12928 Commits

Author SHA1 Message Date
1199733754 podman inspect add State.Health field for docker compat
podman inspect shows the healthcheck status in `.State.Healthcheck`,
docker uses `.State.Health`. To make sure docker scripts work we
should add the `Health` key. Because we do not want to display both keys
by default we only use the new `Health` key. This is a breaking change
for podman users but matches what docker does. To provide some form of
compatibility users can still use `--format {{.State.Healthcheck}}`. IT
is just not shown by default.

Fixes #11645

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2021-09-23 14:44:34 +02:00
aa628b82b1 Merge pull request #11689 from Luap99/con-state
sync container state before reading the healthcheck
2021-09-22 14:30:39 -04:00
420ff1da92 Merge pull request #11694 from edsantiago/prevent_port_collisions
Eighty-six eighty-eighty
2021-09-22 12:33:45 -04:00
ad8f72949a Merge pull request #11657 from containers/dependabot/go_modules/k8s.io/api-0.22.2
Bump k8s.io/api from 0.22.1 to 0.22.2
2021-09-22 12:32:46 -04:00
db44addf97 sync container state before reading the healthcheck
The health check result is stored in the container state. Since the
state can change or might not even be set we have to retrive the current
state before we try to read the health check result.

Fixes #11687

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2021-09-22 17:40:16 +02:00
e92b383033 Merge pull request #11629 from Luap99/CNI-1.0
Bump CNI to v1.0.1
2021-09-22 11:37:45 -04:00
d88ed478cb Merge pull request #11692 from Luap99/nettypes
net types: remove omitempty from required fields
2021-09-22 10:17:45 -04:00
8f19efb519 Merge pull request #11678 from vrothberg/fix-11613
podman save: add `--uncompressed`
2021-09-22 09:53:46 -04:00
5acf8ae120 Eighty-six eighty-eighty
(Sorry, couldn't resist).

CI flakes have been coming down - thank you to everyone who has
been making them a priority.

This leaves a noisy subset that I've just been ignoring for months:

    Running: podman ... -p 8080:something
    ...cannot listen on the TCP port: listen tcp4 :8080: bind: address already in use

Sometimes these are one-time errors resolved on 2nd try; sometimes
they fail three times, forcing CI user to hit Rerun. In all cases
they make noise in my flake logs, which costs me time.

My assumption is that this has to do with ginkgo running random
tests in parallel. Since many e2e tests simplemindedly use 8080,
collisions are inevitable.

Solution: simplemindedly replace 8080 with other (also arbitrarily
picked) numbers. This is imperfect -- it requires human developers
to pick a number NNNN and 'grep NNNN test/e2e/*' before adding
new tests, which I am 100% confident ain't gonna happen -- but
it's better than what we have now.

Side note: I considered writing and using a RandomAvailablePort()
helper, but that would still be racy. Plus, it would be a pain
to interpolate strings into so many places. Finally, with this
hand-tooled approach, if/when we _do_ get conflicts on port NNNN,
it should be very easy to grep for NNNN, find the offending tests
that reuse that port, and fix one of them.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2021-09-22 07:49:19 -06:00
68d21b6ff5 net types: remove omitempty from required fields
This will make reading the fields easier in rust because we can
guarantee that the fields will be present in the json output.

[NO TESTS NEEDED]

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2021-09-22 14:13:37 +02:00
7910bfd7c1 Merge pull request #11659 from vrothberg/psgo
vendor c/psgo@v1.7.1
2021-09-22 06:38:44 -04:00
49c5688a30 podman save: add --uncompressed
Add an option to `podman save` to allow uncompressed layers when
copying OCI images.  Do the neccessary plumbing for the remote client,
add tests and vendor in the latest commit from c/common to fetch
the neccessary changes in libimage.

Closes: #11613
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-09-22 12:38:07 +02:00
af49810a6e Bump CNI to v1.0.1
Update CNI so we can match wrapped errors. This should silence ENOENT
warnings when trying to read the cni conflist files.

Fixes #10926

Because CNI v1.0.0 contains breaking changes we have to change some
import paths. Also we cannot update the CNI version used for the
conflist files created by `podman network create` because this would
require at least containernetwork-plugins v1.0.1 and a updated dnsname
plugin. Because this will take a while until it lands in most distros
we should not use this version. So keep using v0.4.0 for now.

The update from checkpoint-restore/checkpointctl is also required to
make sure it no longer uses CNI to read the network status.

[NO TESTS NEEDED]

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2021-09-22 11:51:40 +02:00
e9214ce81e Merge pull request #11681 from mheon/retry_event_lookup
Add a backoff and retries to retrieving exited event
2021-09-22 05:19:03 -04:00
5875e409e2 vendor c/psgo@v1.7.1
psgo added support for listing supplementary groups via
two new descriptors:

* `groups` for supplementary groups inside the container
* `hgroups` for the counterpart on the host

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-09-22 10:35:08 +02:00
8e2d25e937 Merge pull request #11641 from TomSweeneyRedHat/dev/tsweeney/myalias
[CI:DOCS] Add network alias note in man pages
2021-09-21 20:12:06 -04:00
738f2b36e3 [CI:DOCS] Add network alias note in man pages
Adds a note about the limitation of network aliases to the man pages
This should satisfy https://issues.redhat.com/browse/RUN-1189

Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
2021-09-21 18:15:54 -04:00
79816798c2 Merge pull request #11579 from cevich/add_cross_release
Cross-build linux releases w/ arch in filename
2021-09-21 17:02:06 -04:00
4ecbc7caae Add a backoff and retries to retrieving exited event
There's a potential race around extremely short-running
containers and events with journald. Events may not be written
for some time (small, but appreciable) after they are received,
and as such we can fail to retrieve it if there is a sufficiently
short time between us writing the event and trying to read it.

Work around this by just retrying, with a 0.25 second delay
between retries, up to 4 times.

[NO TESTS NEEDED] because I have no idea how to reproduce this
race in CI.

Fixes #11633

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2021-09-21 15:32:07 -04:00
319fcf52fc Cross-build release-archives w/ arch in filename
Fixes #11417

Cross-building the podman-remote documentation requires a functional
native architecture executable.  However `make` only deals with
files/timestamps, it doesn't understand if an existing binary will
function on the system or not.  This makes building cross-platform
releases incredibly accident-prone and fragile.

A practical way to deal with this, is via multiple conditional (nested)
`make` calls along with careful manipulation of `$GOOS` and `$GOARCH`.
Also, when cross-building releases be kind to humans and cleanup
any non-native binaries left behind.

Update the `Alt Arch. Cross` Cirrus-CI task to build release archives
for all Linux architectures supported by golang and podman.  Update
the `OSX Cross` task to additionally build for the M1 (arm64)
architecture.

Finally, update the release process documentation to reflect the
new locations (Cirrus-CI task names) for the release archives.  Include
a note about additional manual work being required to produce the
signed `.dmg` file for MacOS.

Signed-off-by: Chris Evich <cevich@redhat.com>
2021-09-21 14:34:30 -04:00
cd7b48198c Merge pull request #11631 from cevich/replace_hack-get_release_info
Fix Error, empty output for info: 'VERSION'
2021-09-21 14:05:41 -04:00
34043bd81d Fix Error, empty output for info: 'VERSION'
When building releases, the definitive canonical version of podman (or
podman-remote) is needed.  Previously this was accomplished by scraping
`version/version.go`.  However, due to tooling differences across
platforms, this has proven problematic, unreliable, and hard to
maintain.

Fix this by building and caching a small golang binary who's only purpose
is to print the version number to stdout.  This not only provides a quick
and reliable way to determine the current version, it also acts as a check
on the version API vs tooling that relies on it.

Lastly, remove several `RELEASE_*` Makefile definitions which aren't
actually used anywhere.  These were originally added a very long time
ago to serve as part of a long since retired release process.  The
remaining items, were updated to make use of the new `.podmanversion`
binary on an as-required basis (i.e. not every time `make` is run).

Signed-off-by: Chris Evich <cevich@redhat.com>
2021-09-21 12:29:26 -04:00
d8d494994a Merge pull request #11662 from baude/kubenodev
Remove references to kube being development
2021-09-21 11:34:40 -04:00
f2c2e1c520 Merge pull request #11676 from rhatdan/kube
Generate kube shouldn't add podman default environment vars
2021-09-21 11:27:43 -04:00
b922e61cec Merge pull request #11650 from flouthoc/named-volume-overlay
volume: Add support for overlay on named volumes
2021-09-21 10:50:40 -04:00
185294cb8c Generate kube should'd add podman default environment vars
Currently we add the default PATH, TERM and container from Podman
to every kubernetes.yaml file. These values should not be recorded
in the yaml files.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-09-21 09:03:31 -04:00
9b5522d9ad Merge pull request #11518 from cdoern/podDevice
Pod Devices support
2021-09-21 08:40:40 -04:00
ae5de8b390 volume: Add support for overlay on named volumes
Following PR allows containers to create and mount overlays on top of
named volumes instead of mounting actual volumes via already documented `:O`.

Signed-off-by: Aditya Rajan <arajan@redhat.com>
2021-09-21 13:06:23 +05:30
8fac34b8ff Pod Device Support
added support for pod devices. The device gets added to the infra container and
recreated in all containers that join the pod.

This required a new container config item to keep track of the original device passed in by the user before
the path was parsed into the container device.

Signed-off-by: cdoern <cdoern@redhat.com>
2021-09-20 23:22:43 -04:00
b925d707fa Merge pull request #11639 from jwhonce/issues/2221
Support --format tables in ps output
2021-09-20 18:39:36 -04:00
8453c8ce63 Support --format tables in ps output
- Added tests to help ensure there is no future regressions
- Added WaitWithTimeout(int) rather than calling
  WaitWithDefaultTimeout() multiple times
- Exposed DefaultWaitTimeout to allow test to use a multiplier

Fixes #2221

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2021-09-20 13:51:27 -07:00
7e8ce73c15 Merge pull request #11660 from rhatdan/docs
Add podman image/container inspect man pages
2021-09-20 14:35:45 -04:00
791458605a Merge pull request #11630 from rhatdan/timeout
Add support for retrieving system service --timeout
2021-09-20 14:21:44 -04:00
fff178fe51 Merge pull request #11601 from cdoern/mapOptions
Created MapOptions for PodCreate
2021-09-20 14:02:42 -04:00
a2b3674143 Merge pull request #11649 from Luap99/machine-dns
podman machine: use gvproxy for host.containers.internal
2021-09-20 13:48:42 -04:00
b700fe22fd Merge pull request #11644 from rhatdan/now
Add podman machine init --now option
2021-09-20 13:47:43 -04:00
61217f3ba9 Remove references to kube being development
At this point and even though we are always improving the play and
generate kube functions, I would say it no longers needs to be denoted
as under development.

[NO TESTS NEEDED]

Signed-off-by: Brent Baude <bbaude@redhat.com>
2021-09-20 12:47:15 -05:00
4cdffd0714 Merge pull request #11656 from Luap99/compat-id
compat API: /images/json prefix image id with sha256
2021-09-20 12:34:44 -04:00
8ccaebb853 Merge pull request #11661 from umohnani8/docs
[CI:DOCS] Add link to skopeo delete in podman rmi
2021-09-20 12:31:43 -04:00
b74edfb0a1 Add support for retrieving system service --timeout
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-09-20 12:10:14 -04:00
3221f50a45 Add podman image/container inspect man pages
[NO TESTS NEEDED] since this is really a docs change.

Concludes: https://github.com/containers/podman/pull/11620

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-09-20 12:06:26 -04:00
665b451e51 [CI:DOCS] Add link to skopeo delete in podman rmi
Add a note pointing to skopeo delete for when
users want to delete an image in a remote registry.

Signed-off-by: Urvashi Mohnani <umohnani@redhat.com>
2021-09-20 10:58:18 -04:00
cc6a85bcde Merge pull request #11652 from vrothberg/vendor-common
vendor c/common@main
2021-09-20 10:35:44 -04:00
f7d7fc2c8c Merge pull request #11651 from vrothberg/fix-11557
remote untag: support digests
2021-09-20 10:28:45 -04:00
5098124570 vendor c/common@main
Finalizes the linked BZ to fix passing down custom authfiles during auto
updates.  Also fixes the if-newer pull policy.

[NO TESTS NEEDED] for now validated manually.  There's a TODO to add a
new system test that I did not find time for before PTO.

BZ: bugzilla.redhat.com/show_bug.cgi?id=2000943
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-09-20 15:07:41 +02:00
92ee2f372b remote untag: support digests
Fix a bug when remotely untagging an image via tag@digest.
The digest has been lost in the remote client and hence led
to a wrong behaviour on the server.

Fixes: #11557
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-09-20 15:06:37 +02:00
b906ecbb5b Merge pull request #11648 from giuseppe/raise-move-process-to-scope-only-with-cgroupv2
utils: raise warning only on cgroupv2
2021-09-20 09:05:43 -04:00
cb077c968d Created MapOptions for PodCreate
MapOptions take the pod and container create options, assigning matching values from infra
back to the pod for the Libpod API. This function, unlike the previous one, does not require any
manual additions when new options are added since it uses the structs JSON tags, this is a more modular approach.

Signed-off-by: cdoern <cdoern@redhat.com>
2021-09-20 08:33:15 -04:00
a1861c570f Bump k8s.io/api from 0.22.1 to 0.22.2
Bumps [k8s.io/api](https://github.com/kubernetes/api) from 0.22.1 to 0.22.2.
- [Release notes](https://github.com/kubernetes/api/releases)
- [Commits](https://github.com/kubernetes/api/compare/v0.22.1...v0.22.2)

---
updated-dependencies:
- dependency-name: k8s.io/api
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-09-20 12:24:12 +00:00
5242030ac2 compat API: /images/json prefix image id with sha256
Docker adds the `sha256:` prefix to the image ID, so our compat endpoint
has to do this as well.

Fixes #11623

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2021-09-20 13:47:29 +02:00