16332 Commits

Author SHA1 Message Date
4a1acccf96 Fix bind-mount-option annotation in gen/play kube
The format used for setting the bind-mount-options annotations
in the kube yaml was incorrect and caused k8s to throw an error
when trying to play the generated kube yaml.
Fix the annotation format to match the rules of k8s.

Signed-off-by: Urvashi Mohnani <umohnani@redhat.com>
2022-09-01 11:51:46 -04:00
0085fbb488 Merge pull request #15571 from umohnani8/gen-kube
Set enableServiceLinks to false in generated yaml
2022-09-01 15:17:39 +02:00
3994eb6985 Merge pull request #15574 from edsantiago/fix_useradd_flake
Cirrus: pick UIDs/GIDs starting at 1500, not 1000
2022-09-01 13:51:15 +02:00
72f4c77139 Merge pull request #15360 from m0duspwnens/api_compat_containers
api: return imageID instead of imageName, for "Image" when Podman api is queried
2022-09-01 10:58:33 +02:00
009afb50b3 Merge pull request #15560 from dfr/freebsd-specgen
Add FreeBSD support for pkg/specgen/generate
2022-09-01 10:47:47 +02:00
54873c1f5e Merge pull request #15572 from lsm5/disable-packit
[CI:BUILD] Packit: Disable until proved in other repos
2022-09-01 03:13:28 +02:00
5faf4eff10 Cirrus: pick UIDs/GIDs starting at 1500, not 1000
Reason: looks like UIDs 1001, 1003, 1006 are already taken
in the CI VMs.

Fixes: #15573

Signed-off-by: Ed Santiago <santiago@redhat.com>
2022-08-31 13:47:05 -06:00
b25d62a4db [CI:BUILD] Packit: Disable until proved in other repos
There are concerns with Packit causing flakes and delays on Podman so
let's have Packit prove itself in other repos and only then make its way
into Podman.

See: https://github.com/containers/podman/pull/15549#issuecomment-1233230573

[NO NEW TESTS NEEDED]

Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2022-08-31 15:19:07 -04:00
84352a81c9 Set enableServiceLinks to false in generated yaml
Since podman doesn't set/use the needed service env
variable, always set enableServiceLinks to false in
the generated kube yaml.

Signed-off-by: Urvashi Mohnani <umohnani@redhat.com>
2022-08-31 14:02:13 -04:00
07413f2035 Merge pull request #15566 from mheon/fix_15557
Inhibit SIGTERM during Conmon startup
2022-08-31 19:19:08 +02:00
fed4ce0ea9 Inhibit SIGTERM during Conmon startup
If we get a SIGTERM immediately after Conmon starts but before we
record its PID in the database, we end up leaking a Conmon and
associated OCI runtime process. Inhibit shutdown using the logic
we originally wrote to prevent similar issues during container
creation to prevent this problem.

[NO NEW TESTS NEEDED] No real way to test this I can think of.

Fixes #15557

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2022-08-31 10:58:06 -04:00
8266dbe7a9 Merge pull request #15473 from umohnani8/empty-dir
Add emptyDir volume support to kube play
2022-08-31 09:36:04 -04:00
60e4b762b3 Merge pull request #15562 from edsantiago/docs_dedup_signal
[CI:DOCS] Man pages: refactor common options: --signal
2022-08-31 09:28:00 -04:00
4cff780322 Merge pull request #15479 from dcermak/don-t-use-privileged-containers
Makefile: Mount . with --security-opt label=disable instead of using --privileged
2022-08-31 09:21:51 -04:00
6bda96ab18 Merge pull request #15510 from vrothberg/fix-15485
podman rmi: emit untag events
2022-08-31 09:19:10 -04:00
55710d8d55 Merge pull request #15411 from arixmkii/override_default_username
Allow to override default username via command line
2022-08-31 09:12:46 -04:00
9b4dac4c4d Merge pull request #15389 from giuseppe/userns-map-user
podman: add uid and gid options to keep-id
2022-08-31 08:37:34 -04:00
70a599b571 Man pages: refactor common options: --signal
Would've been an easy one, except I decided to fix the text
to conform to our guidelines. I haven't been doing this,
but in this case it's only two man pages and the text is
short enough to make for easy review.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2022-08-31 05:27:08 -06:00
7503c5544d Merge pull request #15491 from marshall-lee/bindings-schema-ignore
Mark some of the option fields as ignored in pkg/bindings
2022-08-31 06:28:19 -04:00
ac7f4ebb6a Merge pull request #15530 from dfr/freebsd-conmon
libpod: Make sure writeConmonPipeData is called on FreeBSD
2022-08-31 06:10:06 -04:00
f8a861b0e9 Merge pull request #15548 from edsantiago/docs_dedup_restart
[CI:DOCS] Man pages: refactor common options: --restart
2022-08-31 05:40:02 -04:00
368fa6074d Merge branch 'containers:main' into api_compat_containers 2022-08-30 14:12:01 -04:00
1ed9a47409 Man pages: refactor common options: --restart
Only applicable to podman-create and -run. I went with the -run
version because it is cleaner and more recently updated.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2022-08-30 08:35:53 -06:00
98169c20dd Add emptyDir volume support to kube play
When a kube yaml has a volume set as empty dir, podman
will create an anonymous volume with the empty dir name and
attach it to the containers running in the pod. When the pod
is removed, the empy dir volume created is also removed.

Add tests and docs for this as well.

Signed-off-by: Urvashi Mohnani <umohnani@redhat.com>
2022-08-30 10:34:45 -04:00
57441b4c71 Merge pull request #15545 from edsantiago/docs_dedup_subxidname
[CI:DOCS] Man pages: refactor common options: --subXidname
2022-08-30 10:32:23 -04:00
40627e08a4 Merge pull request #15517 from tyler92/remove-libnetwork-dep
remove github.com/docker/libnetwork dependency
2022-08-30 10:29:36 -04:00
8637548a36 docs: move userns options to separate file
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2022-08-30 15:10:41 +02:00
e015c9e3f7 podman: add uid and gid options to keep-id
add two new options to the keep-id user namespace option:

- uid: allow to override the UID used inside the container.
- gid: allow to override the GID used inside the container.

For example, the following command will map the rootless user (that
has UID=0 inside the rootless user namespace) to the UID=11 inside the
container user namespace:

$ podman run --userns=keep-id:uid=11 --rm -ti  fedora cat /proc/self/uid_map
         0          1         11
        11          0          1
        12         12      65525

Closes: https://github.com/containers/podman/issues/15294

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2022-08-30 14:39:27 +02:00
cd62606046 infra: remove dead code
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2022-08-30 14:39:27 +02:00
62d87aa9ba Man pages: refactor common options: --subXidname
Whew! This one started off identical everywhere, but the version
in podman-run got fixed in #1380, then again in #5192, with no
corresponding fixes to any of the other man pages.

I went with the podman-run version, with a small change in wording.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2022-08-30 05:28:28 -06:00
7f141a71a2 Merge pull request #15532 from edsantiago/docs_dedup_httpproxy
[CI:DOCS] Man pages: refactor common options: --http-proxy
2022-08-30 07:08:23 -04:00
08a2851bae Allow to override default username via command line
Signed-off-by: Arthur Sengileyev <arthur.sengileyev@gmail.com>
2022-08-30 13:35:07 +03:00
4781bc7fe7 specgen/generate: Add support for FreeBSD
[NO NEW TESTS NEEDED]

Signed-off-by: Doug Rabson <dfr@rabson.org>
2022-08-30 11:24:57 +01:00
68f4dcf00a specgen/generate: Move specConfigNamespaces to namespace_linux.go and add stubs
Everthing except for hostname management is linux-specific.

[NO NEW TESTS NEEDED]

Signed-off-by: Doug Rabson <dfr@rabson.org>
2022-08-30 11:24:38 +01:00
39880670cd specgen/generate: Move SpecGenToOCI, WeightDevices to oci_linux.go and add stubs.
Almost all of SpecGenToOCI deals with linux-specific aspects of the
runtime spec. Rather than try to factor this out piecemeal, I think it
is cleaner to move the whole function along with its implementation
helper functions. This also meams we don't need non-linux stubs for
functions called from oci_linux.go

[NO NEW TESTS NEEDED]

Signed-off-by: Doug Rabson <dfr@rabson.org>
2022-08-30 11:23:58 +01:00
be77c15e55 Merge pull request #15536 from edsantiago/lock_5000
e2e tests: try to deflake 5000
2022-08-30 05:50:05 -04:00
a240146a2d e2e tests: try to deflake 5000
We keep getting flakes in tests that use port 5000. Try to
find and fix, by switching ports where possible, and locking
5000 when not possible (or not easy) to switch.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2022-08-29 14:11:46 -06:00
0e53c8c735 Merge remote-tracking branch 'upstream/main' into api_compat_containers 2022-08-29 15:48:02 -04:00
468aa6478c Merge pull request #15457 from lsm5/packit-fix-spec-file-action
[CI:BUILD] Packit: Re-introduce packit with fix-spec-file action
2022-08-29 14:14:58 -04:00
08af95f635 updated apiv2 tests to reflect hash compat fix
Signed-off-by: Jason Ertel <jason.ertel@securityonionsolutions.com>
2022-08-29 14:10:33 -04:00
4e18c8100f Man pages: refactor common options: --http-proxy
Only between podman-create and -run. (podman-build is too
different). I went with the podman-run version.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2022-08-29 06:47:07 -06:00
00b03db6f2 Merge pull request #15528 from edsantiago/docs_dedup_dnsopt
[CI:DOCS] Man pages: refactor common options: --dns-*
2022-08-29 08:45:45 -04:00
0166feef2a specgen/generate: Move security.go to security_linux.go and add stubs
The security features (selinux, apparmor, capabilities) are linux
specific.

[NO NEW TESTS NEEDED]

Signed-off-by: Doug Rabson <dfr@rabson.org>
2022-08-29 13:06:15 +01:00
a7d7912029 libpod: Make sure writeConmonPipeData is called on FreeBSD
I managed to miss this while factoring out moveConmonToCgroupAndSignal.
Perhaps the signalling part should move to the caller instead?

[NO NEW TESTS NEEDED]

Signed-off-by: Doug Rabson <dfr@rabson.org>
2022-08-29 13:04:04 +01:00
d19438fa6d Man pages: refactor common options: --dns-*
--dns-opt and --dns-search, but only in podman-create and -run.
Went with the -run version in both cases; --dns-opt remained
unchanged, but in --dns-search I changed 'and' to 'with'.

Did not consolidate podman-build or podman-pod-create: too
different.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2022-08-29 05:37:52 -06:00
cf20e6ed39 Merge pull request #15481 from edsantiago/test_cleanup_apiv2
APIv2 test cleanup, part 2 of 2
2022-08-29 07:08:51 -04:00
e78363d24c Merge pull request #15516 from kubealex/handle-connected-network
Handle an already connected network in libpod API
2022-08-29 06:56:15 -04:00
3a63420628 Merge pull request #15500 from dfr/freebsd-terminal
pkg/domain: Add terminal support for FreeBSD
2022-08-29 06:27:24 -04:00
7287f9e49a Merge pull request #15504 from lsm5/aws-meta
[CI:DOCS] Cirrus: Update meta-task for EC2 image
2022-08-29 06:01:16 -04:00
dcb4d43570 [makefile] disable security labeling instead of using --privileged
$(CURDIR) is mounted in podman as is which causes issues on systems with SELinux
as then the container cannot read or write anything inside /src/. This has been
worked around with the --privileged flag, but that's a rather brutal
solution. Adding :Z is also suboptimal, as that requires a full relabeling after
every run. Instead, we disable security labeling via `--security-opt
label=disable` for this development container allowing us to run `make
vendor-in-container` unprivileged.

Signed-off-by: Dan Čermák <dcermak@suse.com>
2022-08-29 09:03:52 +02:00