17733 Commits

Author SHA1 Message Date
2ad938ec6e pasta: skip "Local forwarder, IPv4" test
It is not working in CI and locally, I filed #17074 to track it so we
can fix it later.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-01-19 15:44:17 +01:00
3db8ef37d8 add testbindings Makefile target
use this target in the CI script to make sure it uses the correct gingko

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-01-19 15:44:17 +01:00
5ad72a2349 update CI images to include pasta
Images were build here: https://github.com/containers/automation_images/pull/249

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-01-19 15:43:40 +01:00
3276c366c0 Merge pull request #17165 from vrothberg/fix-17142
StopContainer: return if cleanup process changed state
2023-01-19 08:30:29 -05:00
4faa139b78 waitPidStop: reduce sleep time to 10ms
Kill is a fast syscall, so we can reduce the sleep time from 100ms to
10ms in hope to speed things up a bit.

[NO NEW TESTS NEEDED]

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-01-19 12:31:37 +01:00
fd42c1dcb8 StopContainer: return if cleanup process changed state
Commit 067442b5701f improved stopping/killing a container by detecting
whether the cleanup process has already fired and changed the state of
the container.  Further improve on that by returning early instead of
trying to wait for the PID to finish.  At that point we know that the
container has exited but the previous PID may have been recycled
already by the kernel.

[NO NEW TESTS NEEDED] - the absence of the two flaking tests recorded
in #17142 will tell.

Fixes: #17142
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-01-19 11:16:07 +01:00
e0f671007d StopSignal: add a comment
Add a comment when SIGKILL is being used.  It may help future readers
better comprehend what's going on and why.

[NO NEW TESTS NEEDED] - cannot test a comment :^)

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-01-19 11:16:05 +01:00
ac47d07194 StopContainer: small refactor
Move the stopSignal decl into the branch where it's actually used.

[NO NEW TESTS NEEDED] as it's just a small refactor.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-01-19 10:57:31 +01:00
e8b35a8c20 waitPidStop: simplify code
The code can be simplified by using a timer directly.

[NO NEW TESTS NEEDED] - should not change behavior.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-01-19 10:40:36 +01:00
17f89c97bd Merge pull request #17164 from edsantiago/unskip_15014
e2e tests: reenable long-skipped build test
2023-01-19 04:09:01 -05:00
51836aa47c e2e tests: reenable long-skipped build test
July 2022: test was flaking on new VM images. We needed new
images, so I filed #15014 and skipped the test.

January 2023: no attention from anyone, so I'll try bumping up
a dd timeout from 10s to 30s. But in the interim, the test
has broken: it used to expect "Containerfile" in output (this
was deliberately added in #13655)... but #16810 changed that
so Containerfile no longer appears. @flouthoc argues that
this too is deliberate (#17059). Okay, so let's change the
test then. All I care about is not adding more regressions.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-01-18 17:31:03 -07:00
21d1e794ce Merge pull request #17144 from rhatdan/annotations
Remove ReservedAnnotations from kube generate specification
2023-01-18 18:44:22 -05:00
7147618c94 Merge pull request #17161 from sbidoul/add-openssh-client
Add openssh-clients to podmanimage
2023-01-18 17:51:13 -05:00
46c85df169 Merge pull request #17160 from n1hility/win-smoke-tunnel
Refactor windows CI to workaround WSL's recent switch to a Windows Store update stream
2023-01-18 17:43:11 -05:00
36510f60db Add openssh-clients to podmanimage
The main goal is to provide ssh-agent,
which is required by podman build --ssh.

Signed-off-by: Stéphane Bidoul <stephane.bidoul@gmail.com>
2023-01-18 20:07:02 +01:00
0bd51f6c87 Reworks Windows smoke test to tunnel through interactive session.
The latest Windows image from containers/automation_image@327d8799 auto-creates
an interactive session through winlogon autologon on boot. Additionally it
includes the PsTools psexec command on the system.

This change utilizes both aspects to launch the verification portion of the
smoke task under the interactive session, away from the session 0 execution
environment that the Cirrus agent runs in.

Since creating a new process under the interactive session requires a new token,
and by extension a clear text password, a new crypto random password is
generated to replace the ec2 boot generated one.

These changes allow WSL to once again function after its move to a store based
delivery stream (which is incompatible with session 0 execution).

Signed-off-by: Jason T. Greene <jason.greene@redhat.com>
2023-01-18 11:23:43 -06:00
0768680b98 Merge pull request #17154 from vrothberg/fix-flake
fix bud-multiple-platform-with-base-as-default-arg flake
2023-01-18 11:43:48 -05:00
b5a6f3f914 fix bud-multiple-platform-with-base-as-default-arg flake
By vendoring the latest c/common.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-01-18 15:32:38 +01:00
ef3f098796 Remove ReservedAnnotations from kube generate specification
Reserved annotations are used internally by Podman and would effect
nothing when run with Kubernetes so we should not be generating these
annotations.

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

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-01-18 08:46:24 -05:00
1fe21cbf61 Merge pull request #17125 from rhatdan/VENDOR
Vendor in latest containers/(image,ocicrypt)
2023-01-18 04:38:46 -05:00
281ccbf5ee Merge pull request #17145 from rhatdan/docs
Cleanup documentation on --userns=auto
2023-01-18 04:35:25 -05:00
bfc5f07d93 Cleanup documentation on --userns=auto
Fixes: https://github.com/containers/podman/issues/17134

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-01-17 17:13:36 -05:00
a702d442e9 Merge pull request #17141 from edsantiago/bump_sigproxy_test_timeout
sig-proxy system test: bump timeout
2023-01-17 15:42:13 -05:00
eede0c9b12 Merge pull request #17143 from ashley-cui/44rc2
Bump to v4.4.0-rc2
2023-01-17 15:28:22 -05:00
fb463f5b62 Merge pull request #17137 from containers/dependabot/go_modules/github.com/containernetworking/plugins-1.2.0
build(deps): bump github.com/containernetworking/plugins from 1.1.1 to 1.2.0
2023-01-17 14:06:37 -05:00
120d16b616 Bump to v4.4.0-dev
Signed-off-by: Ashley Cui <acui@redhat.com>
2023-01-17 12:15:19 -05:00
24cc02a64e Bump to v4.4.0-rc2
Signed-off-by: Ashley Cui <acui@redhat.com>
v4.4.0-rc2
2023-01-17 12:14:25 -05:00
ddf8e49891 Vendor in latest c/common
Signed-off-by: Ashley Cui <acui@redhat.com>
2023-01-17 12:12:17 -05:00
dc2bd0857d sig-proxy system test: bump timeout
...and instrument with 'podman ps'es for debugging failures.

Test flakes pretty regularly in Fedora gating. If the increased
timeout doesn't help, at least we should be able to see if the
container is stopping or failed or something.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-01-17 08:21:39 -07:00
cf40adb3df Merge pull request #17118 from giuseppe/rename-auth-scripts-to-preexec-hooks
rootless: rename auth-scripts to preexec-hooks
2023-01-17 09:53:25 -05:00
193b2a8362 build(deps): bump github.com/containernetworking/plugins
Bumps [github.com/containernetworking/plugins](https://github.com/containernetworking/plugins) from 1.1.1 to 1.2.0.
- [Release notes](https://github.com/containernetworking/plugins/releases)
- [Commits](https://github.com/containernetworking/plugins/compare/v1.1.1...v1.2.0)

---
updated-dependencies:
- dependency-name: github.com/containernetworking/plugins
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-17 12:02:25 +00:00
7093d1fe5c Merge pull request #17130 from Luap99/remove-dup-code
commit: use libimage code to parse changes
2023-01-17 05:10:22 -05:00
abfca47d32 Merge pull request #17127 from mupuf/tty_devices_for_all
Make rootless privileged containers share the same tty devices as rootfull ones
2023-01-17 05:07:56 -05:00
a581d2a041 rootless: rename auth-scripts to preexec-hooks
to not give a false sense of security since these are not a security
mechanism but a hook to run arbitrary code before executing a
command.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2023-01-17 10:58:46 +01:00
07ba51d77a Merge pull request #17133 from cevich/docs_update
Docs: version-check updates
2023-01-16 16:44:26 -05:00
bdf1001790 Docs: version-check updates
Signed-off-by: Chris Evich <cevich@redhat.com>
2023-01-16 15:33:05 -05:00
942ac3de17 Merge pull request #17128 from baude/deprecateexperimental
[CI:DOCS] Remove experimental mac tutorial
2023-01-16 14:56:30 -05:00
f07cee3241 Merge pull request #17126 from vrothberg/fix-16142
container kill: handle stopped/exited container
2023-01-16 13:24:09 -05:00
79865c2903 commit: use libimage code to parse changes
This code is duplicated in podman and c/common, we should only use one
version.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-01-16 16:28:11 +01:00
bdc323cbfa [CI:DOCS] Remove experimental mac tutorial
This doc is no longer applicable.

[NO NEW TESTS NEEDED]

Signed-off-by: Brent Baude <bbaude@redhat.com>
2023-01-16 08:26:15 -06:00
8db2b4b733 man: Document the interaction between --systemd and --privileged
Users need to know about this side effect.

Fixes: 5a2405ae1b3a ("Don't mount /dev/tty* inside privileged...")
Fixes: f4c81b0aa5fd ("Only prevent VTs to be mounted inside ...")
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
2023-01-16 16:23:53 +02:00
70057c8b47 Make rootless privileged containers share the same tty devices as rootfull ones
Until Podman v4.3, privileged rootfull containers would expose all the
host devices to the container while rootless ones would exclude
`/dev/ptmx` and `/dev/tty*`.

When 5a2405ae1b3a ("Don't mount /dev/tty* inside privileged containers
running systemd") landed, rootfull containers started excluding all the
`/dev/tty*` devices when the container would be running in systemd
mode, reducing the disparity between rootless and rootfull containers
when running in this mode.

However, this commit regressed some legitimate use cases: exposing
non-virtual-terminal tty devices (modems, arduinos, serial
consoles, ...) to the container, and the regression was addressed in
f4c81b0aa5fd ("Only prevent VTs to be mounted inside privileged
systemd containers").

This now calls into question why all tty devices were historically
prevented from being shared to the rootless non-privileged containers.
A look at the podman git history reveals that the code was introduced
as part of ba430bfe5ef6 ("podman v2 remove bloat v2"), and obviously
was copy-pasted from some other code I couldn't find.

In any case, we can easily guess that this check was put for the same
reason 5a2405ae1b3a was introduced: to prevent breaking the host
environment's consoles. This also means that excluding *all* tty
devices is overbearing, and should instead be limited to just virtual
terminals like we do on the rootfull path.

This is what this commit does, thus making the rootless codepath behave
like the rootfull one when in systemd mode.

This leaves `/dev/ptmx` as the main difference between the two
codepath. Based on the blog post from the then-runC maintainer[1] and
this Red Hat bug[2], I believe that this is intentional and a needed
difference for the rootless path.

Closes: #16925
Suggested-by: Fabian Holler <mail@fholler.de>
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>

[1]: https://www.cyphar.com/blog/post/20160627-rootless-containers-with-runc
[2]: https://bugzilla.redhat.com/show_bug.cgi?id=501718
2023-01-16 16:23:53 +02:00
067442b570 container kill: handle stopped/exited container
The container lock is released before stopping/killing which implies
certain race conditions with, for instance, the cleanup process changing
the container state to stopped, exited or other states.

The (remaining) flakes seen in #16142 and #15367 strongly indicate a
race in between the stopping/killing a container and the cleanup
process.  To fix the flake make sure to ignore invalid-state errors.
An alternative fix would be to change `KillContainer` to not return such
errors at all but commit c77691f06f61 indicates an explicit desire to
have these errors being reported in the sig proxy.

[NO NEW TESTS NEEDED] as it's a race already covered by the system
tests.

Fixes: #16142
Fixes: #15367
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-01-16 13:56:41 +01:00
a218960bcd Vendor in latest containers/(image,ocicrypt)
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-01-16 07:46:36 -05:00
d558a792f4 Merge pull request #17084 from cevich/fix_main_benchmark_fail
Cirrus: Run machine tests on PR merge
2023-01-16 06:57:56 -05:00
6f919af78b add a comment to container removal
Every time I look at a container-removal issue I wonder why the
container isn't locked directly here, so let's add a comment here.
I am not sure whether I would be better if callers took care of
locking but for now the comment will safe the future me and probably
other readers some time.

[NO NEW TESTS NEEDED]

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-01-16 11:45:19 +01:00
8114cc7f75 Merge pull request #17121 from rhatdan/VENDOR
Vendor in latest containers/storage
2023-01-16 04:36:47 -05:00
5ac5aaa723 Vendor in latest containers/storage
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-01-15 07:41:30 -05:00
cdcd2eddc7 Merge pull request #17107 from vrothberg/fix-17016
kube play: complete container spec
2023-01-14 11:19:07 -05:00
ae674a3c7c Merge pull request #17082 from dcermak/warn-about-replicas
Warn about creating multiple replicas from kubernetes YAML
2023-01-14 11:08:46 -05:00