Commit graph

12675 commits

Author SHA1 Message Date
OpenShift Merge Robot 469900406a
Merge pull request #11406 from flouthoc/manifest-rm-only-manifest
manifest: `rm` should not remove referenced images.
2021-09-02 10:27:16 -04:00
OpenShift Merge Robot afa9987f87
Merge pull request #11405 from Luap99/systemd-arg-case
make podman run --systemd case insensitive
2021-09-02 10:09:16 -04:00
OpenShift Merge Robot a8b8ccdc16
Merge pull request #11404 from Luap99/ip-del
Drop dependency on iproute
2021-09-02 09:49:18 -04:00
Aditya Rajan cba114dd36 manifest: rm should not remove referenced images.
Following PR makes sure that `podman manifest rm <list>` only removes
the named manifest list and not referenced images.

Bumping and squashing c/common to v0.43.3-0.20210902095222-a7acc160fb25
in same commit in order to make sure build commit test passes.

Signed-off-by: Aditya Rajan <arajan@redhat.com>
2021-09-02 17:30:02 +05:30
Paul Holzinger a077335ce5
make podman run --systemd case insensitive
Since boolean flags accept `True` and `False` the systemd flag should do
this as well.

Fixes #11387

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2021-09-02 11:01:10 +02:00
Paul Holzinger ddeaaa47c8
Drop dependency on iproute
We only use the `ip` util to remove a network interface. We can do
this directly via the netlink lib, no need to call a external binary.

[NO TESTS NEEDED]

Fixes #11403

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2021-09-02 10:28:08 +02:00
OpenShift Merge Robot 4207d959a6
Merge pull request #11395 from edsantiago/bats
System tests: add cleanup & debugging output
2021-09-02 03:01:19 -04:00
Daniel J Walsh c36322382a
Merge pull request #11368 from giuseppe/fix-man-format
[CI:DOCS] fix indentation for userns modes
2021-09-01 15:24:24 -04:00
Ed Santiago e3c7e02a0e System tests: add cleanup & debugging output
Cleanup: the final 'play' test wasn't cleaning up after itself,
leading to angry warning messages when rerunning tests (in
my environment; never in CI)

Debug: I'm seeing a lot of "Could not parse READY=1 as MAINPID=nnn"
flakes in the sdnotify:container test (nine in the past month). Add
debug traces to help diagnose in future flakes.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2021-09-01 11:29:59 -06:00
OpenShift Merge Robot fff12da70e
Merge pull request #11391 from Luap99/rootlessport-socket
rootlessport: allow socket paths with more than 108 chars
2021-09-01 12:12:26 -04:00
Paul Holzinger abdedc31a2
rootlessport: allow socket paths with more than 108 chars
Creating the rootlessport socket can fail with `bind: invalid argument`
when the socket path is longer than 108 chars. This is the case for
users with a long runtime directory.
Since the kernel does not allow to use socket paths with more then 108
chars use a workaround to open the socket path.

[NO TESTS NEEDED]

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2021-09-01 16:14:40 +02:00
OpenShift Merge Robot f5cfb0da29
Merge pull request #11388 from Luap99/stop-cleanup
podman stop always cleanup
2021-09-01 10:04:38 -04:00
OpenShift Merge Robot 5c33699515
Merge pull request #11376 from ashley-cui/envsec
Make secret env var available to exec session
2021-09-01 07:19:41 -04:00
Paul Holzinger a55f595fe1
podman stop always cleanup
When a container is configured for auto removal podman stop should still
do cleanup, there is no guarantee the the cleanup process spawned by
conmon will be successful. Also a user expects after podman stop that
the network/mounts are cleaned up. Therefore podman stop should not return
early and instead do the cleanup and ignore errors if the container was
already removed.

[NO TESTS NEEDED] I don't know how to test this.

Fixes #11384

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2021-09-01 12:56:38 +02:00
OpenShift Merge Robot 331b35996f
Merge pull request #11371 from vrothberg/fix-11370
[CI:DOCS] generate systemd: clarify limitations of `--new`
2021-09-01 05:43:43 -04:00
Valentin Rothberg f9a689f3ed generate systemd: clarify limitations of --new
`generate systemd --new` is looking at the "create command" of the
container/pod which is simply the os.Args at creation time.

It does not work on containers or pods created via the REST API since
the create command is not set.  `--new` does work on such containers and
pods since there is no reliable way to reverse-map their configs to
command-line arguments of podman.

Fixes: #11370
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-09-01 08:50:03 +02:00
OpenShift Merge Robot bebaef26fd
Merge pull request #11375 from vrothberg/fix-11346
[CI:DOCS] podman cp: highlight globbing and multi-file copy
2021-08-31 17:29:57 -04:00
OpenShift Merge Robot dc2a3e38d9
Merge pull request #11372 from cevich/apiv2_update
Cirrus: Reduce APIv2 task timeout
2021-08-31 16:01:23 -04:00
OpenShift Merge Robot f947ea2d5f
Merge pull request #11316 from vrothberg/fix-10443
pass LISTEN_* environment into container
2021-08-31 14:46:10 -04:00
Chris Evich 1ed0a7209d
Cirrus: Reduce APIv2 task timeout
At the time of this commit, a significant problem has been identified
(introduced in f5ce02b227).  The effect is, `podman pull` has a chance
of hanging, especially when re-pulling an existing image.  While a fix
is in the works, there's no reason to make developers wait the full
(default) 1-hour timeout for the APIv2 task.  Reduce it to 2x nominal
test runtime, so if the hang/flake is hit, the task can be re-run more
quickly.

Signed-off-by: Chris Evich <cevich@redhat.com>
2021-08-31 14:01:17 -04:00
Ashley Cui 1fb07c4225 Make secret env var available to exec session
Secret environment variables were only available to a podman run/start.
This commit makes sure that exec sessions can see them as well.

Signed-off-by: Ashley Cui <acui@redhat.com>
2021-08-31 13:53:51 -04:00
Valentin Rothberg d674eb41e4 [CI:DOCS] podman cp: highlight globbing and multi-file copy
`podman cp` does not allow for globbing or filtering copied data in any
form.  `docker cp` does not either, so Podman remains compatible.  Due
to a number of requests, highlight how users can effectively achieve
that by means of chaining with tools such as xargs(1) or find(1), or by
making use of `podman mount`.

Closes: #11346
Closes: #11194
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-08-31 17:30:58 +02:00
Valentin Rothberg 10144b707e pass LISTEN_* environment into container
Make sure that Podman passes the LISTEN_* environment into containers.
Similar to runc, LISTEN_PID is set to 1.

Also remove conditionally passing the LISTEN_FDS as extra files.
The condition was wrong (inverted) and introduced to fix #3572 which
related to running under varlink which has been dropped entirely
with Podman 3.0.  Note that the NOTIFY_SOCKET and LISTEN_* variables
are cleared when running `system service`.

Fixes: #10443
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-08-31 17:23:05 +02:00
OpenShift Merge Robot 8ab84b4373
Merge pull request #11373 from mtrmac/mpb-replace
Use UNMERGED vbauerster/mpb PR to fix a pull deadlock
2021-08-31 11:15:58 -04:00
OpenShift Merge Robot 7b75ddb70c
Merge pull request #11374 from cevich/no_api2_cidocs
Cirrus: Skip APIv2 tests for [CI:DOCS]
2021-08-31 10:59:25 -04:00
Miloslav Trmač 9f7bad7dac Use UNMERGED vbauerster/mpb PR to fix a pull deadlock
> go mod edit -replace github.com/vbauerster/mpb/v7=github.com/mtrmac/mpb/v7@abort-deadlock
> make vendor

See https://github.com/vbauerster/mpb/issues/100 and
https://github.com/vbauerster/mpb/pull/101 .

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2021-08-31 15:51:36 +02:00
Chris Evich b3aee22bdc
Cirrus: Skip APIv2 tests for [CI:DOCS]
Signed-off-by: Chris Evich <cevich@redhat.com>
2021-08-31 09:36:48 -04:00
OpenShift Merge Robot bfbbeb4223
Merge pull request #11009 from edsantiago/upgrade_test_3
Upgrade test: add new baseline
2021-08-31 09:35:02 -04:00
Giuseppe Scrivano 375c3a7b3c
docs: fix indentation for userns modes
Closes: https://github.com/containers/podman/issues/11364

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2021-08-31 13:18:33 +02:00
OpenShift Merge Robot 83de22e892
Merge pull request #11357 from vrothberg/fix-11171
auto-update: fix authfile label
2021-08-31 04:16:58 -04:00
OpenShift Merge Robot 95ac8f180f
Merge pull request #11353 from flouthoc/resolve-workdir-after-mounts
container: resolve workdir during initialization after all the mounts are completed.
2021-08-30 18:12:29 -04:00
Ed Santiago 1122c66ce8 upgrade test: add new baseline
Add a new reference point against which to test upgrades.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2021-08-30 14:27:48 -06:00
Matthew Heon c976667231
Merge pull request #11342 from baude/machinecleanups
clean up socket and pid files from podman machine
2021-08-30 15:14:19 -04:00
Brent Baude a2a166345e clean up socket and pid files from podman machine
to avoid segvs, we should clean up as much of the socket and regular
files from podman machine as possible on stop.  also, on start, we
should add logic to remove these files before starting in case the start
process is stopped prematurely (due to an error for example).

[NO TESTS NEEDED]

Signed-off-by: Brent Baude <bbaude@redhat.com>
2021-08-30 12:29:06 -05:00
OpenShift Merge Robot 4834b73119
Merge pull request #11360 from Luap99/rootless-resolv
rootless cni: resolve absolute symlinks correctly
2021-08-30 13:14:31 -04:00
Paul Holzinger 06f94dd09e
rootless cni: resolve absolute symlinks correctly
When /etc/resolv.conf is a symlink to an absolute path use it and not
join it the the previous path.

[NO TESTS NEEDED] This depends on the host layout.

Fixes #11358

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2021-08-30 16:55:26 +02:00
flouthoc ec1f350ee5 container: resolve workdir after all the mounts happen.
There are use-cases where users would want to use overlay-mounts as
workdir. For such cases workdir should be resolved after all the mounts
are completed during the container init process.

Signed-off-by: Aditya Rajan <arajan@redhat.com>
2021-08-30 19:49:26 +05:30
Valentin Rothberg de3920c0e9 auto-update: fix authfile label
Make sure that the container's authfile label is used when pulling down
a new image.

[NO TESTS NEEDED] since it would require some larger rewrite of the
auto-update system tests that I currently have no time for.  I added a
reminder to have some breadcrumbs when there is more time.

Fixes: #11171
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-08-30 13:49:35 +02:00
OpenShift Merge Robot a2acd04447
Merge pull request #11334 from jwhonce/issues/10831
Add support for mount options to API
2021-08-27 16:22:55 -04:00
Jhon Honce a5adc3d80f Add support for mount options to API
When creating containers the specialized mount options where not
populated via the API.

Fixes: #10831
Signed-off-by: Jhon Honce <jhonce@redhat.com>
2021-08-27 11:11:01 -07:00
OpenShift Merge Robot b21f8ea206
Merge pull request #11333 from rhatdan/http-proxy
Globally replace http:// with https://
2021-08-27 13:26:56 -04:00
OpenShift Merge Robot 8cd2f2fb80
Merge pull request #11339 from rhatdan/subid
Add support for libsubid
2021-08-27 13:24:56 -04:00
OpenShift Merge Robot 266a3892f2
Merge pull request #11102 from cdoern/infraEnhance
InfraContainer Rework
2021-08-27 09:24:26 -04:00
OpenShift Merge Robot 69cdf5d803
Merge pull request #11330 from containers/dependabot/go_modules/github.com/containers/image/v5-5.16.0
Bump github.com/containers/image/v5 from 5.15.2 to 5.16.0
2021-08-27 09:10:27 -04:00
Daniel J Walsh db60a1e654
Add support for libsubid
This will enable remote access to /etc/subuid and /etc/subgid
information from ldap services, if shadow-utils ships with a libsubid.

[NO TESTS NEEDED] Since we have no way to test this.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-08-27 08:13:01 -04:00
OpenShift Merge Robot 6f61ef87af
Merge pull request #11337 from Luap99/anon-template
Shell completion for --format with anonymous fields
2021-08-27 07:23:26 -04:00
Daniel J Walsh 8469417040
Globally replace http:// with https://
[NO TESTS NEEDED] Hopefully existing tests will find issues.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-08-27 06:14:46 -04:00
Paul Holzinger ab6c43f3e0
Shell completion for --format with anonymous fields
In commit d81021ed26 I introduced shell completion for the `--format`
flag. This is a very nice way to complete go template field names.
However it did not work correct for anonymous fields. In this case the
child fields can be accessed directly from the parent.

For example:
```
type Anonymous struct {
   Field1 string
   Field2 string
   ...
}

type MyType struct {
    Anonymous
}

var s = MyType{}
```

Now if you want to access a field from the Anonymous struct you can just
do `s.Field1`. The same is allowed for go templates, using `{{.Field1}}`
should work. This commit adds this functionality, if the field is anonymous
read the child field names recursively and add them to the suggestions.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2021-08-27 10:28:15 +02:00
cdoern d28e85741f InfraContainer Rework
InfraContainer should go through the same creation process as regular containers. This change was from the cmd level
down, involving new container CLI opts and specgen creating functions. What now happens is that both container and pod
cli options are populated in cmd and used to create a podSpecgen and a containerSpecgen. The process then goes as follows

FillOutSpecGen (infra) -> MapSpec (podOpts -> infraOpts) -> PodCreate -> MakePod -> createPodOptions -> NewPod -> CompleteSpec (infra) -> MakeContainer -> NewContainer -> newContainer -> AddInfra (to pod state)

Signed-off-by: cdoern <cdoern@redhat.com>
2021-08-26 16:05:16 -04:00
OpenShift Merge Robot 94c37d7d47
Merge pull request #11298 from baude/kubeupdown
teardown play kube
2021-08-26 13:58:44 -04:00