10679 Commits

Author SHA1 Message Date
a4c255a939 Merge pull request #9115 from rhatdan/pull
Switch podman image push handlers to use abi
2021-01-28 14:37:30 -05:00
fb653c43ed Merge pull request #8585 from Luap99/rootless-net-alias
Add support for rootless network-aliases and static ip/mac
2021-01-28 04:58:28 -05:00
9d59daa7cc Merge pull request #9082 from saschagrunert/static-build
Fix static build cache by using cachix
2021-01-27 15:18:22 -05:00
1fac43654c Add support for rootless network-aliases
Make sure we pass the network aliases as capability args to the
cnitool in the rootless-cni-infra container. Also update the
dnsname plugin in the cni-infra container.

Fixes #8567

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2021-01-27 20:58:03 +01:00
14cc4aaf0a Merge pull request #9127 from vrothberg/fix-9111
podman build --pull: use correct policy
2021-01-27 14:56:07 -05:00
1814fa2d21 Merge pull request #9105 from vrothberg/fix-8281
remote exec: write conmon error on hijacked connection
2021-01-27 14:25:06 -05:00
c717b3caca Allow static ip and mac with rootless cni network
Make sure we pass the ip and mac address as CNI_ARGS to
the cnitool which is executed in the rootless-cni-infra
container.

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2021-01-27 17:35:54 +01:00
15caebfe56 podman build --pull: use correct policy
The `--pull` flag should be using the "pull if newer" pull policy rather
than "pull always".  This aligns with what the help message states, what
Buildah does and, according to #9111, what was done before,

Also add a test to prevent future regressions.

Fixes: #9111
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-01-27 16:49:47 +01:00
2ff4da9b59 Merge pull request #9124 from vrothberg/fix-8358
e2e tests: synchronize test results
2021-01-27 10:39:30 -05:00
d8f3450008 Merge pull request #9095 from rhatdan/ps
podman-remote ps --external --pod --sort do not work.
2021-01-27 10:33:30 -05:00
f8bf509d16 Fix static build cache by using cachix
It looks like we always hit the caching issue in Cirrus CI described
within #8313. A solution around that is to use cachix, which has been
pre-populated from my local machine.

To push all (runtime and build) dependencies, we can leverage a
pre-populated store by:

```
> nix-store -qR --include-outputs $(nix-instantiate nix/default.nix) | cachix push podman
```

The cache can be re-used by everybody to rapidly build static Podman
binaries: https://app.cachix.org/cache/podman

[NO TESTS NEEDED]

Signed-off-by: Sascha Grunert <mail@saschagrunert.de>
2021-01-27 16:15:23 +01:00
84f7bdc4db Switch podman image push handlers to use abi
Change API Handlers to use the same functions that the
local podman uses.

At the same time:

Cleanup and pass proper bindings.  Remove cli options from
podman-remote push.  Cleanup manifest push.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-01-27 09:27:25 -05:00
fee2fadc3c e2e tests: synchronize test results
Use a mutex to synchronize the slice for storing tests results.
Running the e2e tests in parallel is otherwise subject to race
conditions surfacing in lost entries.

Fixes: #8358
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-01-27 14:18:12 +01:00
179b9d1745 Merge pull request #9025 from mheon/add_support_volumes_field
Ensure the Volumes field in Compat Create is honored
2021-01-27 12:50:11 +01:00
5c6175df39 Merge pull request #9122 from Luap99/fix-9120
Fix podman history --no-trunc for the CREATED BY field
2021-01-27 12:48:10 +01:00
21cb3043fc podman-remote ps --external --pod --sort do not work.
Fixup the bindings and the handling of the --external --por and --sort
flags.

The --storage option was renamed --external, make sure we use
external up and down the stack.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-01-27 06:44:43 -05:00
f79d68eeae Fix podman history --no-trunc for the CREATED BY field
Fixes #9120

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2021-01-27 10:44:54 +01:00
c63599d361 remote exec: write conmon error on hijacked connection
Make sure to write error from conmon on the hijacked http connection.
This fixes issues where errors were not reported on the client side,
for instance, when specified command was not found on the container.

To future generations: I am sorry.  The code is complex, and there are
many interdependencies among the concurrent goroutines.  I added more
complexity on top but I don't have a good idea of how to reduce
complexity in the available time.

Fixes: #8281
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-01-27 09:58:27 +01:00
2102e26506 Merge pull request #9109 from mheon/issue6618
Fix #6618
2021-01-27 09:31:15 +01:00
c3b39842ce Merge pull request #9101 from gbraad/console-mode-message
Fix #9100 Change console mode message to debug
2021-01-27 07:15:12 +01:00
e9f4fb9759 Fix #9100 Change console mode message to debug
[NO TESTS NEEDED]

Signed-off-by: Gerard Braad <me@gbraad.nl>
2021-01-27 12:03:53 +08:00
02ec5299f6 Add default net info in container inspect
when inspecting a container that is only connected to the default
network, we should populate the default network in the container inspect
information.

Fixes: #6618

Signed-off-by: baude <bbaude@redhat.com>

MH: Small fixes, added another test

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2021-01-26 16:00:06 -05:00
1ae410d19e Ensure the Volumes field in Compat Create is honored
Docker has, for unclear reasons, three separate fields in their
Create Container struct in which volumes can be placed. Right now
we support two of those - Binds and Mounts, which (roughly)
correspond to `-v` and `--mount` respectively. Unfortunately, we
did not support the third, `Volumes`, which is used for anonymous
named volumes created by `-v` (e.g. `-v /test`). It seems that
volumes listed here are *not* included in the remaining two from
my investigation, so it should be safe to just append them into
our handling of the `Binds` (`-v`) field.

Fixes #8649

Signed-off-by: Matthew Heon <mheon@redhat.com>
2021-01-26 14:38:25 -05:00
5d444466e1 Merge pull request #9106 from baude/issue9104
[CI:DOCS]update state of restful service
2021-01-26 17:26:01 +01:00
5e91afb7c8 Merge pull request #9029 from mergetb/master
[CI:DOCS] api: fix import image swagger definition
2021-01-26 17:22:59 +01:00
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
35c89ccc5b [CI:DOCS]update state of restful service
we have not updated the state of the restful service. it is no longer
considered under development.  additionally, clarified our support of
remote clients.

Fixes: #9104

Signed-off-by: baude <bbaude@redhat.com>
2021-01-26 09:12:07 -06: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