14298 Commits

Author SHA1 Message Date
e252b3b4f2 exec: retry rm -rf on ENOTEMPTY and EBUSY
when running on NFS, a RemoveAll could cause EBUSY because of some
unlinked files that are still kept open and "silly renamed" to
.nfs$ID.

This is only half of the fix, as conmon needs to be fixed too.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=2040379
Related: https://github.com/containers/conmon/pull/319

[NO NEW TESTS NEEDED] as it requires NFS as the underlying storage.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2022-01-24 16:58:05 +01:00
2f371cb12c container create: do not check for network dns support
We should not check if the network supports dns when we create a
container with network aliases. This could be the case for containers
created by docker-compose for example if the dnsname plugin is not
installed or the user uses a macvlan config where we do not support dns.

Fixes #12972

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-01-24 16:56:11 +01:00
75e6994d4e libpod: fix leaking fd
the config.json file for the OCI runtime is never closed, this is a
problem when running on NFS, since it leaves around stale files that
cannot be unlinked.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2022-01-24 16:05:46 +01:00
f6e36a6497 libpod: fix connection leak
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2022-01-24 16:05:42 +01:00
b75d6baf07 Merge pull request #12976 from patrycja-guzik/docs-labels
[CI:DOCS] Fix filter description and unify filters docs for containers/images prune
2022-01-24 09:30:23 -05:00
c96aa23adb Merge pull request #12979 from eriksjolund/fix_typo_subpordinate
[CI:DOCS] fix typo subpordinate
2022-01-23 07:30:13 -05:00
e68d188f64 [CI:DOCS] fix typo subpordinate
Signed-off-by: Erik Sjölund <erik.sjolund@gmail.com>
2022-01-22 22:47:28 +01:00
aff6a5af88 Fix filter description and unify filters docs for containers/images prune
Signed-off-by: Patrycja Guzik <patrycja.k.guzik@gmail.com>
2022-01-22 16:22:02 +01:00
7938f32c53 Remove unused param and clean API handlers
This commit removes error message string from utils.Error in pkg/api.
Param was not used inside a function for quite a long time
[NO NEW TESTS NEEDED]

Signed-off-by: Jakub Guzik <jguzik@redhat.com>
2022-01-22 00:31:18 +01:00
d847ad598d Merge pull request #12961 from rhatdan/codespell
Run codespell
2022-01-21 14:55:26 -05:00
1e5a4b99ee Merge pull request #12964 from mheon/bump_400_rc2
Bump to v4.0.0-RC2
2022-01-21 14:11:26 -05:00
94703f668a Merge pull request #12959 from afbjorklund/machine-wait
Restore machine start logic that was hanging
2022-01-21 13:29:25 -05:00
e834297b39 Restore machine start logic that was hanging
After refactoring Stop(), mounting volumes was hanging in Start().

Restore the conditional, and add error reporting from isListening.

[NO NEW TESTS NEEDED]

Signed-off-by: Anders F Björklund <anders.f.bjorklund@gmail.com>
2022-01-21 16:43:48 +01:00
c81a616cab Bump to v4.0.0-dev
Signed-off-by: Matthew Heon <mheon@redhat.com>
2022-01-21 10:39:44 -05:00
71238d3cce Bump to v4.0.0-RC2
Signed-off-by: Matthew Heon <mheon@redhat.com>
v4.0.0-rc2
2022-01-21 10:39:04 -05:00
b29640c78b Final release notes for v4.0.0-rc2
Signed-off-by: Matthew Heon <mheon@redhat.com>
2022-01-21 10:38:15 -05:00
e3ea996919 Merge pull request #12951 from rhatdan/commit
Fix #2 for compat commit handling of --changes
2022-01-21 10:07:27 -05:00
6e17158502 Merge pull request #12948 from Luap99/rootless-networking
Remove rootless_networking option from containers.conf
2022-01-21 09:57:26 -05:00
02d8520869 Merge pull request #12952 from mheon/release_notes_400
[CI:DOCS] Update release notes for Podman v4.0.0
2022-01-21 09:55:27 -05:00
5736649eb8 Run codespell on code
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2022-01-21 09:52:12 -05:00
f6bb600870 Update release notes for Podman v4.0.0
Signed-off-by: Matthew Heon <mheon@redhat.com>
2022-01-21 09:18:29 -05:00
c6fd8a4212 Merge pull request #12924 from afbjorklund/package-alpine
Show package version when running on alpine
2022-01-21 07:31:25 -05:00
3074a98378 Merge pull request #12943 from machacekondra/nil_fix
Fix nil pointer dereference for configmap optional
2022-01-21 07:29:25 -05:00
653da8fe8f Fix #2 for compat commit handling of --changes
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2022-01-21 07:22:36 -05:00
11c5717cdb Merge pull request #12958 from dgibson/ociplex-test
Remove some explicit dependencies on runc/crun in the system tests
2022-01-21 06:47:25 -05:00
845256bdb3 Merge pull request #12936 from cgwalters/null-history
Don't segfault if an image layer has no creation timestamp
2022-01-21 04:17:25 -05:00
9d815707e2 Fix nil pointer dereference for configmap optional
This PR fixes nil pointer dereference for configmap optional parameter.
When optional parameter is not passed, the code tried to acces the
parameter which caused nil pointer dereference.

Signed-off-by: Ondra Machacek <omachace@redhat.com>
2022-01-21 10:01:32 +01:00
0b5136c7ce Make error message matching in 030-run.bats less fragile
Amongst other things 030-run.bats checks for sensible error messages when
attempting a "podman run" with a non-existent or inaccessible path.  It
checks for these messages, which come from the low-level runtime, in a lot
of detail, including separate versions for runc and crun.  This is fragile
in several ways:
  * It's likely to fail if using a runtime other than crun or runc
  * It relies on detecting whether the runtime is crun vs. runc using the
    path, which could fail if the binary has been named something unusual
  * It will break if crun or runc ever alter their error message (even if
    it's just changing case)

This replaces the checked versions with a much more accepting regex which
will work for both the runc and crun messages, while still looking for the
essential pieces.  This isn't guaranteed to work with other runtimes, but
it's much more likely to.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2022-01-21 13:51:25 +11:00
9241b4e340 Don't explicitly check for crun|runc in package information
Amongst other things 005-info.bats tests that the host.ociRuntime.package
field in the output from "podman info" reports something containing "crun"
or "runc".

While those are obviously the dominant runtimes in practice, it seems
undesirable to explicitly exclude them in testing.  So, remove this
specific test.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2022-01-21 13:51:25 +11:00
2947ded7a8 Don't segfault if an image layer has no creation timestamp
It's optional in the specification, and I initially omitted
it in the ostree code.  Now I've fixed the ostree code
to inject a timestamp, but we should clearly avoid segfaulting
on this case.

Signed-off-by: Colin Walters <walters@verbum.org>
2022-01-20 18:02:58 -05:00
993c072029 Merge pull request #12942 from flouthoc/compat-load-tar-with-multiple-images
compat: `images/load` must be able to load tar with multiple images
2022-01-20 17:29:31 -05:00
ca62a39985 Merge pull request #12950 from edsantiago/systemd_250
System tests: fix for new systemd on rawhide
2022-01-20 15:01:29 -05:00
1c0fdba4f2 compat: remove hardcoded index from load images output report
Signed-off-by: Aditya R <arajan@redhat.com>
2022-01-21 00:46:17 +05:30
9df31cfb77 compat: images/load must be able to load tar with multiple images
`http:/host:port/images/load` fails to accept tar with more than one
images however manual load works as expected. Remove explicit check for
`1` image and only fail if result set has value less than `1`.

Signed-off-by: Aditya R <arajan@redhat.com>
2022-01-21 00:23:54 +05:30
47df14af52 System tests: fix for new systemd on rawhide
systemd 250 on f36 has changed the output format of a message
our tests rely on. This breaks bodhi gating tests. Fix test
so it accepts a continually-growing set of systemd outputs.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2022-01-20 11:28:41 -07:00
00a12a0b83 Merge pull request #12871 from jwhonce/issues/12866
Engine.Remote from containers.conf
2022-01-20 13:17:31 -05:00
ee039b7403 Remove rootless_networking option from containers.conf
This field was only needed for machine to force cni, however you can set
netns="bridge" in the config to have the same effect. This is already
done in the machine setup.

see https://github.com/containers/common/pull/895

[NO NEW TESTS NEEDED]

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-01-20 19:08:15 +01:00
76ba0df602 Merge pull request #12945 from vrothberg/vendor-psgo
vendor c/psgo@v1.7.2
2022-01-20 12:29:32 -05:00
e22b9889d6 vendor c/psgo@v1.7.2
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2022-01-20 16:56:20 +01:00
1f85244abe Engine.Remote from containers.conf
Heuristic to initialize TunnelMode/remote podman:
- Podman built with remote tag
- Podman running on darwin or windows GOOS
- CONTAINER_HOST or CONTAINER_CONNECTION set in environment
- --remote flag given on command line
- From containers.conf, Engine.Remote == true and GOOS == linux

Otherwise, podman will run in ABIMode/linked against libpod library.

Fixes #12866

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2022-01-20 08:51:34 -07:00
206e57e5b0 Merge pull request #12928 from n1hility/win-env
Implement env parsing on Windows
2022-01-20 09:33:30 -05:00
1d6e154a73 Merge pull request #12939 from flouthoc/vendor-common
vendor: bump `c/common` for netavark and other pkgs as well.
2022-01-20 04:53:27 -05:00
2c492be00a vendor: bump c/common and other vendors
This commit bumps majorly c/common so netavark features could be synced
with podman.

But there are some other vendor bumps as well

[NO NEW TESTS NEEDED]
[NO TESTS NEEDED]

Signed-off-by: Aditya R <arajan@redhat.com>
2022-01-20 12:40:11 +05:30
f46478c1e9 Merge pull request #12931 from giuseppe/fix-crash-with-bazel-linux-sandbox
rootless: report correctly the error
2022-01-20 00:57:26 -05:00
7fc8bf4a42 Merge pull request #12887 from esendjer/main
Add custom defined dependencies to podman generate systemd
2022-01-19 20:29:01 -05:00
6b59b10248 Merge pull request #12916 from n1hility/winproxy
Implement API forwarding for podman machine on Windows
2022-01-19 17:41:03 -05:00
d2c892c729 Merge pull request #12914 from rhatdan/commit
Handle changes in docker compat mode
2022-01-19 17:19:00 -05:00
7046e78040 rootless: report correctly the error
`err` is nil at this point, so errors.Wrapf() would return nil
ignoring the remaining arguments.  This would prevent SetupRootless()
to fail causing podman to run without capabilities but believing so,
and it would end up in a crash when accessing the local store.

Closes: https://github.com/containers/podman/discussions/12923

[NO NEW TESTS NEEDED] it requires running in the environment created
by bazel linux-sandbox.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2022-01-19 21:14:33 +01:00
2d0b5ebb5b Implement API forwarding for podman machine on Windows
Signed-off-by: Jason T. Greene <jason.greene@redhat.com>
2022-01-19 13:03:49 -06:00
5e2fcf813d Merge pull request #12925 from edsantiago/apiv2_logs
APIv2 tests: followup to recent log test
2022-01-19 13:05:05 -05:00