Commit Graph

12209 Commits

Author SHA1 Message Date
Paul Holzinger c5f9819dac Silence podman network reload errors with iptables-nft
Make sure we do not display the expected error when using podman network
reload. This is already done for iptables-legacy however iptables-nft
creates a slightly different error message so check for this as well.
The error is logged at info level.

[NO TESTS NEEDED] The test VMs do not use iptables-nft so there is no
way to test this. It is already tested for iptables-legacy.

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2021-03-30 10:48:26 +02:00
Jakub Guzik f7d82a1f30 Containers prune endpoint should use only prune filters
Containers endpoints for HTTP compad and libpod APIs allowed usage of list HTTP
endpoint filter funcs. Documentation in case of libpod and compat API does not allow that.
This commit aligns code with the documentation.

Signed-off-by: Jakub Guzik <jakubmguzik@gmail.com>
2021-03-30 10:19:22 +02:00
OpenShift Merge Robot 5eb59509be
Merge pull request #9876 from edsantiago/apiv2_relax_versioncheck
APIv2 basic test: relax APIVersion check
2021-03-30 04:42:37 +00:00
baude b6089a5e99 resolve proper aarch64 image names
when automatically downloading fcos for the Apple M1, we needed
to replace a statically defined URL with the dynamically
determined one.

also, it appears boolean qemu options `server` and `onwait` are
not defined as `server=on` and `wait=off`.

[NO TESTS NEEDED]

Signed-off-by: baude <bbaude@redhat.com>
2021-03-29 20:20:39 -05:00
OpenShift Merge Robot 4fe1ce154f
Merge pull request #9846 from afbjorklund/qemu-arm64
[NO TESTS NEEDED] Add machine support for qemu-system-aarch64 on linux
2021-03-30 00:37:36 +00:00
Ed Santiago c03ff140d8 APIv2 basic test: relax APIVersion check
It is tedious and error-prone to update the 'APIVersion=<exact>'
test every time there's a minor bump. Change the test so it
confirms only the major version.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2021-03-29 15:32:01 -06:00
OpenShift Merge Robot b9e064ab84
Merge pull request #9795 from mheon/bump_320_dev
Bump to v3.2.0-dev
2021-03-29 20:42:03 +00:00
Anders F Björklund 870beaf137 Add machine support for qemu-system-aarch64
- Build machine also for podman-linux-arm64

- Add default machine type for linux arm64

- Add the required qemu-uefi bios parameter

- Remove hardcoded outdated path and show url

Signed-off-by: Anders F Björklund <anders.f.bjorklund@gmail.com>
2021-03-29 21:53:48 +02:00
OpenShift Merge Robot 2e9a46c729
Merge pull request #9870 from edsantiago/manpage_doubledash_helper
[CI:DOCS] manpage xref: helpful diagnostic for unescaped dash-dash
2021-03-29 19:53:36 +00:00
baude 236798e001 podman machine init user input
users may now provide a fully qualified local file path or a URL to seed
the disk-image to be used in the VM.

[NO TESTS NEEDED]

Signed-off-by: baude <bbaude@redhat.com>
2021-03-29 14:42:45 -05:00
Ed Santiago cc0bcea4ea manpage xref: helpful diagnostic for unescaped dash-dash
PR #9856 works around a buggy markdown processor that cleverly
converts double dashes to em-dash. The unfortunate result is
that the man page source files are unmaintainable, because
every '--foo' has to be specified as '\-\-foo'. This is
impossible for humans to remember, so let's add a helpful
diagnostic message when we detect new options added without
the escapes.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2021-03-29 13:00:11 -06:00
Matthew Heon 637c5d55e1 Bump to v3.2.0-dev
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2021-03-29 14:03:04 -04:00
OpenShift Merge Robot aa96cb6739
Merge pull request #9855 from giuseppe/fix-service-race-condition
service: use LISTEN_FDS
2021-03-29 17:40:21 +00:00
OpenShift Merge Robot 26b0ebd22f
Merge pull request #9516 from rhatdan/shrink
[NO TESTS NEEDED] Shrink the size of podman bindings
2021-03-29 17:14:26 +00:00
OpenShift Merge Robot b7bb8a1fb9
Merge pull request #9842 from AlbanBedel/play-kube-env-from-secrets
Add support for env from secrets in play kube
2021-03-29 17:10:25 +00:00
OpenShift Merge Robot bb3e8a4d13
Merge pull request #9858 from rhatdan/warn
[NO TESTS NEEDED] Drop Warning to Info, if cgroups not mounted
2021-03-29 17:04:24 +00:00
OpenShift Merge Robot 58bf62f2d1
Merge pull request #9861 from TristanCacqueray/version-swagger
[CI:DOCS] swagger: update system version response body
2021-03-29 17:01:22 +00:00
OpenShift Merge Robot 3d6dcdc7a4
Merge pull request #9862 from edsantiago/bud_reenable_pull_never
buildah-bud tests: reenable pull-never test
2021-03-29 15:27:42 +00:00
OpenShift Merge Robot 08eab3f8f7
Merge pull request #9307 from Luap99/powershell-completion
Add powershell completions
2021-03-29 15:17:44 +00:00
OpenShift Merge Robot 00792f8c95
Merge pull request #9856 from Luap99/fix-longflag
[CI:DOCS] Fix long option format on docs.podman.io
2021-03-29 14:40:44 +00:00
OpenShift Merge Robot 5e156c892c
Merge pull request #9857 from edsantiago/bats
system tests: friendier messages for 2-arg is()
2021-03-29 14:37:42 +00:00
OpenShift Merge Robot 236943d3c1
Merge pull request #9848 from Luap99/fix-9776
podman generate systemd --new do not duplicate params
2021-03-29 14:32:41 +00:00
Tristan Cacqueray 48549ccc17 swagger: update system version response body
This change updates the swagger documentation of the
system version response body to match the actual
response.

Fixes: #9522
Signed-off-by: Tristan Cacqueray <tdecacqu@redhat.com>
2021-03-29 14:25:25 +00:00
OpenShift Merge Robot 8e01f48d84
Merge pull request #9844 from afbjorklund/qemu-kvm
Add machine support for more Linux distros
2021-03-29 14:10:42 +00:00
Ed Santiago 0ca8d8601f buildah-bud tests: reenable pull-never test
Issue #9573 (podman build --pull-never is a NOP) is fixed.
Remove the 'skip' in the buildah-bud pull-never test.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2021-03-29 07:55:56 -06:00
Daniel J Walsh 127400880a
[NO TESTS NEEDED] Shrink the size of podman-remote
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-03-29 09:49:45 -04:00
OpenShift Merge Robot ac3499cc96
Merge pull request #9631 from rhatdan/pull
Fix podman build --pull-never
2021-03-29 13:41:42 +00:00
Paul Holzinger 6a78fcaa0a Add powershell completions
Add support for generating powershell completion files. This is especially
useful for people using the podman remote client on windows.

[NO TESTS NEEDED]

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2021-03-29 15:00:09 +02:00
Daniel J Walsh 195f340ad4
[NO TESTS NEEDED] Drop Warning to Info, if cgroups not mounted
If I run podman within a container without /sys/fs/cgroups mounted,
we get this warning, which the user can not do much about.  I don't
see a reason for requiring this warning to show by default, so we
should drop it to Info.

User can not do anything about it either, and code works well with
the somewhat expected error.

Helps fix: https://github.com/containers/podman/issues/9753

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-03-29 08:45:11 -04:00
Paul Holzinger bc48211924 Fix long option format on docs.podman.io
Escape the two dashes, otherwise they are combined into one long dash.
I tested that this change is safe and still renders correctly on github
and with the man pages.

This commit also contains a small change to make it build locally.
Assuming you have the dependencies installed you can do:
```
cd docs
make html
```
Preview the html files in docs/build/html with
`python -m http.server 8000 --directory build/html`.

Fixes containers/podman.io#373

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2021-03-29 14:38:25 +02:00
Ed Santiago 06ae12bd4e system tests: friendier messages for 2-arg is()
The 'is' check was intended to be called with three arguments,
the last one being a nice helpful test name. There's a fallback
for two-argument calls, but it was a horrible FIXME.

New fallback: the most recently run podman command. We keep
track of it in each run_podman() invocation.

This is not ideal, because it's theoretically possible to
invoke 'is' on something other than the output of run_podman,
but this at least fixes the by-far-most-common case.

[NO TESTS NEEDED]

Signed-off-by: Ed Santiago <santiago@redhat.com>
2021-03-29 06:10:42 -06:00
Giuseppe Scrivano c064acd78e
service: use LISTEN_FDS
if LISTEN_FDS is specified by systemd, we need to use the first fd
after the std files (so fd=3) to read from the activation socket
instead of manually opening the UNIX socket.

[NO TESTS NEEDED]

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

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2021-03-29 13:51:06 +02:00
OpenShift Merge Robot 259004f0a9
Merge pull request #9854 from vrothberg/fix-9853
[CI:DOCS] man pages: correct seccomp-policy label
2021-03-29 11:35:40 +00:00
Valentin Rothberg fe270c7524 man pages: correct seccomp-policy label
The implementation uses `io.containers.seccomp.profile` while the docs
mentioned `io.podman`.  Correct the two references in the docs to
reflect the implementation.

Fixes: #9853
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-03-29 11:45:59 +02:00
Giuseppe Scrivano 2446bdc7bb
rootless: use is_fd_inherited
since we already have an exported function that does the check,
refactor the code to use it instead of duplicating the logic.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2021-03-29 11:44:43 +02:00
Paul Holzinger aabafc5b1b podman generate systemd --new do not duplicate params
podman generate systemd --new inserts extra idfile arguments. The
generated unit can break when the user did provide their own idfile
arguments as they overwrite the arguments added by generate systemd.
This also happens when a user tries to generate the systemd unit on
a container already create with a --new unit. This should now
create a identical unit. The solution is to remove all user provided
idfile arguments.

This commit also ensures that we do not remove arguments that are part
off the containers entrypoint.

Fixes #9776

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2021-03-28 20:01:17 +02:00
OpenShift Merge Robot ccbe7e9456
Merge pull request #9829 from rhatdan/rmi
[NO TESTS NEEDED] Use same function podman-remote rmi as podman
2021-03-28 17:07:45 +00:00
Alban Bedel c59eb6f12b play kube: add support for env vars defined from secrets
Add support for secretRef and secretKeyRef to allow env vars to be set
from a secret. As K8S secrets are dictionaries the secret value must
be a JSON dictionary compatible with the data field of a K8S secret
object. The keys must consist of alphanumeric characters, '-', '_'
or '.', and the values must be base64 encoded strings.

Signed-off-by: Alban Bedel <albeu@free.fr>
2021-03-28 15:03:29 +02:00
Alban Bedel e5ff694855 play kube: support optional/mandatory env var from config map
In K8S the pod creation fails if an env var reference a non existing
config map key. It can be marked as optional, but per default it is
mandatory. Podman on the other hand always treat such references as
optional.

Rework envVarsFrom() and envVarValue() to additionaly return an error
and add support for the optional attribute in configMapRef and
configMapKeyRef.

Signed-off-by: Alban Bedel <albeu@free.fr>
2021-03-28 15:02:31 +02:00
Alban Bedel 9f92b8b0d8 play kube: prepare supporting other env source than config maps
Rework envVarsFromConfigMap() and envVarValue() to simplify supporting
other env sources than config maps. For this we pass the whole spec
generator options struct as parameter instead of just the config maps
list. Then we rename envVarsFromConfigMap() to envVarsFrom() and in
envVarValue() we reposition the loop over the config maps to only run
it when a configMapRef element exists.

Signed-off-by: Alban Bedel <albeu@free.fr>
2021-03-28 15:01:24 +02:00
Anders F Björklund f606e9e3c4 Add machine support for more Linux distros
There are no regression tests for machine

[NO TESTS NEEDED]

Signed-off-by: Anders F Björklund <anders.f.bjorklund@gmail.com>
2021-03-28 13:35:56 +02:00
OpenShift Merge Robot 7e4b13b946
Merge pull request #9467 from rhatdan/buildah
[NO TESTS NEEDED] Turn on podman-remote build --isolation
2021-03-28 11:00:45 +00:00
Daniel J Walsh eb82c48cc5
[NO TESTS NEEDED] Use same function podman-remote rmi as podman
Make sure fixes that go into local podman commands also work in
podman-remote, by using the same function.

Since this is just a rewrite of existing code, existing tests should
handle it.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-03-28 06:56:44 -04:00
OpenShift Merge Robot b2e7a3e45c
Merge pull request #9836 from baude/vmcreateresize
Podman machine enhancements
2021-03-28 10:55:45 +00:00
OpenShift Merge Robot 4831d41346
Merge pull request #9838 from xordspar0/kubeVolumeErrors
Add problematic volume name to kube play error messages
2021-03-28 10:54:44 +00:00
baude 7a79f708a4 Podman machine enhancements
Podman machine remove is now called `rm`.

Podman machine create now supports resizing the image to the value of
--disk-size as provided.  The default is to 10G.

Added systemd unit file on guest via ignition that sends a Ready message
to the host over a virtio-socket so that we know when the VM is booted
and ready for use.

Podman machine commands no longer require a VM name as an argument.  A
default VM name is defined and if no VM name is provided as a arg, the
default will be used.

[NO TESTS NEEDED]

Signed-off-by: baude <bbaude@redhat.com>
2021-03-27 10:08:11 -05:00
Jordan Christiansen dce877c5ca Add problematic volume name to kube play error messages
When kube play fails to create a volume, it should say which volume had
the problem so the user doesn't have to guess. For the following pod
spec:

	apiVersion: v1
	kind: Pod
	metadata:
	  name: mypod
	spec:
	  containers:
	    - name: myfrontend
	      image: nginx
	      volumeMounts:
	      - mountPath: "/var/www/html"
		name: mypd
	  volumes:
	    - name: mypd
	      hostPath:
		path: /var/blah

podman will now report:

	Error: failed to create volume "mypd": error in parsing HostPath
	in YAML: error checking path "/var/blah": stat /var/blah: no such
	file or directory

Signed-off-by: Jordan Christiansen <xordspar0@gmail.com>
2021-03-27 09:46:30 -05:00
OpenShift Merge Robot ec47312eeb
Merge pull request #9822 from jmguzik/fix-pods-list-filters-http-api
Fix list pods filter handling in libpod api
2021-03-27 12:36:47 +00:00
Daniel J Walsh 4d51995377
Fix podman build --pull-never
Currently pull policy is set incorrectly when users set --pull-never.

Also pull-policy is not being translated correctly when using
podman-remote.

Fixes: #9573

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-03-27 05:33:30 -04:00
OpenShift Merge Robot 5afcaeeaef
Merge pull request #9835 from ntkme/check-userns-support
[NO TESTS NEEDED] Fix for kernel without CONFIG_USER_NS
2021-03-27 09:27:47 +00:00