aboutsummaryrefslogtreecommitdiff
path: root/pkg
Commit message (Collapse)AuthorAge
...
| * | Use Header.Values in GetCredentials.hasMiloslav Trmač2021-12-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | It's possibly a bit more expensive, but semantically safer because it does header normalization. And we'll regain the cost by not looking up the value repeatedly. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
| * | Beautify GetCredentials.has a bitMiloslav Trmač2021-12-10
| | | | | | | | | | | | | | | | | | | | | | | | Use separate lines, and use the provided .String() API. Should not change behaivor. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
| * | Pass a header value directly to parseSingleAuthHeader and parseMultiAuthHeaderMiloslav Trmač2021-12-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | Both have a single caller, so there's no point in looking up the header value twice. Should not change behavior. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
| * | Simplify parseSingleAuthHeaderMiloslav Trmač2021-12-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | In the "no input" case, return a constant instead of continuing with the decode/convert path, converting empty data. Should not change behavior. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
| * | Simplify the interface of parseSingleAuthHeaderMiloslav Trmač2021-12-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Don't create a single-element map only for the only caller to laboriously extract an element of that map; just return a single entry. Should not change behavior. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
| * | Don't return a header name from auth.GetCredentialsMiloslav Trmač2021-12-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Almost every caller is using it only to wrap an error in exactly the same way, so move that error context into GetCredentials and simplify the users. (The one other caller, build, was even wrapping the error incorrectly talking about query parameters; so let it use the same text as the others.) Signed-off-by: Miloslav Trmač <mitr@redhat.com>
| * | Fix normalizeAuthFileKey to use the correct semanticsMiloslav Trmač2021-12-10
| | | | | | | | | | | | Signed-off-by: Miloslav Trmač <mitr@redhat.com>
| * | Rename normalize and a few variablesMiloslav Trmač2021-12-10
| | | | | | | | | | | | | | | | | | | | | | | | ... to refer to auth file keys instead of servers and the like. Should not change behavior. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
| * | Add TestHeaderGetCredentialsRoundtripMiloslav Trmač2021-12-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ... as an end-to-end unit test of the header creation/parsing code. Leave the docker.io and docker.io/vendor test cases commented out, because they are currently failing. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
| * | Add tests for auth.HeaderMiloslav Trmač2021-12-10
| | | | | | | | | | | | | | | | | | | | | Just a single function that handles all of Header, headerConfig and headerAuth; we will split that later. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
| * | Improve TestAuthConfigsToAuthFileMiloslav Trmač2021-12-10
| | | | | | | | | | | | | | | | | | | | | | | | Remove the created temporary file. Use more appropriate assertion calls. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
| * | Add unit tests for singleAuthHeaderMiloslav Trmač2021-12-10
| | | | | | | | | | | | | | | | | | | | | | | | Also rename it to parseSingleAuthHeader Should not change behavior. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
| * | Add unit tests for multiAuthHeaderMiloslav Trmač2021-12-10
| | | | | | | | | | | | | | | | | | | | | | | | Also rename it to parseMultiAuthHeader. Should not change behavior. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
* | | correct typo words in docsDavid Marshall2022-01-05
| | | | | | | | | | | | | | | | | | "for creating a container" appears for networks and volumes Signed-off-by: David Marshall <dmarshall@gmail.com>
* | | Merge pull request #12208 from cdoern/podSecurityOptOpenShift Merge Robot2022-01-05
|\ \ \ | | | | | | | | Pod Security Option support and Infra Inheritance changes
| * | | Pod Security Option supportcdoern2021-12-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added support for pod security options. These are applied to infra and passed down to the containers as added (unless overridden). Modified the inheritance process from infra, creating a new function Inherit() which reads the config, and marshals the compatible options into an intermediate struct `InfraInherit` This is then unmarshaled into a container config and all of this is added to the CtrCreateOptions. Removes the need (mostly) for special additons which complicate the Container_create code and pod creation. resolves #12173 Signed-off-by: cdoern <cdoern@redhat.com>
* | | | Merge pull request #12429 from cdoern/scpOpenShift Merge Robot2022-01-05
|\ \ \ \ | | | | | | | | | | podman image scp never enter podman user NS
| * | | | podman image scp never enter podman user NScdoern2021-12-23
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Podman image scp should never enter the Podman UserNS unless it needs to. This allows for a sudo exec.Command to transfer images to and from rootful storage. If this command is run using sudo, the simple sudo podman save/load does not work, machinectl/su is necessary here. This modification allows for both rootful and rootless transfers, and an overall change of scp to be more of a wrapper function for different load and save calls as well as the ssh component Signed-off-by: cdoern <cdoern@redhat.com>
* | | | Merge pull request #12735 from rhatdan/mountOpenShift Merge Robot2022-01-04
|\ \ \ \ | | | | | | | | | | Fix Container List API call to return mount info
| * | | | Fix Container List API call to return mount infoDaniel J Walsh2022-01-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We are hard coding mounts to return nil in compat API, since we have the data, we should return it. Fixes: https://github.com/containers/podman/issues/12734 Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* | | | | Merge pull request #12643 from leahneukirchen/events-compatOpenShift Merge Robot2022-01-04
|\ \ \ \ \ | | | | | | | | | | | | legacy events: also set Action="die"
| * | | | | legacy events: also set exitCodeLeah Neukirchen2022-01-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For Status = "die", Docker sets the exit code of the container to a field "exitCode". Podman uses "containerExitCode". Copy the value into "exitCode" as well, for compatibility. Signed-off-by: Leah Neukirchen <leah@vuxu.org>
| * | | | | legacy events: also set Action="die"Leah Neukirchen2021-12-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since #10168, on the event "died", the Status is set to "die" for compatibility with the Docker API. Docker also sets the field Action to "died", so do the same here. Signed-off-by: Leah Neukirchen <leah@vuxu.org>
* | | | | | Merge pull request #12709 from flouthoc/ign_add_certsOpenShift Merge Robot2022-01-04
|\ \ \ \ \ \ | |_|/ / / / |/| | | | | ignition: add `certs` from current user into the machine while `init`
| * | | | | ignition: add certs from current user into the machine while initAditya Rajan2021-12-27
| | |_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Following PR ensures that certs from `~/.config/containers/certs.d` or `~/.config/docker/certs.d` are copied into the remote machine at `/etc/containers/certs.d/` As a result on platforms like `macOS` where podman works with a remote machine setup. User's local certs must be transferd to VM without any plumbing needed by user. [NO-NEW-TESTS-NEEDED] Signed-off-by: Aditya Rajan <arajan@redhat.com>
* | | | | Merge pull request #12732 from strideynet/fix-default-cpu-period-commentOpenShift Merge Robot2022-01-03
|\ \ \ \ \ | | | | | | | | | | | | fix misleading comment regarding default value of cpu period
| * | | | | fix misleading comment regarding default value of cpu period [NO NEW TESTS ↵Noah Stride2022-01-03
| | |_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | NEEDED] Signed-off-by: Noah Stride <noah@noahstride.co.uk>
* / | | | Update swagger documentationDaniel J Walsh2021-12-31
|/ / / / | | | | | | | | | | | | | | | | | | | | [NO NEW TESTS NEEDED] Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* | | | Merge pull request #12705 from olitha/compat-api-containers-sha256OpenShift Merge Robot2021-12-29
|\ \ \ \ | |/ / / |/| | | Compat api containers ImageId missing sha256
| * | | prefix imageId with sha256: in containers listOliver2021-12-29
| | | | | | | | | | | | | | | | | | | | | | | | test for compat API ImageId Signed-off-by: Oliver Thallmair <oliver.thallmair@mailbox.org>
* | | | Introduce Windows WSL implementation of podman machineJason T. Greene2021-12-24
|/ / / | | | | | | | | | | | | | | | [NO NEW TESTS NEEDED] for now Signed-off-by: Jason Greene <jason.greene@redhat.com>
* | | Merge pull request #12627 from rhatdan/passwdOpenShift Merge Robot2021-12-23
|\ \ \ | | | | | | | | Allow users to add host user accounts to /etc/passwd
| * | | Allow users to add host user accounts to /etc/passwdDaniel J Walsh2021-12-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some containers require certain user account(s) to exist within the container when they are run. This option will allow callers to add a bunch of passwd entries from the host to the container even if the entries are not in the local /etc/passwd file on the host. Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1935831 Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* | | | container creation: don't apply reserved annotations from imageValentin Rothberg2021-12-23
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | Do not apply reserved annotations from the image to the container. Reserved annotations are applied during container creation to retrieve certain information (e.g., custom seccomp profile or autoremoval) once a container has been created. Context: #12671 Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
* | | Merge pull request #12672 from adrianreber/2021-12-21-check-for-memtrackOpenShift Merge Robot2021-12-23
|\ \ \ | | | | | | | | Error out early if system does not support pre-copy checkpointing
| * | | Error out early if system does not support pre-copy checkpointingAdrian Reber2021-12-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CRIU's pre-copy migration support relies on the soft dirty page tracking in the Linux kernel: https://www.kernel.org/doc/Documentation/vm/soft-dirty.txt This functionality is not implemented for all architectures and it can also be turned off in the kernel. CRIU can check if the combination of architecture/kernel/CRIU supports the soft dirty page tracking and exports this feature checking functionality in go-criu. This commit adds an early check if the user selects pre-copy checkpointing to error out if the system does not support it. Signed-off-by: Adrian Reber <areber@redhat.com>
* | | | Warn on use of --kernel-memoryDaniel J Walsh2021-12-22
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | It has been deprecated and is no longer supported. Fully remove it and only print a warning if a user uses it. Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2011695 Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* | | Merge pull request #12664 from cdoern/noManagePasswdOpenShift Merge Robot2021-12-22
|\ \ \ | | | | | | | | Podman run --passwd
| * | | Podman run --passwdcdoern2021-12-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | added support for a new flag --passwd which, when false prohibits podman from creating entries in /etc/passwd and /etc/groups allowing users to modify those files in the container entrypoint resolves #11805 Signed-off-by: cdoern <cdoern@redhat.com>
* | | | Merge pull request #12663 from vrothberg/compat-normalizationOpenShift Merge Robot2021-12-21
|\ \ \ \ | | | | | | | | | | compat: image normalization: handle sha256 prefix
| * | | | compat: image normalization: handle sha256 prefixValentin Rothberg2021-12-20
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When normalizing image names on the compat API, make sure to take the `sha256:` prefix into account when matching against the image ID. Otherwise, the name will mistakingly be subject to docker.io normalization. Signed-off-by: Valentin Rothberg <rothberg@redhat.com> Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* / / / specgen: honor userns=auto from containers.confGiuseppe Scrivano2021-12-20
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | when using the default userns value, make sure its value is parsed so that userns=auto is parsed and the options for the storage are filled. Closes: https://github.com/containers/podman/issues/12615 Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
* | | Merge pull request #12641 from giuseppe/add-more-logging-setusernsDaniel J Walsh2021-12-19
|\ \ \ | |/ / |/| | rootless: include the args in the debug message
| * | rootless: include the args in the debug messageGiuseppe Scrivano2021-12-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | include the arguments used to create the user namespace to help debugging. [NO NEW TESTS NEEDED] it changes a debug message Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
* | | Set machine timezoneBrent Baude2021-12-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added an option to podman machine init to declare the timezone of the resulting machine. the default is to use the value of the host name or else a given timezone name like America/Chicago. Fixes: #11895 Signed-off-by: Brent Baude <bbaude@redhat.com> [NO NEW TESTS NEEDED] Signed-off-by: Brent Baude <bbaude@redhat.com>
* | | Merge pull request #12606 from vrothberg/fix-12441OpenShift Merge Robot2021-12-16
|\ \ \ | | | | | | | | bindings rmi test: clarify behavior
| * | | bindings rmi test: clarify behaviorValentin Rothberg2021-12-16
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The libpod/images/remove endpoint is not very REST-ish but, after some debate, was decided to be implemented as for the following reasons. First, it allows for batch removing images which improves performance significantly. Note that Docker does support `rmi -a`! Second, it allows for hiding the logic of setting the right exit code to use from the client and keep all the logic on the server. Hence, when removing an image that does not exist, the server will return a 200. The response, however, includes the error message to be used *and* the exit code that podman-remote will use. Fixes: #12441 Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
* / / oci: configure the devices cgroup with default devicesGiuseppe Scrivano2021-12-16
|/ / | | | | | | | | | | | | always set the default devices to the devices cgroup when not running in a user namespace. Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
* | Merge pull request #12600 from rhatdan/externalOpenShift Merge Robot2021-12-15
|\ \ | | | | | | Show --external containers even without --all option
| * | Show --external containers even without --all optionDaniel J Walsh2021-12-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We currently do not show --external containers when the user specifies it, unless they also specify the --all flag. This has led to confusion. I see no reason not to list them without the --all flag if the user specifies the option. Fixes: https://github.com/containers/podman/issues/12353 Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>