Commit graph

13084 commits

Author SHA1 Message Date
OpenShift Merge Robot 03c17e9407
Merge pull request #11864 from Luap99/close
libpod: fix race when closing STDIN
2021-10-06 20:08:02 +02:00
OpenShift Merge Robot 36504be967
Merge pull request #11877 from containers/dependabot/go_modules/github.com/containers/image/v5-5.16.1
Bump github.com/containers/image/v5 from 5.16.0 to 5.16.1
2021-10-06 19:11:03 +02:00
Paul Holzinger fbce7584d7
libpod: fix race when closing STDIN
There is a race where `conn.Close()` was called before `conn.CloseWrite()`.
In this case `CloseWrite` will fail and an useless error is printed. To
fix this we move the the `CloseWrite()` call to the same goroutine to
remove the race. This ensures that `CloseWrite()` is called before
`Close()` and never afterwards.
Also fixed podman-remote run where the STDIN was never was closed.
This is causing flakes in CI testing.

[NO TESTS NEEDED]

Fixes #11856

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2021-10-06 17:51:07 +02:00
dependabot[bot] 675d2d0c1a
Bump github.com/containers/image/v5 from 5.16.0 to 5.16.1
Bumps [github.com/containers/image/v5](https://github.com/containers/image) from 5.16.0 to 5.16.1.
- [Release notes](https://github.com/containers/image/releases)
- [Commits](https://github.com/containers/image/compare/v5.16.0...v5.16.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2021-10-06 12:24:29 +00:00
OpenShift Merge Robot 8bcc086b1b
Merge pull request #11866 from containers/dependabot/go_modules/github.com/docker/docker-20.10.9incompatible
Bump github.com/docker/docker from 20.10.8+incompatible to 20.10.9+incompatible
2021-10-05 09:48:00 -04:00
dependabot[bot] 033a662b9a
Bump github.com/docker/docker
Bumps [github.com/docker/docker](https://github.com/docker/docker) from 20.10.8+incompatible to 20.10.9+incompatible.
- [Release notes](https://github.com/docker/docker/releases)
- [Changelog](https://github.com/moby/moby/blob/master/CHANGELOG.md)
- [Commits](https://github.com/docker/docker/compare/v20.10.8...v20.10.9)

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

Signed-off-by: dependabot[bot] <support@github.com>
2021-10-05 12:23:59 +00:00
OpenShift Merge Robot 4965efe1f6
Merge pull request #11861 from edsantiago/no_new_tests_needed
It really should be no **NEW** tests needed
2021-10-05 05:32:50 -04:00
Ed Santiago 521c0cbd1c It really should be no **NEW** tests needed
Accept both "NO TESTS NEEDED" and "NO NEW TESTS NEEDED".
That was a usability mistake I made on Day One. Fixed it
in Buildah but oops never got around to fixing it here.

Also, fix the test suite script: remove a no-longer-working
test case (changelog.txt, removed in #11467) and add a new
test for commits that include the magic string.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2021-10-04 19:23:38 -06:00
OpenShift Merge Robot c963a50090
Merge pull request #11857 from lsm5/community-channel-update
README.md: Point to Podman's channels
2021-10-04 21:00:57 -04:00
Lokesh Mandvekar fb118b852b
README.md: Point to Podman's channels
There's a significant number of non-IRC users in the bridged rooms,
both Matrix and Discord. So, we should mention those options too.

[NO TESTS NEEDED]

Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2021-10-04 15:33:30 -04:00
OpenShift Merge Robot a866a2f159
Merge pull request #11763 from rhatdan/timeout
Add --time option for podman * rm -f flag
2021-10-04 15:10:36 -04:00
OpenShift Merge Robot 2f72f17a11
Merge pull request #11846 from Luap99/network-reload
CNI networks: reload networks if needed
2021-10-04 15:01:38 -04:00
OpenShift Merge Robot 800e91dafd
Merge pull request #11850 from Luap99/bump-common
bump c/common to latest and c/storage to 1.37.0
2021-10-04 13:37:37 -04:00
Paul Holzinger a726043d0b
CNI networks: reload networks if needed
The current implementation of the CNI network interface only loads the
networks on the first call and saves them in a map. This is done to safe
performance and not having to reload all configs every time which will be
costly for many networks.

The problem with this approach is that if a network is created by
another process it will not be picked up by the already running podman
process. This is not a problem for the short lived podman commands but
it is problematic for the podman service.

To make sure we always have the actual networks store the mtime of the
config directory. If it changed since the last read we have to read
again.

Fixes #11828

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2021-10-04 16:38:52 +02:00
Paul Holzinger 8156df5b72
bump c/common to latest and c/storage to 1.37.0
Update c/common to fix a bug where broken config files could be created
via podman machine and podman system connection add.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2021-10-04 16:34:10 +02:00
Daniel J Walsh 21c9dc3c40
Add --time out for podman * rm -f commands
Add --time flag to podman container rm
Add --time flag to podman pod rm
Add --time flag to podman volume rm
Add --time flag to podman network rm

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-10-04 07:07:56 -04:00
OpenShift Merge Robot 36821d302e
Merge pull request #11834 from cevich/fix_gitlab_setup
Cirrus: Fix defunct package metadata breaking cache
2021-10-04 04:05:10 -04:00
OpenShift Merge Robot b9d8c63813
Merge pull request #11820 from jwhonce/issues/11810
[NO TESTS NEEDED] Ignore removed containers
2021-10-02 07:46:05 -04:00
OpenShift Merge Robot 375fbb9805
Merge pull request #11816 from cdoern/podEventsBug
Pod Events Logging Fix
2021-10-02 07:42:05 -04:00
Chris Evich d6b9451b49
Cirrus: Fix defunct package metadata breaking cache
Original workaround https://github.com/containers/podman/pull/11821

During VM image build, a number of packages are downloaded but not
installed, since they may interfere with some testing.  Then at runtime,
where required, the packages are installed from cache and used.
However, between image build and runtime it's possible the repository
contents change, which will invalidate the package cache.  Since the
`--no-download --ignore-missing` options were used, the install will
fail.

Ref: https://github.com/containers/automation_images/issues/95

Fortunately, when it comes to the docker packages, no other dependencies
are required and so `apt-get` isn't required.  Switch to using a simple
dpkg install command on the necessary files.  If this ever breaks due
to new dependencies, the list of files may simply be updated.

Signed-off-by: Chris Evich <cevich@redhat.com>
2021-10-01 15:45:51 -04:00
OpenShift Merge Robot 1de96f2c4c
Merge pull request #11777 from cdoern/podVolumesFrom
Pod Volumes From Support
2021-10-01 15:32:14 -04:00
OpenShift Merge Robot 9dddd6ab4b
Merge pull request #11833 from umohnani8/swagger
Add note about empty fields and null values for API responses
2021-10-01 15:22:15 -04:00
cdoern 163d81cc0d Pod Events Logging Fix
on create, libpod was only creating a new event if the pod had an infra container.
now, pod creation triggers a new pod event with or without infra

Signed-off-by: cdoern <cdoern@redhat.com>
2021-10-01 14:50:58 -04:00
Jhon Honce c67593df12 [NO TESTS NEEDED] Ignore removed containers
* Ignore condition when containers are removed while listing them for
ps output.

  No tests added at this time as they would create a race condition for
CI.

* Updated godocs

See https://github.com/containers/podman/issues/11810 for reproducer.

Fixes #11810

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2021-10-01 11:17:15 -07:00
cdoern 6da97c8631 Pod Volumes From Support
added support for a volumes from container. this flag just required movement of the volumes-from flag declaration
out of the !IsInfra block, and minor modificaions to container_create.go

Signed-off-by: cdoern <cdoern@redhat.com>
2021-10-01 14:09:11 -04:00
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
Urvashi Mohnani 4ea5d69719 Add note about empty fields and null values for API responses
Add a note the global swagger docs about some fields not showing
up in responses as they are set to omitempty. Also add a note about
null values for complicated field types that swagger-go has a hard time
with.

[NO TESTS NEEDED]

Signed-off-by: Urvashi Mohnani <umohnani@redhat.com>
2021-10-01 13:18:52 -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