Commit Graph

12209 Commits

Author SHA1 Message Date
Giuseppe Scrivano e4c269e2d0
rootless: attempt to copy current mappings first
when creating a user namespace, attempt to create it first by copying
the current mappings and then fallback to the other methods:

1) use newidmap tools and ...
2) create a user namespace with a single user mapped.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2021-04-26 08:58:54 +02:00
OpenShift Merge Robot 9ca53cfb4f
Merge pull request #10131 from eriksjolund/fix_markdown_layout_bugs
[CI:DOCS] Fix Markdown layout bugs
2021-04-25 12:54:45 -04:00
Rob Cowsill 9731ecfc7a
[CI:DOCS] Restore missing content to manpages
The following content was omitted:
- Text after the first markdown link on a line to the end of the last
  (in lines with multiple markdown links)
- Email addresses of the form <a...@...>

Fixed by:
- Making the first two regexes match each link individually, instead
  of matching from the start of the first link to the end of the last
- Making the last regex specifically match <a> and </a> tags

Signed-off-by: Rob Cowsill <42620235+rcowsill@users.noreply.github.com>
2021-04-25 16:19:24 +01:00
Erik Sjölund a010bb912d
[CI:DOCS] Fix Markdown layout bugs
* Add missing backticks to mark the end
  of the code block.

Signed-off-by: Erik Sjölund <erik.sjolund@gmail.com>
2021-04-25 14:39:54 +02:00
flouthoc b0ea40f551 Fix podman ps --filter ancestor to match exact ImageName/ImageID
Signed-off-by: flouthoc <flouthoc.git@gmail.com>
2021-04-25 13:49:40 +05:30
Ashley Cui bd76701e89 Add machine-enabled to containers.conf for machine
Add machine-enabled=true into /etc/containers/containers.conf when
initing a VM. This field should tell Podman it's being run in a
podman-machine and it will be used in future to tell podman to set up
other necessary machine stuff such as networking

[NO TESTS NEEDED]

Signed-off-by: Ashley Cui <acui@redhat.com>
2021-04-23 16:30:54 -04:00
Chris Evich 1e98a95a0e
Several multi-arch image build/push fixes
* Fix not setting `$VERSION` before reference
* Reduce need for "syntax-hilighting workaround` comment.
  Simplify context-expressions -> simple env. var. referenmces
* Fix pushing quay.io/containers/podman:master twice
  ('upstream' and 'testing' matrix items)
* Throw error on unknown/unsupported matrix items
* Improve readability of setting multi-line `$LABELS` value.

Signed-off-by: Chris Evich <cevich@redhat.com>
2021-04-23 13:35:10 -04:00
Daniel J Walsh 3538815c5b
Add podman run --timeout option
This option allows users to specify the maximum amount of time to run
before conmon sends the kill signal to the container.

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

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-04-23 11:18:05 -04:00
OpenShift Merge Robot ba60821f0a
Merge pull request #10107 from cevich/multi_arch_images
[CI:DOCS] Add github-action workflow to build/push multi-arch
2021-04-23 10:40:45 -04:00
OpenShift Merge Robot feac25f722
Merge pull request #10122 from Luap99/fix-10110
Parse slirp4netns net options with compat api
2021-04-23 09:22:44 -04:00
OpenShift Merge Robot afdea0dccd
Merge pull request #10121 from SoMuchForSubtlety/master
Fix removal race condition in ListContainers
2021-04-23 07:20:49 -04:00
Paul Holzinger ca4f6ec1db Parse slirp4netns net options with compat api
Parse the slirp4netns network options when called via compat api. The
options must be extracted from the NetworkMode string.

Fixes #10110

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2021-04-23 11:48:50 +02:00
Paul Holzinger f99b7a314b Fix rootlesskit port forwarder with custom slirp cidr
The source ip for the rootlesskit port forwarder was hardcoded to the
standard slirp4netns ip. This is incorrect since users can change the
subnet used by slirp4netns with `--network slirp4netns:cidr=10.5.0.0/24`.
The container interface ip is always the .100 in the subnet. Only when
the rootlesskit port forwarder child ip matches the container interface
ip the port forwarding will work.

Fixes #9828

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2021-04-23 11:12:49 +02:00
SoMuchForSubtlety 2df5c6383f Fix removal race condition in ListContainers
It is possible that a container is removed between fetching the
initial list of containers and the second access during conversion.

Closes #10120

[NO TESTS NEEDED]

Signed-off-by: Jakob Ahrer <jakob@ahrer.dev>
2021-04-23 10:14:19 +02:00
Chris Evich 3c5bb7bf0f
Add github-action workflow to build/push multi-arch
This borrows very heavily from the work done for buildah by @barthy1 -
Yulia Gaponenko <yulia.gaponenko1@de.ibm.com>.  Some changes to code and
comments made for clarity and specificity.

Signed-off-by: Chris Evich <cevich@redhat.com>
2021-04-22 16:20:59 -04:00
OpenShift Merge Robot 8465626e31
Merge pull request #10099 from Luap99/format-completion
Add go template shell completion for --format
2021-04-22 09:56:28 -04:00
Giuseppe Scrivano 24f00e4695
rootless: if root is not sub?id raise a debug message
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2021-04-22 15:32:36 +02:00
OpenShift Merge Robot 21c77846e4
Merge pull request #9495 from rhatdan/groups
Add '--group-add keep-groups': supplementary groups into container
2021-04-22 09:29:28 -04:00
OpenShift Merge Robot a67aec72ed
Merge pull request #10113 from containers/dependabot/go_modules/github.com/containers/common-0.37.0
Bump github.com/containers/common from 0.36.0 to 0.37.0
2021-04-22 06:39:43 -04:00
dependabot[bot] 8ebafbde34
Bump github.com/containers/common from 0.36.0 to 0.37.0
Bumps [github.com/containers/common](https://github.com/containers/common) from 0.36.0 to 0.37.0.
- [Release notes](https://github.com/containers/common/releases)
- [Commits](https://github.com/containers/common/compare/v0.36.0...v0.37.0)

Signed-off-by: dependabot[bot] <support@github.com>
2021-04-22 07:59:24 +00:00
Paul Holzinger d81021ed26 Add go template shell completion for --format
The --format flags accepts go template strings. I use this often but I
consistently forget the field names. This commit adds a way to provide
shell completion for the --format flag. It works by automatically
receiving the field names with the reflect package from the given
struct. This requires almost no maintenance since this ensures that we
always use the correct field names. This also works for nested structs.

```
$ podman ps --format "{{.P"
{{.Pid}}      {{.PIDNS}}    {{.Pod}}      {{.PodName}}  {{.Ports}}
```

NOTE: This only works when you use quotes otherwise the shell does not
provide completions. Also this does not work for fish at the moment.

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2021-04-22 00:31:08 +02:00
OpenShift Merge Robot 979f047d73
Merge pull request #10102 from edsantiago/bats
corrupt-image test: fix an oops
2021-04-21 15:45:47 -04:00
OpenShift Merge Robot 382c0ac133
Merge pull request #10103 from pipern/patch-1
[CI:DOCS] Typo fix to usage text of --compress option
2021-04-21 15:42:47 -04:00
OpenShift Merge Robot 5c8ba48807
Merge pull request #10097 from containers/dependabot/go_modules/github.com/containers/storage-1.30.0
Bump github.com/containers/storage from 1.29.0 to 1.30.0
2021-04-21 15:41:46 -04:00
Daniel J Walsh e356160f41
Add --group-add keep-groups: suplimentary groups into container
Currently we have rootless users who want to leak their groups access
into containers, but this group access is only able to be pushed in by
a hard to find OCI Runtime annotation.  This PR makes this option a lot
more visable and hides the complexity within the podman client.

This option is only really needed for local rootless users. It makes
no sense for remote clients, and probably makes little sense for
rootfull containers.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-04-21 13:28:36 -04:00
OpenShift Merge Robot 897f6c3a4a
Merge pull request #10088 from rhatdan/no-headers
Add --noheading flag to all list commands
2021-04-21 13:20:36 -04:00
Daniel J Walsh 9c8277247d
Fixes from make codespell
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-04-21 13:16:33 -04:00
Nick Piper 85937044cd
Typo fix to usage text of --compress option
Correction of `--format-docker-dir` in to `--format=docker-dir`

Signed-off-by: Nick Piper <nick.piper@cgi.com>
2021-04-21 17:26:50 +01:00
Ed Santiago a273d25ed1 corrupt-image test: fix an oops
Followup to #10033: actually implement the system reset test.
And, just out of paranoia, extend the warning-message check.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2021-04-21 06:09:31 -06:00
OpenShift Merge Robot 544c315665
Merge pull request #10080 from rhatdan/remote
podman-remote should show podman.sock info
2021-04-21 08:05:35 -04:00
OpenShift Merge Robot 41677b192a
Merge pull request #8979 from haircommander/full-attach-path
Use full attach path, rather than a symlink
2021-04-21 05:25:19 -04:00
Daniel J Walsh 8ebeadc3c6
Add --noheading flag to all list commands
Currently we have only podman images list --noheading.
This PR Adds this option to volumes, containers, pods, networks,
machines, and secrets.

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

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-04-21 05:22:29 -04:00
OpenShift Merge Robot 0d3aa18f04
Merge pull request #10096 from containers/dependabot/go_modules/github.com/containers/image/v5-5.11.1
Bump github.com/containers/image/v5 from 5.11.0 to 5.11.1
2021-04-21 05:17:20 -04:00
dependabot[bot] 5aef11026a
Bump github.com/containers/storage from 1.29.0 to 1.30.0
Bumps [github.com/containers/storage](https://github.com/containers/storage) from 1.29.0 to 1.30.0.
- [Release notes](https://github.com/containers/storage/releases)
- [Changelog](https://github.com/containers/storage/blob/master/docs/containers-storage-changes.md)
- [Commits](https://github.com/containers/storage/compare/v1.29.0...v1.30.0)

Signed-off-by: dependabot[bot] <support@github.com>
2021-04-21 07:58:32 +00:00
dependabot[bot] 8a3df76ef9
Bump github.com/containers/image/v5 from 5.11.0 to 5.11.1
Bumps [github.com/containers/image/v5](https://github.com/containers/image) from 5.11.0 to 5.11.1.
- [Release notes](https://github.com/containers/image/releases)
- [Commits](https://github.com/containers/image/compare/v5.11.0...v5.11.1)

Signed-off-by: dependabot[bot] <support@github.com>
2021-04-21 07:57:31 +00:00
OpenShift Merge Robot 9ef298e784
Merge pull request #10033 from nalind/just-remove-it
rmi: don't break when the image is missing a manifest
2021-04-21 02:39:53 -04:00
OpenShift Merge Robot 101571dc6b
Merge pull request #10093 from eriksjolund/fix_markdown_table_bug
[CI:DOCS] Fix Markdown table layout bugs
2021-04-20 22:14:53 -04:00
Erik Sjölund c1f117e526
[CI:DOCS] Fix Markdown table layout bugs
* Fix the Markdown table layout bugs that manifest themselves in
  corrupted tables in the generated HTML pages
  http://docs.podman.io/en/latest/markdown/podman-create.1.html
  http://docs.podman.io/en/latest/markdown/podman-run.1.html

Signed-off-by: Erik Sjölund <erik.sjolund@gmail.com>
2021-04-20 22:18:44 +02:00
Daniel J Walsh 659dc7843c
podman-remote should show podman.sock info
Currently podman-remote info does not show socket information.

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

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-04-20 15:56:45 -04:00
Nalin Dahyabhai fd9dd7065d rmi: don't break when the image is missing a manifest
In libpod/image.Image.Remove(), if the attempt to find the image's
parent fails for any reason, log a warning and proceed as though it
didn't have one instead of failing, which would leave us unable to
remove the image without resetting everything.

In libpod/Runtime.RemoveImage(), if we can't determine if an image has
children, log a warning, and assume that it doesn't have any instead of
failing, which would leave us unable to remove the image without
resetting everything.

In pkg/domain/infra/abi.ImageEngine.Remove(), when attempting to remove
all images, if we encounter an error checking if a given image has
children, log a warning, and assume that it doesn't have any instead of
failing, which would leave us unable to remove the image without
resetting everything.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2021-04-20 15:44:39 -04:00
OpenShift Merge Robot 2a32fc3e40
Merge pull request #10072 from eriksjolund/rewrite_uidmap_documenation
[CI:DOCS] Rewrite --uidmap doc in podman-create.1.md and podman-run.1.md
2021-04-20 15:07:11 -04:00
Erik Sjölund 6e5bb9d1d3
[CI:DOCS] Rewrite --uidmap doc in podman-create.1.md and podman-run.1.md
Introduce the concept of "intermediate UID" to explain
how --uidmap works when running rootless.

Add Markdown tables to show examples of how UIDs are mapped.

Co-authored-by: Tom Sweeney <tsweeney@redhat.com>
Signed-off-by: Erik Sjölund <erik.sjolund@gmail.com>
2021-04-20 20:28:11 +02:00
Sebastian Jug db7cff8c86
Add support for CDI device configuration
- Persist CDIDevices in container config
- Add e2e test
- Log HasDevice error and add additional condition for safety

Signed-off-by: Sebastian Jug <seb@stianj.ug>
2021-04-20 09:18:52 -04:00
OpenShift Merge Robot cf2c3a1f13
Merge pull request #10087 from TomSweeneyRedHat/dev/tsweeney/quickimportfix
[CI:DOCS] Add missing dash to verbose option
2021-04-19 22:28:04 -04:00
OpenShift Merge Robot d84422e14e
Merge pull request #10085 from containers/dependabot/go_modules/github.com/uber/jaeger-client-go-2.27.0incompatible
Bump github.com/uber/jaeger-client-go from 2.25.0+incompatible to 2.27.0+incompatible
2021-04-19 16:38:04 -04:00
TomSweeneyRedHat 7f6bcc2008 [CI:DOCS] Add missing dash to verbose option
The `--verbose` option in the import man page was
missing a dash, this corrects it.

Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
2021-04-19 16:24:52 -04:00
OpenShift Merge Robot a94360a3f7
Merge pull request #10041 from chenk008/add_pidfile_flag
Add flag "--pidfile" for podman create/run
2021-04-19 16:22:05 -04:00
dependabot[bot] 37a00c9964
Bump github.com/uber/jaeger-client-go
Bumps [github.com/uber/jaeger-client-go](https://github.com/uber/jaeger-client-go) from 2.25.0+incompatible to 2.27.0+incompatible.
- [Release notes](https://github.com/uber/jaeger-client-go/releases)
- [Changelog](https://github.com/jaegertracing/jaeger-client-go/blob/master/CHANGELOG.md)
- [Commits](https://github.com/uber/jaeger-client-go/compare/v2.25.0...v2.27.0)

Signed-off-by: dependabot[bot] <support@github.com>
2021-04-19 17:12:04 +00:00
OpenShift Merge Robot b5e0b292bf
Merge pull request #10056 from mheon/misc_cleanup
[NO TESTS NEEDED] Make an advanced layer diff function private
2021-04-19 10:51:58 -04:00
OpenShift Merge Robot a917bae67d
Merge pull request #10025 from zhangguanzhang/remote-save-dir
Fixes podman-remote save to directories does not work
2021-04-19 10:22:52 -04:00