14371 Commits

Author SHA1 Message Date
3c53200e9d Merge pull request #15079 from cevich/v4.0_latest_imgts
[v4.0] [CI:DOCS] Cirrus: Use the latest imgts container
2022-07-26 21:48:24 +02:00
da3d9ddef6 [CI:DOCS] Cirrus: Use the latest imgts container
Contains important updates re: preserving release-branch CI VM images.
Ref: https://github.com/containers/automation_images/pull/157

Signed-off-by: Chris Evich <cevich@redhat.com>
2022-07-26 15:14:44 -04:00
57335d29db Merge pull request #14325 from cevich/fix_netavark-aardvar_branch
[v4.0] Cirrus: Use fixed netavark/aardvark-dns branch
2022-06-02 07:58:14 -04:00
a3a903dfc3 Cirrus: Use fixed netavark/aardvark-dns branch
This is important for the stability of CI in case of a  future backport
that happens to be incompatible with netavark/aardvark `main`.  Since CI
doesn't run very often on the podman `v4.0` branch, an incompatible change
may not be noticed.  Fix this by switching off of the `main` branch onto
a netavark/aardvark release branches.

Signed-off-by: Chris Evich <cevich@redhat.com>
2022-05-23 16:04:30 -04:00
60f605f912 test: fix "podman search format json"
the alpine image used previously returns a description that contains
'...':

$ podman search --format json alpine | fgrep ...\"\,
        "Description": "alpine 3.7 with bash, perl, gzip, wget...",

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Signed-off-by: Chris Evich <cevich@redhat.com>
2022-05-23 16:04:25 -04:00
91362ff22f CI: fix golangci-lint installation
avoid this warn:
```
golangci/golangci-lint info installed ./bin/golangci-lint
golangci/golangci-lint err this script is deprecated, please do not use it anymore. check https://github.com/goreleaser/godownloader/issues/207
```

Signed-off-by: Pascal Bourdier <pascal.bourdier@gmail.com>
Signed-off-by: Chris Evich <cevich@redhat.com>
2022-05-23 15:06:47 -04:00
8987cfd91b Merge pull request #14097 from cevich/goimports_v4.0
[v4.0] CI: emergency fix for broken go get
2022-05-03 20:36:01 -04:00
65b2bb9ef5 CI: Fix installing 'latest' tooling at runtime
Thanks to @Luap99 for the fix.

Signed-off-by: Chris Evich <cevich@redhat.com>
2022-05-03 13:44:36 -04:00
d025ce03f0 CI: emergency fix for broken go get
go get is deprecated, we should use go install instead.

Also for some reason go get -u golang.org/x/tools/cmd/goimports is
broken at the moment, thus failing CI jobs where we have to install
this. Switching to go install seems to fix it.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-05-03 10:47:00 -04:00
7eb8eff034 Merge pull request #13395 from TomSweeneyRedHat/dev/tsweeney/fixurl
[v4.0] Option --url and --connection should imply --remote
2022-04-19 19:48:17 -04:00
957b288887 Merge pull request #13886 from n1hility/fix-wsl-rootless-40
[v4.0] Respect "Rootful" when starting WSL API Forwarding
2022-04-15 05:44:02 -04:00
40834f3df4 Respect "Rootful" when starting WSL API Forwarding
Signed-off-by: Jason T. Greene <jason.greene@redhat.com>
2022-04-15 00:29:56 -05:00
e4752c0985 Prefer registering both machine and global pipe
Signed-off-by: Jason T. Greene <jason.greene@redhat.com>
2022-04-15 00:29:49 -05:00
caef981d37 Merge pull request #13843 from lsm5/v4.0-cve-2022-27191-backport
[v4.0 backport] Bump golang.org/x/crypto to 7b82a4e
2022-04-12 16:29:43 -04:00
6a6e033e35 Bump golang.org/x/crypto to 7b82a4e
Resolves: GHSA-8c26-wmh5-6g9v - CVE-2022-27191

Podman doesn't seem to be directly affected as the logic in question
is not called.

golang.org/x/crypto@1baeb1ce contains the actual CVE fix. Using the
latest upstream commit to also include support for SHA-2.

Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
(cherry picked from commit 5e680d54e9e8b849b90047d2d87bc7664edaaa1d)
Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2022-04-12 11:02:40 -04:00
b74b93b9fc Merge pull request #13753 from mheon/bump_403_real
[CI:DOCS] Bump to v4.0.3
2022-04-01 13:13:25 -04:00
bc8ef4c2ca Update readme for v4.0.3
Signed-off-by: Matthew Heon <mheon@redhat.com>
2022-04-01 11:32:11 -04:00
29e931e9bd Bump to v4.0.4-dev
Signed-off-by: Matthew Heon <mheon@redhat.com>
2022-04-01 11:29:33 -04:00
6253405308 Bump to v4.0.3
Signed-off-by: Matthew Heon <mheon@redhat.com>
v4.0.3
2022-04-01 11:28:59 -04:00
eec7587aee Update release notes with Buildah revendor
Signed-off-by: Matthew Heon <mheon@redhat.com>
2022-04-01 11:28:40 -04:00
846d1c4fbd Merge pull request #13749 from Luap99/buildah-4.0
[v4.0] bump buildah to 1.24.3
2022-04-01 11:25:29 -04:00
35348a3e87 Merge pull request #13721 from mheon/bump_403
Backports and release notes for v4.0.3
2022-04-01 11:23:30 -04:00
d2cb8f4d4d [v4.0] bump buildah to 1.24.3
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-04-01 15:44:57 +02:00
d30a1e9d08 Update release notes
Signed-off-by: Matthew Heon <mheon@redhat.com>
2022-03-30 15:54:50 -04:00
df6082fd6f fix slirp4netns port forwarding with ranges
The slirp4netns port forwarder was not updated to make use of the new
port format. This results in a problem when port ranges are used since
it does not read the range field from the port.

Update the logic to iterate through all ports with the range and
protocols. Also added a system test for port ranges with slirp4netns,
rootlesskit and the bridge network mode.

Fixes #13643

[Fixed merge conflict]

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-03-30 15:53:56 -04:00
5949238e58 Update release notes for v4.0.3
Signed-off-by: Matthew Heon <mheon@redhat.com>
2022-03-30 15:36:05 -04:00
997b57dccf systemd: enable all cgroups when running as a service
enable cgroup delegation when running as a systemd service so all the
available controllers are correctly detected.

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

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2022-03-30 15:36:05 -04:00
197b8ad77b rootless netns: move process to scope only with systemd
When you run podman on a non systemd system we should not try to move the
process under a new systemd scope.

[NO NEW TESTS NEEDED]

Ref #13703

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-03-30 15:36:05 -04:00
c1d9851a4f upgrade tests: fix networking problems
With podman4 we support netavark, however old versions will still use
cni. Since netavark and cni can conflict we should not mix them.
Remove the network setup from the inital podman command and create the
directories manually to prevent such conflicts.

Also the update to 4.0 changes the network db structure. While it is
compatible from 3.X to 4.0 it will fail the other way around. In this
test it will happen because the cleanup process still uses the old
podman while the network connect/disconnect test already changed the db
format. Therefore the cleanup process cannot see any networks and will
not tear it down. The following start will fail because the ip address
is already assigned.

Fixes #13679

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-03-30 15:36:05 -04:00
a4203bd66c Set systemd mode if entrypoint begins with /bin/sh -c
Fixes: https://github.com/containers/podman/issues/13324

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2022-03-30 15:36:05 -04:00
b362367efb Switch all calls to filepath.Walk to filepath.WalkDir
WalkDir should be faster the Walk, since we often do
not need to stat files.

[NO NEW TESTS NEEDED] Existing tests should find errors.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2022-03-30 15:36:05 -04:00
713ce2a967 clarifying "loginctl enable-linger" section in doc
Signed-off-by: Adam Maryniuk <adamaze@gmail.com>
2022-03-30 15:36:05 -04:00
2d01e788b1 add contextDir to tar on remote
podman build fails on remote build when using a relative context directory.
This is because the context dir was not being added to the tar, so when remote
the compat build function would not be able to stat the contextDir.

resolves #13293

Signed-off-by: cdoern <cbdoer23@g.holycross.edu>
2022-03-30 15:36:05 -04:00
e93dc6c784 readConmonPipeData: try to improve error
Issue #10927 reports `container create failed (no logs from conmon): EOF`
errors. Since we do not know the root cause it would be helpful to try
to get as much info as possible out of the error.
(buffer).ReadBytes() will return the bytes read even when an error
occurs. So when we get an EOF we could still have some valuable
information in the buffer. Lets try to unmarshal them and if this fails
we add the bytes to the error message.

This does not fix the issue but it might help us getting a better error.

[NO NEW TESTS NEEDED]

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-03-30 15:36:05 -04:00
1e8c8e912a fix podman machine start log level detection
Use logrus.IsLevelEnabled because this will cover all levels below it as
well. Currently this condition would fail for the trace log level.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-03-30 15:36:05 -04:00
07c5946d9c podman machine start: lookup qemu path again if not found
We store the full path to qemu in the machine config. When the path
changes on the host the machine can longer be started. To fix it we get
the path again when we fail to start the machine due the missing binary.

We want to store and use the full path first because otherwise existing
machines can break when the qemu version changed.

[NO NEW TESTS NEEDED] We still have no machine tests.

Fixes #13394

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-03-30 15:36:05 -04:00
7705943816 Remove experimental warning from podman-remote rpm
podman-remote is considered stable and follows the same semver as
podman.

Fixes a question on the podman mailing list.
https://lists.podman.io/archives/list/podman@lists.podman.io/thread/2DVCU5Z54U4PI5ROTBQXHDBLQSAXAHFU/

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-03-30 15:36:05 -04:00
bca6b80b3e podman machine set: clarify --rootful option
It is not quite clear what the difference between `podman machine set
--rootful` and `podman system connection default` is.
Add a small note with the difference, the --rootful option will also
affect the socket forwarding.

Fixes #13515

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-03-30 15:36:05 -04:00
b1cc5043fd play: kube: use in-memory kubefile and remove tempfile
The PlayKube and PlayKubeDown commands accepted a "path" argument to a YAML file
to play. This requires the caller to write the YAML to a file path. The downside
of this is apparent in the HTTP handlers which have to use a temporary file on
disk to store the YAML file.

The file is opened & used as the body of the HTTP request. It's possible to
instead pass a io.Reader and use a fully in-memory request body.

Add backwards-compatible changes to bindings to allow passing either a filepath
or a io.Reader body.

Refactor the podman bindings to use a io.Reader instead of a filepath.

Simplify the HTTP handlers for PlayKube by removing the now unneeded tempfile.

[NO NEW TESTS NEEDED]

Signed-off-by: Christian Stewart <christian@paral.in>
2022-03-30 15:36:05 -04:00
ee9030bfde machine-set: fix example for setting rootful flag
Flag is actually named `rootful` however documented as `root`, fix the
documented example as actual flag.

Both `podman machine init` and `podman machine set` uses flag `rootfull`

[NO TESTS NEEDED]
[NO NEW TESTS NEEDED]

Signed-off-by: Aditya R <arajan@redhat.com>
2022-03-30 15:36:05 -04:00
1266f73420 podman stats: calc CPU percentage correctly
When you run podman stats, the first interval always shows the wrong cpu
usage. To calculate cpu percentage we get the cpu time from the cgroup
and compare this against the system time between two stats. Since the
first time we do not have a previous stats an empty struct is used
instead. Thus we do not use the actual running time of the container but
the current unix timestamp (time since Jan 1 1970).

To fix this we make sure that the previous stats time is set to the
container start time, when it is empty.

[NO NEW TESTS NEEDED] No idea how I could create a test which would have
a predictable cpu usage.

See the linked bugzilla for a reproducer.

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=2066145

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-03-30 15:36:05 -04:00
9510238ff9 podman stats: improve cpu average calc
We can just calculate the cpu percent for the time the container is
running. There is no need to use datapoints.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-03-30 15:36:05 -04:00
8bc2f6cd84 Explicitly use IPv4 to check if podman-machine VM is listening
When starting a VM that has been configured with volume mounts, the
podman client attempts to connect via TCP to localhost, which runs
gvproxy to proxy an ephemeral port to the VM's ssh port.  Previously,
gvproxy was listening on all interfaces and IP addresses, but this
behavior has changed to listening only on the IPv4 loopback address.

Without this change, if a newer build of gvproxy is used, a podman
machine configured with volume mounts will hang forever after "podman
machine start" with "Waiting for VM ...".

[NO NEW TESTS NEEDED]

Signed-off-by: Burt Holzman <burt@fnal.gov>
2022-03-30 15:36:05 -04:00
82c01341f7 Fix a potential race around the exec cleanup process
Every exec session run attached will, on exit, do two things: it
will signal the associated `podman exec` that it is finished (to
allow Podman to collect the exit code and exit), and spawn a
cleanup process to clean up the exec session (in case the `podman
exec` process died, we still need to clean up). If an exec
session is created that exits almost instantly, but generates a
large amount of output (e.g. prints thousands of lines), the
cleanup process can potentially execute before `podman exec` has
a chance to read the exit code, resulting in errors. Handle this
by detecting if the cleanup process has already removed the exec
session before handling the error from reading the exec exit
code.

[NO NEW TESTS NEEDED] I have no idea how to test this in CI.

Fixes #13227

Signed-off-by: Matthew Heon <mheon@redhat.com>
2022-03-30 15:36:05 -04:00
12ab78d333 docs: Fix links to Containerfile and containerignore
The documentation files for `Containerfile` and `containerignore` have
been moved from the `buildah` repository to the `common` repository.

ref: https://github.com/containers/buildah/commit/488e8654ea

Signed-off-by: John Kristensen <john@jerrykan.com>
2022-03-30 15:36:05 -04:00
98677c2f04 podman unshare: document that command cannot be used with remote
Fixes #13596

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-03-30 15:36:05 -04:00
89a4466ee8 fix compose test error in retry logic
We cannot use local var outside of a function. We have to use a global
one.

Log: https://storage.googleapis.com/cirrus-ci-6707778565701632-fcae48/artifacts/containers/podman/5970023511490560/html/compose_v2-podman-fedora-35-root-host.log.html

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-03-30 15:36:05 -04:00
4dbb2bf92b libpod: drop warning if cgroup doesn't exist
do not print a warning on cgroup removal if it doesn't exist.

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

[NO NEW TESTS NEEDED]

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2022-03-30 15:36:05 -04:00
ef202133f5 healthcheck: stop showing wrong status when --no-healthcheck is set
Containers started with `--no-healthcheck` are configured to contain no
healthcheck and test configured as `NONE`. Podman shows wrong status as
such use cases.

Following commit fixes the faulty behavior of stauts field for
containers started with `--no-healthcheck`

Signed-off-by: Aditya R <arajan@redhat.com>
2022-03-30 15:36:05 -04:00
116a9ef02f Makefile: build podman-remote-static with cgo disabled
Resolves: #13557

[NO NEW TESTS NEEDED]

Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2022-03-30 15:36:05 -04:00