15411 Commits

Author SHA1 Message Date
b34cba6cd5 Merge pull request #14521 from cevich/fix_build_dep
Cirrus: Fix artifact passing when dep. skipped
2022-06-13 10:45:54 -04:00
1c46b31a68 Merge pull request #14560 from rhatdan/remote
podman-remote push --remove-signatures support
2022-06-13 04:15:20 -04:00
c044d455a1 Merge pull request #14562 from containers/dependabot/go_modules/test/tools/golang.org/x/tools-0.1.11
Bump golang.org/x/tools from 0.1.10 to 0.1.11 in /test/tools
2022-06-11 06:28:13 -04:00
b078aeb87c Merge pull request #14537 from m4z/patch-2
[CI:DOCS] Update remote_client.md
2022-06-10 11:42:50 -04:00
b7c283759a Bump golang.org/x/tools from 0.1.10 to 0.1.11 in /test/tools
Bumps [golang.org/x/tools](https://github.com/golang/tools) from 0.1.10 to 0.1.11.
- [Release notes](https://github.com/golang/tools/releases)
- [Commits](https://github.com/golang/tools/compare/v0.1.10...v0.1.11)

---
updated-dependencies:
- dependency-name: golang.org/x/tools
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-10 12:36:28 +00:00
efc1936c7c Merge pull request #14526 from vrothberg/fix-14420
podman cp: do not overwrite non-dirs with dirs and vice versa
2022-06-10 07:52:46 -04:00
48cf1d2583 podman-remote push --remove-signatures support
I don't see a reason why we don't support --remove-signatures
from remote push, so adding support.

Fixes: https://github.com/containers/podman/issues/14558

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2022-06-10 07:14:12 -04:00
d4272bed51 podman cp: do not overwrite non-dirs with dirs and vice versa
Add a new `--overwrite` flag to `podman cp` to allow for overwriting in
case existing users depend on the behavior; they will have a workaround.
By default, the flag is turned off to be compatible with Docker and to
have a more sane behavior.

Fixes: #14420
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2022-06-10 09:42:19 +02:00
46c8da7d9a vendor buildah@main
Note that the bud-logfile-with-split-logfile-by-platform test is skipped
on the remote client (see #14544).

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2022-06-10 09:42:19 +02:00
9f1bd0a0a1 Merge pull request #14405 from rhatdan/docs
[CI:DOCS] Mount propagation works with named volumes
2022-06-09 17:13:31 -04:00
f808907d85 Merge pull request #14469 from shanesmith/prevent-simultaneous-machine-starts
Prevent simultaneous machine starts
2022-06-09 16:23:25 -04:00
6a2c0e9601 Merge pull request #14552 from edsantiago/apiv2_test_panic_fix
APIv2 tests: (try to) fix flaky registry panic
2022-06-09 16:09:15 -04:00
ec7951bc14 Merge pull request #14553 from cevich/fix_eventually
Fix Remote filtering embedded directory test
2022-06-09 15:51:16 -04:00
e7db6d4893 Merge pull request #14480 from cdoern/infra
patch for pod host networking & other host namespace handling
2022-06-09 15:49:21 -04:00
0405e7c161 Merge pull request #14539 from Luap99/completion5
shell completion: fix problems with container path completion
2022-06-09 14:35:07 -04:00
80d5a00bb4 Fix Remote filtering embedded directory test
Fixes #14184

Docs: https://onsi.github.io/gomega/#making-asynchronous-assertions

Signed-off-by: Chris Evich <cevich@redhat.com>
2022-06-09 14:31:53 -04:00
2b97795c19 APIv2 tests: (try to) fix flaky registry panic
APIv2 tests are flaky after this morning's merge of #14543.

Symptom:
   test-apiv2: Timed out (10s) waiting for service (/dev/tcp/localhost/5564)

journal shows:
   registry[7421]: panic: unable to configure authorization (htpasswd):
      no access controller registered with name: none

Possible cause:
   Mix of REGISTRY_AUTH=none with REGISTRY_AUTH_HTPASSWD_* vars.
      https://github.com/distribution/distribution/issues/1168

Solution:
   only set _HTPASSWD_* vars when AUTH=htpasswd

Signed-off-by: Ed Santiago <santiago@redhat.com>
2022-06-09 12:17:17 -06:00
874ca426eb Merge pull request #14549 from Luap99/compat-create
compat api: fix regressions from "Swagger refactor/cleanup"
2022-06-09 13:27:11 -04:00
e5ef9fd5bc Merge pull request #14548 from containers/dependabot/go_modules/github.com/opencontainers/runc-1.1.3
Bump github.com/opencontainers/runc from 1.1.2 to 1.1.3
2022-06-09 13:25:12 -04:00
fd1d0d67fb Merge pull request #14533 from mheon/avoid_error_on_container_stop
Do not error on signalling a just-stopped container
2022-06-09 12:54:04 -04:00
81153ffa21 Introduce 'Starting' status for machines
- The State() function now returns machine.Starting status instead of an
  empty string if the VM is in the process of starting.

- The `CheckExclusiveActiveVM()` function returns `true` to prevent
  starting a VM while another is in the process of starting.

- `podman machine ls` displays "Currently starting" under "Last Up" for
  the starting VM

- `podman machine ls` supports `{{.Starting}}` boolean field in the format

- `podman machine inspect` displays "starting" in the "State" field for
  the starting VM

Signed-off-by: Shane Smith <shane.smith@shopify.com>
2022-06-09 12:42:43 -04:00
852a406851 Merge pull request #14542 from hshiina/restore-filelock
Pass '--file-locks' to OCI runtime at restoring
2022-06-09 11:48:52 -04:00
b13fc1bf98 patch for pod host networking & other host namespace handling
this patch included additonal host namespace checks when creating a ctr as well
as fixing of the tests to check /proc/self/ns/net

see #14461

Signed-off-by: cdoern <cdoern@redhat.com>
2022-06-09 10:30:48 -04:00
5614c29ce1 compat api: fix regressions from "Swagger refactor/cleanup"
For some reason commit 5b79cf15a022 moved the container create options
parsing from cmd/podman/common to pkg/api/handlers. However it did not
remove the old code. Unfortunately  it moved the code from an outdated
version and did not update it before this commit was merged.
Therefore a couple of regressions were introduced. I manually compared
both versions and found three missing bugfixes.

I fixed the network test again that was changed in bce97a3b5dd1. We
want bridge as default even as rootless. Sine the test is not run as
rootless in CI the regression was not caught.
Also the no hosts test never worked since it was missing the import
check if the hosts file exists.

I don't think we can check for the volume parsing change since this only
works on windows/wsl.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-06-09 16:00:46 +02:00
eed0e66710 Pass '--file-locks' to OCI runtime at restoring
`podman container restore --file-locks` does not restore file locks
because this option is not passed to OCI runtime. This patch fixes this
issue.

Signed-off-by: Hironori Shiina <shiina.hironori@jp.fujitsu.com>
2022-06-09 09:49:53 -04:00
c77691f06f Do not error on signalling a just-stopped container
Previous PR #12394 tried to address this, but made a mistake:
containers that have just exited do not move to the Exited state
but rather the Stopped state - as such, the code would never have
run (there is no way we start `podman kill`, and the container
transitions to Exited while we are doing it - that requires
holding the container lock, which Kill already does).

Fix the code to check Stopped as well (we omit Exited entirely
but it's a cheap check and our state logic could change in the
future). Also, return an error, instead of exiting cleanly - the
Kill failed, after all. ErrCtrStateInvalid is already handled by
the sig-proxy logic so there won't be issues.

[NO NEW TESTS NEEDED] This fixes a race that I cannot reproduce
myself, and I have no idea how we'd repro in CI.

Signed-off-by: Matthew Heon <mheon@redhat.com>
2022-06-09 09:11:18 -04:00
7e97675025 Bump github.com/opencontainers/runc from 1.1.2 to 1.1.3
Bumps [github.com/opencontainers/runc](https://github.com/opencontainers/runc) from 1.1.2 to 1.1.3.
- [Release notes](https://github.com/opencontainers/runc/releases)
- [Changelog](https://github.com/opencontainers/runc/blob/v1.1.3/CHANGELOG.md)
- [Commits](https://github.com/opencontainers/runc/compare/v1.1.2...v1.1.3)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-09 12:15:39 +00:00
549bffe58d shell completion: fix problems with container path completion
When you try to complete a path which exists and it is a file the
completion logic did not check the parent dir for other matching file
names. To fix that we have to check if the current completion is not a
dir and use the parent dir in this case.

See the updated test for an example why this is required.

Also make sure directories are correctly completed, the shell always
adds the "/" as suffix to signal the user that this path is a directory.
In this case we do not want to automatically add a space. When the path
is a regular file we want the space after the suggestion since there is
nothing more to complete.

This better matches the normal default shell completion.

The test were changed to not assume any particular ordering since this
is irrelevant for the shell completion script and there is no guarantee
about the ordering.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-06-09 13:46:55 +02:00
643a692360 Merge pull request #14543 from edsantiago/apiv2_test_cleanup
apiv2 tests: clean up
2022-06-09 06:57:01 -04:00
bce97a3b5d apiv2 tests: clean up
Mostly fix a bad design decision I made early on, re: registry.
 old: registry starts once, runs to the end
 new: registry is brought up on demand, then stopped
Reason: there are times when we need a password-controlled
registry, and times when we need it open.

As long as I'm in here, I've also cleaned up some confusing code
and fixed things so tests can run rootless again.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2022-06-08 19:33:07 -06:00
576c739e5f Merge pull request #14484 from marshall-lee/test/manifest-push
Add missing tests for manifests API
2022-06-08 14:29:39 -04:00
700248bfef Update remote_client.md
Explicitly include copy-and-paste code line for `ssh-copy-id` because people like myself will easily forget this part and (repeatedly) overlook it in the text. 😊

Supersedes #14445 and attempts to address review by @TomSweeneyRedHat there (but enforcing a filename instead of using a placeholder).

Signed-off-by: Christopher 'm4z' Holm <them4z@gmail.com>

Signed-off-by: Christopher 'm4z' Holm <them4z@googlemail.com>
2022-06-08 17:42:23 +02:00
864d46c77e Merge pull request #14532 from rhatdan/man
--userns=keep-id,nomap are not allowed in rootful mode
2022-06-08 11:03:36 -04:00
254048e17d Cirrus: Fix artifact passing when dep. skipped
When passing artifacts from one task to another, if a direct dependency
was not created due to `only_if`, a race condition can occur:  The
descendent task may start running prior to the indirect (but required)
dependency (`build` in this case) completing and uploading artifacts.
Fix this by spamming a `build` dependency into all tasks which require
it (basically everything).

Signed-off-by: Chris Evich <cevich@redhat.com>
2022-06-08 10:43:43 -04:00
f0516a0141 --userns=keep-id,nomap are not allowed in rootful mode
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2022-06-08 09:59:13 -04:00
b4c981893d Merge pull request #14220 from Luap99/resolvconf
use resolvconf package from c/common/libnetwork
2022-06-07 18:00:34 -04:00
dfdc95754e Merge pull request #14519 from rhatdan/Dockerfile
[CI:DOCS] Podman images generated with empty /etc/containers/storage.conf
2022-06-07 16:00:46 -04:00
496677925a Merge pull request #14516 from cevich/podmanimage_docs
[CI:DOCS] Minor: Fix podmanimage README links
2022-06-07 15:58:34 -04:00
fef40e2ad3 Merge pull request #14483 from jakecorrenti/restart-privelaged-containers-after-host-device-change
Privileged containers can now restart if the host devices change
2022-06-07 15:48:36 -04:00
f459c197bd Merge pull request #14512 from cdoern/infraInherit
Infra Inheritance patch
2022-06-07 14:46:35 -04:00
126686f3d7 Podman images generated with empty /etc/containers/storage.conf
The Containerfiles were built with sed -i, which is leading to empty
storage.conf files. This will cause Podman in a container to print
warning information about storage.driver not being set to something.

[NO NEW TESTS REQUIRED]

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2022-06-07 14:43:01 -04:00
96578a26c3 Merge pull request #14479 from ibotty/patch-1
[CI:DOCS] Add docs of changing default netavark networks
2022-06-07 14:32:56 -04:00
3274496a60 Merge pull request #14438 from cevich/replace_skips
Cirrus: Simplify only_if/skip + optimize multiarch
2022-06-07 14:28:36 -04:00
20aaaa382c Minor: Fix podmanimage README links
Signed-off-by: Chris Evich <cevich@redhat.com>
2022-06-07 13:48:51 -04:00
dc4a01ec61 Add docs of changing default netavark networks
Signed-off-by: Tobias Florek <tob@butter.sh>
2022-06-07 19:30:51 +02:00
ed1e4f94fb Infra Inheritance patch
infra was overriding options that it should be appending rather than resetting.
fix this by appending the given container's spec to the compatible options before marshaling/unmarshaling

resolves #14454

Signed-off-by: cdoern <cdoern@redhat.com>
2022-06-07 11:42:16 -04:00
5fc3d871ad Cirrus: Simplify only_if/skip + optimize multiarch
Using both the 'skip' and 'only_if' features at the same time may be
hard for maintainers to decipher.  Consolidate them into `only_if` since
that bypasses creation of the task all together - meaning there are
potentially fewer tasks for a developer to scroll through.

Since the `multiarch` Cirrus-Cron build no-longer depends on the direct
"build-ability" from the current repo. state, it can be further
optimized.  When operating in this context, avoid running many/most
other tasks, depending instead only on `ext_svc_check`.

Finally, add a simple document describing the various runtime contexts
along with the list of expected tasks.  Reference this prominently right
in front of every `only_if` so it's impossible for a maintainer to miss.

Signed-off-by: Chris Evich <cevich@redhat.com>
2022-06-07 11:39:26 -04:00
96f9d0dc0e Merge pull request #14507 from Luap99/userns-net
libpod: store network status when userns is used
2022-06-07 11:00:28 -04:00
7a09429dff Merge pull request #14506 from containers/dependabot/go_modules/github.com/docker/docker-20.10.17incompatible
Bump github.com/docker/docker from 20.10.16+incompatible to 20.10.17+incompatible
2022-06-07 10:20:27 -04:00
a69a48b0d6 test/e2e: network dis-/connect test remove unhelpful assertions
Using `To(BeTrue()/BeFalse())` provides very bas error messages. It is not
clear to a log reader what went wrong. Using ContainsSubstring() make
the error message much more useful.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-06-07 15:17:12 +02:00