Commit Graph

10101 Commits

Author SHA1 Message Date
OpenShift Merge Robot 28d331d074
Merge pull request #8036 from xordspar0/heading-consistency
[CI:DOCS] Make man page headings more consistent
2020-10-16 17:58:54 -04:00
OpenShift Merge Robot 9d5f28ba9e
Merge pull request #8039 from zhangguanzhang/runlabel-panic
Fix panic when runlabel is missing
2020-10-16 16:10:02 -04:00
Jordan Christiansen 88bc133dac Make man page headings more consistent
Signed-off-by: Jordan Christiansen <xordspar0@gmail.com>
2020-10-16 15:06:33 -05:00
OpenShift Merge Robot 9f98b3447c
Merge pull request #7992 from containers/dependabot/go_modules/github.com/containers/common-0.25.0
Bump github.com/containers/common from 0.24.0 to 0.26.0
2020-10-16 09:27:44 -04:00
Andy Librian eefa3cbf6e Update podman-remote start --attach to handle detach keys
fixes #7979

Signed-off-by: Andy Librian <andylibrian@gmail.com>
2020-10-16 19:44:29 +07:00
Andy Librian 480cb2db5e Update podman-remote run to handle detach keys
addresses #7979

Signed-off-by: Andy Librian <andylibrian@gmail.com>
2020-10-16 19:44:29 +07:00
OpenShift Merge Robot fe1b6ccc85
Merge pull request #8029 from Luap99/image-trust-show-raw
Fix podman image trust show --raw output
2020-10-16 05:49:49 -04:00
Daniel J Walsh 711d4ba027
Bump github.com/containers/common from 0.24.0 to 0.26.0
Bumps [github.com/containers/common](https://github.com/containers/common) from 0.24.0 to 0.26.0.
- [Release notes](https://github.com/containers/common/releases)
- [Commits](https://github.com/containers/common/compare/v0.24.0...v0.26.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-10-16 04:38:06 -04:00
zhangguanzhang 97fec29212 Fix panic when runlabel is missing
Signed-off-by: zhangguanzhang <zhangguanzhang@qq.com>
2020-10-16 11:09:21 +08:00
Daniel J Walsh c3ecdd09ed
Merge pull request #8035 from xordspar0/fix-doc-heading
Fix podman-run man page heading
2020-10-15 14:24:02 -04:00
Paul Holzinger a261819183 Fix podman image trust show --raw output
Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2020-10-15 19:04:57 +02:00
Jordan Christiansen 579a10157d Fix podman-run man page heading
Sharing IPC is meant to be an example under the Examples heading, not a
new section.

Signed-off-by: Jordan Christiansen <xordspar0@gmail.com>
2020-10-15 09:51:25 -05:00
Daniel J Walsh 571ae9db72
Fix sorting issues in completions
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-10-15 10:17:52 -04:00
OpenShift Merge Robot a82d60db0f
Merge pull request #8030 from Luap99/fix-restore-panic
Fix possible panic in libpod container restore
2020-10-15 10:09:40 -04:00
Daniel J Walsh db23e12611
Add support for external container
External containers are containers created outside of Podman.
For example Buildah and CRI-O Containers.

$ buildah from alpine
alpine-working-container
$ buildah run alpine-working-container touch /test
$ podman container exists --external alpine-working-container

$ podman container diff alpine-working-container
C /etc
A /test

Added --external flag to refer to external containers, rather then --storage.

Added --external for podman container exists and modified podman ps to use
--external rather then --storage.  It was felt that --storage would confuse
the user into thinking about changing the storage driver or options.

--storage is still supported through the use of aliases.

Finally podman contianer diff, does not require the --external flag, since it
there is little change of users making the mistake, and would just be a pain
for the user to remember the flag.

podman container exists --external is required because it could fool scripts
that rely on the existance of a Podman container, and there is a potential
for a partial deletion of a container, which could mess up existing users.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-10-15 09:51:31 -04:00
Daniel J Walsh 22c8270135
fix podman container exists and diff for storage containers
Current these commands only check if a container exists in libpod. With
this fix, the commands will also check if they are in containers/storage.

This allows users to look at differences within a buildah or CRI-O container.

Currently buildah diff does not exists, so this helps out in that situation
as well as in CRI-O since the cri does not implement a diff command.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-10-15 09:51:15 -04:00
OpenShift Merge Robot a1d5a518d3
Merge pull request #8028 from containers/dependabot/go_modules/github.com/spf13/cobra-1.1.0
Bump github.com/spf13/cobra from 1.0.0 to 1.1.0
2020-10-15 09:32:50 -04:00
OpenShift Merge Robot d7a1e3fe2a
Merge pull request #8003 from containers/dependabot/go_modules/github.com/onsi/gomega-1.10.3
Bump github.com/onsi/gomega from 1.10.2 to 1.10.3
2020-10-15 07:35:23 -04:00
OpenShift Merge Robot ef7f584acf
Merge pull request #8025 from edsantiago/bats
System test additions
2020-10-15 06:19:07 -04:00
Paul Holzinger 2e65497dea Fix possible panic in libpod container restore
We need to do a length check before we can access the
networkStatus slice by index to prevent a runtime panic.

Fixes #8026

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2020-10-15 11:50:29 +02:00
OpenShift Merge Robot 41eda417fe
Merge pull request #8013 from rhatdan/homedir
Setup HOME environment when using --userns=keep-id
2020-10-15 05:09:40 -04:00
dependabot-preview[bot] e6d3c492a0
Bump github.com/spf13/cobra from 1.0.0 to 1.1.0
Bumps [github.com/spf13/cobra](https://github.com/spf13/cobra) from 1.0.0 to 1.1.0.
- [Release notes](https://github.com/spf13/cobra/releases)
- [Changelog](https://github.com/spf13/cobra/blob/master/CHANGELOG.md)
- [Commits](https://github.com/spf13/cobra/compare/v1.0.0...v1.1.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-10-15 04:46:01 -04:00
Ed Santiago 1646da834c System test additions
- run --userns=keep-id: confirm that $HOME gets set (#8013)

 - inspect: confirm that JSON output is a sane number of
   lines (10 or more), not an unreadable one-liner (#8011
   and #8021). Do so with image, pod, network, volume
   because the code paths might be different.

 - cgroups: confirm that 'run' preserves cgroup manager (#7970)

 - sdnotify: reenable tests, and hope CI doesn't hang. This
   test was disabled on August 18 because CI jobs were hanging
   and timing out. My suspicion was that it was #7316, which
   in turn seems to have hinged on conmon #182. The latter
   was merged on Sep 16, so let's cross our fingers and see
   what happens.

Also: remove inaccurate warning from a networking test.

And, wow, fix is_cgroupsv2(), it has never actually worked.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2020-10-14 15:32:02 -06:00
Daniel J Walsh 1814bac92e Setup HOME environment when using --userns=keep-id
Currently the HOME environment is set to /root if
the user does not override it.

Also walk the parent directories of users homedir
to see if it is volume mounted into the container,
if yes, then set it correctly.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-10-14 15:31:56 -06:00
Daniel J Walsh 6ca8067956
Setup HOME environment when using --userns=keep-id
Currently the HOME environment is set to /root if
the user does not override it.

Also walk the parent directories of users homedir
to see if it is volume mounted into the container,
if yes, then set it correctly.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-10-14 16:45:24 -04:00
OpenShift Merge Robot e4f6a1afae
Merge pull request #8021 from mheon/fix_pod_inspect_indent
Fix indentation for `podman pod inspect`
2020-10-14 16:29:05 -04:00
OpenShift Merge Robot 3e8e2a5035
Merge pull request #8018 from cevich/docker_py_vm
Cirrus: Execute docker-py tests on a VM
2020-10-14 14:51:44 -04:00
Matthew Heon bddd5580ab Fix indentation for `podman pod inspect`
Signed-off-by: Matthew Heon <mheon@redhat.com>
2020-10-14 13:55:16 -04:00
OpenShift Merge Robot e3eb6fd0e4
Merge pull request #7987 from jwhonce/jira/run-898-5
Restore --format table support
2020-10-14 13:07:11 -04:00
Chris Evich c921e3b9da
Cirrus: Execute docker-py tests on a VM
Signed-off-by: Chris Evich <cevich@redhat.com>
2020-10-14 11:39:27 -04:00
OpenShift Merge Robot d30b4b7aa5
Merge pull request #8011 from mheon/fix_inspect_json
Restore indent on JSON from `podman inspect`
2020-10-14 10:55:27 +02:00
Jhon Honce eb4a746efc Restore --format table support
* system df
* events
  * fix error handling from go routine
  * update tests to use gomega matchers for better error messages
* system info
* version
* volume inspect

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2020-10-13 17:28:45 -07:00
TomSweeneyRedHat 33366a2cda Convert Split() calls with an equal sign to SplitN()
After seeing #7759, I decided to look at the calls in
Podman and Buildah to see if we had issues with strings.Split()
calls where an "=" (equals) sign was in play and we expected
to split on only the first one.

There were only one or two that I found in here that I think
might have been troubling, the remainder are just adding
some extra safety.

I also had another half dozen or so that were checking length
expectations appropriately, those I left alone.

Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
2020-10-13 19:30:08 -04:00
dependabot-preview[bot] 9066292ee4
Bump github.com/onsi/gomega from 1.10.2 to 1.10.3
Bumps [github.com/onsi/gomega](https://github.com/onsi/gomega) from 1.10.2 to 1.10.3.
- [Release notes](https://github.com/onsi/gomega/releases)
- [Changelog](https://github.com/onsi/gomega/blob/master/CHANGELOG.md)
- [Commits](https://github.com/onsi/gomega/compare/v1.10.2...v1.10.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-10-13 16:22:29 -04:00
OpenShift Merge Robot d1ba9ce555
Merge pull request #8009 from baude/nosuchimage
alter compat no such image message
2020-10-13 21:53:05 +02:00
OpenShift Merge Robot 98708b1268
Merge pull request #7967 from cevich/restore_apiv2_test
Cirrus: Restore APIv2 Testing
2020-10-13 21:11:02 +02:00
Matthew Heon 915591b832 Restore indent on JSON from `podman inspect`
I don't know when this was disabled, but it's very hard to read
without it.

Signed-off-by: Matthew Heon <mheon@redhat.com>
2020-10-13 14:52:33 -04:00
OpenShift Merge Robot 8fef35a2ff
Merge pull request #7998 from cevich/add_ci_docs
[CI:DOCS] Cirrus: Ability to skip most tests for docs updates
2020-10-13 20:47:41 +02:00
OpenShift Merge Robot 6a548df546
Merge pull request #8007 from ashley-cui/formatting
Restore --format: container stats & pod ps
2020-10-13 20:36:46 +02:00
Matthew Heon f58d2f5e75 Enforce LIFO ordering for shutdown handlers
This allows us to run both the Libpod and Server handlers at the
same time without unregistering one.

Also, pass the signal that killed us into the handlers, in case
they want to use it to determine what to do (e.g. what exit code
to set).

Signed-off-by: Matthew Heon <mheon@redhat.com>
2020-10-13 14:21:19 -04:00
baude ef5c884673 alter compat no such image message
we need to alter the return error message when a GET (inspect) is performed on an image using the compatibility layer.  docker-py bindings look for a initial capped error message.

Signed-off-by: baude <bbaude@redhat.com>
2020-10-13 12:11:52 -05:00
OpenShift Merge Robot 3e2d7a992a
Merge pull request #7955 from ParkerVR/7751-alt
Container detach newlines
2020-10-13 12:31:14 -04:00
Chris Evich 23087f77ae
Cirrus: Restore APIv2 Testing
Signed-off-by: Chris Evich <cevich@redhat.com>
2020-10-13 11:42:31 -04:00
Chris Evich b7fd5d022d
Cirrus: Ability to skip most tests for docs updates
***Warning***: `skip` has non-obvious side-effects vs `only_if`:
https://cirrus-ci.org/guide/writing-tasks/#conditional-task-execution

The skip instruction can give a false sense of security by always
marking tasks as passed in the UI, even if they didn't run. In
contrast, the `only_if` condition will avoid creating the task
all -together; therefore, a problematic task's absense is more likely to
be noticed if it introduced a problem.

Signed-off-by: Chris Evich <cevich@redhat.com>
2020-10-13 10:17:51 -04:00
OpenShift Merge Robot 7ad631b819
Merge pull request #8000 from edsantiago/fix_apiv2_tests_again
APIv2 tests: try again to fix them
2020-10-13 09:33:57 -04:00
OpenShift Merge Robot d161f4225a
Merge pull request #7995 from mheon/api_is_stable
[CI:DOCS] Remove a note that the HTTP API is not yet stable.
2020-10-13 09:25:23 -04:00
Ashley Cui 8f603a76f6 Restore --format: stats & pod ps
Restore formatting for stats
Fix formatting for pod ps

Signed-off-by: Ashley Cui <acui@redhat.com>
2020-10-13 09:08:13 -04:00
OpenShift Merge Robot b1b9d9e139
Merge pull request #7996 from edsantiago/ci_systemtest_rootless_safe
System tests: run with local podman, not remote
2020-10-13 03:34:43 -04:00
Matthew Heon 83e6e4ccdd Enable masking stop signals within container creation
Expand the use of the Shutdown package such that we now use it
to handle signals any time we run Libpod. From there, add code to
container creation to use the Inhibit function to prevent a
shutdown from occuring during the critical parts of container
creation.

We also need to turn off signal handling when --sig-proxy is
invoked - we don't want to catch the signals ourselves then, but
instead to forward them into the container via the existing
sig-proxy handler.

Fixes #7941

Signed-off-by: Matthew Heon <mheon@redhat.com>
2020-10-12 17:08:26 -04:00
Ed Santiago 2a6a3f333b APIv2 tests: try again to fix them
CI discovered that a lot of networking tests are failing; my
fault, for not having run my tests as root on my laptop.
Disable those.

Also: bump up the ten-request time limit, from 5 to 7 seconds.
Looks like something keeps getting slower and slower, but I
guess there's not much we can do about it.

Also: when we get a mismatch response code (e.g. 500 when we
expect 200), dump the response body and skip any subsequent
response checks.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2020-10-12 13:57:59 -06:00