19728 Commits

Author SHA1 Message Date
da8e29b043 Merge pull request #18612 from containers/renovate/major-ci-vm-image
chore(deps): update dependency containers/automation_images to v20230726
2023-08-03 09:30:42 +02:00
cd5ce63724 Merge pull request #19406 from rhatdan/volumes
Fix up man page and add test on globs
2023-08-02 13:44:34 +02:00
e581360272 Merge pull request #19469 from vrothberg/fix-16054
machine: QEMU: recover from failed start
2023-08-02 13:36:52 +02:00
2252ed1241 Merge pull request #19436 from rhatdan/remote
Cleanup CIDFile on podman-remote run --rm command
2023-08-02 12:00:27 +02:00
8b7701f522 machine: QEMU: recover from failed start
After a failed start, we can run into (somehow inconsistent) states
where the machine won't start because a previous QEMU process is still
running and the PID file is being used.  Stop didn't resolve the issue
as this state wasn't detected.

Allow to recover from this state by a) detecting it during start and
error out with a more helpful message than the error QEMU would
otherwise spit out, and b) by enabling stop to kill the dangling QEMU
process - even after a failed stop.

With the changes, a recovery may look as follows:
```
_  podman git:(main) _ ./bin/darwin/podman machine start
Starting machine "podman-machine-default"
Error: cannot start VM "podman-machine-default": another instance of "/opt/homebrew/bin/qemu-system-aarch64" is already running with process ID 970: please stop and restart the VM
_  podman git:(main) _ ./bin/darwin/podman machine stop
Machine "podman-machine-default" stopped successfully
_  podman git:(main) _ ./bin/darwin/podman machine start
Starting machine "podman-machine-default"
Waiting for VM ...
```

Please note that this change does not prevent us from running into such
inconsistent states but only allows for recovering from them.

[NO NEW TESTS NEEDED] - there is no reliable reproducer.

Fixes: #16054
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-08-02 11:08:26 +02:00
1656b93b86 Merge pull request #19480 from jakecorrenti/machine-duplicate-code
Consolidate `machine.go` duplicate code across hypervisors
2023-08-02 10:53:20 +02:00
74b7cdff4c Merge pull request #19479 from containers/renovate/golang.org-x-net-0.x
Update module golang.org/x/net to v0.13.0
2023-08-02 10:50:42 +02:00
73df21bd93 Merge pull request #18982 from danishprakash/secret-rm-ignore
secret: add support for `--ignore` with rm
2023-08-02 10:48:06 +02:00
6d6dfbd48b Merge pull request #19472 from flouthoc/bump-common-image
vendor: bump `c/image` -> `8c387a14f4ac` and `c/common` -> `44bfd82e3ed2`
2023-08-02 10:26:03 +02:00
8844b98f7a Merge pull request #19475 from edsantiago/remove_registryfile_workaround
CI: e2e: remove workaround for missing login file
2023-08-02 10:13:16 +02:00
bfd2a8cad3 secret: add support for --ignore with rm
Signed-off-by: danishprakash <danish.prakash@suse.com>
2023-08-02 11:13:08 +05:30
21ebe0e90a Move writeConfig logic to shared function
Moves the shared logic from `writeConfig` into a shared function in
`pkg/machine/machine_common.go`

[NO NEW TESTS NEEDED]

Signed-off-by: Jake Correnti <jakecorrenti+github@proton.me>
2023-08-01 21:40:14 -04:00
597ccff0bc Move some logic of setRootful to a common file
Moves most of the logic of `setRootful` to the common file
`pkg/machine/machine_common.go`.

Signed-off-by: Jake Correnti <jakecorrenti+github@proton.me>
2023-08-01 21:40:06 -04:00
98cf8462ad move removeFilesAndConnections to a common file
Moves `removeFilesAndConnections` to the common file
`pkg/machine/connections.go` to be reused by multiple hypervisors.

Signed-off-by: Jake Correnti <jakecorrenti+github@proton.me>
2023-08-01 21:13:58 -04:00
75a8f13c4a Move waitAPIAndPrintInfo to common file
Moves `waitAPIAndPrintInfo` into the common file
`pkg/machine/machine_common.go` allowing applehv and qemu to share the
code.

Signed-off-by: Jake Correnti <jakecorrenti+github@proton.me>
2023-08-01 21:13:58 -04:00
55c7b5ceca Move addSSHConnectionsToPodmanSocket code to shared file
Moves the implementation of `addSSHConnectionsToPodmanSocket` into the
common file `pkg/machine/machine_common.go`. The implementation was
shared between the hypervisors and does not need to be implemented
multiple times.

Signed-off-by: Jake Correnti <jakecorrenti+github@proton.me>
2023-08-01 21:13:52 -04:00
0489d3aa6b Update module golang.org/x/net to v0.13.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-08-01 22:48:32 +00:00
d74c225f4b chore(deps): update dependency containers/automation_images to v20230726
Also update Fedora and Debian names.  Include ID of broken images in
`validate_task` comment about broken rawhide.  This should get picked
up by renovate next time images are updated - hopefully prompting
someone to re-enable the check.

Signed-off-by: Renovate Bot <bot@renovateapp.com>
Signed-off-by: Chris Evich <cevich@redhat.com>
2023-08-01 15:33:49 -04:00
27d79e1fca Skip pasta local forwarder test on debian SID
Requires currently unavailable 0.0~git20230625.32660ce-1 or later.

Signed-off-by: Chris Evich <cevich@redhat.com>
2023-08-01 15:27:03 -04:00
b69cd8d84c Skip broken/flaky blkio-weight test
Ref: https://github.com/containers/podman/issues/19471

Signed-off-by: Chris Evich <cevich@redhat.com>
2023-08-01 15:26:20 -04:00
822f2f4952 Skip tarball re-inport test in rawhide for CI
Ref: #19407

Signed-off-by: Chris Evich <cevich@redhat.com>
2023-08-01 15:26:20 -04:00
851cd9cca9 Cleanup CIDFile on podman-remote run --rm command
Currently the CIDFile is not removed with podman --remote run --rm
if the client and server are on different machines.

[NO NEW TESTS NEEDED] i
There is currently a test for this that does not fail because the client
and server are on the same machine.

If we run these tests on a MAC or Windows platform, they would start
failing.

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

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-08-01 14:24:55 -04:00
a237c3f461 CI: e2e: remove workaround for missing login file
As of #19391, REGISTRY_AUTH_FILE=/nonexistent no longer
causes 'podman run' to die.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-08-01 12:10:20 -06:00
ee9fb3680d Merge branch 'main' of github.com:containers/podman into volumes 2023-08-01 14:09:29 -04:00
42ad0c6e78 vendor: bump c/image and c/common
bump github.com/containers/common -> v0.55.1-0.20230801150045-44bfd82e3ed2
bump github.com/containers/image/v5 -> v5.26.1-0.20230726142307-8c387a14f4ac

[NO NEW TESTS NEEDED]

Signed-off-by: Aditya R <arajan@redhat.com>
2023-08-01 22:05:54 +05:30
5b7dce8a3d Add support for confined users
The original SELinux support in Docker and Podman does not follow the
default SELinux rules for how label transitions are supposed to be
handled. Containers always switch their user and role to
system_u:system_r, rather then maintain the collers user and role.
For example
unconfined_u:unconfined_r:container_t:s0:c1,c2

Advanced SELinux administrators want to confine users but still allow
them to create containers from their role, but not allow them to launch
a privileged container like spc_t.

This means if a user running as
container_user_u:container_user_r:container_user_t:s0

Ran a container they would get

container_user_u:container_user_r:container_t:s0:c1,c2

If they run a privileged container they would run it with:

container_user_u:container_user_r:container_user_t:s0

If they want to force the label they would get an error

podman run --security-opt label=type:spc_t ...

Should fail. Because the container_user_r can not run with the spc_t.

SELinux rules would also prevent the user from forcing system_u user and
the sytem_r role.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Signed-off-by: Chris Evich <cevich@redhat.com>
2023-08-01 11:25:00 -04:00
78b850c48b Cirrus: Temp. disable rawhide validation task
This is caused by:
https://github.com/containers/automation_images/pull/284/files#diff-66757a985486a838bd165fde75e7f0d50de7281ceab5e044cd7625979956e65cL124-L142

Signed-off-by: Chris Evich <cevich@redhat.com>
2023-08-01 11:25:00 -04:00
def70012b9 Limit git-validation to 'short-subject'
This tool sometimes throws nonsensical or difficult to debug errors.
Verifying DCO and white-space issues in commits has long since been
moved to other tools (github-actions and git pre-commit hooks).  There's
no need to duplicate these checks with the git-validation tool.

Signed-off-by: Chris Evich <cevich@redhat.com>
2023-08-01 11:24:59 -04:00
33b8c451e5 Fix up man page and add test on globs
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-08-01 10:28:00 -04:00
608f484e9b Merge pull request #19417 from lsm5/main-packit
[CI:BUILD] RPM: define gobuild macro for rhel/centos stream
2023-08-01 15:57:40 +02:00
850482b314 Move alternate image acquisition to separate function
Moves acquisition of an alternate image provided by the user out of
`acquireVMImage` in `pkg/machine/<hypervisor>/machine.go` and into
`pkg/machine/pull.go` as its own function.

Signed-off-by: Jake Correnti <jakecorrenti+github@proton.me>
2023-08-01 09:53:38 -04:00
906af5bbc6 Move getDevNullFiles into a common file
Moves `getDevNullFiles` into a new common file,
`pkg/machine/machine_common.go`, preventing the re-implementation of the
function across the different hypervisor implementations.

Signed-off-by: Jake Correnti <jakecorrenti+github@proton.me>
2023-08-01 08:52:23 -04:00
7d5f9de7a9 Merge pull request #19423 from rhatdan/man
[CI:DOCS] Mention no comment lines in Containerfile.in podman-build man page
2023-08-01 12:16:25 +02:00
57aa4850fc Merge pull request #19434 from rhatdan/userns
Set default userns from containers.conf file
2023-08-01 12:00:57 +02:00
843f663c81 Merge pull request #19460 from containers/renovate/github.com-digitalocean-go-qemu-digest
Update github.com/digitalocean/go-qemu digest to 2e3d018
2023-08-01 10:02:42 +02:00
a9948dafc9 Merge pull request #19455 from jakecorrenti/qemu-machine-funcs-to-methods
Convert new QEMU functions to methods with documentation
2023-08-01 09:43:17 +02:00
0ecda592c9 Merge pull request #19350 from jakecorrenti/breakup-applehv-machine-funcs
Breakup applehv machine funcs
2023-08-01 09:22:20 +02:00
89f1fdc7f2 Update github.com/digitalocean/go-qemu digest to 2e3d018
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-08-01 02:51:46 +00:00
dcb7f5e130 Merge pull request #19450 from cevich/use_stable_go
[CI:DOCS] GHA: Use stable go for Mac/Win builds
2023-08-01 00:12:26 +02:00
d6847b19c8 Convert QEMU functions to methods with documentation
Converts new functions added in #19311 to methods and adds
documentation.

[NO NEW TESTS NEEDED]

Signed-off-by: Jake Correnti <jakecorrenti+github@proton.me>
2023-07-31 15:55:47 -04:00
0d21f8986b Merge pull request #19419 from Romain-Geissler-1A/remove-EOF-error-empty-context-with-podman-remote
Don't log EOF error when using podman --remote build with an empty context directory.
2023-07-31 21:43:36 +02:00
ad9015f478 Merge pull request #19096 from BlackHole1/support-new-line
feat(env): support multiline in env-file
2023-07-31 21:40:13 +02:00
3ddde2023a Merge pull request #19413 from vrothberg/fix-19368
API: kill: return 409 on invalid state
2023-07-31 21:37:21 +02:00
30ad23e559 Merge pull request #19444 from Luap99/net-none-netns-path
inspect with network=none show SandboxKey netns path
2023-07-31 21:34:22 +02:00
6930f39a66 Update docs/source/markdown/podman-build.1.md.in
Co-authored-by: Valentin Rothberg <vrothberg@redhat.com>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-07-31 15:20:58 -04:00
a52cefe6b9 Merge pull request #19431 from rhatdan/man1
[CI:DOCS] Improve the description of fields in podman-stats man page
2023-07-31 21:01:24 +02:00
e1114f03ce do not redefine gobuild for eln
Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2023-07-31 14:55:52 -04:00
6b404759f2 Merge pull request #19422 from rhatdan/read-only
make /dev & /dev/shm read/only when --read-only --read-only-tmpfs=false
2023-07-31 20:24:16 +02:00
39341f283c Set default userns from containers.conf file
Fixed: https://github.com/containers/podman/issues/19432

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-07-31 14:21:06 -04:00
94743d4e76 Merge pull request #19451 from rhatdan/quadlet
[CI:DOCS] Mention TimeoutStartSec in quadlet man page
2023-07-31 14:17:53 -04:00