19856 Commits

Author SHA1 Message Date
1a63c1b23e Fix nits in #19480
Fixes non-blocking nits that were in the PR that consolidated some of
the machine code into common areas.

Fixes a capitalization error in documentation, inverts the logic in
`AddSSHConnectionsToPodmanSocket`, and uses raw strings in
`WaitAPIAndPrintInfo` instead of printing the messages line-by-line.

[NO NEW TESTS NEEDED]

Signed-off-by: Jake Correnti <jakecorrenti+github@proton.me>
2023-08-04 09:28:20 -04:00
1e54539432 Add support for passing container stop timeout as -1 (infinite)
Compat api for containers/stop should take -1 value

Add support for `podman stop --time -1`
Add support for `podman restart --time -1`
Add support for `podman rm --time -1`
Add support for `podman pod stop --time -1`
Add support for `podman pod rm --time -1`
Add support for `podman volume rm --time -1`
Add support for `podman network rm --time -1`

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

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-08-04 08:36:45 -04:00
0fb5b3acf0 Merge pull request #19483 from dfr/freebsd-devices
pkg/specgen: Add device support for FreeBSD
2023-08-04 14:35:33 +02:00
1440985877 Merge pull request #19505 from eriksjolund/fix_issue_19462_remove_duplicate_lastup_from_man_page
[CI:DOCS] man: remove duplicate entry `.LastUp`
2023-08-04 11:36:50 +02:00
d50054f1e4 pkg/specgen: Add device support for FreeBSD
On FreeBSD, each container has its own devfs instance with a ruleset
that controls what the container can see. To expose devices to a
container we add rules to its devfs to make the requested devices
visible. For privileged containers, we use 'ruleset=0' which makes
everything visible.

This shares the ParseDevice function with Linux so it moves to
config_common.go from config_linux.go.

Signed-off-by: Doug Rabson <dfr@rabson.org>
2023-08-04 10:11:14 +01:00
f5058f1483 [CI:DOCS] man: remove duplicate entry .LastUp
Fixes: https://github.com/containers/podman/issues/19462

Signed-off-by: Erik Sjölund <erik.sjolund@gmail.com>
2023-08-04 08:47:08 +02:00
84dec22349 Merge pull request #19494 from rhatdan/codespell
Run codespell on code
2023-08-03 19:32:27 +02:00
92090d6acc Merge pull request #19310 from cgiradkar/fix_dash_t_flag
Check tty flag to set default terminal in Env
2023-08-03 18:49:51 +02:00
0fb6708e52 Merge pull request #19495 from edsantiago/remove_useless_test
CI: e2e: remove useless test
2023-08-03 16:03:36 +02:00
a8974d4a3e CI: e2e: remove useless test
Remove "HTTP if one registry" test. It is a NOP, has been skipped
for two months, and nobody knows what its original purpose was.

Closes: #18768

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-08-03 06:16:25 -06:00
53d44a65e5 Check tty flag to set default terminal in Env
First, all the defaults for TERM=xterm were removed from c/common, then accordingly the same will be added if encountered a set tty flag.

Signed-off-by: Chetan Giradkar <cgiradka@redhat.com>
2023-08-03 12:29:21 +01:00
bde942e216 Merge pull request #19468 from flouthoc/manifest-add-compression
manifest, push: implement `--add-compression` to push with compressed variants.
2023-08-03 13:15:34 +02:00
62a22c5d60 Run codespell on code
Also cleanup --rm=true to be just --rm

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-08-03 07:00:30 -04:00
44f159ed31 Deprecate podman generate systemd
Now that Quadlets are fully supported, it is time to Depracate
podman generate systemd command.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-08-03 06:58:53 -04:00
7a2c5422e8 Merge pull request #19418 from cevich/dry_run_actions
[CI:DOCS] GHA: Support testing build/sign workflows
2023-08-03 11:38:56 +02:00
b427fe76b0 Merge pull request #19489 from ashley-cui/relnotes
[CI:DOCS] Update Release Notes
2023-08-03 10:57:34 +02:00
b8c9ad8982 Merge pull request #19482 from rhatdan/rmi
Make podman run --rmi automatically set --rm
2023-08-03 10:55:00 +02:00
346f9cb4ed manifest/push: add support for --add-compression
Adds support for --add-compression which accepts multiple compression
formats and when used it will add all instances in a manifest list with
requested compression formats.

Signed-off-by: Aditya R <arajan@redhat.com>
2023-08-03 14:20:38 +05:30
ebf368dd69 Merge pull request #19484 from domdomegg/patch-2
[CI:DOCS] Use code blocks for commands in podman-completion
2023-08-03 09:56:37 +02:00
3b7ad61f6b Merge pull request #19488 from edsantiago/journald_race
CI: sys: quadlet %T test: do not rely on journal
2023-08-03 09:46:15 +02:00
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
8ccda1ee8a [CI:DOCS]Update Release Notes
To reflect 4.5.1 and 4.6.0 releases

Signed-off-by: Ashley Cui <acui@redhat.com>
2023-08-02 18:55:51 -04:00
b91599742c CI: sys: quadlet %T test: do not rely on journal
Some people might expect this to work:

    systemctl --wait start foo
    journalctl -u foo  ---> displays output from foo

Well, it does not. Not reliably, anyway:

   https://github.com/systemd/systemd/issues/28650

Shrug, okay, deal with it: write value of %T to a tmpfile
instead of relying on journal. I tested with TMPDIR=<many values>
on an SELinux system and, by golly, it works fine.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-08-02 15:24:48 -06:00
4d69f01468 GHA: Support testing build/sign workflows
Neither `release` nor `workflow_dispatch` triggers may be tested inside
a PR context.  The workflow steps always run from what's already
committed to `main`.  Rather than waiting for a release to discover
some unforeseen workflow problem, allow manual runs to optionally skip
the release upload step (by default).

Also, update the windows workflow to store an artifact of the signed
build, and migrate away from the deprecated "set-output" command.

Signed-off-by: Chris Evich <cevich@redhat.com>
2023-08-02 16:58:16 -04:00
15f35d3548 Remove unnecessary backslashes
Signed-off-by: Adam Jones <domdomegg+git@gmail.com>
2023-08-02 15:01:16 +01:00
18e75daa53 [docs] Use code blocks for commands in podman-completion
Currently, due to sphinx smart quote features being enabled, fancy quotes are used in the commands. This means the docs are harder to use as the commands cannot be copy/pasted into a terminal.

Wrapping the code in code blocks fixes this. An alternative would be to disable smart quotes entirely, but this seems over-the-top (especially considering wrapping commands in code blocks harmonises this page with most of the other documentation)

Signed-off-by: Adam Jones <domdomegg+git@gmail.com>
2023-08-02 14:07:57 +01:00
f3ebd798c6 Make podman run --rmi automatically set --rm
Forcing users to set --rm when setting --rmi is just bad UI.
If I want the image to be removed, it implies that I want the
container removed that I am creating.

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

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-08-02 08:33:06 -04: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
49b8b971ac vendor: bump c/image to v5.26.1-0.20230801083106-fcf7f0e1712a
Signed-off-by: Aditya R <arajan@redhat.com>
2023-08-02 14:01:49 +05:30
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