podman/pkg/domain/entities
Paul Holzinger 4b3890ccac
remote: fix incorrect CONTAINER_CONNECTION parsing
When a user specifies a invalid connection in CONTAINER_CONNECTION then
podman should return a proper error saying so. Currently it ignored the
error and in rootFlags() just exited early with defining any flags. This
caused a panic then when trying to use the flags later.

In order to address this first store the connection error in the
PodmanConfig struct and not abort right away during flag setup. This is
important as the user might have specified a flag with a valid remote
connection. As such we check all flags and only when none were given we
return the connection error.

Also while at it I noticed that the default connection reported via
podman --help was wrong as it only used the old containers.conf field
for it and did not consider the podman-connections.json default.

New regression tests have been added to make sure it behaves correctly.

This fixes the problem reported in the PR #22997.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-06-21 14:01:22 +02:00
..
reports Removing the RawInput from the API output 2022-11-17 15:41:01 +09:00
types Add `podman system check` for checking storage consistency 2024-06-04 10:00:37 -04:00
apply.go Add podman kube apply command 2022-11-01 15:30:17 -04:00
auto-update.go auto update: fix usage of --authfile 2023-07-05 08:30:39 +02:00
container_ps.go Bump Go module to v5 2024-02-08 09:35:39 -05:00
containers.go Bump Go module to v5 2024-02-08 09:35:39 -05:00
engine.go remote: fix incorrect CONTAINER_CONNECTION parsing 2024-06-21 14:01:22 +02:00
engine_container.go Add `podman system check` for checking storage consistency 2024-06-04 10:00:37 -04:00
engine_image.go podman manifest add: support creating artifact manifest on the fly 2024-02-29 11:47:44 -05:00
events.go properly implement pull-error event status 2024-03-05 10:50:42 +01:00
filters.go Swagger refactor/cleanup 2022-05-19 15:24:18 -07:00
generate.go Bump Go module to v5 2024-02-08 09:35:39 -05:00
healthcheck.go podmanv2 enable healthcheck run 2020-03-29 18:48:29 -05:00
images.go swagger fix infinitive recursion on some types 2024-04-12 15:26:34 +02:00
machine.go Bump Go module to v5 2024-02-08 09:35:39 -05:00
manifest.go swagger fix infinitive recursion on some types 2024-04-12 15:26:34 +02:00
network.go swagger fix infinitive recursion on some types 2024-04-12 15:26:34 +02:00
play.go Bump Go module to v5 2024-02-08 09:35:39 -05:00
pods.go add --retry --retry-delay to podman run/create 2024-02-29 10:20:21 -05:00
secrets.go Bump Go module to v5 2024-02-08 09:35:39 -05:00
set.go Fix Id->ID where possible for lint 2020-06-10 05:49:41 -04:00
system.go Add `podman system check` for checking storage consistency 2024-06-04 10:00:37 -04:00
types.go Bump Go module to v5 2024-02-08 09:35:39 -05:00
volumes.go swagger fix infinitive recursion on some types 2024-04-12 15:26:34 +02:00