Currently the difference between isRetryable and shouldRestart
is not clear in the function names, this simply makes them
more understandable.
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Need to be able to getdefault container environment
based on use provided functions on httpProxy and use
the environment from the host.
This way users can modify the environment from podman
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
syscall.ERESTART is not defined on Darwin, so move to
an unsupported package. While this would work on Windows
this code most likey never will, so rather then complicate
code, I just left ERESTART on Windows as not supported.
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
This is the implementation of the backend of secrets. pkg/secrets takes a secret name and data and does these operations on that secret data: store, delete, lookup, and list, using a secretsmanager.
The first driver implemented here is a filedriver - where the data is stored unencrypted on disk in a file.
The secrets package can be easily expanded to use more drivers as the package implements an interface to accept different drivers
Signed-off-by: Ashley Cui <acui@redhat.com>
Also we now log at Warning level, so we should see the warnings on retries.
The current code retries on all failures except ECONNREFUSED. We believe
this was a mistake, and should have been retrying on ECONNREFUSED, since this
could change on a retry. On the other hand there are many other errno that
should not be ignored. This PR attempts to use the ERNNO that we assume might
be retryable and not retry on the others.
Fixes: https://github.com/containers/podman/issues/7963
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
In the containers.conf we default to true, but in code and man page
it is defaulted to false. Since Podman wants it defaulted to true
we need to change default and man page to match.
Also fixed the testing for SELinux, which would never succeed on an SELinux box.
Helps fix: https://github.com/containers/podman/pull/8844
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
DOCKER_CONFIG environment variable is sometimes used to point
to the config.json. The container engines use REGISTRY_AUTH_FILE
for similar functionality. This PR causes programs that use
GetAuthFile to use DOCKER_CONFIG if it set and REGISTRY_AUTH_FILE
is not.
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Currently this code is not building correctly on darwin builds.
This PR handles non linux platforms correctly.
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Systemd is now complaining or mentioning /var/run as a legacy directory.
It has been many years where /var/run is a symlink to /run on all
most distributions, make the change to the default.
Partial fix for https://github.com/containers/podman/issues/8369
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Users could have any one of the OCI runtimes installed,
code will search for default. This way they do not need
to modify defaults if they have "crun" installed.
Search order will be crun, runc, kata
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>