14906 Commits

Author SHA1 Message Date
104042e20b 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.3.2 to 0.4.0.
- [Release notes](https://github.com/container-orchestrated-devices/container-device-interface/releases)
- [Commits](https://github.com/container-orchestrated-devices/container-device-interface/compare/v0.3.2...v0.4.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-22 12:12:33 +00:00
04acbaa4b1 Merge pull request #13969 from flouthoc/mount-csv-parsing
specgen-volumes: parse `--mount` using csv-reader instead of split.
2022-04-22 07:08:32 -04:00
e0f5bf279b test/system: add containers.conf test for new /etc/hosts options
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-04-22 13:06:01 +02:00
e912f1b689 Improve /etc/hosts documentation
Update the documentation for /etc/hosts options --add-host and
--no-hosts. Also make sure that all references use the same text for
consistency.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-04-22 13:06:01 +02:00
e4ab8a5bed shared netns and --add-host should conflict
Because /etc/hosts is shared for all containers with a shared network
namespace you should not be able to add hosts from a joined container.
Only the primary netns container can set the hosts.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-04-22 13:06:00 +02:00
cf1b0c1965 network dis-/connect: update /etc/hosts
When we connect or disconnect from a network we also have to update
/etc/hosts to ensure we only have valid entries in there.
This also fixes problems with docker-compose since this makes use of
network connect/disconnect.

Fixes #12533

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-04-22 13:05:53 +02:00
128086639c libpod: fix c.Hostname() to respect the utsNsCtr
When we lookup the hostname for a given container we have to check if
the container is joined to another utsns and use this hostname then
instead.
This fixes a problem where the `hostname` command would use the correct
name but /etc/hostname would contain a different name.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-04-22 12:59:51 +02:00
696bcd2773 use etchosts package from c/common
Use the new logic from c/common to create the hosts file. This will help
to better allign the hosts files between buildah and podman.

Also this fixes several bugs:
- remove host entries when container is stopped and has a netNsCtr
- add entries for containers in a pod
- do not duplicate entries in the hosts file
- use the correct slirp ip when an userns is used

Features:
- configure host.containers.internal entry in containers.conf
- configure base hosts file in containers.conf

Fixes #12003
Fixes #13224

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-04-22 12:59:49 +02:00
0d6af14387 Merge pull request #13964 from rhatdan/rootfull
Switch all rootful to rootfull
2022-04-22 06:56:33 -04:00
1514d5c933 silence deprecated warnings for manifest functions
There is no reason to mark them directly as deprecated since we still
have to use them as long as we want to support 3.X calls. The
staticcheck linter is complaining about the Deprecated comment but that
doesn't make sense in this context. There is no good way to only exclude
a single check with golangci-lint.

I renamed the function with a V3 suffix to make clear that we only use
this for backwards compat.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-04-22 12:51:41 +02:00
2a8e435671 enable staticcheck linter
Fix many problems reported by the staticcheck linter, including many
real bugs!

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-04-22 12:51:29 +02:00
56d6ee0808 move golang.org/x/crypto/ssh/terminal to golang.org/x/term
golang.org/x/crypto/ssh/terminal is deprecated. The package was moved to
golang.org/x/term. golang.org/x/crypto/ssh/terminal was already just
calling golang.org/x/term itslef so there are no functional changes.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-04-22 12:40:52 +02:00
1fcefc94f9 Merge pull request #13971 from rhatdan/codespell
[CI:DOCS] Run codespell on code
2022-04-22 06:34:32 -04:00
82393e2565 Merge pull request #13935 from edsantiago/bats_assert
system tests: add assert(), and start using it
2022-04-22 06:30:49 -04:00
26a51b2900 Merge pull request #13943 from cdoern/clone
podman container clone -f
2022-04-22 06:24:52 -04:00
67a1b520e3 Merge pull request #13956 from cevich/fix_git_id
Cirrus: Fix missing git-enforced runtime identity
2022-04-22 06:22:50 -04:00
e39f4495e7 Run codespell on code
[NO NEW TESTS NEEDED]

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2022-04-22 06:18:20 -04:00
f87f23e3b6 specgen-volumes: parse --mount using csv-reader instead of split by comma
Following commit ensures that csv escaping is supported while using
inline `--mount=type=......` flag with `podman run` by using
`encoding/csv` to parse options instead of performing a `split.String(`
by `comma`.

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

Signed-off-by: Aditya R <arajan@redhat.com>
2022-04-22 14:49:56 +05:30
2627345dd5 Merge pull request #13958 from cevich/fix_system_criu_relink
Workaround criu re-linking output in system test
2022-04-22 05:18:34 -04:00
b46970763c Merge pull request #13938 from rhatdan/VENDOR
Vendor
2022-04-22 03:48:32 -04:00
78ccd83390 Merge pull request #13963 from flouthoc/revert-entrypoint-compat
Revert "container,inspect: convert Entrypoint to array instead of a string
2022-04-21 18:18:55 -04:00
93ecafcbae Workaround criu re-linking output in system test
When run on an F36 host using netavark/aardvark-dns, for whatever
underlying reason most checkpoint/restore tests are emitting an error
similar to:

`criu: Symbol `__rseq_offset' has different size in shared object,
consider re-linking`

This extraneous output is causing the basic checkpoint system test to
fail.  Since, all other testing of checkpoint/restore feature is
passing (also with the extraneous message) loosen the system test
sensitivity to match.

Signed-off-by: Chris Evich <cevich@redhat.com>
2022-04-21 17:53:31 -04:00
d5f568efe3 Merge pull request #13957 from cevich/fix_remote_netavark
Fix using --network-backend on podman-remote
2022-04-21 17:27:04 -04:00
bfd617ebbe Merge pull request #13955 from cevich/fix_size_check
Fix size-check to display more context
2022-04-21 17:21:12 -04:00
077e7c5068 Merge pull request #13960 from cevich/fix_upgrade
Fix upgrade tests assuming storage.conf exists
2022-04-21 17:19:05 -04:00
cc3790f332 Switch all rootful to rootfull
We are inconsistent on the name, we should stick with rootfull.

[NO NEW TESTS NEEDED] Existing tests should handle this and no tests for
machines exists yet.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2022-04-21 17:05:16 -04:00
bdbd477c28 Merge pull request #13936 from edsantiago/can_you_believe_ed_wants_to_skip_tests
Optimization: skip tests in some circumstances
2022-04-21 16:35:08 -04:00
566b6071d4 Cirrus: Fix missing git-enforced runtime identity
Newer versions of git (like `2.35`) fail on certain operations (like
`rebase` and `am`) without a local identity.  Add a fake one from the
start, with a clearly identifiable test-value to avoid problems at
runtime.

Signed-off-by: Chris Evich <cevich@redhat.com>
2022-04-21 16:23:36 -04:00
80c0fceb24 Add support for --userns=nomap
From a security point of view, it would be nice to be able to map a
rootless usernamespace that does not use your own UID within the
container.

This would add protection against a hostile process escapping the
container and reading content in your homedir.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2022-04-21 15:29:04 -04:00
8080a5f8ec Revert "container,inspect: convert Entrypoint to array instead of a string"
It seems this breaks older version of `podman-remote` users hence it
looks like this patch would be a better candidate for podman `5.0`

Problem
* Client with `4.0` cannot interact with a server of `4.1`

Plan this patch for podman `5.0`

This reverts commit 0cebd158b6d8da1828b1255982e27fe9224310d0.

Signed-off-by: Aditya R <arajan@redhat.com>
2022-04-22 00:58:40 +05:30
17105028e5 vendor in latest containers/(storage,common,image)
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2022-04-21 15:18:07 -04:00
5375401960 podman container clone -f
add the option -f to force remove the parent container if --destory is specified

resolves #13917

Signed-off-by: cdoern <cbdoer23@g.holycross.edu>
2022-04-21 15:00:32 -04:00
d24507c1ec Fix upgrade tests assuming storage.conf exists
On F36 / podman 4, at the time of this commit there is no
`/etc/containers/storage.conf` installed by default.  Since the
test volume-mounts this file into the container, it was failing.  Fix
this by using a conditional volume-mount based on the file existing (or
not).

Signed-off-by: Chris Evich <cevich@redhat.com>
2022-04-21 14:38:07 -04:00
c67d6a52c4 Fix using --network-backend on podman-remote
When this option was added to the e2e tests, there was no CI Automation
support for running remote tests w/ netavark.  When added, many
e2e test errors/failures are generated due to this option not being
valid for the remote client.  Fix this in the tests by conditionally
adding the option if the test is running the remote client.

Signed-off-by: Chris Evich <cevich@redhat.com>
2022-04-21 14:29:44 -04:00
121dde6234 Merge pull request #13954 from mheon/update_release_notes
[CI:DOCS] Update release notes for v4.0.3 and v3.4.7
2022-04-21 14:23:31 -04:00
dc02e99d8f Fix size-check to display more context
When going through the rebase+build loop, the repository state won't
match the exact branch or PR history.  This results in the `Building:
XYZSHA` indications being entirely useless.  Fix this by at least
including the title line of the commit being built.  This will allow a
human to make sense of any size-check failure WRT their view of history.

Signed-off-by: Chris Evich <cevich@redhat.com>
2022-04-21 14:07:20 -04:00
b7dcbfed04 Update release notes for v4.0.3 and v3.4.7
Also update README and ensure we point to v4.0.3 as the latest
release, instead of v3.4.7 (which is newer chronologically but
not by actual version).

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2022-04-21 14:05:44 -04:00
55a5bd8a00 Optimization: skip tests in some circumstances
A common pattern is to submit PRs that update only tests or docs.

When the only changes are to test/e2e, there is no point in running
test/system or test/upgrade or test/buildah-bud. Likewise, reciprocally,
and similarly for a bunch of other tests (alt, cross, apiv2, ...)

And when the only changes are under docs/ , there is no point in
running any of the above.

Exception: if $CIRRUS_<mumble> are undefined (e.g., cron), never skip

Signed-off-by: Ed Santiago <santiago@redhat.com>
2022-04-21 11:02:57 -06:00
cb09c26c65 Merge pull request #13505 from rst0git/checkpoint-image-1
Add support for checkpoint image
2022-04-21 11:58:56 -04:00
e47dda5d81 Merge pull request #13937 from edsantiago/buildah_vendor_treadmill_script
Buildah Vendor Treadmill: the script
2022-04-21 11:49:38 -04:00
2576e16660 Merge pull request #13949 from containers/dependabot/go_modules/github.com/fsnotify/fsnotify-1.5.2
Bump github.com/fsnotify/fsnotify from 1.5.1 to 1.5.2
2022-04-21 11:19:15 -04:00
bfb23363ed Merge pull request #13950 from Luap99/systemd-activation
systemd socket activation: check listener
2022-04-21 10:03:03 -04:00
de58f58ee6 Merge pull request #13945 from vrothberg/vendor-common
vendor c/common
2022-04-21 09:33:01 -04:00
68e998dbff Merge pull request #13952 from vrothberg/fix-13864
[CI:DOCS] podman build --pull=*missing*
2022-04-21 09:10:45 -04:00
df156ab787 [CI:DOCS] podman build --pull=*missing*
Document the *missing* pull policy in `podman build`.

Fixes: #13864
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2022-04-21 14:37:02 +02:00
fa239f2eca Bump github.com/fsnotify/fsnotify from 1.5.1 to 1.5.2
Bumps [github.com/fsnotify/fsnotify](https://github.com/fsnotify/fsnotify) from 1.5.1 to 1.5.2.
- [Release notes](https://github.com/fsnotify/fsnotify/releases)
- [Changelog](https://github.com/fsnotify/fsnotify/blob/main/CHANGELOG.md)
- [Commits](https://github.com/fsnotify/fsnotify/compare/v1.5.1...v1.5.2)

---
updated-dependencies:
- dependency-name: github.com/fsnotify/fsnotify
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-21 12:10:08 +00:00
eb71712626 systemd socker activation: check listener
activation.Listeners() can return an net.Listener array which contains
nil entries if it cannot listen on the given fds. This can cause podman
to panic so we should check the we have non nil net.Listener first.

[NO NEW TESTS NEEDED] No idea how to reproduce this.

Fixes #13911

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-04-21 14:07:54 +02:00
ff2e6291a5 vendor c/common
Update the recent events-log changes to fix the build error.

[NO NEW TESTS NEEDED] since there's no functional change.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2022-04-21 13:43:58 +02:00
13c6fd067c system service: remove unnecessary pointer to listner
Since the listener is already an interface there is no reason to use a
extra pointer for it.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-04-21 13:32:20 +02:00
02ab86a68a Merge pull request #13934 from cevich/fix_debug
Fix e2e tests referencing generic env. var.
2022-04-20 20:02:55 -04:00