Commit graph

14901 commits

Author SHA1 Message Date
Daniel J Walsh 49264c7148
vendor in containers/(common,buildah,storage,image)
Changes as of 2022-04-21:

- apply-podman-deltas: minor cleanup
- buildah-tests.diff: deal with:
  . buildah #3894 (the registry one), which affected helpers.bash in
    a way that resulted in conflicts here; and
  . buildah #3917 (etchosts), which caused offset-only diffs
    with no conflicts
- Reevaluate the bud skip list, and reenable some tests that
  seems to be passing now under podman:
  . bud with specified context ...
  . two tests that require a local registry (which buildah now runs)
  . bud with --cgroup-parent

Signed-off-by: Ed Santiago <santiago@redhat.com>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2022-04-26 08:49:38 -04:00
OpenShift Merge Robot ace6672bf1
Merge pull request #13908 from n1hility/win-mounts
Implement Windows volume/mount support
2022-04-26 08:38:33 -04:00
OpenShift Merge Robot b3416d3292
Merge pull request #13791 from edsantiago/curl_dash_f
Robustify nginx tests
2022-04-26 08:36:36 -04:00
OpenShift Merge Robot 9db22fb58a
Merge pull request #14004 from cevich/refix_docker-py
[CI:BUILD] Cirrus: Re-fix build-cache miss on main
2022-04-26 08:08:53 -04:00
OpenShift Merge Robot 913a3a813c
Merge pull request #14006 from baude/pkgsignalspecgenutilunittests
Unit tests for pkg/specgenutil pkg/signal
2022-04-26 02:47:15 -04:00
OpenShift Merge Robot 05bdb4139a
Merge pull request #13942 from baude/machinetests
Add podman machine test suite
2022-04-25 16:36:01 -04:00
Ed Santiago ee9d755c5b Robustify nginx tests
[skip ci]

While chasing a flake, I discovered that our alpine_nginx
image is broken: it returns 404 on all requests. We never
caught this because--surprise!--curl exits 0 even when
server returns 4xx/5xx status.

Let's be strict: add -f (--fail) option to all invocations
of curl.

And, although I couldn't identify the root cause of the
flake (in "run two containers with the same IP" test),
I can at least fix the broken wait-for-nginx loop, bump
up the number of retries, and improve diagnostics on
failure. And add a strict error-message check.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2022-04-25 14:25:10 -06:00
Brent Baude ecd245d8fd Unit tests for pkg/specgenutil pkg/signal
Add some lightweight unit tests to the arsenal.

Signed-off-by: Brent Baude <bbaude@redhat.com>
2022-04-25 14:48:39 -05:00
Chris Evich c5e48f12ec
Cirrus: Re-fix build-cache miss on main
After merging #13998 it was observed that the `docker-py` task was still
failing with the same error on `main`.  The original quick-fix had
placed the full-build (`make`) call too late in the process.  This
commit moves it up to right before the `make install` call which was
resulting in an error.

Again, a further future commit is planned to re-work and simplify the
entire cache setup.  This is only a quick fix to make branch-builds
pass.

Signed-off-by: Chris Evich <cevich@redhat.com>
2022-04-25 15:33:11 -04:00
Chris Evich eb4e53087e
Revert "Cirrus: Fix cirrus cache race on bin/podman"
This reverts commit 2f53259a8d.

Signed-off-by: Chris Evich <cevich@redhat.com>
2022-04-25 15:31:36 -04:00
OpenShift Merge Robot 181c9d3ee3
Merge pull request #13990 from rhatdan/build
Pass --tls-verify option in podman -remote build
2022-04-25 15:24:17 -04:00
Jason T. Greene b0d36f6351 Implements Windows volume/mount support
Based on WSL2 9p support: remaps windows paths to /mnt/<drive> locations for
both podman and Docker API clients.

Signed-off-by: Jason T. Greene <jason.greene@redhat.com>
2022-04-25 13:52:27 -05:00
Jason T. Greene 3b6ffcd290 Update to use new common machine API
Signed-off-by: Jason T. Greene <jason.greene@redhat.com>
2022-04-25 13:52:27 -05:00
Brent Baude 833456e079 Add podman machine test suite
This PR introduces a test suite for podman machine.  It can currently be
run on developers' local machines and is not part of the official CI
testing; however, the expectation is that any work on machine should
come with an accompanying test.

At present, the test must be run on Linux.  It is untested on Darwin.
There is no Makefile target for the test.  It can be run like `ginkgo -v
pkg/machine/test/.`.  It should be run as a unprivileged user.

Signed-off-by: Brent Baude <bbaude@redhat.com>
2022-04-25 13:05:35 -05:00
OpenShift Merge Robot 6984a0f357
Merge pull request #13999 from Luap99/go1.18-deprecated
[CI:DOCS] fix staticcheck linter warning for deprecated function
2022-04-25 13:52:15 -04:00
Daniel J Walsh 3d1e406081
Pass --tls-verify option in podman -remote build
Fixes: https://github.com/containers/podman/issues/13979

[NO NEW TESTS NEEDED] Buildah has a test for this.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2022-04-25 13:47:11 -04:00
OpenShift Merge Robot 09ef4f2e22
Merge pull request #13978 from Luap99/unparam
enable unparam linter
2022-04-25 13:43:57 -04:00
OpenShift Merge Robot 23d2bf5188
Merge pull request #13998 from cevich/fix_docker-py_test
Cirrus: Fix cirrus cache race on bin/podman
2022-04-25 13:40:01 -04:00
OpenShift Merge Robot a775e77cba
Merge pull request #13995 from ashley-cui/revrootful
Rootfull -> Rootful
2022-04-25 13:37:59 -04:00
Paul Holzinger 62f4ae98fb
fix staticcheck linter warning for deprecated function
go1.18 deprecates `strings.Title()`. However for our use case this is
still fine. The recommended replacement is adding about 400kb binary
size so lets keep using this for now.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-04-25 18:55:28 +02:00
Ashley Cui a615cb2fe2 Docs rootfull -> rootful
Some docs say roofull. Change to rootful.

[NO NEW TESTS NEEDED]

Signed-off-by: Ashley Cui <acui@redhat.com>
2022-04-25 11:53:57 -04:00
Chris Evich 2f53259a8d
Cirrus: Fix cirrus cache race on bin/podman
A suspected race on uploading gopath cache is causing the docker-py (and
possibly other) tasks to fail unpredictably with an error from `make`
regarding missing `bin/podman`.  Since this failure is affecting all
development activity, apply a quick/dirty fix to the failing task, by
simply rebuilding the binary.  A more comprehensive/long-term fix will
be worked in a future PR.

Signed-off-by: Chris Evich <cevich@redhat.com>
2022-04-25 11:30:14 -04:00
OpenShift Merge Robot 9784d97bd6
Merge pull request #13993 from aonoa/main
Modify the pod name suffix '_pod' to '-pod'
2022-04-25 09:37:05 -04:00
OpenShift Merge Robot a9f8fb9cea
Merge pull request #13981 from rhatdan/volume
Add support for passing --volumepath
2022-04-25 09:35:03 -04:00
Ashley Cui 1260bf631f Revert "Switch all rootful to rootfull"
This reverts commit cc3790f332.

We can't change rootful to rootfull because `rootful` is written into the machine config. Changing this will break json unmarshalling, which will break existing machines.

[NO NEW TESTS NEEDED]

Signed-off-by: Ashley Cui <acui@redhat.com>
2022-04-25 09:14:04 -04:00
Paul Holzinger c7b16645af
enable unparam linter
The unparam linter is useful to detect unused function parameters and
return values.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-04-25 13:23:20 +02:00
aonoa 94d043be8c Modify the pod name suffix '_pod' to '-pod'
Signed-off-by: aonoa <1991849113@qq.com>
2022-04-25 15:47:24 +08:00
OpenShift Merge Robot ba6356280a
Merge pull request #13988 from rhatdan/apiv2
Allow filtering of "removing", it is a valid status
2022-04-25 03:38:03 -04:00
Daniel J Walsh 0d83f4b768
Allow filtering of "removing", it is a valid status
Do not use a list of statuses outside of libpod to validate container
statuses.  Removing status was never added to the list.

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

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2022-04-24 06:07:10 -04:00
Daniel J Walsh 13079abe3f
Add support for passing --volumepath
Fixes: https://github.com/containers/podman/issues/13860

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2022-04-23 08:03:36 -04:00
OpenShift Merge Robot f65f3320e1
Merge pull request #13980 from lsm5/switch-sha256
libpod/networking_linux.go: switch to sha256 hash generation
2022-04-23 06:56:00 -04:00
OpenShift Merge Robot 2df9bdc009
Merge pull request #13973 from Luap99/linter-revive
replace golint with revive linter
2022-04-23 06:32:41 -04:00
OpenShift Merge Robot 31231ffd74
Merge pull request #13959 from cevich/fix_apiv2
Fix hang in apiv2 test_connect
2022-04-23 06:22:26 -04:00
Lokesh Mandvekar 44642bee87
libpod/networking_linux.go: switch to sha256 hashes
SHA-1 is prone to collisions.

This will likely break connectivity between old containers started
before update and containers started after update. It will also fail to
cleanup old netns. A reboot will fix this, so a reboot is recommended
after update.

[NO NEW TESTS NEEDED]

Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2022-04-22 16:31:43 -04:00
Chris Evich ad249222d2
Fix hang in test_connect
Starting the podman service in debug-mode causes aardvark to run in
debug mode.  This does unexpected things with file-descriptors leading
to a test-hang.  Thanks to @Luap99 for the fix.

Signed-off-by: Chris Evich <cevich@redhat.com>
2022-04-22 16:16:32 -04:00
Chris Evich cafb76b635
Increase verbosity and sequencing of APIv2 testing
The default verbosity level does not show the classes or function names.
This makes it difficult to debug problems like hangs.  Also, separate
the bats and python-based tests into two sections.  This allows for
easier debugging, since isolation can be done in `runner.sh` rather than
mucking with the `Makefile`.  Lastly, update the logformatter script
to `autoflush stdout` (thanks @edsantiago).

Signed-off-by: Chris Evich <cevich@redhat.com>
2022-04-22 16:16:17 -04:00
OpenShift Merge Robot 1a768dbc08
Merge pull request #13976 from rhatdan/rootless
Update test to run network check in both rootless and rootfull mode
2022-04-22 11:05:36 -04:00
OpenShift Merge Robot 9168faffbf
Merge pull request #13975 from containers/dependabot/go_modules/github.com/fsnotify/fsnotify-1.5.3
Bump github.com/fsnotify/fsnotify from 1.5.2 to 1.5.3
2022-04-22 10:49:34 -04:00
OpenShift Merge Robot c17c72772d
Merge pull request #13974 from containers/dependabot/go_modules/github.com/container-orchestrated-devices/container-device-interface-0.4.0
Bump github.com/container-orchestrated-devices/container-device-interface from 0.3.2 to 0.4.0
2022-04-22 10:47:32 -04:00
Paul Holzinger 5b4af0584d
replace golint with revive linter
golint, scopelint and interfacer are deprecated. golint is replaced by
revive. This linter is better because it will also check for our error
style: `error strings should not be capitalized or end with punctuation or a newline`

scopelint is replaced by exportloopref (already endabled)
interfacer has no replacement but I do not think this linter is
important.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-04-22 15:12:33 +02:00
Daniel J Walsh 454468e034
Update test to run network check in both rootless and rootfull mode
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2022-04-22 09:02:05 -04:00
OpenShift Merge Robot ad3da638ce
Merge pull request #13918 from Luap99/hosts
use etchosts package from c/common
2022-04-22 08:50:32 -04:00
OpenShift Merge Robot 1bafde2d22
Merge pull request #13881 from rhatdan/userns
Add support for --userns=nomap
2022-04-22 08:40:34 -04:00
OpenShift Merge Robot 22500d797a
Merge pull request #13972 from Luap99/staticcheck
enable staticcheck linter
2022-04-22 08:26:31 -04:00
dependabot[bot] 3e240c3ae0
Bump github.com/fsnotify/fsnotify from 1.5.2 to 1.5.3
Bumps [github.com/fsnotify/fsnotify](https://github.com/fsnotify/fsnotify) from 1.5.2 to 1.5.3.
- [Release notes](https://github.com/fsnotify/fsnotify/releases)
- [Changelog](https://github.com/fsnotify/fsnotify/blob/main/CHANGELOG.md)
- [Commits](https://github.com/fsnotify/fsnotify/compare/v1.5.2...v1.5.3)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-22 12:12:43 +00:00
dependabot[bot] 104042e20b
Bump github.com/container-orchestrated-devices/container-device-interface
Bumps [github.com/container-orchestrated-devices/container-device-interface](https://github.com/container-orchestrated-devices/container-device-interface) from 0.3.2 to 0.4.0.
- [Release notes](https://github.com/container-orchestrated-devices/container-device-interface/releases)
- [Commits](https://github.com/container-orchestrated-devices/container-device-interface/compare/v0.3.2...v0.4.0)

---
updated-dependencies:
- dependency-name: github.com/container-orchestrated-devices/container-device-interface
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-22 12:12:33 +00:00
OpenShift Merge Robot 04acbaa4b1
Merge pull request #13969 from flouthoc/mount-csv-parsing
specgen-volumes: parse `--mount` using csv-reader instead of split.
2022-04-22 07:08:32 -04:00
Paul Holzinger e0f5bf279b
test/system: add containers.conf test for new /etc/hosts options
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-04-22 13:06:01 +02:00
Paul Holzinger e912f1b689
Improve /etc/hosts documentation
Update the documentation for /etc/hosts options --add-host and
--no-hosts. Also make sure that all references use the same text for
consistency.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-04-22 13:06:01 +02:00
Paul Holzinger e4ab8a5bed
shared netns and --add-host should conflict
Because /etc/hosts is shared for all containers with a shared network
namespace you should not be able to add hosts from a joined container.
Only the primary netns container can set the hosts.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-04-22 13:06:00 +02:00