Commit Graph

4196 Commits

Author SHA1 Message Date
openshift-ci[bot] 2477a68b43
Merge pull request #15205 from sstosh/ci-run-cleanup-rootless
e2e: Add rootless mount cleanup test
2022-08-06 18:56:57 +00:00
openshift-ci[bot] 66c246d2c1
Merge pull request #15093 from karthikelango137/rmiNoPrune1
remove image podman no prune
2022-08-05 14:48:18 +00:00
openshift-ci[bot] 49ee311950
Merge pull request #15092 from karthikelango137/startFilter
start --filter flag changes
2022-08-05 06:43:56 +00:00
Toshiki Sonoda 83bd7a5c28 e2e: Add rootless mount cleanup test
`podman run -d mount cleanup test` adapt to rootless environment.

Signed-off-by: Toshiki Sonoda <sonoda.toshiki@fujitsu.com>
2022-08-05 12:01:51 +09:00
Karthik Elango cc8e4d5fec remove image podman no prune
Signed-off-by: Karthik Elango <kelango@redhat.com>
2022-08-04 14:55:03 -04:00
openshift-ci[bot] e9f1eb28c4
Merge pull request #15197 from vrothberg/fix-15006
podman rmi: improve error message for build containers
2022-08-04 17:47:03 +00:00
Valentin Rothberg 3102194f03 podman rmi: improve error message for build containers
Improve the error message when attempting to remove an image that is in
use by an external/build container.  Prior, the error only indicated
that the image was in use but did not aid in resolving the issue.

Fixes: #15006
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2022-08-04 16:42:02 +02:00
Karthik Elango 9964366f69 start filter flag changes
Tying filtering logic for podman stop and start to same place in getContainersAndInputByContext() to reduce code redundancy

Signed-off-by: Karthik Elango <kelango@redhat.com>
2022-08-04 09:08:14 -04:00
Valentin Rothberg f8b6a81ae4 test/system/255-auto-update.bats: add an SELinux comment
Drop a comment on using `chcon` to let the local rollback test pass.
It took me a while to understand why the test failed and future souls
may appreciated the extra breadcrumb.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2022-08-04 13:07:58 +02:00
Charlie Doern 7df8d80508 add omitempty to Secret in k8s VolumeSource
Secret was populating a generated kube as `null`. Add omitempty
so that when the volume source is not a secret, we do not print unnecessary info

resolves #15156

Signed-off-by: Charlie Doern <cdoern@redhat.com>
2022-08-03 16:42:28 -04:00
openshift-ci[bot] 5fc7339aa1
Merge pull request #15084 from sstosh/rm-filter
Add rm --filter option
2022-08-03 17:23:07 +00:00
openshift-ci[bot] c1a38eb773
Merge pull request #15161 from lsm5/switch-to-dnf
Cirrus: use dnf instead of rpm to install packages
2022-08-03 15:14:22 +00:00
openshift-ci[bot] e54dac4dc6
Merge pull request #15166 from sstosh/ci-mount-rootless
Cirrus: Fix e2e tests for "mount_rootless_test"
2022-08-03 13:55:25 +00:00
Lokesh Mandvekar 50981cb846
skip pod resource limits test on aarch64
Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2022-08-03 08:29:59 -04:00
Toshiki Sonoda 1dbd61653d Cirrus: Fix e2e tests for "mount_rootless_test"
e2e `mount_rootless_test` did not load `podman binary path` successfully.
This PR fix this problem.

[It] podman unshare podman mount:
```
[+1596s] Running: ... unshare  mount <cid>
[+1596s] Error: exec: no command
[+1596s] output:
```

[It] podman unshare image podman mount:
```
[+1599s] Running: ... unshare  image mount quay.io/libpod/alpine:latest
[+1599s] Error: exec: no command
[+1599s] output:
```

Signed-off-by: Toshiki Sonoda <sonoda.toshiki@fujitsu.com>
2022-08-03 17:01:18 +09:00
Niall Crowe 1249cbb75f add "podman kube down" command
The "podman kube down" reads in a structured file of
Kubernetes YAML and removes pods based on the Kubernetes kind described in the YAML,
similiar to "podman play kube --down". Users will still be able to use
"podman play kube --down" and "podman kube play --down" to
perform the same function.

Signed-off-by: Niall Crowe <nicrowe@redhat.com>
2022-08-02 16:27:01 +01:00
Aditya R 5ab98f2c07 test: verify manifest inspect must contain OCI annotations
Signed-off-by: Aditya R <arajan@redhat.com>
2022-08-01 21:47:04 +05:30
Valentin Rothberg 3a05ddfb73 fix e2e sign tests
The key used in the tests has expired.  Remove the expiration date to
turn CI happy and green.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2022-08-01 16:21:55 +02:00
OpenShift Merge Robot 82137dc64e
Merge pull request #15108 from mtrmac/sigstore-sign
Sigstore sign
2022-08-01 13:35:43 +02:00
Miloslav Trmač d462da676c Add support for creating sigstore signatures, and providing passphrases
- Allow creating sigstore signatures via --sign-by-sigstore-private-key .
  Like existing --sign-by, it does not work remote (in this case
  because we would have to copy the private key to the server).
- Allow passing a passphrase (which is mandatory for sigstore private keys)
  via --sign-passphrase-file; if it is not provided, prompt interactively.
- Also, use that passphrase for --sign-by as well, allowing non-interactive
  GPG use. (But --sign-passphrase-file can only be used with _one of_
  --sign-by and --sign-by-sigstore-private-key.)

Note that unlike the existing code, (podman build) does not yet
implement sigstore (I'm not sure why it needs to, it seems not to
push images?) because Buildah does not expose the feature yet.

Also, (podman image sign) was not extended to support sigstore.

The test for this follows existing (podman image sign) tests
and doesn't work rootless; that could be improved by exposing
a registries.d override option.

The test for push is getting large; I didn't want to
start yet another registry container, but that would be an
alternative.  In the future, Ginkgo's Ordered/BeforeAll
would allow starting a registry once and using it for two
tests.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2022-07-30 17:26:08 +02:00
Miloslav Trmač 5a5624f818 Update the registry server we test against from 2.6 to 2.8
... primarily so that it can support OCI artifacts.

2.8 already seems to exist in the repo.

This requires changing WaitContainerReady to also check
stderr (ultimately because docker/distribution was
updated to a more recent sirupsen/logrus, which logs
by default to stderr instead of stdout).

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2022-07-30 17:24:31 +02:00
Miloslav Trmač 7599fde73e Use existing REGISTRY_IMAGE variables in more places
... instead of hard-coding a copy of the value.

Notably this makes hack/podman_registry actually
support the documented -i option.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2022-07-30 17:23:38 +02:00
Romain Geissler 24a599fe1d Add flag "--compression-format" to "podman manifest push" both in local/remote mode.
Also Fix usage of flag "--compression-format" for remote "podman image push". Fix usage of flags "--format", "--remove-signatures" in remote "podman manifest push".
Closes #15109.

Signed-off-by: Romain Geissler <romain.geissler@amadeus.com>
2022-07-30 15:10:41 +00:00
Toshiki Sonoda 53ec479685 Add rm --filter option
--filter : remove the filtered container.

Signed-off-by: Toshiki Sonoda <sonoda.toshiki@fujitsu.com>
2022-07-30 10:59:59 +09:00
Miloslav Trmač 68463278e3 Use httpasswd from the surrouding OS instead of the registry image
htpasswd is no longer included in docker.io/library/distribution
after 2.7.0, per https://github.com/docker/distribution-library-image/issues/107 ,
and we want to upgrade to a recent version.

At least system tests currently execute htpasswd from the OS,
so it seems that it is likely to be available.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2022-07-30 01:54:22 +02:00
OpenShift Merge Robot a43cfc1b1a
Merge pull request #15060 from rhatdan/rm1
With --rm option remove container if podman run fails
2022-07-28 21:31:34 +02:00
dependabot[bot] 17e3680fbe
Bump golang.org/x/tools from 0.1.11 to 0.1.12 in /test/tools
Bumps [golang.org/x/tools](https://github.com/golang/tools) from 0.1.11 to 0.1.12.
- [Release notes](https://github.com/golang/tools/releases)
- [Commits](https://github.com/golang/tools/compare/v0.1.11...v0.1.12)

---
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-07-28 12:55:26 +00:00
Daniel J Walsh de13dea863
With --rm option remove container if podman run fails
Fixes https://github.com/containers/podman/issues/15049

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2022-07-28 05:54:58 -04:00
OpenShift Merge Robot e1238ceb89
Merge pull request #14801 from lsm5/ec2-aarch64
Cirrus: enable Fedora 36 aarch64 tasks on EC2
2022-07-28 11:33:31 +02:00
OpenShift Merge Robot b933b8a1c1
Merge pull request #15034 from sstosh/manifest-push-rm
Fix: manifest push --rm removes a correct manifest list
2022-07-27 16:54:55 -04:00
OpenShift Merge Robot f7a0a24d20
Merge pull request #15066 from sstosh/checkpoint-samename
Fix: Restore a container which name is equal to a image name
2022-07-27 16:49:46 -04:00
Lokesh Mandvekar da98c88778
Cirrus: enable Fedora 36 aarch64 tasks on EC2
new file:   test/e2e/config_arm64.go

Tests that fail on aarch64 have been skipped with
`skip_if_aarch64`.

Co-authored-by: Chris Evich <cevich@redhat.com>
Co-authored-by: Ed Santiago <santiago@redhat.com>
Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2022-07-27 15:27:52 -04:00
OpenShift Merge Robot 432348e8e4
Merge pull request #14959 from rhatdan/rm
When removing objects specifying --force,podman should exit with 0
2022-07-27 14:10:19 -04:00
OpenShift Merge Robot eea8e570f2
Merge pull request #14997 from cdoern/prune
prune filter handling
2022-07-27 09:38:12 -04:00
Toshiki Sonoda 8628c01f5e Fix: manifest push --rm removes a correct manifest list
This bug is reproduced when we execute the following command:

1. podman manifest add <manifest list> <images exist on local storage>
2. podman manifest push --rm <manifest list> dir:<directory>

If pushing succeeds, it is expected to remove only a manifest list.
However, manifest list remains on local storage and images are removed.

This commit fixes `podman manifest push --rm` to remove only a manifest list.

And, supports `manifest push --rm option` in remote environment,
like host environment.

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

Signed-off-by: Toshiki Sonoda <sonoda.toshiki@fujitsu.com>
2022-07-27 10:33:15 +09:00
Toshiki Sonoda e4992fb818 Fix: Restore a container which name is equal to a image name
If there is a match for both container and image, we restore the container.

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

Signed-off-by: Toshiki Sonoda <sonoda.toshiki@fujitsu.com>
2022-07-27 09:44:48 +09:00
Daniel J Walsh 75419c5d88
When removing objects specifying --force,podman should exit with 0
This Patch will cause podman COMMAND rm --force bogus not fail

This is how Docker works, so Podman should follow this to allow existing
scripts to convert from Docker to Podman.

Fixes: #14612
Oprignal version of this patch came from wufan 1991849113@qq.com

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2022-07-26 16:00:42 -04:00
OpenShift Merge Robot 7f0fab10d1
Merge pull request #15059 from cdoern/infra
pod create --share none should not create infra
2022-07-26 16:21:40 +02:00
OpenShift Merge Robot 43d6f89d12
Merge pull request #15057 from marshall-lee/tls-verify-default-true
Set TLSVerify=true by default for API endpoints
2022-07-26 11:52:17 +02:00
Vladimir Kochnev 52a4642edd
Set TLSVerify=true by default for API endpoints
Option defaults in API must be the same as in CLI.

```
% podman image push --help
% podman image pull --help
% podman manifest push --help
% podman image search --help
```

All of these CLI commands them have --tls-verify=true by default:
```
--tls-verify  require HTTPS and verify certificates when accessing the registry (default true)
```

As for `podman image build`, it doesn't have any means to control
`tlsVerify` parameter but it must be true by default.

Signed-off-by: Vladimir Kochnev <hashtable@yandex.ru>
2022-07-26 02:07:56 +03:00
Ed Santiago 94e0a364a8 Semiperiodoc cleanup of obsolete FIXMEs
Some refer to issues that are closed. Remove them.

Some are runc bugs that will never be fixed. Say so, and remove
the FIXME.

One (bps/iops) should probably be fixed. File an issue for it, and
update comment to include the issue# so my find-obsolete-skips script
can track it.

And one (rootless mount with a "kernel bug?" comment) is still
not fixed. Leave the skip, but add a comment documenting the symptom.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2022-07-25 13:08:35 -06:00
Charlie Doern 27679d80b8 pod create --share none should not create infra
for podman pod create, when we are not sharing any namespaces there is no point for the infra container.
This is especially true since resources have also been decoupled from the container recently.

handle this on the cmd level so that we can still create infra if set explicitly

resolves #15048

Signed-off-by: Charlie Doern <cdoern@redhat.com>
2022-07-25 13:11:06 -04:00
Valentin Rothberg 4d18a98ec2 benchmarks: fix create test
And a new one for `run --detach`.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2022-07-25 17:44:13 +02:00
Charlie Doern 4724a0000d prune filter handling
network and container prune could not handle the label!=... filter. vendor in c/common to fix this and
add some podman level handling to make everything run smoothly

resolves #14182

Signed-off-by: Charlie Doern <cdoern@redhat.com>
2022-07-25 09:28:26 -04:00
OpenShift Merge Robot da1f479216
Merge pull request #15035 from cdoern/cgroup
fix container create/run throttle devices
2022-07-23 01:35:58 +02:00
OpenShift Merge Robot 935c150ee2
Merge pull request #15042 from Luap99/int-remote-netbackend
integration test: fix network backend option with remote
2022-07-22 19:32:58 +02:00
OpenShift Merge Robot 9b4df69830
Merge pull request #14967 from sstosh/pause-option
Add pause/unpause --latest, --cidfile, --filter
2022-07-22 18:12:50 +02:00
Charlie Doern ad8940cecf fix container create/run throttle devices
pod resource limits introduced a regression where `FinishThrottleDevices` was not called for create/run

Signed-off-by: Charlie Doern <cdoern@redhat.com>
2022-07-22 11:42:51 -04:00
OpenShift Merge Robot f53234a67e
Merge pull request #15040 from Luap99/api-umask
API: libpod/create use correct default umask
2022-07-22 17:34:22 +02:00
OpenShift Merge Robot d1f432dd56
Merge pull request #14567 from cdoern/secrets
Implement kubernetes secret handling for podman play kube
2022-07-22 16:07:45 +02:00