16739 Commits

Author SHA1 Message Date
fb3d55006f Improve generate systemd format
Fixes: https://github.com/containers/podman/issues/14897

Followup to #13814

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2022-09-21 05:10:55 -04:00
9bb51e8e96 Add labels to secrets
Add --label/-l label flag to secret create, and show labels when
inspecting secrets. Also allow labeling secrets via libpod/compat API.

Signed-off-by: Ashley Cui <acui@redhat.com>
2022-09-20 16:28:00 -04:00
7cfe0328f1 Add support to sig-proxy for podman-remote
Signed-off-by: Boaz Shuster <boaz.shuster.github@gmail.com>
2022-09-20 22:52:45 +03:00
377773ab5b Fix podman-remote run --attach stdin to show container ID
Signed-off-by: Boaz Shuster <boaz.shuster.github@gmail.com>
2022-09-20 22:42:49 +03:00
d968f3fe09 Replace deprecated ioutil
Package `io/ioutil` was deprecated in golang 1.16, preventing podman from
building under Fedora 37.  Fortunately, functionality identical
replacements are provided by the packages `io` and `os`.  Replace all
usage of all `io/ioutil` symbols with appropriate substitutions
according to the golang docs.

Signed-off-by: Chris Evich <cevich@redhat.com>
2022-09-20 15:34:27 -04:00
bb160be12b libpod: Implement 'podman cp' for FreeBSD
[NO NEW TESTS NEEDED]

Signed-off-by: Doug Rabson <dfr@rabson.org>
2022-09-20 08:36:23 +01:00
88f82ceab2 libpod: Move jointMountAndExec to container_copy_linux.go
This also moves the logic for resolving paths in running and stopped
containers tp container_copy_linux.go.

On FreeBSD, we can execute the function argument to joinMountAndExec
directly using host-relative paths since the host mount namespace
includes all the container mounts.

[NO NEW TESTS NEEDED]

Signed-off-by: Doug Rabson <dfr@rabson.org>
2022-09-20 08:36:23 +01:00
75d6e7bae5 libpod: Move part of (*Container).stat to container_stat_linux.go
The logic that treats running containers differently from stopped
containers is not needed on FreeBSD where the container mounts live in
a global mount namespace.

[NO NEW TESTS NEEDED]

Signed-off-by: Doug Rabson <dfr@rabson.org>
2022-09-20 08:36:23 +01:00
0b02d4cee6 libpod: Move container_copy_linux.go to container_copy_common.go
[NO NEW TESTS NEEDED]

Signed-off-by: Doug Rabson <dfr@rabson.org>
2022-09-20 08:36:23 +01:00
24d1290710 libpod: Move container_stat_linux.go to container_stat_common.go
[NO NEW TESTS NEEDED]

Signed-off-by: Doug Rabson <dfr@rabson.org>
2022-09-20 08:36:23 +01:00
30231d0da7 Merge pull request #15859 from edsantiago/docs_format_events
[CI:DOCS] man pages: document some --format options
2022-09-19 20:03:27 +02:00
5f5d40084c Merge pull request #15072 from rhatdan/context
Add support for podman context as alias to podman system connection
2022-09-19 17:35:43 +02:00
6790deb1b1 man pages: document some --format options
Baby steps toward merging #14046: document Go format options
for podman events.

This is deliberately imperfect. I am not the right person
to document these. I am simply the person who is getting
a skeleton framework in place.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2022-09-19 08:34:38 -06:00
541655f31a Merge pull request #15844 from rhatdan/selinux
label.Relabel third option is shared not recurse
2022-09-19 13:31:01 +02:00
23195646dc pkginstaller: use path_helper to add podman and helpers to path
path_helper(8) appends the contents of /etc/paths.d/podman-pkg to the
PATH env

[NO NEW TESTS NEEDED]

Signed-off-by: Anjan Nath <kaludios@gmail.com>
2022-09-19 12:08:01 +05:30
dc8fdb46c5 label.Relabel third option is shared not recurse
There is no option in Selinux labeling to only relabel the top level of
a directory. The option is to either label the path shared or not
shared. Changing to make sure future engineers do not assume that
recurse can work.

[NO NEW TESTS NEEDED]

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2022-09-17 07:14:31 -04:00
4e14fa05c9 Merge pull request #15839 from cdoern/clone
podman container clone env patch
2022-09-17 12:54:36 +02:00
049b108845 podman container clone env patch
podman container clone was failing when env variables had multiple `=` in them.
Switch split to splitn

resolves #15836

Signed-off-by: Charlie Doern <cdoern@redhat.com>
2022-09-16 11:43:26 -04:00
8f76bc2d73 Merge pull request #15833 from containers/dependabot/go_modules/github.com/coreos/go-systemd/v22-22.4.0
build(deps): bump github.com/coreos/go-systemd/v22 from 22.3.2 to 22.4.0
2022-09-16 17:27:11 +02:00
a9a1345cb0 Merge pull request #15823 from rhatdan/dns-opt
Default to --dns-option to match Docker and Buildah
2022-09-16 17:24:34 +02:00
4823c1b3f6 Merge pull request #15775 from cevich/gitlab_nightly
Cirrus: Move gitlab test to cirrus-cron "main"
2022-09-16 17:22:02 +02:00
1e16668ecc Merge pull request #15173 from carljmosca/main
[CI:DOCS] added docs for installing certificate authority
2022-09-16 16:58:48 +02:00
924079f8a1 Merge pull request #15755 from edsantiago/docs_for_formats
[CI:DOCS] man pages: document some --format options
2022-09-16 16:20:40 +02:00
903f551ae5 build(deps): bump github.com/coreos/go-systemd/v22 from 22.3.2 to 22.4.0
Bumps [github.com/coreos/go-systemd/v22](https://github.com/coreos/go-systemd) from 22.3.2 to 22.4.0.
- [Release notes](https://github.com/coreos/go-systemd/releases)
- [Commits](https://github.com/coreos/go-systemd/compare/v22.3.2...v22.4.0)

---
updated-dependencies:
- dependency-name: github.com/coreos/go-systemd/v22
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-09-16 12:17:01 +00:00
4a053a821a notifyproxy: don't set a read deadline
The read deadline may yield the READY message to be lost in space.
Instead, use a more Go-idiomatic alternative by using two goroutines;
one reading from the connection, the other watching the container.

[NO NEW TESTS NEEDED] since existing tests are exercising this
functionality already.

Fixes: #15800
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2022-09-16 13:45:25 +02:00
1071098ee2 kube play: sdnotify proxy: use a wait group
Use a wait group to a) wait for all proxies in parallel
                    b) avoid the potential for ABBA deadlocks

[NO NEW TESTS NEEDED] as it is not changing functionality

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2022-09-16 13:43:23 +02:00
740223c441 Merge pull request #15812 from sstosh/checkpoint-export-rawinput
remote: checkpoint --export prints a rawInput or an error on remote
2022-09-16 12:26:07 +02:00
21841dc381 Default to --dns-option to match Docker and Buildah
[NO NEW TESTS NEEDED] Existing tests cover this.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2022-09-16 06:14:35 -04:00
4ba6ee3060 Merge pull request #15776 from cevich/no_ubuntu_unit
Cirrus: Only run unit-testing on Fedora.
2022-09-16 11:36:27 +02:00
373267d103 Merge pull request #15817 from edsantiago/docs_dedup_dns
[CI:DOCS] Man pages: Refactor common options: --dns
2022-09-16 11:33:44 +02:00
ccee741973 Merge pull request #15829 from edsantiago/shlint
Cleanup: fix problems reported by shell lint
2022-09-16 09:55:56 +02:00
d63e49a26a remote: checkpoint --export prints a rawInput or an error on remote
This commit fixes `container checkpoint --export`
to print a rawInput or an error.

Fixes: #15743

Signed-off-by: Toshiki Sonoda <sonoda.toshiki@fujitsu.com>
2022-09-16 16:46:14 +09:00
0e3a0ec7d4 Merge pull request #15825 from edsantiago/fix_readthedocs
[CI:DOCS] Fix broken titles on readthedocs
2022-09-16 09:41:53 +02:00
a8a56b188c Merge pull request #15722 from edsantiago/treadmill_improvements
[CI:DOCS] Buildah treadmill script: various fixes
2022-09-16 09:39:04 +02:00
cfbc4aaeb5 Cleanup: fix problems reported by shell lint
Followup to #15616, which is not usable as it is (way, way, way
too much noise) but actually found a few real nits that should
be fixed.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2022-09-15 20:10:34 -06:00
e2573b734e Fix broken titles on readthedocs
Followup to #15621, which (correctly) removed parentheses from
md files. Turns out, a hidden part of our readthedocs process
depended on those parentheses. Update that step so it handles
the new, correct, <space><section-number> format.

Also update local-testing documentation in README, and clean it
up a little.

Fixes: #15822

Signed-off-by: Ed Santiago <santiago@redhat.com>
2022-09-15 14:35:06 -06:00
750726e62c Merge pull request #15821 from vrothberg/revert-c20abf12c714f359c7bbb291c444530f70cb1185
Revert "generate systemd: drop ExecStop"
2022-09-15 21:32:39 +02:00
df73f606ef Merge pull request #15757 from mheon/fix_15526
Introduce graph-based pod container removal
2022-09-15 21:01:23 +02:00
62d1c487d9 Man pages: Refactor common options: --dns
Only between podman-build, create, and run. podman-pod-create
is too different.

As usual I went with the podman-run version. This means
keeping the word "flag" (which should be "option"), for
ease of review. I will fix in my in-progress cleanup PR.

For podman-build, I removed "during the build" and changed
it to a note for that man page only.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2022-09-15 10:12:34 -06:00
7d1f688ff9 [CI:DOCS] man pages: document some --format options
Baby steps toward merging #14046: document a few of the Go format
command-line options.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2022-09-15 09:59:32 -06:00
884fd4575c Revert "generate systemd: drop ExecStop"
This reverts commit c20abf12c714f359c7bbb291c444530f70cb1185. In the
absence of `ExecStop` step, systemd will send the stop/kill signals to
the main PID while I asummed that systemd would jump directly to an
ExecStopPost step instead.

Hence revert the commit to let Podman take care of stopping rather than
systemd.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2022-09-15 17:56:45 +02:00
50c538b3cc Merge pull request #15792 from dfr/freebsd-inspect
Add support for 'podman inspect' on FreeBSD
2022-09-15 17:28:51 +02:00
50142678e4 Merge pull request #15816 from vrothberg/15686-drop-execstop
generate systemd: drop ExecStop
2022-09-15 17:07:59 +02:00
3508bd22fe Add support for podman context as alias to podman system connection
Alias
podman --context -> podman --connection
podman context use -> podman system connection default
podman context rm -> podman system connection rm
podman context create -> podman system connection add
podman context ls ->podman system connection ls
podman context inspect ->podman system connection ls --json (For
specified connections)

Podman context is a hidden command, but can be used for existing scripts
that assume Docker under the covers.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2022-09-15 08:17:15 -04:00
05e8d564ca Merge pull request #15815 from edsantiago/docs_dedup_no-stream
[CI:DOCS] Man pages: refactor common options: 2 stats opts
2022-09-15 14:06:13 +02:00
9ba034293d Man pages: refactor common options: 2 stats opts
--no-reset and --no-stream, in podman-stats and pod-stats.

Very minor tweak to --no-stream to account for pods.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2022-09-15 05:17:25 -06:00
c20abf12c7 generate systemd: drop ExecStop
Drop the ExecStop step to simplify the generated units a bit.

The extra ExecStopPost step was added by commit e5c343294424. If the
main PID (i.e., conmon) is killed, systemd will not execute ExecStop
(since the main PID is already down) but only execute the *Post steps.
Credits to the late Ulrich Obergfell for tracking this issue down; he is
missed.

The ExecStop step can safely be dropped since the Post step will take of
stopping (and removing) in any case.

Context: #15686
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2022-09-15 13:15:35 +02:00
2a8df49c2a Merge pull request #15811 from giuseppe/fix-memory-stats-api
stats: cap memory limit to the available memory
2022-09-15 12:12:48 +02:00
c8bd81caca Merge pull request #15810 from edsantiago/docs_dedup_shmsize
[CI:DOCS] Man pages: refactor common options: --shm-size
2022-09-15 12:02:29 +02:00
89cd311a1b Merge pull request #15781 from cevich/fix_win_installer_clone
Cirrus: Fix win_installer task clone failure
2022-09-15 11:43:57 +02:00