summaryrefslogtreecommitdiff
path: root/pkg
Commit message (Collapse)AuthorAge
* Merge pull request #14037 from rhatdan/remoteuriOpenShift Merge Robot2022-05-04
|\ | | | | Report correct RemoteURI
| * Report correct RemoteURIDaniel J Walsh2022-05-04
| | | | | | | | | | | | | | | | | | | | | | | | Rather than assuming a filesystem path, the API service URI is recorded in the libpod runtime configuration and then reported as requested. Note: All schemes other than "unix" are hard-coded to report URI exists. Fixes #12023 Signed-off-by: Jhon Honce <jhonce@redhat.com> Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* | Merge pull request #14095 from baude/moreunittestsOpenShift Merge Robot2022-05-04
|\ \ | | | | | | Add more unit tests
| * | Add more unit testsBrent Baude2022-05-04
| | | | | | | | | | | | | | | | | | Improve "code coverage" with more unit-tests. Signed-off-by: Brent Baude <bbaude@redhat.com>
* | | Merge pull request #14066 from ashley-cui/sysresOpenShift Merge Robot2022-05-04
|\ \ \ | |_|/ |/| | podman system reset removed machines incorrectly
| * | podman system reset removed machines incorrectlyAshley Cui2022-05-04
| | | | | | | | | | | | | | | | | | | | | podman system reset did not clean up machines fully, leaving some config files, and breaking machines. Now it removes all machines files fully. Signed-off-by: Ashley Cui <acui@redhat.com>
* | | Merge pull request #14060 from nicrowe00/13781OpenShift Merge Robot2022-05-04
|\ \ \ | |_|/ |/| | play kube default log driver
| * | play kube default log driverNiall Crowe2022-05-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | The default log driver is not used when using play kube without --log-driver. The LogDriver function needs to be called in order to use the default log driver. fixes #13781 Signed-off-by: Niall Crowe <nicrowe@redhat.com>
* | | Implement --format for machine inspectJhon Honce2022-05-03
|/ / | | | | | | | | | | * Fix issue of nil pointer derefence Signed-off-by: Jhon Honce <jhonce@redhat.com>
* / generate systemd: pods: set exit policyValentin Rothberg2022-05-03
|/ | | | | | | | | | Unless specified in the create command of the pod, enforce the exit policy to "stop". With "stop", a pod is stopped when the last container exits and does not continue running. This behavior integrates much better into systemd which is now able to tell whether the service running as pod is actually running/active or not. Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
* Merge pull request #13859 from vrothberg/fix-13464OpenShift Merge Robot2022-05-02
|\ | | | | pod: add exit policies
| * pod: add exit policiesValentin Rothberg2022-05-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add the notion of an "exit policy" to a pod. This policy controls the behaviour when the last container of pod exits. Initially, there are two policies: - "continue" : the pod continues running. This is the default policy when creating a pod. - "stop" : stop the pod when the last container exits. This is the default behaviour for `play kube`. In order to implement the deferred stop of a pod, add a worker queue to the libpod runtime. The queue will pick up work items and in this case helps resolve dead locks that would otherwise occur if we attempted to stop a pod during container cleanup. Note that the default restart policy of `play kube` is "Always". Hence, in order to really solve #13464, the YAML files must set a custom restart policy; the tests use "OnFailure". Fixes: #13464 Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
* | Implement machine inspect for WSLJason T. Greene2022-05-01
|/ | | | Signed-off-by: Jason T. Greene <jason.greene@redhat.com>
* pkg/api: do not register decoder in endpoint handlerPaul Holzinger2022-04-29
| | | | | | | | | | | | Since the decoder is shared registering the decoder inside a single endpoint will also register it for all others. Also the problem with that is the it will register it everytime this endpoint is called which is wrong. Instead we should register it once like the other custom decoder functions. Signed-off-by: Paul Holzinger <pholzing@redhat.com>
* enable errcheck linterPaul Holzinger2022-04-29
| | | | | | | | The errcheck linter makes sure that errors are always check and not ignored by accident. It spotted a lot of unchecked errors, mostly in the tests but also some real problem in the code. Signed-off-by: Paul Holzinger <pholzing@redhat.com>
* Merge pull request #14033 from baude/inspectredoOpenShift Merge Robot2022-04-28
|\ | | | | Refactor machine inspect
| * Refactor machine inspectBrent Baude2022-04-28
| | | | | | | | | | | | | | | | | | | | I was asked to refactor machine inspect output to represent more common and basic information. machine inspect now has information that would be appropriate for different machines. [NO NEW TESTS NEEDED] Signed-off-by: Brent Baude <bbaude@redhat.com>
* | Merge pull request #14024 from cdoern/machineOpenShift Merge Robot2022-04-28
|\ \ | |/ |/| podman machine starting test
| * podman machine starting testcdoern2022-04-27
| | | | | | | | | | | | | | | | | | | | | | | | add a test to make sure machines are not running while still starting in order to do this, I added a parameter to `run()` to delineate whether or not the command should block or not. The non blocking run allows for tests to get and use the `machineSession` pointer and check the exit code to see if it has finished. also fix a bug (created by #13996) that before started, the machines would always say "LastUp" and "Created" Less than one second ago Signed-off-by: cdoern <cbdoer23@g.holycross.edu>
* | Merge pull request #14051 from giuseppe/volume-create-noquota-optionOpenShift Merge Robot2022-04-28
|\ \ | | | | | | volume: add new option -o o=noquota
| * | volume: add new option -o o=noquotaGiuseppe Scrivano2022-04-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | add a new option to completely disable xfs quota usage for a volume. xfs quota set on a volume, even just for tracking disk usage, can cause weird errors if the volume is later re-used by a container with a different quota projid. More specifically, link(2) and rename(2) might fail with EXDEV if the source file has a projid that is different from the parent directory. To prevent such kind of issues, the volume should be created beforehand with `podman volume create -o o=noquota $ID` Closes: https://github.com/containers/podman/issues/14049 Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
* | | Produce better test error messagesBrent Baude2022-04-27
| | | | | | | | | | | | | | | | | | | | | As Ed has pointed out, the form of Expect(session).To(Exit(0)) provides much better error messages. Let's make Ed happy. Signed-off-by: Brent Baude <bbaude@redhat.com>
* | | Merge pull request #13953 from ashley-cui/machOpenShift Merge Robot2022-04-27
|\ \ \ | |/ / |/| | Allow changing of CPUs, Memory, and Disk Size
| * | Allow changing of CPUs, Memory, and Disk SizeAshley Cui2022-04-27
| |/ | | | | | | | | | | | | | | | | Allow podman machine set to change CPUs, Memory and Disk size of a QEMU machine after its been created. Disk size can only be increased. If one setting fails to be changed, the other settings will still be applied. Signed-off-by: Ashley Cui <acui@redhat.com>
* | Merge pull request #13698 from Luap99/versionOpenShift Merge Robot2022-04-27
|\ \ | | | | | | Bump version to v4.1.0-dev
| * | manifest endpoints fix orderingPaul Holzinger2022-04-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | OK this is a pretty bad design IMO. We have to endpoints: manifest create: `POST /{name}` manifest push: `POST /{name}/registry/{destination}` So basically all push requests are valid create requests. Fortunately we can change the order in which the endpoints are matched. If the logic matches push first it will fall back to create if the request does not have the `/registry/{}` part. Signed-off-by: Paul Holzinger <pholzing@redhat.com>
| * | pkg/bindings: manifest remove 3.X API support conditionalPaul Holzinger2022-04-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | Since the minimum API version is set to 4.0.0 the endpoint will not talk to the 3.X endpoint. Therefore this logic is broken and should just be removed. 4.0 bindings should only talk to 4.0 server. This is already the case for many other endpoints. Signed-off-by: Paul Holzinger <pholzing@redhat.com>
| * | fix manifest modify endpoint to respect tlsverify paramPaul Holzinger2022-04-27
| | | | | | | | | | | | Signed-off-by: Paul Holzinger <pholzing@redhat.com>
| * | Bump version to v4.1.0-devPaul Holzinger2022-04-27
| | | | | | | | | | | | | | | | | | | | | | | | I think we forgot to bump the version in the main branch. It should be v4.1.0-dev now. Also set the min api version to 4.0.0 as on the podman 4.0 branch. Signed-off-by: Paul Holzinger <pholzing@redhat.com>
* | | Merge pull request #14023 from rhatdan/kubeOpenShift Merge Robot2022-04-27
|\ \ \ | | | | | | | | Truncate annotations when generating kubernetes yaml files
| * | | Truncate annotations when generating kubernetes yaml filesDaniel J Walsh2022-04-27
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Kubernetes only allows 63 characters in an annotation. Make sure that we only add 63 or less charaters when generating kube. Warn if containers or pods have longer length and truncate. Discussion: https://github.com/containers/podman/discussions/13901 Fixes: https://github.com/containers/podman/issues/13962 Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* | | play kube respect hostNetworkPaul Holzinger2022-04-27
| |/ |/| | | | | | | | | | | | | | | | | | | We need to use the host network when it is set in the config and --network was not used. This regression was added in 3e9af2029f1f. Fixes #14015 Signed-off-by: Paul Holzinger <pholzing@redhat.com>
* | Merge pull request #13997 from Luap99/gocriticOpenShift Merge Robot2022-04-27
|\ \ | |/ |/| enable gocritic linter
| * play kube: do not skip containers by namePaul Holzinger2022-04-26
| | | | | | | | | | | | | | | | We should not exclude contianers by name. If a users has a container with the name "inf" it is currently skipped. This is wrong. The k8s yaml does not contain infra containers so we do not have to skip them. Signed-off-by: Paul Holzinger <pholzing@redhat.com>
| * enable gocritic linterPaul Holzinger2022-04-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The linter ensures a common code style. - use switch/case instead of else if - use if instead of switch/case for single case statement - add space between comment and text - detect the use of defer with os.Exit() - use short form var += "..." instead of var = var + "..." - detect problems with append() ``` newSlice := append(orgSlice, val) ``` This could lead to nasty bugs because the orgSlice will be changed in place if it has enough capacity too hold the new elements. Thus we newSlice might not be a copy. Of course most of the changes are just cosmetic and do not cause any logic errors but I think it is a good idea to enforce a common style. This should help maintainability. Signed-off-by: Paul Holzinger <pholzing@redhat.com>
* | Merge pull request #14010 from vrothberg/remote-rootlessOpenShift Merge Robot2022-04-26
|\ \ | |/ |/| remote: do not join user NS
| * remote: do not join user NSValentin Rothberg2022-04-26
| | | | | | | | | | | | | | | | | | As noticed while debugging #13992, do not join the rootless user NS as a Linux remote client. [NO NEW TESTS NEEDED] as existing tests should continue to work. Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
* | Merge pull request #13996 from cdoern/machineOpenShift Merge Robot2022-04-26
|\ \ | |/ |/| machine starting status
| * machine starting statuscdoern2022-04-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | podman machine was using the file modification time to get the running status add three new config entries Starting (bool) Created (time) LastUp (time) to actually keep track of when these events happened. This means we can use the config file to actually store this data and not mess up the created/last-up time. This fixes the issues where the machine would report running 15 seconds before it was up. Also fixes the issue of modifying the file manually and saying the machine is "up" [NO NEW TESTS NEEDED] resolves #13711 Signed-off-by: cdoern <cbdoer23@g.holycross.edu>
* | Merge pull request #13908 from n1hility/win-mountsOpenShift Merge Robot2022-04-26
|\ \ | | | | | | Implement Windows volume/mount support
| * | Implements Windows volume/mount supportJason T. Greene2022-04-25
| | | | | | | | | | | | | | | | | | | | | Based on WSL2 9p support: remaps windows paths to /mnt/<drive> locations for both podman and Docker API clients. Signed-off-by: Jason T. Greene <jason.greene@redhat.com>
* | | Merge pull request #14006 from baude/pkgsignalspecgenutilunittestsOpenShift Merge Robot2022-04-26
|\ \ \ | | | | | | | | Unit tests for pkg/specgenutil pkg/signal
| * | | Unit tests for pkg/specgenutil pkg/signalBrent Baude2022-04-25
| |/ / | | | | | | | | | | | | | | | Add some lightweight unit tests to the arsenal. Signed-off-by: Brent Baude <bbaude@redhat.com>
* | | Merge pull request #13942 from baude/machinetestsOpenShift Merge Robot2022-04-25
|\ \ \ | | | | | | | | Add podman machine test suite
| * | | Add podman machine test suiteBrent Baude2022-04-25
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This PR introduces a test suite for podman machine. It can currently be run on developers' local machines and is not part of the official CI testing; however, the expectation is that any work on machine should come with an accompanying test. At present, the test must be run on Linux. It is untested on Darwin. There is no Makefile target for the test. It can be run like `ginkgo -v pkg/machine/test/.`. It should be run as a unprivileged user. Signed-off-by: Brent Baude <bbaude@redhat.com>
* | | Merge pull request #13990 from rhatdan/buildOpenShift Merge Robot2022-04-25
|\ \ \ | |/ / |/| | Pass --tls-verify option in podman -remote build
| * | Pass --tls-verify option in podman -remote buildDaniel J Walsh2022-04-25
| | | | | | | | | | | | | | | | | | | | | | | | Fixes: https://github.com/containers/podman/issues/13979 [NO NEW TESTS NEEDED] Buildah has a test for this. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* | | Merge pull request #13978 from Luap99/unparamOpenShift Merge Robot2022-04-25
|\ \ \ | | | | | | | | enable unparam linter
| * | | enable unparam linterPaul Holzinger2022-04-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The unparam linter is useful to detect unused function parameters and return values. Signed-off-by: Paul Holzinger <pholzing@redhat.com>
* | | | Merge pull request #13995 from ashley-cui/revrootfulOpenShift Merge Robot2022-04-25
|\ \ \ \ | | | | | | | | | | Rootfull -> Rootful