13729 Commits

Author SHA1 Message Date
8fd31c674b Merge pull request #12260 from Luap99/upgrade-flake
Fix flake in upgrade tests
2021-11-11 15:38:41 +01:00
c43b81f9a0 Fix flake in upgrade tests
The cni plugins need access to /run/cni and the dnsname plugin needs
access to /run/containers.

The race condition was basically that a `podman stop` could either do the
cleanup itself or the spawned cleanup process would do the cleanup if it
was fast enough. The `podman stop` is executed on the host while the
podman cleanup process is executed in the "parent container". The parent
container contains older plugins than on the host. The dnsname plugin
before version 1.3 could error and this would prevent CNI from
doing a proper cleanup. The plugin errors because it could not find its
files in /run/containers. On my system the test always failed because
the cleanup process was always faster than the stop process. However in
the CI VMs the stop process was usually faster and so it failed only
sometimes.

Fixes #11558

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2021-11-11 14:15:35 +01:00
73e1cdfe9e export adding id-specifier code to setContainerNameForTemplate
Signed-off-by: Boaz Shuster <boaz.shuster.github@gmail.com>
2021-11-11 11:45:36 +02:00
5f3ce2515d Merge pull request #12261 from rhatdan/Dockerfile
[CI:DOCS] VOLUME must be declared after RUN chown command
2021-11-11 02:33:35 +01:00
fa8184c807 Merge pull request #12240 from umohnani8/table
Print headers for system connection ls
2021-11-10 23:29:36 +01:00
546ad0e6ab Merge pull request #12242 from Luap99/port-reload
network reload without ports should not reload ports
2021-11-10 23:28:35 +01:00
980c47aaa2 VOLUME must be declared after RUN chown command
Podman and Docker will not commit changes via RUN command
of a VOLUME directory, so we need to chown path first.

Not doing do will cause: https://bugzilla.redhat.com/show_bug.cgi?id=2009266

Signed-off-by: Jindrich Novy <jnovy@redhat.com>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-11-10 17:15:58 -05:00
9dddc47d28 Merge pull request #12258 from edsantiago/xref_manpages_see_also
[CI:DOCS] Add CI check for SEE ALSO in man pages
2021-11-10 22:53:36 +01:00
3690532b3b network reload return error if we cannot reload ports
As rootless we have to reload the port mappings. If it fails we should
return an error instead of the warning.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2021-11-10 21:16:30 +01:00
27de152b5a network reload without ports should not reload ports
When run as rootless the podman network reload command tries to reload
the rootlessport ports because the childIP could have changed.
However if the containers has no ports we should skip this instead of
printing a warning.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2021-11-10 21:16:08 +01:00
a55fdbb49c Print headers for system connection ls
Print out the headers even if the system connection list
is empty to match the behavior of other list commands.

Signed-off-by: Urvashi Mohnani <umohnani@redhat.com>
2021-11-10 14:48:08 -05:00
4bf0146c29 Merge pull request #12255 from vrothberg/fix-11970
podman load: support downloading files
2021-11-10 18:27:39 +01:00
6236be4ff9 [CI:DOCS] Add CI check for SEE ALSO in man pages
Add new CI check to confirm that links and references
in SEE ALSO sections are properly formatted and that
links are valid (at least in theory: we do no actual
URL fetching to test for 404).

The check is piggybacked into existing xref-helpmsgs-manpages
script. It could conceivably be more elegant to write a
separate tool for this purpose, but I don't wish to duplicate
the logic for finding and reading markdown files.

Script identified various problems, which I fix in this PR:

  . missing '**' (asterisks) around some references, or '**'
    in the wrong place.

  . links pointing to github.com/.../tree/ instead of /blob/
    (github redirects those automatically, but I like
    consistency)

  . a few copy-paste errors, e.g. subgid linking to subuid.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2021-11-10 09:03:40 -07:00
2e6231bcbc Merge pull request #12241 from rhatdan/man
[CI:DOCS] Add links to all SEE ALSO sections
2021-11-10 16:10:06 +01:00
1ef66d6d7f podman load: support downloading files
Support downloading files, for instance via
`podman load -i server.com/image.tar`.  The specified URL is downloaded
in the frontend and stored as a temp file that gets passed down to the
backend.

Also vendor in c/common@main to use the new `pkg/download`.

Fixes: #11970
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-11-10 15:43:16 +01:00
93df757b93 Merge pull request #12250 from vrothberg/fix-12245
pod create: read infra image from containers.conf
2021-11-10 15:40:43 +01:00
2720156fa5 Add links to all SEE ALSO sections
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-11-10 09:29:21 -05:00
df06664363 pod create: read infra image from containers.conf
Fix a bug where pods would be created with the hard-coded default infra
image instead of the custom one from containers.conf.  Add a simple
regression test.

Fixes: #12245
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-11-10 12:59:42 +01:00
9877280f5a rootless: adjust error message
since we now support reading additional IDs with libsubid, clarify
that the /etc/subuid and /etc/subgid files are honored only when
shadow-utils is configured to use them.

[NO TESTS NEEDED]

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2021-11-10 09:26:22 +01:00
5437568fcd Merge pull request #12227 from Luap99/net-setup
Fix rootless networking with userns and ports
2021-11-09 21:11:30 +01:00
43bd57c7fb Merge pull request #12195 from boaz0/closes_11998
podman-generate-kube - remove empty structs from YAML
2021-11-09 19:46:31 +01:00
ad4366ad24 Merge pull request #12239 from vrothberg/fix-12226
support health checks from image configs
2021-11-09 16:57:29 +01:00
216e2cb366 Fix rootless networking with userns and ports
A rootless container created with a custom userns and forwarded ports
did not work. I refactored the network setup to make the setup logic
more clear.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2021-11-09 15:58:57 +01:00
c996d9f11e Merge pull request #12235 from saschagrunert/fix-static-build
Exclude already built sources for static build
2021-11-09 15:54:28 +01:00
faf450ea18 support health checks from image configs
Health checks may be defined in the container config or the config of an
image.  So far, Podman only looked at the container config.

The plumbing happened in libimage but add a regression test to Podman as
well to make sure the glue code will not regress.

Note that I am pinning github.com/onsi/gomega to v1.16.0 since v1.17.0
requires go 1.16 which in turn is breaking CI.

Fixes: #12226
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-11-09 15:32:36 +01:00
d4953c0185 Merge pull request #12232 from ianw/make-c-files
Match .c files in Makefile
2021-11-09 15:27:27 +01:00
4f65befc39 Merge pull request #12233 from ianw/shm-lock-failure-message
shm_lock: Handle ENOSPC better in AllocateSemaphore
2021-11-09 15:05:28 +01:00
6ee3b33d38 change from run to create in 250-systemd.bats
Signed-off-by: Boaz Shuster <boaz.shuster.github@gmail.com>
2021-11-09 11:54:18 +02:00
d0b502fcea Exclude already built sources for static build
We now do not copy the `bin` directory to the target nix sources to
avoid skipping the build because "everything is up to date".

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

Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
2021-11-09 09:44:56 +01:00
3ccd999340 Merge pull request #12230 from rhatdan/man
[ci:docs] Add links to podman build see also
2021-11-09 08:52:26 +01:00
72cf389685 shm_lock: Handle ENOSPC better in AllocateSemaphore
When starting a container libpod/runtime_pod_linux.go:NewPod calls
libpod/lock/lock.go:AllocateLock ends up in here.  If you exceed
num_locks, in response to a "podman run ..." you will see:

 Error: error allocating lock for new container: no space left on device

As noted inline, this error is technically true as it is talking about
the SHM area, but for anyone who has not dug into the source (i.e. me,
before a few hours ago :) your initial thought is going to be that
your disk is full.  I spent quite a bit of time trying to diagnose
what disk, partition, overlay, etc. was filling up before I realised
this was actually due to leaking from failing containers.

This overrides this case to give a more explicit message that
hopefully puts people on the right track to fixing this faster.  You
will now see:

 $ ./bin/podman run --rm -it fedora bash
 Error: error allocating lock for new container: allocation failed; exceeded num_locks (20)

[NO NEW TESTS NEEDED] (just changes an existing error message)

Signed-off-by: Ian Wienand <iwienand@redhat.com>
2021-11-09 18:34:21 +11:00
8a9da76989 Fix Zsh completion command documentation
Signed-off-by: yahavi <yahavi@jfrog.com>
2021-11-09 09:08:30 +02:00
555e215574 Match .c files in Makefile
Ensure that rebuilds happen when .c files are updated in the source
tree.

Signed-off-by: Ian Wienand <iwienand@redhat.com>
2021-11-09 14:31:28 +11:00
65609f3389 Add Static Build download instructions to README
[NO NEW TEST NEEDED]

Signed-off-by: Gábor Lipták <gliptak@gmail.com>
2021-11-08 22:04:02 -05:00
7225ddb5b1 Add links to podman build,run, create see also
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-11-08 21:03:18 -05:00
6d56ac7e0f Merge pull request #12222 from Luap99/pod-create-net
pod create: read network mode from config
2021-11-09 02:08:56 +01:00
ec37d35883 Merge pull request #12229 from edsantiago/minor_test_tweaks
Minor test tweaks
2021-11-08 23:44:56 +01:00
2ed31f9f1d Minor test tweaks
- remove 'NO TESTS NEEDED' as a valid bypass string. Henceforth
  only 'NO NEW TESTS NEEDED' will work.

- add a debugging aid for #11871, in which bodhi tests time out
  in nslookup.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2021-11-08 14:23:55 -07:00
3a31ac50da Merge pull request #12223 from cevich/bump_catatonit
Bump Catatonit up to v0.1.7
2021-11-08 19:13:30 +01:00
8b7b0b7caf pod create: read network mode from config
When we create a pod we have to parse the network mode form the config
file. This is a regression in commit d28e85741f.

Fixes #12207

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2021-11-08 18:59:28 +01:00
d0a44755c7 Merge pull request #12036 from jwhonce/issues/11984
test connection add
2021-11-08 18:53:29 +01:00
abfec8144a Merge pull request #11953 from markusthoemmes/help-default
Display help text on empty subcommand by default
2021-11-08 18:23:17 +01:00
5fbc67f205 Bump Catatonit up to v0.1.7
Ref: https://github.com/containers/podman/pull/12218

Signed-off-by: Chris Evich <cevich@redhat.com>
2021-11-08 11:35:19 -05:00
e907f095b2 test connection add
* Fix connection JSON encoding
* Add custom ginkgo matchers for connection testing
* Cleanup code

Fixes #11984

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2021-11-08 09:20:58 -07:00
22ef488d24 Merge pull request #12213 from flouthoc/system-connection-rm-all
system: Adds support for removing all named destination via `--all`
2021-11-08 16:50:59 +01:00
c9ba1fb7d4 Merge pull request #11958 from cdoern/scp
Podman Image SCP rootful to rootless transfer
2021-11-08 16:19:57 +01:00
a58c0bb39a Merge pull request #12137 from vrothberg/fix-11735
pod/container create: resolve conflicts of generated names
2021-11-08 15:36:58 +01:00
338eb9d75e system: Adds support for removing all named destination via --all
Adds support of dropping all named destination from system connections via `--all`.

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

Signed-off-by: Aditya Rajan <arajan@redhat.com>
2021-11-08 19:42:45 +05:30
d6ef903164 Merge pull request #12172 from rhatdan/man
[CI:DOCS] Add some information about disabling SELinux when using system volumes
2021-11-08 13:38:55 +01:00
6444f24028 pod/container create: resolve conflicts of generated names
Address the TOCTOU when generating random names by having at most 10
attempts to assign a random name when creating a pod or container.

[NO TESTS NEEDED] since I do not know a way to force a conflict with
randomly generated names in a reasonable time frame.

Fixes: #11735
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-11-08 13:33:30 +01:00