17249 Commits

Author SHA1 Message Date
50992d0be4 Merge pull request #16645 from dfr/freebsd-nil-pointers
libpod: Add checks to avoid nil pointer dereference if network setup fails
2022-11-28 09:39:13 -05:00
07940764c1 libpod: Add checks to avoid nil pointer dereference if network setup fails
This addresses #16333 although that issue was also avoided by changes in
PR #16554.

[NO NEW TESTS NEEDED]

Signed-off-by: Doug Rabson <dfr@rabson.org>
2022-11-28 13:10:30 +00:00
ab7f6095a1 Merge pull request #16580 from giuseppe/specgen-support-cdi-devices
specgen: support CDI devices from containers.conf
2022-11-28 06:36:33 -05:00
c1db4f85ae Merge pull request #16329 from gupttaru/encryption-decryption-feature
Add encryption decryption feature
2022-11-28 06:33:59 -05:00
e4e7e41ce5 Merge pull request #16457 from bjorndown/feature/pass-ssl-cert-file-via-fw-cfg
podman machine: Propagate SSL_CERT_FILE and SSL_CERT_DIR to systemd e…
2022-11-28 06:31:35 -05:00
d5f806eb05 Merge pull request #16607 from vrothberg/BZ-2144754
container restart: clean up healthcheck state
2022-11-28 06:20:50 -05:00
9e8f5db47c Merge pull request #16613 from elezar/add-generic-in-container-target
Add validate-in-container target
2022-11-28 06:18:14 -05:00
96fa8f5ec9 Merge pull request #16616 from Luap99/ginkgolint
fix issues found by ginkgolint
2022-11-28 06:15:02 -05:00
53da8e6022 Merge pull request #16630 from vorburger/patch-4
[CI:DOCS] Fix MD for Troubleshooting Guide link in GitHub Issue Template
2022-11-28 06:12:27 -05:00
308cdc153d Merge pull request #16633 from dfr/freebsd-cloexec
libpod: Use O_CLOEXEC for descriptors returned by (*Container).openDi…
2022-11-28 03:20:17 -05:00
c2450bb325 Merge pull request #16622 from ingobecker/fix-vol-create-md-typo
[CI:DOCS] Fix manpage emphasis
2022-11-26 12:31:35 -05:00
f06869168e libpod: Use O_CLOEXEC for descriptors returned by (*Container).openDirectory
Since mountStorage and createNetNS run in parallel, the directory file
descriptors used by mountStorage were (rarely) propagated to the CNI
plugins. On FreeBSD, the CNI bridge plugin needs to make changes to the
network jail. This fails if there are any descriptors to open directories
to protect against host directories being visible to the jail's chroot.

Adding O_CLOEXEC to the unix.Open call in openDirectory ensures that these
descriptors are not visible to podman's child processes.

[NO NEW TESTS NEEDED]

Signed-off-by: Doug Rabson <dfr@rabson.org>
2022-11-26 13:55:18 +00:00
fad50a9f2e chore: Fix MD for Troubleshooting Guide link in GitHub Issue Template
Signed-off-by: Michael Vorburger ⛑️ <mike@vorburger.ch>
2022-11-25 23:06:28 +01:00
64a450c51a test/tools: rebuild when files are changed
Add all go files as source to make sure we rebuild the tools when
required.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-11-25 14:42:26 +01:00
2ddf1c5cbd ginkgo tests: apply ginkgolinter fixes
I found the ginkgolinter[1] by accident, this looks for not optimal
matching and suggest how to do it better.

Overall these fixes seem to be all correct and they will give much
better error messages when something fails.
Check out the repo to see what the linter reports.

[1] https://github.com/nunnatsa/ginkgolinter

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-11-25 14:41:43 +01:00
c7827957a4 ginkgo: restructure install work flow
- move the ginkgo deps into test/tools which is more consitent with the
  other tools there, listing in dependencies always causes errors with
  linters
- do not install it globally on the system, instead we use it in a
  subdir of this project

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-11-25 14:41:43 +01:00
4135655ecb Merge pull request #16619 from dfr/default-policy
pkg/trust: Take the default policy path from c/common/pkg/config
2022-11-25 08:31:47 -05:00
ce7d4bbc75 Fix manpage emphasis
Signed-off-by: Ingo Becker <ingo@orgizm.net>
2022-11-25 12:19:06 +01:00
5d26628df6 specgen: support CDI devices from containers.conf
Closes: https://github.com/containers/podman/issues/16232

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2022-11-25 11:44:38 +01:00
7eb11e7bb3 vendor: update containers/common
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2022-11-25 11:44:38 +01:00
6502b1faa6 pkg/trust: Take the default policy path from c/common/pkg/config
This reduces the number of places default policy path is defined to two.

[NO NEW TESTS NEEDED]

Signed-off-by: Doug Rabson <dfr@rabson.org>
2022-11-25 10:14:15 +00:00
ba522e8f3c Add validate-in-container target
This change adds a validate-in-container make target that can be used to run
the make validate target in a container instead of requiring the dependencies
to be available on the system. This mirrors what is already done for the vendor
target and allows additional targets to be added.

A PODMANCMD make variable is also added to allow for the podman binary to be
overridden in cases where this is not available.

Signed-off-by: Evan Lezar <elezar@nvidia.com>
2022-11-24 19:32:34 +01:00
fd142ef5f4 Merge pull request #16573 from cevich/fix_rerun_gha_workflow
[skip-ci] GHA: Fix cirrus re-run workflow for other repos.
2022-11-24 10:41:06 -05:00
3bb9ed4f09 Adding encryption decryption feature
Signed-off-by: Tarun1 Gupta <gupttaru@deshaw.com>
2022-11-24 04:53:59 -05:00
e2fa94e8ac container restart: clean up healthcheck state
When restarting a container, clean up the healthcheck state by removing
the old log on disk.  Carrying over the old state can lead to various
issues, for instance, in a wrong failing streak and hence wrong
behaviour after the restart.

Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2144754
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2022-11-24 10:22:22 +01:00
34cc61d167 Merge pull request #16554 from dfr/freebsd-network-errors
libpod: Report network setup errors properly on FreeBSD
2022-11-23 04:47:56 -05:00
1b583a709b Merge pull request #16563 from ygalblum/quadlet_k8s
Quadlet: Add support for running podman kube play via .kube files
2022-11-22 14:52:32 -05:00
d58d021dea Merge pull request #16578 from rhatdan/VENDOR
Update vendor of containers/(buildah, common, storage, image)
2022-11-22 11:17:41 -05:00
ab077cabfb Merge pull request #16577 from ashley-cui/cirrusm1
[CI:DOCS] Migrate OSX Cross to M1
2022-11-22 10:20:50 -05:00
1aa28b18c2 Merge pull request #16570 from edsantiago/systemtest_cleanup
ssh system test: skip until it becomes a test
2022-11-22 10:17:48 -05:00
3084ed4686 Quadlet: Add support for .kube files
Get the path to the yaml file and call podman kube play
Add tests

Signed-off-by: Ygal Blum <ygal.blum@gmail.com>
2022-11-22 16:58:01 +02:00
fb429dbe3c Update vendor of containers/(buildah, common, storage, image)
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2022-11-22 08:53:59 -05:00
d202416302 Merge pull request #16571 from giuseppe/honor-userns-size
specgen: honor user namespace value
2022-11-22 05:43:46 -05:00
b570b9d66f Merge pull request #16574 from alexlarsson/quadlet-usermap
quadlet: Rework uid/gid remapping
2022-11-22 04:13:22 -05:00
3b0abfbb61 Merge pull request #16555 from Luap99/network-driver-completion
shell completion: fix hard coded network drivers
2022-11-22 04:10:30 -05:00
1492ffefea Merge pull request #16566 from ygalblum/fix_search_test
E2E Tests: change the registry for the search test to avoid authentication
2022-11-22 03:40:15 -05:00
a891199b9a specgen: honor user namespace value
honor eventual options set in the containers.userns setting in the
containers.conf file, e.g.:

[containers]
userns = "auto:size=8192"

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2022-11-21 21:27:22 +01:00
a575111ad4 [CI:DOCS] Migrate OSX Cross to M1
Migrate our OSX Cross build to a M1 instance, since Cirrus is sunsetting Intel-based macOS instances.

Signed-off-by: Ashley Cui <acui@redhat.com>
2022-11-21 15:15:53 -05:00
285d6c9ba0 quadlet: Rework uid/gid remapping
Quadlet was doing some custom handling of uid/gid remapping, originating
from pre --userns=auto support, including its own user for getting subuids
which kinda conflicts with the "container" user used for that.

This drops all the old support for id remapping in favour of a new set
of keys that more directly map to the podman run options.

We have essentially 3 modes now:

```
RemapUsers=manual
RemapUid=0:10000:10
RemapUid=10:20000:10
RemapGid=0:10000:10
RemapGid=10:20000:10
```

This maps to --uidmap and --gidmap options.

```
RemapUsers=auto
```

This maps to --userns=auto. But you can additionally specify RemapUid,
RemapGid and RemapUidSize which gets applied as options to the
--userns podman option.

```
RemapUsers=keep-id
```
This maps to --userns=keep-id and only works for user units.

Signed-off-by: Alexander Larsson <alexl@redhat.com>
2022-11-21 18:02:19 +01:00
f5a43eea29 GHA: Fix cirrus re-run workflow for other repos.
The checkout action by default, clones the current repository.  However,
since this workflow is re-used by other repos, and it calls scripts in
the podman repo, those calls will all fail.  Fix this by hard-coding the
podman repo.

Ref: https://github.com/actions/checkout

Signed-off-by: Chris Evich <cevich@redhat.com>
2022-11-21 10:59:40 -05:00
50d72bc639 ssh system test: skip until it becomes a test
The 900-ssh test is not an actual test, and I'm unable to
figure out how to make it one. Skip it for now, but add a
bunch of FIXMEs some someone can come in later and actually
implement it.

Also removed lots of dead code and misleading comments.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2022-11-21 08:02:00 -07:00
e7eed5aa90 shell completion: fix hard coded network drivers
Depending on the backend (CNI, netavark) we support different drivers,
the auto completion should only suggest the ones that are available.

This list is podman info so we can get the correct list for local and
remote.

[NO NEW TESTS NEEDED]

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-11-21 15:33:43 +01:00
504fcbbf92 libpod: Report network setup errors properly on FreeBSD
Some error reporting logic got lost from (*Container).prepare during the
port. This adds the missing logic, similar to the Linux version.

[NO NEW TESTS NEEDED]

Signed-off-by: Doug Rabson <dfr@rabson.org>
2022-11-21 14:16:51 +00:00
dd4d212b0a E2E Tests: change the registry for the search test to avoid authentication
The current test uses registry.redhat.io which does not support unauthenticated access
Replace the registry with registry.access.redhat.com which does

Signed-off-by: Ygal Blum <ygal.blum@gmail.com>
2022-11-21 10:34:52 +02:00
3f76f29adb Merge pull request #16560 from eriksjolund/fix_typo_a_an
Fix language. Mostly spelling a -> an
2022-11-20 17:04:36 -05:00
a1b32866cc Fix language. Mostly spelling a -> an
Signed-off-by: Erik Sjölund <erik.sjolund@gmail.com>
2022-11-20 19:41:06 +01:00
98ae79cd78 Merge pull request #16559 from eriksjolund/fix_spelling_and_typos
[CI:DOCS] Fix spelling and typos
2022-11-20 10:26:51 -05:00
caa2dfe01b podman machine: Propagate SSL_CERT_FILE and SSL_CERT_DIR to systemd environment.
Fixes #16041.

Signed-off-by: Björn Mosler <dev@bjoern.mosler.ch>
2022-11-20 14:14:50 +01:00
72966a32cd [CI:DOCS] Fix spelling and typos
Signed-off-by: Erik Sjölund <erik.sjolund@gmail.com>
2022-11-19 16:26:00 +01:00
cea9340242 Merge pull request #16299 from alexlarsson/quadlet-shortname-warning
quadlet: Warn in generator if using short names
2022-11-18 20:01:39 +00:00