16517 Commits

Author SHA1 Message Date
6668ac93bb libpod: Factor out capabilites code from prepareProcessExec
This moves the code which sets the process capabilites for the exec to
oci_conmon_exec_linux.go since this is a linux-specific feature. Adding
a no-op stub for FreeBSD enables 'podman exec' when using the ocijail
runtime.

[NO NEW TESTS NEEDED]

Signed-off-by: Doug Rabson <dfr@rabson.org>
2022-09-07 07:58:37 +01:00
f6e3cfa538 system tests: fix systemd tests in proxy environment
Under proxy environment, we need to add
proxy environment variables.

Related to: #15639

Signed-off-by: Toshiki Sonoda <sonoda.toshiki@fujitsu.com>
2022-09-07 09:46:31 +09:00
744878a71c Add win-installer build/verify workflows to CI
Signed-off-by: Jason T. Greene <jason.greene@redhat.com>
2022-09-06 16:17:31 -05:00
ecb9f99b88 Add new windows installer and build
Signed-off-by: Jason T. Greene <jason.greene@redhat.com>
2022-09-06 16:12:09 -05:00
ea3e7ef073 Merge pull request #15654 from tyler92/fix-ctr-remove-after-power-off
fix Pod removal after OS hard shutdown
2022-09-06 21:44:04 +02:00
db5ec4dcdc Merge pull request #15547 from vrothberg/RUN-1606
Support auto updates for Kubernetes workloads
2022-09-06 21:38:54 +02:00
d759576ab3 emit container labels also for container exited and exec died events
- adds unit test for container labels on container die event
- implements #15617

Signed-off-by: Harald Albrecht <harald.albrecht@gmx.net>
2022-09-06 20:29:44 +02:00
9585147e1e fix Pod removal after OS hard shutdown
In case of a hard OS shutdown, containers may have a "removing"
state after a reboot, and an attempt to remove Pods with such
containers is unsuccessful:

error freeing lock for container ...: no such file or directory

[NO NEW TESTS NEEDED]

Signed-off-by: Mikhail Khachayants <tyler92@inbox.ru>
2022-09-06 20:41:10 +03:00
2f555c0c74 Merge pull request #15621 from ventifus/fix-manpage-header
[CI:DOCS] Fix manpage header formatting
2022-09-06 19:26:53 +02:00
e0d5b4e3fb Change pipe wait to 20 seconds
[NO NEW TESTS NEEDED]

Signed-off-by: Jason T. Greene <jason.greene@redhat.com>
2022-09-06 12:24:38 -05:00
63c779a857 Fix manpage headers
Signed-off-by: Andrew Denton <adenton@redhat.com>
2022-09-06 09:37:13 -07:00
4675103c22 Man pages: refactor common options: --sysctl
As promised, harder and harder to review. Please take your time
with this one.

For IPC, I went with the list form. For net, I used the single-
sentence form instead of a one-element list.

The container/pod diffs are clumsy, sorry. Maybe it's time to
start thinking of a more flexible conditional mechanism, but
I'd really like to avoid that so I hope this is acceptable.

In the first sentence I went with 'namespaced' (final 'd') in
all instances. I also got rid of the 'new' in 'new pod' in
pod-clone.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2022-09-06 09:59:14 -06:00
6da1eaf287 Merge pull request #15650 from edsantiago/docs_dedup_device
[CI:DOCS] Man pages: refactor common options: --device
2022-09-06 17:52:23 +02:00
eb39d56dfc Bump github.com/docker/go-units from 0.4.0 to 0.5.0
Bumps [github.com/docker/go-units](https://github.com/docker/go-units) from 0.4.0 to 0.5.0.
- [Release notes](https://github.com/docker/go-units/releases)
- [Commits](https://github.com/docker/go-units/compare/v0.4.0...v0.5.0)

---
updated-dependencies:
- dependency-name: github.com/docker/go-units
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2022-09-06 16:59:24 +02:00
f4c39df25e Add win-sshproxy.exe to windows client zips
Signed-off-by: Jason T. Greene <jason.greene@redhat.com>
2022-09-06 09:26:28 -05:00
41e1642f56 Merge pull request #15645 from containers/dependabot/go_modules/github.com/container-orchestrated-devices/container-device-interface-0.5.1
build(deps): bump github.com/container-orchestrated-devices/container-device-interface from 0.5.0 to 0.5.1
2022-09-06 16:22:55 +02:00
40cd1c0ff5 Man pages: refactor common options: --device
The refactors are starting to get harder to review - sorry.

Here the differences are pretty small, mostly changes to the
"it is a combination" wording and some asteriskization.

The more significant diffs are that there are some Notes that
are pod- or container- or build-specific; I needed to move those
from the middle to the end, then keep them in the source files
themselves. I don't think this affects readability of the
resulting man pages, but your opinion may differ.

Last important thing: I included the /dev/fuse text in the
common option, which means it will now show up in podman-build
(it was not previously there). If this text is not applicable
to podman-build, please LMK ASAP so I can just move it back
to individual source files.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2022-09-06 08:20:32 -06:00
4462305fe8 Update the displayed warning in documentation regarding the system reset
[NO NEW TESTS NEEDED]

Signed-off-by: Barnabé BALP <contact@barnabebalp.fr>
2022-09-06 16:04:51 +02:00
cd09e3b6d0 Merge pull request #15644 from Luap99/event-format
fix podman events with custom format
2022-09-06 15:56:20 +02:00
46e9178ef6 Merge pull request #15639 from fj-tsubasa/system-test-proxy
system tests: fix some tests in proxy environment
2022-09-06 15:53:45 +02:00
4e06aa3771 Merge pull request #15584 from sstosh/generate-systemd-env
Add generate systemd -e/--env option
2022-09-06 15:40:55 +02:00
34b0be6cff Merge pull request #15638 from n1hility/stale-config-fix
(Windows) Drop stale config value resulting in asymmetric config
2022-09-06 15:13:04 +02:00
0926902976 build(deps): bump github.com/container-orchestrated-devices/container-device-interface
Bumps [github.com/container-orchestrated-devices/container-device-interface](https://github.com/container-orchestrated-devices/container-device-interface) from 0.5.0 to 0.5.1.
- [Release notes](https://github.com/container-orchestrated-devices/container-device-interface/releases)
- [Commits](https://github.com/container-orchestrated-devices/container-device-interface/compare/v0.5.0...v0.5.1)

---
updated-dependencies:
- dependency-name: github.com/container-orchestrated-devices/container-device-interface
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-09-06 12:25:06 +00:00
77ab6125f2 remove SkipIfNotFedora() from events test
They should work on all distros.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-09-06 13:57:06 +02:00
d22aeeec28 fix podman events with custom format
podman events --format {{.ID}} was not working since the template was
converted to a range but we only render each event individually.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-09-06 13:56:26 +02:00
a9a411f8a8 Add generate systemd -e/--env option
-e/--env option sets environment variables to the systemd unit files.

Fixes: #15523

Signed-off-by: Toshiki Sonoda <sonoda.toshiki@fujitsu.com>
2022-09-06 20:17:11 +09:00
6b3bb9e75e Merge pull request #15632 from dfr/freebsd-container
Add support for FreeBSD containers
2022-09-06 12:43:55 +02:00
a61a9525e3 Merge pull request #15637 from edsantiago/argh
CI: Cirrus setup: retry failed curls
2022-09-06 10:09:12 +02:00
43baf49bb8 Merge pull request #15636 from edsantiago/docs_dedup_memory
[CI:DOCS] Man pages: refactor common options: --memory*
2022-09-06 09:09:50 +02:00
274d34a25a kube play: support auto updates and rollbacks
Add auto-update support to `podman kube play`.  Auto-update policies can
be configured for:
 * the entire pod via the `io.containers.autoupdate` annotation
 * a specific container via the `io.containers.autoupdate/$name` annotation

To make use of rollbacks, the `io.containers.sdnotify` policy should be
set to `container` such that the workload running _inside_ the container
can send the READY message via the NOTIFY_SOCKET once ready.  For
further details on auto updates and rollbacks, please refer to the
specific article [1].

Since auto updates and rollbacks bases on Podman's systemd integration,
the k8s YAML must be executed in the `podman-kube@` systemd template.
For further details on how to run k8s YAML in systemd via Podman, please
refer to the specific article [2].

An examplary k8s YAML may look as follows:
```YAML
apiVersion: v1
kind: Pod
metadata:
  annotations:
      io.containers.autoupdate: "local"
      io.containers.autoupdate/b: "registry"
  labels:
    app: test
  name: test_pod
spec:
  containers:
  - command:
    - top
    image: alpine
    name: a
  - command:
    - top
    image: alpine
    name: b
```

[1] https://www.redhat.com/sysadmin/podman-auto-updates-rollbacks
[2] https://www.redhat.com/sysadmin/kubernetes-workloads-podman-systemd

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2022-09-06 08:56:55 +02:00
04f0ac2aab system tests: fix some tests in proxy environment
Some system tests in `255-auto-update.bats` and `500-networking.bats`
fail under proxy environment.
This PR fixes this problem.

Signed-off-by: Tsubasa Watanabe <w.tsubasa@fujitsu.com>
2022-09-06 14:22:31 +09:00
6a3c28968e Drop stale config value resulting in asymmetric config
Fixes log follow operations since corresponding k8s-file backend was previously dropped

Signed-off-by: Jason T. Greene <jason.greene@redhat.com>
2022-09-06 00:01:30 -05:00
c2c910736c CI: Cirrus setup: retry failed curls
We're seeing a huge number of "unknown failure" flakes,
and all seem to be in the 'clone' step, failing with:

   echo "$ARTCURL..."
   curl ... https://api.cirrus-ci.com/.../repo.tbz
   (lots of pretty curl output lines)
   curl: (22) The requested URL returned error: 502

Solution: use --retry, which will backoff-retry transient
failures. Start with a backoff of 8s, not the default 1.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2022-09-05 18:06:18 -06:00
fb38838fea Man pages: refactor common options: --memory*
(memory-star, i.e., several memory options) that didn't get
included in #15276. Most of them are shoo-ins; the two in
container-clone and pod-clone deserve special attention
because of the "If unspecified" wording.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2022-09-05 17:59:13 -06:00
0df291d3b5 Update system reset warning message to warn against deletion of all volumes
Signed-off-by: Barnabé BALP <contact@barnabebalp.fr>
2022-09-05 19:34:04 +02:00
bdfc4df1f2 pkg/autoupdate: allow updating multiple tasks per unit
Refactor the auto-update backend to allow for updating multiple
tasks/containers per unit.  This commit is merely doing the plumbing.
The actual integration comes in a following commit.

[NO NEW TESTS NEEDED] as behavior should not change and existing
tests are expected to continue to pass.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2022-09-05 16:23:06 +02:00
8882b7664d Merge pull request #15630 from rhatdan/capabilities
[CI:DOCS] Fix list of default capabilities
2022-09-05 16:07:42 +02:00
cbaa78cd8a Fix list of default capabilities
Fixes: https://github.com/containers/podman/issues/15626

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2022-09-05 07:25:38 -04:00
a3aecf0f26 libpod: Factor out setting volume atime to container_internal_linux.go
It turns out that field names in syscall.Stat_t are platform-specific.
An alternative to this could change fixVolumePermissions to use
unix.Lstat since unix.Stat_t uses the same mmember name for Atim on both
Linux and FreeBSD.

[NO NEW TESTS NEEDED]

Signed-off-by: Doug Rabson <dfr@rabson.org>
2022-09-05 10:20:50 +01:00
7a1abd03c5 libpod: Move miscellaneous file handlling to container_internal_common.go
[NO NEW TESTS NEEDED]

Signed-off-by: Doug Rabson <dfr@rabson.org>
2022-09-05 10:20:50 +01:00
d162285f34 libpod: Don't mount /dev/shm in containers on FreeBSD
This mount has never been standard on FreeBSD, preferring to use /tmp or
/var/tmp optionally with tmpfs to ensure data is lost on a reboot.

[NO NEW TESTS NEEDED]

Signed-off-by: Doug Rabson <dfr@rabson.org>
2022-09-05 10:20:50 +01:00
212b11c34c libpod: Factor out handling of slirp4netns and net=none
[NO NEW TESTS NEEDED]

Signed-off-by: Doug Rabson <dfr@rabson.org>
2022-09-05 10:20:50 +01:00
eab4291d99 libpod: Move functions related to /etc bind mounts to container_internal_common.go
[NO NEW TESTS NEEDED]

Signed-off-by: Doug Rabson <dfr@rabson.org>
2022-09-05 10:20:50 +01:00
b3989be768 libpod: Move getRootNetNsDepCtr to container_internal_common.go
[NO NEW TESTS NEEDED]

Signed-off-by: Doug Rabson <dfr@rabson.org>
2022-09-05 10:17:50 +01:00
a148c16225 libpod: Use (*Container).addNetworkNamespace to restore checkpoint network
[NO NEW TESTS NEEDED]

Signed-off-by: Doug Rabson <dfr@rabson.org>
2022-09-05 10:17:49 +01:00
7518a9136a libpod: Move functions related to checkpoints to container_internal_common.go
[NO NEW TESTS NEEDED]

Signed-off-by: Doug Rabson <dfr@rabson.org>
2022-09-05 10:17:49 +01:00
be5d1261b4 libpod: Move mountNotifySocket to container_internal_common.go
[NO NEW TESTS NEEDED]

Signed-off-by: Doug Rabson <dfr@rabson.org>
2022-09-05 10:17:49 +01:00
71e2074e83 libpod: Move getUserOverrides, lookupHostUser to container_internal_common.go
[NO NEW TESTS NEEDED]

Signed-off-by: Doug Rabson <dfr@rabson.org>
2022-09-05 10:17:49 +01:00
232eea5a00 libpod: Move isWorkDirSymlink, resolveWorkDir to container_internal_common.go
[NO NEW TESTS NEEDED]

Signed-off-by: Doug Rabson <dfr@rabson.org>
2022-09-05 10:17:49 +01:00
a5ee3cb790 pkg/util: Add no-op implementation of AddPrivilegedDevices on FreeBSD
[NO NEW TESTS NEEDED]

Signed-off-by: Doug Rabson <dfr@rabson.org>
2022-09-05 10:17:49 +01:00