Commit graph

12950 commits

Author SHA1 Message Date
OpenShift Merge Robot e8fc990aad
Merge pull request #11654 from Luap99/health-docker
podman inspect add State.Health field for docker compat
2021-09-23 11:34:42 -04:00
OpenShift Merge Robot c2beea6958
Merge pull request #11721 from Luap99/image-completion
shell completion: do not show images without tag
2021-09-23 10:51:44 -04:00
OpenShift Merge Robot 6b8371b1a3
Merge pull request #11722 from nalind/build-platform-docs
[CI:DOCS] update docs for --platform in podman-build.1
2021-09-23 10:15:43 -04:00
OpenShift Merge Robot b08acdbc6b
Merge pull request #11714 from vrothberg/save-remove-signatures
podman save: enforce signature removal
2021-09-23 09:38:25 -04:00
Nalin Dahyabhai 82818caffe Update docs for --platform in podman-build.1
Update the descriptions of the --arch, --os, --variant, and --platform
options, since the last of those hasn't been a no-op for some time, and
it was recently extended to accept multiple values.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2021-09-23 09:24:18 -04:00
Paul Holzinger b6e5a4909a
shell completion: do not show images without tag
The shell completion should only suggest arguments that work. Using a
image without tag does not work in many cases. Having both the version
with and without tag also forces users to press one key more because
tab completion will always stop at the colon.

Fixes #11673

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2021-09-23 15:15:35 +02:00
Paul Holzinger 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
OpenShift Merge Robot 3d34d3a186
Merge pull request #11647 from EduardoVega/11491-U-suffix-mount-option
Add support for :U flag with --mount option
2021-09-23 08:32:24 -04:00
OpenShift Merge Robot 5764693613
Merge pull request #11174 from TomSweeneyRedHat/dev/tsweeney/docpodimage
[CI:DOCS] Add link to running ctrimage on enablesysadm
2021-09-23 08:01:25 -04:00
Valentin Rothberg 01bf8a6687 podman save: enforce signature removal
Enforce the removal of signatures in `podman save` to restore behavior
prior to the migration to libimage.  We may consider improving on that
in the future.  For details, please refer to the excellent summary by
@mtrmac [1].

[NO TESTS NEEDED] - manually verified but exisiting tests need some
further investigation (see [1]).

[1] https://github.com/containers/podman/pull/11669#issuecomment-925250264

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-09-23 13:50:49 +02:00
OpenShift Merge Robot b0d1c0fe22
Merge pull request #11704 from rhatdan/kube
podman generate kube should not include images command
2021-09-23 04:27:26 -04:00
OpenShift Merge Robot 1dba601b56
Merge pull request #11691 from afbjorklund/machine-list
Add more information about the VM to podman machine list
2021-09-22 18:47:48 -04:00
OpenShift Merge Robot 626df0a54e
Merge pull request #11604 from rhatdan/deleteContainer
Ignore mount errors except ErrContainerUnknown when cleaningup container
2021-09-22 18:45:48 -04:00
OpenShift Merge Robot f342784ce5
Merge pull request #11701 from ashley-cui/stream
Fix machine image
2021-09-22 18:44:47 -04:00
OpenShift Merge Robot f2eb5bbbae
Merge pull request #11693 from rhatdan/cleanup
standardize logrus messages to upper case
2021-09-22 18:25:48 -04:00
Eduardo Vega ed3c4a89d6 Add support for :U flag with --mount option
The :U flag can be used to change the ownership of source volumes based on
the UID, GID of the container. This is only supported by the --volume option,
this will allow to use --mount option as well.

Signed-off-by: Eduardo Vega <edvegavalerio@gmail.com>
2021-09-22 15:42:16 -06:00
TomSweeneyRedHat 2d5d98c047 [CI:DOCS] Add link to running ctrimage on enablesysadm
Add a link to the podman images readme.md to Dan's recent post
on Enable Sysadm about running containers inside of Podman

Fixes: https://github.com/containers/buildah/issues/3119

Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
2021-09-22 16:54:21 -04:00
Daniel J Walsh b6fecbb75e
Ignore mount errors except ErrContainerUnknown when cleaningup container
Fixes: https://github.com/containers/podman/issues/11207

[NO TESTS NEEDED] Since I don't know how to get into this situation.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-09-22 15:34:02 -04:00
Daniel J Walsh 1c4e6d8624
standardize logrus messages to upper case
Remove ERROR: Error stutter from logrus messages also.

[ NO TESTS NEEDED] This is just code cleanup.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-09-22 15:29:34 -04:00
Daniel J Walsh 45ee5c5db2
podman generate kube should not include images command
If the command came from the underlying image, then we should
not include it in the generate yaml file.

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

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-09-22 15:10:37 -04:00
Ashley Cui f5f95d722f Fix machine image
Make sure setting machine image to `testing` pulls down the testing
stream, and not the next stream

Signed-off-by: Ashley Cui <acui@redhat.com>
2021-09-22 14:38:24 -04:00
OpenShift Merge Robot aa628b82b1
Merge pull request #11689 from Luap99/con-state
sync container state before reading the healthcheck
2021-09-22 14:30:39 -04:00
OpenShift Merge Robot 420ff1da92
Merge pull request #11694 from edsantiago/prevent_port_collisions
Eighty-six eighty-eighty
2021-09-22 12:33:45 -04:00
OpenShift Merge Robot 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
Paul Holzinger 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
OpenShift Merge Robot e92b383033
Merge pull request #11629 from Luap99/CNI-1.0
Bump CNI to v1.0.1
2021-09-22 11:37:45 -04:00
Anders F Björklund 0baee2cc33 Also show the (initial) disk size
[NO TESTS NEEDED]

Signed-off-by: Anders F Björklund <anders.f.bjorklund@gmail.com>
2021-09-22 17:14:16 +02:00
Anders F Björklund 911298252a Show cpus and memory in machine list
[NO TESTS NEEDED]

Signed-off-by: Anders F Björklund <anders.f.bjorklund@gmail.com>
2021-09-22 17:14:07 +02:00
OpenShift Merge Robot d88ed478cb
Merge pull request #11692 from Luap99/nettypes
net types: remove omitempty from required fields
2021-09-22 10:17:45 -04:00
OpenShift Merge Robot 8f19efb519
Merge pull request #11678 from vrothberg/fix-11613
podman save: add `--uncompressed`
2021-09-22 09:53:46 -04:00
Ed Santiago 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
Paul Holzinger 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
OpenShift Merge Robot 7910bfd7c1
Merge pull request #11659 from vrothberg/psgo
vendor c/psgo@v1.7.1
2021-09-22 06:38:44 -04:00
Valentin Rothberg 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
Paul Holzinger 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
OpenShift Merge Robot 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
Valentin Rothberg 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
OpenShift Merge Robot 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
TomSweeneyRedHat 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
OpenShift Merge Robot 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
Matthew Heon 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
Chris Evich 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
OpenShift Merge Robot 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
Chris Evich 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
OpenShift Merge Robot d8d494994a
Merge pull request #11662 from baude/kubenodev
Remove references to kube being development
2021-09-21 11:34:40 -04:00
OpenShift Merge Robot 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
OpenShift Merge Robot 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
Daniel J Walsh 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
OpenShift Merge Robot 9b5522d9ad
Merge pull request #11518 from cdoern/podDevice
Pod Devices support
2021-09-21 08:40:40 -04:00
Aditya Rajan 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