10827 Commits

Author SHA1 Message Date
f28b08fe96 Correct compat network prune response
Correcting the structure of the compat network prune response.  They
should follow {"NetworksDeleted": [<network_name>",...]}

Fixes: #9310

Signed-off-by: baude <bbaude@redhat.com>
2021-02-10 15:48:14 -06:00
4d604c1089 Merge pull request #9268 from cevich/podman_monitor
[CI:DOCS] Cirrus: Send cirrus-cron report e-mail to list.
2021-02-10 13:12:38 -05:00
88ab83d4e0 Merge pull request #9298 from containers/dependabot/go_modules/github.com/spf13/cobra-1.1.2
Bump github.com/spf13/cobra from 1.1.1 to 1.1.2
2021-02-10 10:41:38 -05:00
832639ca6d Merge pull request #9299 from Luap99/secret-shell-completion-test
Add shell completion tests for secrets
2021-02-10 10:30:39 -05:00
939282fe91 Merge pull request #9301 from vrothberg/bump
bump to v3.1.0-dev
2021-02-10 10:29:38 -05:00
871562f9fe Merge pull request #9294 from matejvasek/update_linter
Update golangci-lint
2021-02-10 10:26:39 -05:00
b4ca924365 Merge pull request #9297 from matejvasek/apiv2_push_get_digest
Docker [APIv2] push sends digest in response body
2021-02-10 08:52:36 -05:00
629a9796e5 Merge pull request #9291 from lsm5/fedora-rpm-binary-hardening
hardening flags for fedora rpmbuilds
2021-02-10 08:00:38 -05:00
31b2b2cc2d bump to v3.1.0-dev
Given we branched for 3.0 already, bumping the version in the main
branch will help prevent confusion in case users report issues on main
versus the v3.0 branch.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-02-10 13:34:11 +01:00
68133414f4 [NO TESTS NEEDED] Update linter
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2021-02-10 13:25:40 +01:00
46b014bad5 Bump github.com/spf13/cobra from 1.1.1 to 1.1.2
Bumps [github.com/spf13/cobra](https://github.com/spf13/cobra) from 1.1.1 to 1.1.2.
- [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.1.1...v1.1.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-02-10 12:35:20 +01:00
1cc387bf78 Add shell completion tests for secrets
Add the SECRET keyword to the shell completion test. Also update the
use line for podman secret create to use `NAME` instead of `SECRET`.
This matches the other commands such as network/volume create.

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2021-02-10 10:41:51 +01:00
055e2dda3a Merge pull request #9295 from Luap99/fix-9293
Fix compat networks endpoint for a empty result
2021-02-10 01:45:31 -05:00
f4ece018b4 Docker APIv2 push sends digest in response body
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2021-02-10 02:03:28 +01:00
2d829aeb1f Merge pull request #9284 from rhatdan/annotations
Support annotations from containers.conf
2021-02-09 18:40:36 -05:00
f2a8562031 Fix compat networks endpoint for a empty result
The networks list compat api endpoint must return `[]`
and not `null` if no networks are found.

Fixes #9293

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2021-02-09 23:03:48 +01:00
21deafba85 hardening flags for fedora rpmbuilds
This commit sets the CGO_CFLAGS variable for hardening the Fedora rpm
binaries.

The flags used are the same as those in the official Fedora rpms.
Setting the flags in upstream spec would provide early warnings for
flag adjustments or other hardening issues.

Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2021-02-09 15:48:43 -05:00
8600c3b8e2 Merge pull request #9288 from vrothberg/vendor-image
vendor github.com/containers/image v5.10.2
2021-02-09 14:56:12 -05:00
cd8a061214 Merge pull request #9289 from edsantiago/apiv2_test_fixes
apiv2 test fixes
2021-02-09 14:40:13 -05:00
a8c7aedc74 Merge pull request #9270 from matejvasek/fix_apiv2_push
Fix Docker APIv2 push endpoint
2021-02-09 14:30:12 -05:00
995a60481a Merge pull request #9283 from vrothberg/fix-8897
generate kube: do not set caps with --privileged
2021-02-09 14:23:15 -05:00
46385dd609 Restart service when CONTAINERS_CONF changes
Service needs to be restarted in order to read the CONTAINERS_CONF file.
Not resetting this can lead to lots of flakes, since the test will use
whatever the host system has to be set in it's containers.conf.

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

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-02-09 13:18:18 -05:00
cc846a8cd9 Support annotations from containers.conf
Currently podman does not use the annotations specified in the
containers.conf. This PR fixes this.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-02-09 13:18:18 -05:00
68414537c1 vendor github.com/containers/image v5.10.2
Fixes: #8559
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-02-09 19:05:15 +01:00
ea704da726 APIv2 tests: lots of cleanup
It's been a while since I last looked at these; some cruft
has crept in, generating noise and hence unreadable test
results. Clean it up:

 * remove pushd/popd in one subtest, replace with 'tar -C'.
   (Also remove confusing quotation marks). This removes
   spurious directory names from output.

 * in like(), show only first line of actual output.
   Some commands ('tree', 'generate kube') produce
   voluminous multi-line output, which is super useless
   and distracting when reading a test run.

 * Recognize that some queries will not generate output,
   e.g. HEAD requests and some POSTs. Deal with that.
   This fixes "curl.result.out: no such file" and "parse
   error" warnings.

 * In cleanup, 'podman rm -a' and 'rmi -af'; this gets
   rid of errors when deleting $WORKDIR. (EBUSY error
   when root, EPERM when rootless).

And, the original reason for poking in here: refactor the
wait-for-port part of start_server() into its own helper
function, so we can use it when starting a local registry
in 12-imagesMore. (Ref: #9270)

Signed-off-by: Ed Santiago <santiago@redhat.com>
2021-02-09 10:43:54 -07:00
763d522983 Merge pull request #9281 from containers/dependabot/go_modules/github.com/containers/ocicrypt-1.1.0
Bump github.com/containers/ocicrypt from 1.0.3 to 1.1.0
2021-02-09 18:35:09 +01:00
721a1e104e Fix Docker APIv2 push endpoint
Docker doesn't have the destination parameter as libpod does,
the "image name" path parameter is supposed to be the destination.

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2021-02-09 18:20:15 +01:00
f98605e0e4 Merge pull request #9125 from ashley-cui/secretswiring
Implement Secrets
2021-02-09 17:51:08 +01:00
48c612cf66 generate kube: support --privileged
Do not play with capabilities for privileged containers where all
capabilities will be set implicitly.

Also, avoid the device check when running privileged since all of /dev/*
will be mounted in any case.

Fixes: #8897
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-02-09 17:40:35 +01:00
08d8290f1d Bump github.com/containers/ocicrypt from 1.0.3 to 1.1.0
Bumps [github.com/containers/ocicrypt](https://github.com/containers/ocicrypt) from 1.0.3 to 1.1.0.
- [Release notes](https://github.com/containers/ocicrypt/releases)
- [Commits](https://github.com/containers/ocicrypt/compare/v1.0.3...v1.1.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-02-09 10:49:43 -05:00
832a69b0be Implement Secrets
Implement podman secret create, inspect, ls, rm
Implement podman run/create --secret
Secrets are blobs of data that are sensitive.
Currently, the only secret driver supported is filedriver, which means creating a secret stores it in base64 unencrypted in a file.
After creating a secret, a user can use the --secret flag to expose the secret inside the container at /run/secrets/[secretname]
This secret will not be commited to an image on a podman commit

Signed-off-by: Ashley Cui <acui@redhat.com>
2021-02-09 09:13:21 -05:00
9da4169e31 Merge pull request #9269 from Luap99/rootfs-shell-completion
Allow path completion for podman create/run --rootfs
2021-02-09 04:25:30 -05:00
58810fbfbb Merge pull request #9272 from rhatdan/VENDOR
Bump containers/buildah to v1.19.4
2021-02-09 04:16:30 -05:00
45981ba29a Bump containers/buildah to v1.19.4
Fix handling of --iidfile to happen on the client side.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-02-08 16:02:20 -05:00
19507d0ffe Merge pull request #9246 from rhatdan/build
Implement missing arguments for podman build
2021-02-08 14:18:31 -05:00
1caace8f4c Allow path completion for podman create/run --rootfs
If the --rootfs flag is set podman create/run expect a host
path as first argument. The shell completion should provide
path completion in that case.

[NO TESTS NEEDED]
This can manually be verified with `podman run --rootfs [TAB]`.

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2021-02-08 20:11:00 +01:00
6c75419a8f Cirrus: Send cirrus-cron report e-mail to list.
This mailing-list was established to allow people to sub/unsub from
automated notifications.  Add it to the list of destinations picked up
by the Github Actions workflow
`.github/workflows/check_cirrus_cron.yml`.

Signed-off-by: Chris Evich <cevich@redhat.com>
2021-02-08 12:11:16 -05:00
2bf13219f5 Merge pull request #9266 from vrothberg/fix-6510
make `podman rmi` more robust
2021-02-08 11:35:15 -05:00
c32913d0a3 Merge pull request #9236 from baude/networkprune
add network prune
2021-02-08 09:50:50 -05:00
2aaf631586 Merge pull request #9265 from vrothberg/vendor-common
vendor latest containers/common
2021-02-08 09:15:08 -05:00
feecdf919f make podman rmi more robust
The c/storage library is subject to TOCTOUs as the central container and
image storage may be shared by many instances of many tools.  As shown
in #6510, it's fairly easy to have multiple instances of Podman running
in parallel and yield image-lookup errors when removing them.

The underlying issue is the TOCTOU of removal being split into multiple
stages of first reading the local images and then removing them.  Some
images may already have been removed in between the two stages. To make
image removal more robust, handle errors at stage two when a given image
is not present (anymore) in the storage.

Fixes: #6510
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-02-08 14:58:17 +01:00
407e86dcd2 Implement missing arguments for podman build
Buildah bud passes a bunch more flags then podman build.

We need to implement hook up all of these flags to get full functionality.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-02-08 08:39:18 -05:00
3c3e644c1c vendor latest containers/common
We had a couple of regressions in containers/common in the last release.
Before cutting a new release, let's vendor it here.  Since 3.0 has been
branched, we can vendor a non-release commit of c/common.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-02-08 13:19:08 +01:00
91ea3fabd6 add network prune
add the ability to prune unused cni networks.  filters are not implemented
but included both compat and podman api endpoints.

Fixes :#8673

Signed-off-by: baude <bbaude@redhat.com>
2021-02-06 07:37:29 -06:00
69ddbde983 Merge pull request #9205 from st1971/issue-8710
play kube selinux label issue
2021-02-05 12:25:55 -05:00
c421127dd7 Merge pull request #9231 from vrothberg/rootfs-workdir
fix logic when not creating a workdir
2021-02-05 06:29:05 -05:00
42d4652fed Merge pull request #9048 from matejvasek/apiv2_wait
Fix Docker APIv2 container wait endpoint
2021-02-05 04:41:41 -05:00
4a0ae01261 Merge pull request #9182 from mheon/bump_api
Bump remote API version to 3.0.0
2021-02-05 04:10:29 -05:00
821ef6486a fix logic when not creating a workdir
When resolving the workdir of a container, we may need to create unless
the user set it explicitly on the command line.  Otherwise, we just do a
presence check.  Unfortunately, there was a missing return that lead us
to fall through into attempting to create and chown the workdir.  That
caused a regression when running on a read-only root fs.

Fixes: #9230
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-02-05 09:50:07 +01:00
002f2aca70 Bump remote API version to 3.0.0
Fixes #9175

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2021-02-04 16:42:29 -05:00