13902 Commits

Author SHA1 Message Date
67dab9e360 Merge pull request #12726 from hikhvar/remove-superflous-pod-rename
Don't rename pod if container has the same name
2022-01-07 13:11:50 +01:00
8a22384406 Merge pull request #12758 from rhatdan/runtime
add OCI Runtime name to errors
2022-01-06 23:42:09 +01:00
3ac1219cbc Merge pull request #12614 from baude/bz2028408
fix healthcheck timeouts and ut8 coercion
2022-01-06 23:36:09 +01:00
1941d45e32 add OCI Runtime name to errors
It would be easier to diagnose OCI runtime errors if the error actually
had the name of the OCI runtime that produced the error.

[NO NEW TESTS NEEDED]

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2022-01-06 16:21:02 -05:00
d627528192 Merge pull request #11454 from afbjorklund/virtfs-volumes
Implement virtfs volumes for podman machine
2022-01-06 21:04:12 +01:00
2a524fcaec fix healthcheck timeouts and ut8 coercion
this commit fixes two bugs and adds regression tests.

when getting healthcheck values from an image, if the image does not
have a timeout defined, this resulted in a 0 value for timeout.  The
default as described in the man pages is 30s.

when inspecting a container with a healthcheck command, a customer
observed that the &, <, and > characters were being converted into a
unicode escape value.  It turns out json marshalling will by default
coerce string values to ut8.

Fixes: bz2028408

Signed-off-by: Brent Baude <bbaude@redhat.com>
2022-01-06 13:56:54 -06:00
2fd6c2ee89 Merge pull request #11538 from mtrmac/http-credentials
Fix HTTP credentials passing
2022-01-06 16:50:12 +01:00
4191616cc5 Don't rename pod if container has the same name
We enforce the naming scheme "<podname>-<containername>" here [1].
Therefore we must not rename the pod in case of a naming conflict
between pod name and container name. Not renaming the pod increases the
usability for the user and easies scripting based on the name. Otherwise
a user must set some label to reliable find a pod after creation. Or
have to implement the renaming logic in the script.

[1] https://github.com/containers/podman/blob/main/pkg/specgen/generate/kube/kube.go#L140

Fixes #12722

Signed-off-by: Christoph Petrausch <chrobbert@gmail.com>
2022-01-06 16:48:20 +01:00
c0b3df8059 Merge pull request #12759 from rhatdan/ci
Fix CI
2022-01-06 16:41:11 +01:00
7a24be6ad9 Fix CI
crun should be available in f35.

[ NO NEW TESTS NEEDED]

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2022-01-06 09:21:28 -05:00
755b7aa521 Merge pull request #12687 from rhatdan/volume
Support volume bind mounts for rootless containers
2022-01-06 15:16:13 +01:00
8d5d0e7c6d Merge pull request #12754 from dwmarshall/fix-typos
[CI:DOCS] correct typo words in docs
2022-01-06 12:20:37 +01:00
6809237436 correct typo words in docs
"for creating a container" appears for networks and volumes

Signed-off-by: David Marshall <dmarshall@gmail.com>
2022-01-05 15:23:07 -08:00
d67f178563 Merge pull request #12750 from rhatdan/error
Change Tests to ignore missing containers when removing --all
2022-01-05 18:10:37 +01:00
50e156b605 Merge pull request #12208 from cdoern/podSecurityOpt
Pod Security Option support and Infra Inheritance changes
2022-01-05 17:56:36 +01:00
2157414cf8 Merge pull request #12168 from mtrmac/socket-collision
Avoid RemoteSocket collisions in e2e tests
2022-01-05 17:52:39 +01:00
cbb2b68fc9 Merge pull request #12429 from cdoern/scp
podman image scp never enter podman user NS
2022-01-05 17:50:37 +01:00
64df41755a Change Tests to ignore missing containers when removing --all
Fixes: https://github.com/containers/podman/issues/12740

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2022-01-05 10:46:53 -05:00
6902d9d909 Merge pull request #12744 from kolyshkin/fix-flake
Fix test flake in test/e2e/pod_initcontainers
2022-01-05 13:50:37 +01:00
79c5b73ed7 test/e2e/pod_initcontainers: fix a flake
Commit 3c3fa6fac4d0f8e8 added a few test cases for the init containers.
The "podman ensure always init containers always run" implicitly assumes
that restarting a pod will take more than 1 second. When this assumption
is not met (because computers are fast!), we get a flake.

The fix (without using sleep) is to print nanoseconds in date output.
This format option (%N) is not supported by date in Alpine Linux, so
switch to Fedora.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2022-01-04 17:45:34 -08:00
cf7fc36953 test/e2e/run: don't use date +%N on Alpine
Commit e1443fe05d146def6 added a test case that ran "date +%N" inside
a Fedora container (without actually using its output).

Commit ccc5bc167fa2c140 changed that test case to use Alpine. Problem
is, %N is not supported by date in Alpine (it only prints a newline).

To eliminate the ambiguity, replace date with touch.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2022-01-04 17:33:44 -08:00
ec9d67b7e4 Merge pull request #12735 from rhatdan/mount
Fix Container List API call to return mount info
2022-01-04 19:52:05 +01:00
9a35494141 Merge pull request #12643 from leahneukirchen/events-compat
legacy events: also set Action="die"
2022-01-04 19:50:09 +01:00
2e0d3e9ea4 Support all volume mounts for rootless containers
Fix handling of "bind" and "tmpfs" olumes to actually work.
Allow bind, tmpfs local volumes to work in rootless mode.

Also removed the string "error" from all error messages that begine with it.
All Podman commands are printed with Error:, so this causes an ugly
stutter.

Fixes: https://github.com/containers/podman/issues/12013

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2022-01-04 13:48:03 -05:00
47cf00eb13 Merge pull request #12709 from flouthoc/ign_add_certs
ignition: add `certs` from current user into the machine while `init`
2022-01-04 19:12:05 +01:00
e6cbfae912 Merge pull request #12738 from pdostal/podman_search
[CI:DOCS] Fix wrong 'podman search --format' placeholder
2022-01-04 17:36:07 +01:00
32e845028a Fix wrong 'podman search --format' placeholder
Signed-off-by: Pavel Dostál <pdostal@suse.cz>
2022-01-04 17:04:19 +01:00
0c6ae3ab26 Fix Container List API call to return mount info
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>
2022-01-04 10:56:03 -05:00
aaf90c5596 Merge pull request #12611 from Luap99/ipv6
add --ip6 flag to podman create/run
2022-01-03 18:42:12 +01:00
8ad8faa91f Merge pull request #12732 from strideynet/fix-default-cpu-period-comment
fix misleading comment regarding default value of cpu period
2022-01-03 18:40:13 +01:00
e7222e34da Merge pull request #12697 from baude/servicefailedstates
.service file removal on failure
2022-01-03 16:44:15 +01:00
76a944b147 fix misleading comment regarding default value of cpu period [NO NEW TESTS NEEDED]
Signed-off-by: Noah Stride <noah@noahstride.co.uk>
2022-01-03 14:32:02 +00:00
99a5754d6d Merge pull request #12725 from rhatdan/test
test/system: podman run with log-opt option
2022-01-03 15:08:15 +01:00
481839af2f Merge pull request #12724 from rhatdan/swagger
Update swagger documentation
2022-01-03 14:42:14 +01:00
c496001d03 add --ip6 flag to podman create/run
Add the --ipv6 flag to podman create/run and pod create. We support the
--network name:ip6=<ip> syntax now but for docker compat we should also
support the --ip6 flag.
Note that there is no validation if the ip is actually a v6 or v4 address
because the backend does not care either.

Fixes #7511

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-01-03 14:26:34 +01:00
0efced4049 Merge pull request #12708 from flouthoc/swagger-sort-operations
[CI:DOCS]: sort swagger operations alpabetically
2022-01-03 14:22:13 +01:00
116a276e8c legacy events: also set exitCode
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>
2022-01-03 14:00:13 +01:00
f6a3eddd2c Don't initialize the global RNG with GinkgoRandomSeed() in e2e tests
- It probably doesn't actually make a difference: in experiments,
  the github.com/containers/storage/pkg/stringid RNG initialization
  has been happening later
- This makes the RNG caller-controlled (which we don't benefit from),
  but also the same on all nodes of multi-process Ginkgo execution.
  So, if it works at all, it may make collisions of random ID values
  more likely, and our tests are not robust against that. So don't
  go out of our way to make collisions more likely.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2022-01-03 12:31:47 +01:00
90e74e794c Avoid collisions on RemoteSocket paths
Add lock files and re-generate the UUID if we
are not a known-unique user of the socket path.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2022-01-03 12:31:47 +01:00
ee146a9ab0 Refactor remote socket path determination in tests
Separate the code that determines the directory and file prefix
from the code that chooses and applies a UUID; we will make the
second part more complex in a bit.

Should not change behavior.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2022-01-03 12:31:47 +01:00
172d4eb400 Merge pull request #12731 from Junnplus/typo-ipv4
[CI:DOCS] fix doc typo
2022-01-03 10:26:14 +01:00
a8e223faf4 fix doc
Signed-off-by: ye.sijun <junnplus@gmail.com>
2022-01-03 16:11:11 +08:00
5d2c03e8b0 Merge pull request #12718 from afbjorklund/machine-resources
[CI:DOCS] Add example of cpus to init command
2021-12-31 16:30:13 +01:00
2ff5644bf8 test/system: podman run image with filesystem permission
This test case is used for covering rhbz#1854566.

Replaces: #12220
Signed-off-by: Alex Jia <ajia@redhat.com>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-12-31 08:59:09 -05:00
fc65b0f73c test/system: podman run with log-opt option
This test case is used for covering rhbz#1763007.
Replaces: #12221

Signed-off-by: Alex Jia <ajia@redhat.com>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-12-31 08:49:21 -05:00
1e3434d114 Update swagger documentation
[NO NEW TESTS NEEDED]

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-12-31 08:43:56 -05:00
6630e5cf66 Make it possible to select the volume driver
Use the same type of mounts for all the machine volumes.

The default could change in the future, depending on OS.

[NO NEW TESTS NEEDED]

Signed-off-by: Anders F Björklund <anders.f.bjorklund@gmail.com>
2021-12-30 13:47:16 +01:00
a3326e23d8 Check the mount type for future compatibility
There are other mount types available, such as NFS or SMB,
or one could use reverse sshfs for better compatibility.

It could either be a global option, or it could perhaps be
overridden for each volume (like the container volumes).

Refactor the creation of the options string or array.

Allow specifying the volume as read-only, if desired.

[NO NEW TESTS NEEDED]

Signed-off-by: Anders F Björklund <anders.f.bjorklund@gmail.com>
2021-12-30 13:37:34 +01:00
8e7eeaa4dd Implement virtfs volumes for podman machine
Allow using the built-in 9pfs feature of qemu,
mounting host directories into vm mountpoints.

The volumes are generic, the mounts are specific.

Wait for the machine to be "running", otherwise
the SSH function might throw an error instead.

Increase the default msize from 8 KiB to 128 KiB

[NO NEW TESTS NEEDED]

Signed-off-by: Anders F Björklund <anders.f.bjorklund@gmail.com>
2021-12-30 13:36:56 +01:00
ec32430a06 [CI:DOCS] Add example of cpus to init command
Signed-off-by: Anders F Björklund <anders.f.bjorklund@gmail.com>
2021-12-30 13:32:30 +01:00