10652 Commits

Author SHA1 Message Date
ad1e0bb77f Merge pull request #9054 from vrothberg/fix-9040
make sure the workdir exists on container mount
2021-01-26 16:59:57 +01:00
41dd1eb8a2 Merge pull request #9022 from cevich/swagger_upload
Cirrus: Upload swagger YAML in every context
2021-01-26 16:53:57 +01:00
f13385e80e Merge pull request #8761 from ybelleguic/fix-man-page-on-overlayfs-in-rootless-mode
[CI:DOCS] Fix man page for fuse-overlayfs config in rootless mode
2021-01-26 15:59:58 +01:00
efcd48b966 Merge pull request #9070 from rhatdan/search
Fixup search
2021-01-26 13:05:55 +01:00
e5e447debc Merge pull request #9084 from rhatdan/override
Fix --arch and --os flags to work correctly
2021-01-26 11:41:58 +01:00
79565d1af1 Merge pull request #9094 from rhatdan/mount
Pass DefaultMountsFile to podman build
2021-01-26 10:13:56 +01:00
0f668aa085 workdir presence checks
A container's workdir can be specified via the CLI via `--workdir` and
via an image config with the CLI having precedence.

Since images have a tendency to specify workdirs without necessarily
shipping the paths with the root FS, make sure that Podman creates the
workdir.  When specified via the CLI, do not create the path, but check
for its existence and return a human-friendly error.

NOTE: `crun` is performing a similar check that would yield exit code
127.  With this change, however, Podman performs the check and yields
exit code 126.  Since this is specific to `crun`, I do not consider it
to be a breaking change of Podman.

Fixes: #9040
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-01-26 09:02:21 +01:00
7b186dcb9e libpod: add (*Container).ResolvePath()
Add an API to libpod to resolve a path on the container.  We can
refactor the code that was originally written for copy.  Other
functions are requiring a proper path resolution, so libpod seems
like a reasonable home for sharing that code.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-01-26 09:01:33 +01:00
74a63df053 Fixup search
podman-remote search had some FIXMEs in tests that were failing.
So I reworked the search handler to use the local abi.  This
means the podman search and podman-remote search will use the
same functions.

While doing this, I noticed we were just outputing errors via
logrus.Error rather then returning them, which works ok for
podman but the messages get lost on podman-remote.  Changed
the code to actually return the error messages to the caller.

This allows us to turn on the remaining podman-remote FIXME
tests.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-01-25 18:01:22 -05:00
97f5e9458c Pass DefaultMountsFile to podman build
The --default-mounts-file path was not being handled in
podman build.  This will enable it to use for testing.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-01-25 17:54:43 -05:00
6ba8819d33 Merge pull request #9090 from mheon/sync_shutdown
[NO TESTS NEEDED] Ensure shutdown handler access is syncronized
2021-01-25 23:26:52 +01:00
b902ad9375 Merge pull request #9091 from edsantiago/more_bats
System tests: cover gaps from the last month
2021-01-25 23:20:53 +01:00
63cef43f0c Merge pull request #9081 from containers/dependabot/go_modules/github.com/google/uuid-1.2.0
Bump github.com/google/uuid from 1.1.5 to 1.2.0
2021-01-25 21:55:56 +01:00
5350254f05 Ensure shutdown handler access is syncronized
There was a potential race where two handlers could be added at
the same time. Go Maps are not thread-safe, so that could do
unpleasant things. Add a mutex to keep things safe.

Also, swap the order or Register and Start for the handlers in
Libpod runtime created. As written, there was a small gap between
Start and Register where SIGTERM/SIGINT would be completely
ignored, instead of stopping Podman. Swapping the two closes this
gap.

Signed-off-by: Matthew Heon <mheon@redhat.com>
2021-01-25 15:44:42 -05:00
33179c281e System tests: cover gaps from the last month
- stop: test --all and --ignore (#9051)
- build: test /run/secrets (#8679, but see below)
- sensitive mount points: deal with 'stat' failures
- selinux: confirm useful diagnostics on unknown labels (#8946)

The 'build' test is intended as a fix for #8679, in which
'podman build' does not mount secrets from mounts.conf.
Unfortunately, as of this writing, 'podman build' does
not pass the --default-mounts-file option to buildah,
so there's no reasonable way to test this path. Still,
we can at least confirm /run/secrets on 'podman run'.

The /sys thing is related to #8949: RHEL8, rootless, cgroups v1.
It's just a workaround to get gating tests to pass on RHEL.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2021-01-25 13:34:26 -07:00
5623cb9d3d Fix --arch and --os flags to work correctly
Currently podman implements --override-arch and --overide-os
But Podman has made these aliases for --arch and --os.  No
reason to have to specify --override, since it is clear what
the user intends.

Currently if the user specifies an --override-arch field but the
image was previously pulled for a different Arch, podman run uses
the different arch.  This PR also fixes this issue.

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

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-01-25 14:58:24 -05:00
23b879d72f Merge pull request #9085 from rhatdan/docs
Fix typo
2021-01-25 20:48:51 +01:00
f4e857245a Merge pull request #9079 from Luap99/fish-completion
[CI:DOCS] Fix fish completion issue if the command is prefixed with a space
2021-01-25 17:41:52 +01:00
cd62d372e5 Merge pull request #9057 from baude/dnsnameinternal
disable dnsname when --internal
2021-01-25 17:35:52 +01:00
a86d23c750 Bump github.com/google/uuid from 1.1.5 to 1.2.0
Bumps [github.com/google/uuid](https://github.com/google/uuid) from 1.1.5 to 1.2.0.
- [Release notes](https://github.com/google/uuid/releases)
- [Commits](https://github.com/google/uuid/compare/v1.1.5...v1.2.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-01-25 11:07:19 -05:00
75698b4b78 Fix typo
Copied from @TeeVenDick patch https://github.com/containers/podman/pull/9072

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-01-25 10:34:23 -05:00
393a8f0261 disable dnsname when --internal
when doing a network creation, the dnsname plugin should be disabled
when the --internal bool is set.  a warning is displayed if this
happens and docs are updated.

Signed-off-by: baude <bbaude@redhat.com>
2021-01-25 08:51:15 -06:00
b4b78382cd Merge pull request #9080 from siretart/patch-1
swagger.go: Fix compilation error
2021-01-25 11:51:09 +01:00
ef76b92b80 swagger.go: Fix compilation error
Error looks like:

  # github.com/containers/podman/pkg/api/handlers/swagger
  src/github.com/containers/podman/pkg/api/handlers/swagger/swagger.go:169:3: undefined: libpod.InspectVolumeData

[NO TESTS NEEDED]

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2021-01-24 17:31:29 -05:00
8c1768e382 Fix fish completion issue if the command is prefixed with a space
Update the completion script like https://github.com/spf13/cobra/pull/1249.

[NO TESTS NEEDED]

Fixes #8829

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2021-01-24 18:04:48 +01:00
479fc22604 Merge pull request #9066 from giuseppe/set-source-to-net
networking: lookup child IP in networks
2021-01-24 16:16:10 +01:00
b6765c17e6 Merge pull request #9071 from TomSweeneyRedHat/dev/tsweeney/bump_crypto2
Bump golang.org/x/crypto
2021-01-24 16:15:12 +01:00
a457c5c928 Bump golang.org/x/crypto
Bump golang.org.x/cyrpto to the latest

Signed-off-by: root <root@localhost.localdomain>
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
2021-01-23 17:04:59 -05:00
0ba1942f26 networking: lookup child IP in networks
if a CNI network is added to the container, use the IP address in that
network instead of hard-coding the slirp4netns default.

commit 5e65f0ba30f3fca73f8c207825632afef08378c1 introduced this
regression.

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

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2021-01-23 18:28:56 +01:00
3f5af4e806 Merge pull request #9073 from mlegenovic/master
Small API test improvement for compatibility search endpoint
2021-01-23 16:37:10 +01:00
c182091b02 Small API test improvement for compatibility search endpoint
Signed-off-by: Milivoje Legenovic <m.legenovic@gmail.com>
2021-01-23 13:50:32 +01:00
6cef7c78dd Merge pull request #9028 from mlegenovic/master
Accept and ignore 'null' as value for X-Registry-Auth
2021-01-23 12:16:09 +01:00
1305f7c47a Merge pull request #9067 from Luap99/podman-manifest-exists
podman manifest exists
2021-01-23 11:05:09 +01:00
6e6a38b416 podman manifest exists
Add podman manifest exists command with remote support.

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2021-01-22 20:19:13 +01:00
474ba4c3ac Merge pull request #9068 from rhatdan/remote
Turn on some remote test
2021-01-22 18:34:20 +01:00
c9baa6b93b Accept and ignore 'null' as value for X-Registry-Auth
docker-client is a library written in Java and used in Eclipse to
speak with Docker API. When endpoint /images/search is called,
HTTP header attribute X-Registry-Auth has value "null". This is for
sure wrong but Docker tolerates this value, and call works. With this
patch call works also with Podman. #7857

Signed-off-by: Milivoje Legenovic <m.legenovic@gmail.com>
2021-01-22 18:26:21 +01:00
4b8df5903f Turn on some remote test
Just running through the tests that have SkipIfRemote("FIXME")
and attempting to not skip. Found these tests now work.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-01-22 10:54:39 -05:00
47616fe647 Merge pull request #9050 from xcffl/doc-rm-pod-before-start-systemd-service
[ci:docs] Add a notice to remove pods/containers before starting the systemd service
2021-01-22 06:23:09 -05:00
94f96c78a6 Add a notice to remove pod before starting service
Signed-off-by: xcffl <2216902+xcffl@users.noreply.github.com>
2021-01-22 18:28:19 +08:00
f02aba6594 Merge pull request #9052 from giuseppe/set-source-to-slirp4netns-ip
rootlessport: set source IP to slirp4netns device
2021-01-22 05:07:15 -05:00
ef654941d1 libpod: move slirp magic IPs to consts
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2021-01-22 08:08:27 +01:00
5e65f0ba30 rootlessport: set source IP to slirp4netns device
set the source IP to the slirp4netns address instead of 127.0.0.1 when
using rootlesskit.

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

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2021-01-22 08:08:26 +01:00
37319dec17 vendor: update rootlesskit to v0.12.0
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2021-01-22 08:08:25 +01:00
6fd83de31d Merge pull request #9027 from Luap99/podman-volume-exists
Podman volume exists
2021-01-21 15:31:32 -05:00
9d31fed5f7 podman volume exists
Add podman volume exists command with remote support.

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2021-01-21 19:18:51 +01:00
3ba1a8de86 Merge pull request #9053 from cevich/master_no_smoke_branches
[CI:DOCS] Cirrus: Skip smoke task on branch-push
2021-01-21 12:11:44 -05:00
4e4d318b71 Cirrus: Upload swagger YAML in every context
The podman documentation site uses javascript to display
API documentation at:

http://docs.podman.io/en/latest/Reference.html

As input, the javascript sources from a CORS-enabled Google Cloud
Storage object.  This commit ensures the storage object is present and
updated for every Cirrus-CI execution context: Tags, Branches, and PRs.

As of this commit, the documentation site only utilizes the object
uploaded by the Cirrus-CI run on the `master` branch:
`swagger-master.yaml`.  The file produced and uploaded due to a PR is
intended for testing purposes: Confirm it's generation and uploading are
both functional.

Signed-off-by: Chris Evich <cevich@redhat.com>
2021-01-21 10:26:57 -05:00
d102d02eb1 Merge pull request #9046 from Luap99/fix-network-tests
Fix e2e network test flakes
2021-01-21 09:49:15 -05:00
dbb99433d5 [CI:DOCS] Cirrus: Skip smoke task on branch-push
There is no need to re-run the same basic validation checks as were
presumably already run on a PR before it merged.  There are also
possible problems properly determining `$EPOCH_TEST_COMMIT` when
there have been no successful CI-runs on the branch (i.e. it's new).
This needlessly fouls up the git-validation tool.  Fix Both problems
by just skipping the 'smoke' task for branches and tags.

Signed-off-by: Chris Evich <cevich@redhat.com>
2021-01-21 09:09:23 -05:00
7d297ddbda Merge pull request #9044 from TomSweeneyRedHat/dev/tsweeney/coc_2
[CI:DOCS] Update project name in Code of Conduct
2021-01-21 08:03:20 -05:00