9383 Commits

Author SHA1 Message Date
7ac8000cc1 fix allowing inspect manifest of non-local image
Add support of `podman manifest inspect` returning manifest list of non-local manifest.
Close #https://github.com/containers/podman/issues/7726

Signed-off-by: Qi Wang <qiwan@redhat.com>
2020-09-30 14:12:32 -04:00
f86e01ab10 Merge pull request #7820 from giuseppe/fix-capabilities-not-root
capabilities: always set ambient and inheritable
2020-09-30 17:22:54 +00:00
e2050d7c35 Merge pull request #7847 from rhatdan/network
Make the e2e test network cleanup more robust.
2020-09-30 16:07:26 +00:00
fb43e8c6a4 Merge pull request #7833 from jwhonce/issues/7826
Refactor IdleTracker to handle StateIdle transitions
2020-09-30 14:37:31 +00:00
5766f5b587 Make the e2e test network cleanup more robust.
We need to handle removal of non existing network.

This allows the `removeCNINetwork` function
always to be called. This is needed by tests which are trying
to remove the network manually in order to prevent flakes.

Fixes #7809

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-09-30 09:50:59 -04:00
703381b4a2 capabilities: always set ambient and inheritable
change capabilities handling to reflect what docker does.

Bounding: set to caplist
Inheritable: set to caplist
Effective: if uid != 0 then clear; else set to caplist
Permitted: if uid != 0 then clear; else set to caplist
Ambient: clear

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2020-09-30 15:14:07 +02:00
4d57313449 Merge pull request #7840 from vrothberg/remote-untag
fix remote untag
2020-09-30 12:58:08 +00:00
451f003ce9 Merge pull request #7841 from AkihiroSuda/fix-7789
rootless-cni-infra v3: fix cleaning up DNS entries
2020-09-30 12:41:57 +00:00
6fd0e9bb73 Merge pull request #7831 from rhatdan/env
We already set container=podman environment variable
2020-09-30 12:24:32 +00:00
08d036cbd4 Merge pull request #7825 from rhatdan/exitcode
Fix handling of remove of bogus volumes, networks and Pods
2020-09-30 11:33:19 +00:00
19f080f1af Merge pull request #7827 from vrothberg/systemd-run-error
healthchecks: return systemd-run error
2020-09-30 10:50:56 +00:00
515b919438 libpod: bump up rootless-cni-infra to v3
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2020-09-30 19:01:52 +09:00
eb56673b3b rootless-cni-infra v3: fix cleaning up DNS entries
Fix "Old DNS entries are not cleaned up" by passing CNI_ARGS to `cnitool del`.

Fix #7789

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2020-09-30 18:59:39 +09:00
1a3e409412 fix remote untag
Fix the remote client to untag all tags of the specified image.
Instead of querying the image on the client side, support the
case where both, repo and tag, are empty and remove all tags.

Reuse the ABI implementation where possible.  In retrospective,
the libpod untag endpoint should support a slice of strings to
batch remove tags rather than reaching out for each tag individually.

Enable the skipped test.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2020-09-30 11:57:31 +02:00
e9edddaaf2 Merge pull request #7799 from rhatdan/rootless
Make all Skips specify a reason
2020-09-30 09:18:41 +00:00
b68b6f334d Merge pull request #7832 from edsantiago/bats_run_tz
System tests: add podman run --tz
2020-09-30 00:24:55 +00:00
b496802413 Make all Skips specify a reason
Always use CGROUPV2 rather then reading from system all the time.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-09-29 16:01:26 -04:00
22474095ab Fix handling of remove of bogus volumes, networks and Pods
In podman containers rm and podman images rm, the commands
exit with error code 1 if the object does not exists.

This PR implements similar functionality to volumes, networks, and Pods.

Similarly if volumes or Networks are in use by other containers, and return
exit code 2.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-09-29 15:52:43 -04:00
453333a35c Merge pull request #7828 from edsantiago/bats
System tests: corner case for run --pull
2020-09-29 19:29:51 +00:00
ac23ff55b8 We already set container=podman environment variable
Only need to set container, no need for containers

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-09-29 15:26:45 -04:00
f03d470349 Refactor IdleTracker to handle StateIdle transitions
* Remove stutter naming for package and types
* Stop treating StateIdle the same as StateClosed, rather transitions to
  StateIdle will keep API timeout window open
* Remove redundate code

Fixes #7826

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2020-09-29 11:32:47 -07:00
258ccfc3c9 System tests: add podman run --tz
New tests for podman run --tz=EXPLICIT and =local. Requires
updating our testimage by adding a fixed reference timestamp
to a known file path.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2020-09-29 12:23:58 -06:00
12f173f473 Merge pull request #7797 from rsommer/master
[CI:DOCS] Add section about current differences
2020-09-29 17:51:05 +00:00
81d9ba59db System tests: corner case for run --pull
Obscure corner case in which 'podman run --pull=never alpine'
will actually pass *with no alpine image* if there's an
image named "myalpine". (i.e. a substring match, not full
string match). Fixed in #7770 but the tests that were added
there do not actually test that.

This adds a double-duty test for that as well as making
sure that 'run --pull=never SHORTNAME' (implicit :latest)
does not match our existing :YYYYMMDD image; then one
more quick test to make sure that if we tag as :latest,
the same --pull=never succeeds.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2020-09-29 10:56:40 -06:00
b07eb0bc91 healthchecks: return systemd-run error
In case `systemd-run` errors when creating transient unit files (and
timers), create an error based on the combined output from stdout and
stderr.  Using the error from `exec.Command` contains the exit code
only which is not useful to debug (see #7484).

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2020-09-29 18:26:15 +02:00
2ee415be90 Merge pull request #7788 from IceCodeNew/patch-1
Updating on supported restart policy
2020-09-29 15:38:24 +00:00
63f0bb93f8 Merge pull request #7783 from ashley-cui/slirp
Add support for slirp network for pods
2020-09-29 15:34:37 +00:00
53aa9764c4 Merge pull request #7822 from edsantiago/bats
Gating-test fix: deal with new crun error msg
2020-09-29 15:21:09 +00:00
bf10168614 Merge pull request #7811 from rhatdan/sysctls
Ignore containers.conf sysctl when namespaces set to host
2020-09-29 14:59:16 +00:00
84dede4452 Merge pull request #7819 from containers/dependabot/go_modules/github.com/sirupsen/logrus-1.7.0
Bump github.com/sirupsen/logrus from 1.6.0 to 1.7.0
2020-09-29 13:20:30 +00:00
f732e2edcb Gating-test fix: deal with new crun error msg
crun changed an error message:

   https://github.com/containers/crun/pull/439

It's a good change, absolutely the right thing to do, but
it broke gating tests. Fix tests so they handle both old
and new format.

Fixes: #7814

Signed-off-by: Ed Santiago <santiago@redhat.com>
2020-09-29 06:20:21 -06:00
e6789cb3e8 Bump github.com/sirupsen/logrus from 1.6.0 to 1.7.0
Bumps [github.com/sirupsen/logrus](https://github.com/sirupsen/logrus) from 1.6.0 to 1.7.0.
- [Release notes](https://github.com/sirupsen/logrus/releases)
- [Changelog](https://github.com/sirupsen/logrus/blob/master/CHANGELOG.md)
- [Commits](https://github.com/sirupsen/logrus/compare/v1.6.0...v1.7.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-09-29 05:58:49 -04:00
5cf865926e Merge pull request #7792 from Landrash/master
[CI:DOCS] Adds missing . to README.md file.
2020-09-29 08:45:01 +00:00
72d316bee2 Apply suggestions from code review
Co-authored-by: Tom Sweeney <tsweeney@redhat.com>
Signed-off-by: Roland Sommer <rol@ndsommer.de>
2020-09-29 08:21:09 +02:00
4a7fb62adc Merge pull request #7803 from edsantiago/bats
System tests: reenable some skipped tests
2020-09-29 01:45:20 +00:00
e7e466e0c8 Merge pull request #7805 from Luap99/journald-test
Journald log driver test
2020-09-28 21:04:55 +00:00
6b803a66fa Merge pull request #7804 from baude/issue7740
fix for compatibility volume creation
2020-09-28 20:26:09 +00:00
63420d50a1 Adds missing . to README.md file.
Signed-off-by: Fredrik Lindqvist <landrash@mail.com>
2020-09-28 22:25:49 +02:00
0d70df1195 Ignore containers.conf sysctl when namespaces set to host
If user sets namespace to host, then default sysctls need to be ignored
that are specific to that namespace.

--net=host ignore sysctls that begin with net.
--ipc=host ignore fs.mqueue
--uts=host ignore kernel.domainname and kernel.hostname

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-09-28 16:17:28 -04:00
1f78d33f76 System tests: reenable some skipped tests
- pause test: enable when rootless + cgroups v2
   (was previously disabled for all rootless)

 - run --pull: now works with podman-remote
   (in #7647, thank you @jwhonce)

 - various other run/volumes tests: try reenabling
   It looks like #7195 was fixed (by #7451? I'm not
   sure if I'm reading the conversation correctly).
   Anyway, remove all the skip()s on 7195. Only time
   will tell if it's really fixed)

Also:

 - new test for podman image tree --whatrequires
   (because TIL). Doesn't work with podman-remote.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2020-09-28 13:59:42 -06:00
1db49d95b7 Journald log driver test
Test that the journald log driver writes to journald and
that we can read it with journalctl.

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2020-09-28 20:48:12 +02:00
be88d45f5a fix for compatibility volume creation
in the compatibility layer, creating a volume with a name that already does not result in an error.  instead a 201 response with the existing volume's information is returned. while it seems like a bug on the part of docker and they agree, no attempt has been made to fix it in five years.  See https://github.com/moby/moby/issues/16068

Fixes: #7740

Signed-off-by: baude <bbaude@redhat.com>
2020-09-28 13:28:07 -05:00
e0abd12016 Add section about current differences
There are some differences in behaviour between docker and podman which should be documented to help developers while transitioning.

Signed-off-by: Roland Sommer <rol@ndsommer.de>
2020-09-28 17:10:24 +02:00
b0e70a6411 Merge pull request #7786 from rhatdan/rootless
Remove SkipIfRootless if possible, document other calls
2020-09-28 14:43:46 +00:00
d2802636b0 Merge pull request #7770 from rhatdan/pullpolicy
Properly handle podman run --pull command
2020-09-28 14:36:43 +00:00
97841e5507 Merge pull request #7793 from Luap99/network-force
Fix podman network rm --force when network is used by a pod
2020-09-28 14:13:32 +00:00
343a10e25f Fix network remove for the podman remote client
The podman remote client ignored the force option due a typo.
If an error occured the remote client would panic with an
index out of range error.

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2020-09-28 13:34:56 +02:00
393120c135 Fix podman network rm --force when network is used by a pod
I added a test to prevent a future regression.

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2020-09-28 10:41:25 +02:00
007c0ecd50 Remove SkipIfRootless if possible, document other calls
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-09-27 07:55:16 -04:00
1b5853e647 Properly handle podman run --pull command
Currently the --pull missing|always|never is ignored

This PR implements this for local API.  For remote we
need to default to pullpolicy specified in the containers.conf
file.

Also fixed an issue when images were matching other images names
based on prefix, causing images to always be pulled.

I had named an image myfedora and when ever I pulled fedora, the system
thought that it there were two images named fedora since it was checking
for the name fedora as well as the prefix fedora.  I changed it to check
for fedora and the prefix /fedora, to prefent failures like I had.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-09-27 07:25:28 -04:00