Commit graph

13058 commits

Author SHA1 Message Date
OpenShift Merge Robot e9d8524af5
Merge pull request #11783 from containers/dependabot/go_modules/github.com/containers/buildah-1.23.1
Bump github.com/containers/buildah from 1.23.0 to 1.23.1
2021-10-01 13:43:15 -04:00
OpenShift Merge Robot 1b88b678cf
Merge pull request #11707 from rhatdan/play
Add podman play kube --no-hosts options
2021-10-01 13:27:17 -04:00
dependabot[bot] 97bf6331f9
Bump github.com/containers/buildah from 1.23.0 to 1.23.1
Bumps [github.com/containers/buildah](https://github.com/containers/buildah) from 1.23.0 to 1.23.1.
- [Release notes](https://github.com/containers/buildah/releases)
- [Changelog](https://github.com/containers/buildah/blob/v1.23.1/CHANGELOG.md)
- [Commits](https://github.com/containers/buildah/compare/v1.23.0...v1.23.1)

---
updated-dependencies:
- dependency-name: github.com/containers/buildah
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-10-01 15:01:50 +00:00
OpenShift Merge Robot c6a896b0c7
Merge pull request #11808 from vrothberg/cache
pkg/specgen: cache image in generator
2021-10-01 10:57:13 -04:00
Daniel J Walsh 641f0ccc4e
Add podman play kube --no-hosts options
This option will setup the containers to not modify their /etc/hosts
file and just use the one from the image.

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

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-10-01 10:53:50 -04:00
OpenShift Merge Robot 81aabc8054
Merge pull request #11686 from cdoern/podDeviceOptions
Pod Device-Read-BPS support
2021-10-01 10:53:14 -04:00
OpenShift Merge Robot 285c9ec69b
Merge pull request #11813 from jwhonce/wip/bindings
Add guard for BuildOptions.CommonBuildOpts
2021-10-01 10:36:12 -04:00
OpenShift Merge Robot 324871d451
Merge pull request #11802 from flouthoc/podman-machine-rm-cleanup
machine: silently cleanup dangling sockets before `rm` if possible
2021-10-01 10:21:13 -04:00
OpenShift Merge Robot fedd9cc120
Merge pull request #11823 from edsantiago/bats
Gating tests: fix permissions error
2021-10-01 09:20:14 -04:00
Ed Santiago fb2355adb3 Gating tests: fix permissions error
...in volume test. Looks like Bodhi gating tests run from a
nonwritable directory. I feel really stupid for not realizing
this when I first tried to fix this bug two weeks ago.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2021-10-01 05:36:12 -06:00
Valentin Rothberg 686b7ef7bf pkg/specgen: cache image in generator
To prevent expensive redundant lookups and inspects on the same image,
cache the image in the generator.  Note that once a given image has been
inspected, subsequent calls will use the libimage-internal cache.

[NO TESTS NEEDED] since it is no functional change.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-10-01 13:30:46 +02:00
OpenShift Merge Robot 1da364783d
Merge pull request #11821 from vrothberg/gitlab
cirrus: gitlab: download packages
2021-10-01 07:27:15 -04:00
Valentin Rothberg 0b5a2b7468 cirrus: gitlab: download packages
It looks like the containerd.io package is not present anymore in the
package cache which ultimately breaks CI since it's a requirement for
docker.

Hence, download the few packages instead of relying on the cache.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-10-01 10:34:44 +02:00
OpenShift Merge Robot 317e20a8d5
Merge pull request #11776 from edsantiago/bats_is_cleanup
System tests: tighten 'is' operator
2021-10-01 03:36:11 -04:00
OpenShift Merge Robot f96c281f53
Merge pull request #11815 from edsantiago/bats
sdnotify test: accept MAINPID anywhere
2021-09-30 20:13:26 -04:00
Jhon Honce 648882bf64 Add guard for BuildOptions.CommonBuildOpts
Existing images.Build() bindings code panicked when field was not
initialized.

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2021-09-30 14:30:06 -07:00
OpenShift Merge Robot 6adf3293a0
Merge pull request #11811 from umohnani8/swagger
Add expose type map[uint16]string to description
2021-09-30 16:11:27 -04:00
Ed Santiago bf94ebf423 System tests: tighten 'is' operator
Fix day-one sloppiness: when I first wrote this framework
it compared strings using 'expr', not '=', to be more
forgiving of extra cruft in output. This was a bad decision.
It means that warnings or additional text are ignored:

    is "all is ok, NOT!"  "all is ok"  <-- this would pass

Solution: tighten up the 'is' check. Use '=' (direct
compare) first. If it fails, look for wild cards ('*')
or character classes ('[') in the expect string. If
so, and only then, use 'expr'. And, thanks to a clever
suggestion from Luap99, include '(using expr)' in the
error message when we do so; this could make it easier
for a developer to understand a string mismatch.

This change exposes a lot of instances in which we weren't
doing proper comparisons. Fix those. Thankfully, there
weren't as many as I'd feared.

Also, and completely unrelated, add '-T' flag to bats
helper, for showing timing results. (I will open this
as a separate PR if requested. I too find it offensive
to jumble together unrelated commits.)

Signed-off-by: Ed Santiago <santiago@redhat.com>
2021-09-30 13:32:51 -06:00
OpenShift Merge Robot ba72b17d28
Merge pull request #11818 from mheon/bump_main_340
[CI:DOCS] Update README and release notes for v3.4.0
2021-09-30 15:32:27 -04:00
OpenShift Merge Robot 5c2204b5ce
Merge pull request #11794 from umohnani8/pid
Allow a value of -1 to set unlimited pids limit
2021-09-30 15:14:28 -04:00
Matthew Heon 7e81d78ed0 Update README and release notes for v3.4.0
Signed-off-by: Matthew Heon <mheon@redhat.com>
2021-09-30 15:09:53 -04:00
Daniel J Walsh 1f3e2ed74f
Merge pull request #11807 from emsoucy/main
Fix typo in storage.conf file exists message
2021-09-30 14:25:59 -04:00
Ed Santiago cc42321697 sdnotify test: accept MAINPID anywhere
systemd sometimes spits out lines in the wrong order. Deal with it.

This fixes an infrequent flake that I haven't filed because I
didn't understand it well enough. (Hence, this reduces BUGS
but does not reduce BUG COUNT. Sorry!)

Signed-off-by: Ed Santiago <santiago@redhat.com>
2021-09-30 12:09:48 -06:00
OpenShift Merge Robot 16b9b51ae1
Merge pull request #11806 from giuseppe/play-kube-fix-cpu-limits
kube: fix conversion from milliCPU to period/quota
2021-09-30 13:34:52 -04:00
OpenShift Merge Robot 3d08c4088f
Merge pull request #11793 from baude/playgenkubeselinux
Support selinux options with bind mounts play/gen
2021-09-30 13:31:53 -04:00
Aditya Rajan 642d682998
machine: silently cleanup dangling sockets before rm if possible
Try to cleanup dandling pid and machine socket if possible silently
before `rm`.

[NO TESTS NEEDED]

Signed-off-by: Aditya Rajan <arajan@redhat.com>
2021-09-30 22:38:13 +05:30
Urvashi Mohnani a1dce3a0df Add expose type map[uint16]string to description
Swagger-go doesn't generate the types correctly for some
complicated structs. We are seeing this with the expose option
for container create, it is showing up as any. Add a line
to the description to highlight that the type is map[uint16]string.

[NO TESTS NEEDED]

Signed-off-by: Urvashi Mohnani <umohnani@redhat.com>
2021-09-30 12:53:25 -04:00
OpenShift Merge Robot 2a3c70fd9c
Merge pull request #11804 from containers/dependabot/go_modules/github.com/mattn/go-isatty-0.0.14
Bump github.com/mattn/go-isatty from 0.0.12 to 0.0.14
2021-09-30 12:34:53 -04:00
OpenShift Merge Robot f313ff46d6
Merge pull request #11801 from flouthoc/podman-machine-stop-info
machine: Info on successfully stopping qemu machine
2021-09-30 12:33:53 -04:00
Ethan Soucy 0a156211d7 [NO TESTS NEEDED] Fix typo in storage.conf file exists message
Signed-off-by: Ethan Soucy <ethan.soucy@gmail.com>
2021-09-30 12:30:07 -04:00
Brent Baude 1ff6a5082a Support selinux options with bind mounts play/gen
When using play kube and generate kube, we need to support if bind
mounts have selinux options.  As kubernetes does not support selinux in
this way, we tuck the selinux values into a pod annotation for
generation of the kube yaml.  Then on play, we check annotations to see
if a value for the mount exists and apply it.

Fixes BZ #1984081

Signed-off-by: Brent Baude <bbaude@redhat.com>
2021-09-30 10:49:14 -05:00
OpenShift Merge Robot 966b6030fa
Merge pull request #11798 from giuseppe/skip-pid-shared-ns-on-rootless-cgroups-v1
test: skip test on rootless cgroupsv1
2021-09-30 10:12:07 -04:00
Giuseppe Scrivano 9c6c981928
kube: fix conversion from milliCPU to period/quota
Closes: https://github.com/containers/podman/issues/11803

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2021-09-30 16:08:43 +02:00
OpenShift Merge Robot 831842e520
Merge pull request #11790 from rhatdan/VENDOR
Vendor in latest containers/storage
2021-09-30 09:52:08 -04:00
OpenShift Merge Robot 39d27cc6cc
Merge pull request #11787 from rhatdan/deleteContainer
Storage can remove ErrNotAContainer as well
2021-09-30 08:32:04 -04:00
dependabot[bot] 5090920cc0
Bump github.com/mattn/go-isatty from 0.0.12 to 0.0.14
Bumps [github.com/mattn/go-isatty](https://github.com/mattn/go-isatty) from 0.0.12 to 0.0.14.
- [Release notes](https://github.com/mattn/go-isatty/releases)
- [Commits](https://github.com/mattn/go-isatty/compare/v0.0.12...v0.0.14)

---
updated-dependencies:
- dependency-name: github.com/mattn/go-isatty
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-09-30 12:27:25 +00:00
Giuseppe Scrivano 5c1b3e8d72
test: use new helper
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2021-09-30 13:59:46 +02:00
Giuseppe Scrivano 788106dad1
test: skip test on rootless cgroupsv1
skip the test "podman selinux: shared context in (some) namespaces" on
cgroupsv1 when running as rootless since the tests requires
--pid=container:.

If the container runtime cannot use cgroupsv1 and the container has no
pid namespace. then it is not possible to correctly terminate the
container.  Without a cgroup or a pid namespace, the runtime has no
control on what processes are in the container.

Closes: https://github.com/containers/podman/issues/11785

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2021-09-30 13:58:47 +02:00
Aditya Rajan 5a33b7aef8
machine: Info on successfully stopping qemu machine
Spit info log whenever we successfully stop qemu machine for ack.
Closes: https://github.com/containers/podman/issues/11542

[NO TESTS NEEDED]

Signed-off-by: Aditya Rajan <arajan@redhat.com>
2021-09-30 16:16:07 +05:30
Urvashi Mohnani c25cc7230f Allow a value of -1 to set unlimited pids limit
Users can set --pids-limit to -1 now to set unlimited
pids limit for a container - this matches the convention.

[NO TESTS NEEDED]

Signed-off-by: Urvashi Mohnani <umohnani@redhat.com>
2021-09-29 16:22:55 -04:00
OpenShift Merge Robot b187dfef20
Merge pull request #11390 from giuseppe/logging-passthrough
logging: new mode -l passthrough
2021-09-29 15:33:06 -04:00
Daniel J Walsh 1805ed360d
Vendor in latest containers/storage
Fix handling of additional shares with no images

Fixes: https://github.com/containers/storage/issues/1029

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-09-29 15:25:54 -04:00
OpenShift Merge Robot d987f26f1e
Merge pull request #11703 from n1hility/disable-fcos-moby
[NO TESTS NEEDED] Disable docker and alias to podman in FCOS ignition
2021-09-29 13:29:04 -04:00
OpenShift Merge Robot 4b9cd9201b
Merge pull request #11781 from vrothberg/spec
podman run - avoid calls to JSONDeepCopy
2021-09-29 13:26:03 -04:00
OpenShift Merge Robot a22a9a5218
Merge pull request #11761 from umohnani8/init
Add port configuration to first regular container
2021-09-29 10:32:10 -04:00
OpenShift Merge Robot 512a994e8b
Merge pull request #11637 from ashley-cui/warn
[NO TESTS NEEDED] Remind user to check connection or use podman machine
2021-09-29 10:31:06 -04:00
Daniel J Walsh c9ea2cae1e
Storage can remove ErrNotAContainer as well
Fixes: https://github.com/containers/podman/issues/11775

[NO TESTS NEEDED] No easy way to cause this problem in CI.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-09-29 10:12:49 -04:00
Valentin Rothberg ccff77025c libpod: container create: init variable: do not deep copy spec
Do not create an expensive deep copy for the provided spec.Spec
when creating a container.  No API should be expected to create
deep copies of arguments unless explicitly documented.

This removes the last call to JSONDeepCopy in a simple
`podman run --rm -d busybox true`.

[NO TESTS NEEDED]

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-09-29 14:24:11 +02:00
Valentin Rothberg 5ea369adef libpod: add GetConfigNoCopy()
Add a new function to libpod to directly access the runtime
configuration without creating an expensive deep copy.  Further migrate
a number of callers to this new function.

This drops the number of calls to JSONDeepCopy from 4 to 1 in a simple
`podman run --rm -d busybox top`.

Future work: Please note that there are more callers of GetConfig() that
can me migrated to GetConfigNoCopy().

[NO TESTS NEEDED]

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-09-29 14:24:09 +02:00
Valentin Rothberg 30bf31010e libpod: add execSessionNoCopy
To avoid creating an expensive deep copy, create an internal function to
access the exec session.

[NO TESTS NEEDED]

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-09-29 13:44:55 +02:00