Commit graph

13010 commits

Author SHA1 Message Date
OpenShift Merge Robot
16e80e07d5
Merge pull request #12832 from edsantiago/emergency_buildah_skips_342rhel
[v3.4.2-rhel] buildah bud tests: skip failing tests
2022-01-12 23:34:19 +01:00
Ed Santiago
7c9cc3f6e5 buildah bud tests: skip failing tests
[backport of #12818]

Emergency workaround for github's deprecation of git://

   https://github.blog/2021-09-01-improving-git-protocol-security-github/

Two buildah tests rely on 'git://' URLs. These now fail. They
have been fixed in the buildah repo[1] but it will take time
to vendor that in. ITM, we need to get CI passing. Skip those
two failing tests.

 [1] https://github.com/containers/buildah/pull/3701

Signed-off-by: Ed Santiago <santiago@redhat.com>
2022-01-12 10:52:59 -07:00
OpenShift Merge Robot
75e98708dc
Merge pull request #12789 from TomSweeneyRedHat/dev/tsweeney/cstore_1_36_1
[v3.4.2-rhel] Fix intermittently missing files in merged directory du…
2022-01-10 19:23:10 +01:00
tomsweeneyredhat
d0c59672f9 [v3.4.2-rhel] Fix intermittently missing files in merged directory during llistxattr
Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=2008997 in the
v3.4.2-rhel branch. Bumps c/storage to v1.36.1 that includes this PR:
containers/storage#1037

Signed-off-by: tomsweeneyredhat <tsweeney@redhat.com>
2022-01-10 11:36:55 -05:00
OpenShift Merge Robot
30a6e0d2bd
Merge pull request #12742 from baude/v3.4.2healthcheckbackports
[v3.4.2-rhel] Backports for health check files
2022-01-05 01:40:06 +01:00
Brent Baude
241f26f934 .service file removal on failure
Prodding bz #2024229 a little more, it turns out the service file is NOT
deleted when it is in a failed state (i.e the healtch check has failed
for some reason).  The state must be reset before the service is stopped
on container removal and then the files will be removed properly.

BZ#:2024229

[NO NEW TESTS NEEDED]

Signed-off-by: Brent Baude <bbaude@redhat.com>
2022-01-04 16:06:19 -06:00
Brent Baude
b3f31026ee Removed .service file for healthchecks
when a container with healthchecks exits due to stopping or failure, we
need the cleanup process to remove both the timer file and the service
file.

Bz#:2024229

Signed-off-by: Brent Baude <bbaude@redhat.com>
2022-01-04 16:05:11 -06:00
Daniel J Walsh
90fb2cff07
Merge pull request #12602 from machacekondra/restartSecv34rhel
[v3.4.2-rhel] Add restart-sec option to systemd generate
2021-12-16 09:44:17 -05:00
Ondra Machacek
135041be41 Add restart-sec option to systemd generate
Signed-off-by: Ondra Machacek <omachace@redhat.com>
2021-12-16 13:37:12 +01:00
OpenShift Merge Robot
4853c18c56
Merge pull request #12520 from mheon/fix_2021_4024_rhel
Backport CVE-2021-4024 fix to RHEL branch
2021-12-06 17:49:27 +00:00
Matthew Heon
3eb88d0be0 Swap bind address for gvproxy to localhost-only
This resolves CVE-2021-4024, where an attacker could access the
API externally and forward any port they desired to the VM from
`podman machine`.

[NO NEW TESTS NEEDED] gvproxy is not tested directly at this
time.

Signed-off-by: Matthew Heon <mheon@redhat.com>
2021-12-06 09:32:34 -05:00
OpenShift Merge Robot
f601d7af41
Merge pull request #12496 from mheon/backport_12294
Backports for v3.4.2-rhel
2021-12-03 19:16:45 +01:00
Hironori Shiina
e770060906 Set flags to test 'logs -f' with journald driver
`logs -f` with `journald` is supported only when `journald` events
backend is used. To pass system tests using `logs -f` in an environment
where `events_logger` is not set to `journald` in `containers.conf`,
this fix sets `--events-backend` or `--log-driver` temporally.

Signed-off-by: Hironori Shiina <shiina.hironori@jp.fujitsu.com>

<MH: Fixed cherry-pick conflicts>
2021-12-03 10:11:26 -05:00
Aditya Rajan
7a6c99406e secret: honor custom target for secrets with run
Honor custom `target` if specified while running or creating containers
with secret `type=mount`.

Example:
`podman run -it --secret token,type=mount,target=TOKEN ubi8/ubi:latest
bash`

Signed-off-by: Aditya Rajan <arajan@redhat.com>
2021-12-02 11:26:17 -05:00
OpenShift Merge Robot
48f9f34d22
Merge pull request #12399 from edsantiago/backport_flake_fixes
[v3.4.2-rhel] Backport flake fixes
2021-11-23 18:29:12 +01:00
Valentin Rothberg
3922e61b32 fix CI
Our fedora-minimal image on Quay bases on fedora-minimal:latest which
starting with F35 removed a number of binaries that our CI depends on.
Fix that by pulling `fedora-minimal:34` from the Fedora registry
directly.

Once the build bot on Quay has been disabled, we move the image over
there to make sure that it will not change over time.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-11-23 08:37:48 -07:00
Giuseppe Scrivano
dcc66d59ff utils: use podman-pause-$RANDOM.scope name
we try hard to re-use the existing podman-pause.scope name when it
already exists, causing any sort of race errors when the already
existing scope is terminating.

There is no such a requirement though, so just try with a random
name.

Closes: https://github.com/containers/podman/issues/12065

[NO NEW TESTS NEEDED] it fixes a race in the CI

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2021-11-23 08:37:43 -07:00
Ed Santiago
0998761370 Network test: fix podman-remote-rootless corner case
Followup to #12229, in which I added a podman unshare for
flake debugging. Turns out that doesn't work in podman-remote.
It was not caught because CI doesn't run podman-remote rootless.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2021-11-23 08:36:45 -07:00
OpenShift Merge Robot
c323d545a6
Merge pull request #12302 from mheon/fix_dst_branch
[NO NEW TESTS NEEDED] Fix destination branch for v3.4.2-rhel
2021-11-15 23:07:29 +01:00
Matthew Heon
eff7367c96 Fix destination branch for v3.4.2-rhel
Signed-off-by: Matthew Heon <mheon@redhat.com>
2021-11-15 11:22:28 -05:00
Matthew Heon
2ad1fd3555 Bump to v3.4.2
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2021-11-12 11:08:25 -05:00
Matthew Heon
1d6397e5c0 Add release notes for v3.4.2
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2021-11-12 11:08:25 -05:00
Matthew Heon
6d9b1e4b8e Fix partial log line handling with journald log driver
Patch originally by Paul Holzinger (sourced from [1]).

This is necessary to get the tests to pass in order to include a
batch of other, related journald fixes in `podman logs`.

[1] https://github.com/containers/podman/pull/12274#issuecomment-967168173

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2021-11-12 11:08:25 -05:00
Yahav Itzhak
8b368b5e1b Fix Zsh completion command documentation
Signed-off-by: yahavi <yahavi@jfrog.com>
2021-11-12 11:08:25 -05:00
Paul Holzinger
c2fb170b87 Fix flake in upgrade tests
The cni plugins need access to /run/cni and the dnsname plugin needs
access to /run/containers.

The race condition was basically that a `podman stop` could either do the
cleanup itself or the spawned cleanup process would do the cleanup if it
was fast enough. The `podman stop` is executed on the host while the
podman cleanup process is executed in the "parent container". The parent
container contains older plugins than on the host. The dnsname plugin
before version 1.3 could error and this would prevent CNI from
doing a proper cleanup. The plugin errors because it could not find its
files in /run/containers. On my system the test always failed because
the cleanup process was always faster than the stop process. However in
the CI VMs the stop process was usually faster and so it failed only
sometimes.

Fixes #11558

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2021-11-12 11:08:25 -05:00
Jindrich Novy
6770fede71 VOLUME must be declared after RUN chown command
Podman and Docker will not commit changes via RUN command
of a VOLUME directory, so we need to chown path first.

Not doing do will cause: https://bugzilla.redhat.com/show_bug.cgi?id=2009266

Signed-off-by: Jindrich Novy <jnovy@redhat.com>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-11-12 11:08:25 -05:00
Boaz Shuster
cedf1a3d43 podman-generate-kube - remove empty structs from YAML
[NO NEW TESTS NEEDED]

Signed-off-by: Boaz Shuster <boaz.shuster.github@gmail.com>
2021-11-12 11:08:25 -05:00
Sascha Grunert
e456873c02 Exclude already built sources for static build
We now do not copy the `bin` directory to the target nix sources to
avoid skipping the build because "everything is up to date".

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

Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
2021-11-12 11:08:25 -05:00
Ian Wienand
e9f6e5194c Match .c files in Makefile
Ensure that rebuilds happen when .c files are updated in the source
tree.

Signed-off-by: Ian Wienand <iwienand@redhat.com>
2021-11-12 11:08:25 -05:00
Ian Wienand
de852ebd05 shm_lock: Handle ENOSPC better in AllocateSemaphore
When starting a container libpod/runtime_pod_linux.go:NewPod calls
libpod/lock/lock.go:AllocateLock ends up in here.  If you exceed
num_locks, in response to a "podman run ..." you will see:

 Error: error allocating lock for new container: no space left on device

As noted inline, this error is technically true as it is talking about
the SHM area, but for anyone who has not dug into the source (i.e. me,
before a few hours ago :) your initial thought is going to be that
your disk is full.  I spent quite a bit of time trying to diagnose
what disk, partition, overlay, etc. was filling up before I realised
this was actually due to leaking from failing containers.

This overrides this case to give a more explicit message that
hopefully puts people on the right track to fixing this faster.  You
will now see:

 $ ./bin/podman run --rm -it fedora bash
 Error: error allocating lock for new container: allocation failed; exceeded num_locks (20)

[NO NEW TESTS NEEDED] (just changes an existing error message)

Signed-off-by: Ian Wienand <iwienand@redhat.com>
2021-11-12 11:08:25 -05:00
Ed Santiago
fc1707dfe4 Minor test tweaks
- remove 'NO TESTS NEEDED' as a valid bypass string. Henceforth
  only 'NO NEW TESTS NEEDED' will work.

- add a debugging aid for #11871, in which bodhi tests time out
  in nslookup.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2021-11-12 11:08:25 -05:00
Valentin Rothberg
c8b7ca2ba2 pod/container create: resolve conflicts of generated names
Address the TOCTOU when generating random names by having at most 10
attempts to assign a random name when creating a pod or container.

[NO TESTS NEEDED] since I do not know a way to force a conflict with
randomly generated names in a reasonable time frame.

Fixes: #11735
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-11-12 11:08:25 -05:00
Daniel J Walsh
2dc8db7730 Add some information about disabling SELinux when using system volumes
A comment was made on internal mailing list about confusion on SELinux
labeling of volumes. This PR makes it a little more clear about when
you should or should not relabel.

We need a similar comment in podman pod create, but it does not support
--security-opt processing yet.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-11-12 11:08:25 -05:00
Jhon Honce
93a3e720d7 Log Apache access_log-like entries at Info level [NO NEW TESTS NEEDED]
Only log API access entries when --log-level set to Info or below.

Fixes #12181

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2021-11-12 11:08:25 -05:00
Nalin Dahyabhai
b1ac02dcbb tweak a couple of flag descriptions in help output
Descriptions of flags don't need to start with whitespace of their own.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2021-11-12 11:08:25 -05:00
Paul Holzinger
718de67f33 Fix bindings container log test
The returned error was not checked, thus the test could hang forever
since it blocks on the log channel.

Also handle unexpectedEOF like EOF.

Fixes #12176

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2021-11-12 11:08:25 -05:00
Giuseppe Scrivano
dd6551055a test: run --cgroups=split in new cgroup
the --cgroups=split test changes the current cgroup as it creates a
sub-cgroup.  This can cause a race condition in tests that are reading
the current cgroup.

Closes: https://github.com/containers/podman/issues/11191

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2021-11-12 11:08:25 -05:00
Miloslav Trmač
df9e0fdcb0 Fix tests of podman image trust --raw and --json
Instead using the OS-wide system default policy, use
the one in this repo, and adjust the expected results
(as well as making the test stricter).

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2021-11-12 11:08:25 -05:00
Miloslav Trmač
df736396e1 Tighten the expected output of the "podman image trust show" test
... to include all fields.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2021-11-12 11:08:25 -05:00
Miloslav Trmač
18c322d1c0 Use INTEGRATION_ROOT instead of current directory
Should not change behavior, just to set a consistent
precedent for code introduced in future commits.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2021-11-12 11:08:25 -05:00
Ondra Machacek
3bd80ac9ae Handle HTTP 409 error messages properly for Pod actions
This PR fixes the case when the API return HTTP 409 response. Where the
API return the body format different then for other HTTP error codes.

Signed-off-by: Ondra Machacek <omachace@redhat.com>
2021-11-12 11:08:25 -05:00
Matej Vasek
a8332f6946 Fix swagger definitions
[NO TESTS NEEDED]

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2021-11-12 11:08:25 -05:00
Chris Evich
5889c2c241 Cirrus: Authorize rootless user self-ssh
Future testing needs dictate rootless (in addition to root) users are
able to ssh to localhost.  Add ssh-key generation commands for the
rootless user, and authorize their public key.

Minor: Also remove update of `/etc/sub{uid,gid}` files, since this is
now done automatically by `{user,group}add` commands.

Signed-off-by: Chris Evich <cevich@redhat.com>
2021-11-12 11:08:25 -05:00
Ashley Cui
2a0aad6beb Add information on how podman machine is updated
Update documentation on how the default podman machine distribution,
FCOS, is updated.

Signed-off-by: Ashley Cui <acui@redhat.com>
2021-11-12 11:08:25 -05:00
Praveen Kumar
0ded340e6b Fix help message case for podman version
This is a cosmetic change. The help message for `podman version` is in
title case whereas all other command help messages are not in title
case. This stands out as inconsistent when looking at the output of
`podman help`.

Signed-off-by: Praveen Kumar <praveen+git@kumar.in>
2021-11-12 11:08:25 -05:00
Giacomo Sanchietti
fa29ca7106 Fix pause usage example
The page contains a wrong 'stop' command example.

Signed-off-by: Giacomo Sanchietti <giacomo.sanchietti@nethesis.it>
2021-11-12 11:08:25 -05:00
Adrian Reber
6bf6d72372 Set Checkpointed state to false after restore
A restored container still had the state set to 'Checkpointed: true'
which seems wrong if it running again.

[NO NEW TESTS NEEDED]

Signed-off-by: Adrian Reber <areber@redhat.com>
2021-11-12 11:08:25 -05:00
Giuseppe Scrivano
2d6252b98a runtime: change PID existence check
commit 6b3b0a17c6 introduced a check for
the PID file before attempting to move the PID to a new scope.

This is still vulnerable to TOCTOU race condition though, since the
PID file or the PID can be removed/killed after the check was
successful but before it was used.

Closes: https://github.com/containers/podman/issues/12065

[NO NEW TESTS NEEDED] it fixes a CI flake

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2021-11-12 11:08:25 -05:00
Matej Vasek
a208bc24de Set DOCKER_HOST in the VM
[NO TESTS NEEDED]

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2021-11-12 11:08:25 -05:00
Giuseppe Scrivano
246782133c runtime: check for pause pid existence
check that the pause pid exists before trying to move it to a separate
scope.

Closes: https://github.com/containers/podman/issues/12065

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2021-11-12 11:08:25 -05:00