13266 Commits

Author SHA1 Message Date
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
cf28dab9f1 podman machine: use gvproxy for host.containers.internal
Let the gvproxy dns server handle the host.containers.internal entry.
Support for this is already added to gvproxy. [1]

To make sure the container uses the dns response from gvproxy we should
not add host.containers.internal to /etc/hosts in this case.

[NO TESTS NEEDED] podman machine has no tests :/

Fixes #11642

[1] 1108ea4516

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2021-09-20 11:31:26 +02:00
eea5d25126 utils: return error message from StartTransientUnit
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2021-09-20 09:42:35 +02:00
4caca09698 utils: raise warning only on cgroupv2
if it is not running on cgroup v2, print only a debug message since
rootless users cannot create the cgroup.

commit 9c1e27fdd536f6026efe3da4360755a3e9135ca8 introduced the regression.

[NO TESTS NEEDED]

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2021-09-20 09:38:24 +02:00
74ad05396b Add podman machine init --now option
Once we have this option, the new documentation from users becomes
a little simpler.

brew install podman
podman machine init --now
podman run ...

--now option is based off of `systemctl enable XYZ.service --now`

[NO TESTS NEEDED] The infrastructure has not been setup yet to test
podman machine init.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-09-19 05:53:08 -04:00
ddb3844511 Merge pull request #11638 from edsantiago/bats
System tests: cleanup, and remove obsolete skips
2021-09-18 15:13:05 -04:00
a9e95eb327 Merge pull request #11628 from Luap99/remove-unsued-code
Remove unused code from libpod
2021-09-18 07:46:04 -04:00
fc4a47e0e7 Merge pull request #11617 from ashley-cui/ssh
[NO TESTS NEEDED] Add username flag for machine ssh
2021-09-18 06:43:03 -04:00
22df773f77 System tests: cleanup, and remove obsolete skips
* 070-build:
  - remove workaround for #9567, which is closed.
  - add many more cases to the ignorefile test,
    to test complicated special cases of Buildah PR 3486.

* 160-volumes:
  - remove a skip_if_remote, volumes now work on remote
  - use a random name for tarball, and clean up when
    done using it. This fixes a gating-test failure
    (test runs as root, then rootless, and rootless
    can't clobber root's file).

Signed-off-by: Ed Santiago <santiago@redhat.com>
2021-09-17 14:29:18 -06:00
e3e9e5175f Add username flag for machine ssh
allow users to specify what username to use when ssh-ing into the vm.
If the username flag is set, the username will be the flag value. If the
flag is not set and the the vm name is specified, the default user of
the vm will be used. if the flag is not set, and the vm name is not
specified, then the username of the default connection will be used.

Signed-off-by: Ashley Cui <acui@redhat.com>
2021-09-17 13:33:56 -04:00
08e1bb54c3 Merge pull request #11607 from Luap99/ipvlan
CNI: add ipvlan driver support and macvlan modes
2021-09-17 10:45:18 -04:00
c692f7a18b Remove unused code from libpod
The libpod package should only compile on linux. The remote client
should never try to import this package.

Since these files do not add any value we should remove them, this
prevents people from accidentally importing this package because it would
fail to compile on windows/macos.

[NO TESTS NEEDED]

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2021-09-17 13:57:38 +02:00
9a5987cf6a Merge pull request #11603 from rhatdan/truncate
Add no-trunc support to podman-events
2021-09-17 07:02:52 -04:00