Commit Graph

12209 Commits

Author SHA1 Message Date
なつき a2e834d0d9 [NO TESTS NEEDED] Fix for kernel without CONFIG_USER_NS
Signed-off-by: Natsuki <i@ntk.me>
2021-03-26 21:03:24 -07:00
Daniel J Walsh 6e250c317c
[NO TESTS NEEDED] Turn on podman-remote build --isolation
Currently podman only works with --isolation chroot.  This PR
fixes this by allowing the isolation mode to default to OCI and to
also allow users to pass the isolation mode into the containers.

The current tests for --isolation should cause this code to be tested.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-03-26 22:04:14 -04:00
OpenShift Merge Robot 4d0b583340
Merge pull request #9833 from rhatdan/resize
Remove resize race condition
2021-03-27 00:05:47 +00:00
OpenShift Merge Robot f3024b906c
Merge pull request #9821 from rhatdan/VENDOR
[NO TESTS NEEDED] Vendor in containers/buildah v1.20.0
2021-03-26 19:38:49 +00:00
Jakub Guzik 85015a5e23 Fix list pods filter handling in libpod api
Signed-off-by: Jakub Guzik <jakubmguzik@gmail.com>
2021-03-26 20:19:12 +01:00
Daniel J Walsh dcabf6dd71
Remove resize race condition
Since podman-remote resize requests can come in at random times, this
generates a real potential for race conditions. We should only be
attempting to resize TTY on running containers, but the containers can
go from running to stopped at any time, and returning an error to the
caller is just causing noice.

This change will basically ignore requests to resize terminals if the
container is not running and return the caller to success.  All other
callers will still return failure.

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

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-03-26 15:15:17 -04:00
OpenShift Merge Robot c81e273835
Merge pull request #9832 from rhatdan/commit
Use TMPDIR when commiting images
2021-03-26 18:31:52 +00:00
Daniel J Walsh fc197fb4f5
[NO TESTS NEEDED] Vendor in containers/buildah v1.20.0
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-03-26 13:57:27 -04:00
OpenShift Merge Robot 47006d32ed
Merge pull request #9726 from tunacado/add_runroot_mount_require_to_systemd_gen
Add RequiresMountsFor= to systemd generate
2021-03-26 15:59:12 +00:00
OpenShift Merge Robot fa6ba9b00f
Merge pull request #9826 from containers/dependabot/go_modules/github.com/vbauerster/mpb/v6-6.0.3
Bump github.com/vbauerster/mpb/v6 from 6.0.2 to 6.0.3
2021-03-26 14:06:09 +00:00
OpenShift Merge Robot 25525ff834
Merge pull request #9820 from ashley-cui/machineinit
[NO TESTS NEEDED] Rename podman machine create to init and clean up
2021-03-26 13:45:11 +00:00
Daniel J Walsh 8762d875c2
Use TMPDIR when commiting images
Fixes: https://github.com/containers/podman/issues/9825

Currently we are using TMPDIR for storaing temporary files
when building images, but not when you directly commit the images.

This change simply uses the TMPDIR environment variable if set
to store temporary files.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-03-26 09:37:07 -04:00
OpenShift Merge Robot 7ae1d23a38
Merge pull request #9782 from afbjorklund/terminal-getsize
[NO TESTS NEEDED] Fix swapped dimensions from terminal.GetSize
2021-03-26 13:21:10 +00:00
Robb Manes 748826fc88 Add RequiresMountsFor= to systemd generate
It is rare but possible that storage locations for the graphroot and the
runroot are not mounted at boot time, and therefore might race when
doing container operations.  An example we've seen in the wild is that a
slow tmpfs mount for the runroot would suddenly mount over /run, causing
the container to lose all currently-running data, requiring a system
refresh to get it back.

This patch adds RequiresMountsFor= to the systemd.unit header to ensure
the paths for both the graphroot and runroot are mounted prior to
starting any generated unit files.

Signed-off-by: Robb Manes <rmanes@redhat.com>
2021-03-26 08:53:26 -04:00
dependabot[bot] b7dda21e33
Bump github.com/vbauerster/mpb/v6 from 6.0.2 to 6.0.3
Bumps [github.com/vbauerster/mpb/v6](https://github.com/vbauerster/mpb) from 6.0.2 to 6.0.3.
- [Release notes](https://github.com/vbauerster/mpb/releases)
- [Commits](https://github.com/vbauerster/mpb/compare/v6.0.2...v6.0.3)

Signed-off-by: dependabot[bot] <support@github.com>
2021-03-26 07:54:00 +00:00
Anders F Björklund 826c228035 Fix swapped dimensions from terminal.GetSize
Signed-off-by: Anders F Björklund <anders.f.bjorklund@gmail.com>
2021-03-26 07:14:47 +01:00
Ashley Cui f663857103 Rename podman machine create to init and clean up
Rename podman machine create to init because we're initing a VM, not
really creating it
Wire up CPUs flag
Suppress QEMU GUI from popping up when not in debug mode

[NO TESTS NEEDED]
Signed-off-by: Ashley Cui <acui@redhat.com>
2021-03-25 17:45:27 -04:00
OpenShift Merge Robot 9e23e0b3e3
Merge pull request #9810 from jmguzik/fix-impages-filter-http-api
Fix filters list/prune in image http compat/libpod api endpoints
2021-03-25 14:40:21 -07:00
OpenShift Merge Robot 8eb36320ca
Merge pull request #9816 from jwhonce/wip/namespace
Correct json encoding field name for Namespace type
2021-03-25 11:44:00 -07:00
OpenShift Merge Robot 029659ac15
Merge pull request #9818 from edsantiago/bats
system tests: new interactive tests
2021-03-25 11:37:00 -07:00
OpenShift Merge Robot db35674873
Merge pull request #9781 from baude/addqemu
introduce podman machine
2021-03-25 10:50:01 -07:00
OpenShift Merge Robot 24581d8760
Merge pull request #9759 from EduardoVega/9129-multi-docs-kube
Support multi doc yaml for generate/play kube
2021-03-25 10:44:03 -07:00
OpenShift Merge Robot d64ebc5369
Merge pull request #9817 from vrothberg/image-unit-aliases
image unit tests - make them pass on F34 with enforced short-name mode
2021-03-25 10:43:00 -07:00
Jhon Honce f5e2c53678 Correct json field name
[NO TESTS NEEDED]

* When using the Namespace type, the field Value was json encoded
  with the name "string" vs "value".

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2021-03-25 09:55:13 -07:00
Ed Santiago 4b23bc7aa4 system tests: new interactive tests
socat can create a dummy PTY that we can manipulate. This
lets us run a variety of tests that we couldn't before,
involving "run -it", and stty, and even "load" with no args.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2021-03-25 10:48:55 -06:00
baude 4ab8a6f67e Improvements for machine
clean up ci failures and add appropriate arch,os exclusion tags

Signed-off-by: baude <bbaude@redhat.com>
2021-03-25 11:02:33 -05:00
Valentin Rothberg 2a66ef333a libpod/image: unit tests: use a `registries.conf` for aliases
Since some unit tests use "busybox", we need to point it to some alias
if we want it to pass CI on F34 where we're running in enforced mode.

Furthermore, make sure that the registries.conf can actually be
overridden in the code.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-03-25 16:20:35 +01:00
Valentin Rothberg 7fe40cd203 libpod/image: unit tests: defer cleanup
Defer cleaning up the test artifacts as early as possible.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-03-25 16:20:30 +01:00
Valentin Rothberg 6a4ff44ae1 libpod/image: unit tests: use `require.NoError`
In contrast to `assert.NoError`, `require.NoError` treats mismatches
fatally which in many cases is necessary to prevent subsequent checks
from segfaulting.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-03-25 16:20:26 +01:00
Ashley Cui e766113737 Add --execute flag to podman machine ssh
--execute, -e allows to execute a command through ssh

Signed-off-by: Ashley Cui <acui@redhat.com>
2021-03-25 08:46:43 -05:00
baude b5f54a9b23 introduce podman machine
podman machine allows podman to create, manage, and interact with a vm
running some form of linux (default is fcos).  podman is then configured
to be able to interact with the vm automatically.

while this is usable on linux, the real push is to get this working on
both current apple architectures in macos.

Ashley Cui contributed to this PR and was a great help.

[NO TESTS NEEDED]

Signed-off-by: baude <bbaude@redhat.com>
2021-03-25 08:43:51 -05:00
Ashley Cui a861f6fd3e Podman machine CLI and interface stub
Podman machine will be a mac-only command that manages the VM where
containers are run. Currently, only the CLI is written and the interface
function for the VM management is stub for future developement

The podman machine cli is only built on mac builds.

Signed-off-by: Ashley Cui <acui@redhat.com>
2021-03-25 08:41:11 -05:00
Eduardo Vega cbf53c166d Support multi doc yaml for generate/play kube
Signed-off-by: Eduardo Vega <edvegavalerio@gmail.com>
2021-03-25 06:54:12 -06:00
Jakub Guzik 429a655866 Fix filters in image http compat/libpod api endpoints
Signed-off-by: Jakub Guzik <jakubmguzik@gmail.com>
2021-03-25 12:29:53 +01:00
OpenShift Merge Robot 896ea085b1
Merge pull request #9768 from mheon/fix_9608
Ensure manually-created volumes have correct ownership
2021-03-25 03:09:25 -07:00
OpenShift Merge Robot 95ef8a6f03
Merge pull request #9811 from containers/dependabot/go_modules/github.com/containers/storage-1.28.1
Bump github.com/containers/storage from 1.28.0 to 1.28.1
2021-03-25 03:08:25 -07:00
OpenShift Merge Robot dd32fa833e
Merge pull request #9812 from containers/dependabot/go_modules/github.com/containers/common-0.35.4
Bump github.com/containers/common from 0.35.3 to 0.35.4
2021-03-25 03:06:31 -07:00
dependabot[bot] a4390cd898
Bump github.com/containers/common from 0.35.3 to 0.35.4
Bumps [github.com/containers/common](https://github.com/containers/common) from 0.35.3 to 0.35.4.
- [Release notes](https://github.com/containers/common/releases)
- [Commits](https://github.com/containers/common/compare/v0.35.3...v0.35.4)

Signed-off-by: dependabot[bot] <support@github.com>
2021-03-25 07:06:07 +00:00
dependabot[bot] 9a899da160
Bump github.com/containers/storage from 1.28.0 to 1.28.1
Bumps [github.com/containers/storage](https://github.com/containers/storage) from 1.28.0 to 1.28.1.
- [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.28.0...v1.28.1)

Signed-off-by: dependabot[bot] <support@github.com>
2021-03-25 07:05:38 +00:00
OpenShift Merge Robot e523d09638
Merge pull request #9808 from thephoenixofthevoid/issue-9650-fixed
[NO TESTS NEEDED] Fix rootless volume plugins
2021-03-24 17:21:24 -07:00
OpenShift Merge Robot ebb57df0f6
Merge pull request #9747 from rhatdan/tty
Check if stdin is a term in --interactive --tty mode
2021-03-24 15:28:25 -07:00
OpenShift Merge Robot 545127c075
Merge pull request #9809 from rhatdan/tmpdir
[NO TESTS NEEDED] Remove /tmp/containers-users-* files on reboot
2021-03-24 14:51:51 -07:00
Daniel J Walsh 00949d0bd8
Check if stdin is a term in --interactive --tty mode
If you are attempting to run a container in interactive mode, and want
a --tty, then there must be a terminal in use.

Docker exits right away when a user specifies to use a --interactive and
--TTY but the stdin is not a tty.

Currently podman will pull the image and then fail much later.

Podman will continue to run but will print an warning message.

Discussion in : https://github.com/containers/podman/issues/8916

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-03-24 16:33:30 -04:00
Daniel J Walsh 9ba23be549
[NO TESTS NEEDED] Remove /tmp/containers-users-* files on reboot
Helps Fix https://github.com/containers/podman/issues/9765

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-03-24 15:58:31 -04:00
Phoenix The Fallen f2181141e1 [NO TESTS NEEDED] Fix rootless volume plugins
In a case of volume plugins with custom options.

Signed-off-by: Phoenix The Fallen <thephoenixofthevoid@gmail.com>
2021-03-24 22:53:53 +03:00
Matthew Heon 452decf8a4 Ensure manually-created volumes have correct ownership
As part of a fix for an earlier bug (#5698) we added the ability
for Podman to chown volumes to correctly match the user running
in the container, even in adverse circumstances (where we don't
know the right UID/GID until very late in the process). However,
we only did this for volumes created automatically by a
`podman run` or `podman create`. Volumes made by
`podman volume create` do not get this chown, so their
permissions may not be correct. I've looked, and I don't think
there's a good reason not to do this chwon for all volumes the
first time the container is started.

I would prefer to do this as part of volume copy-up, but I don't
think that's really possible (copy-up happens earlier in the
process and we don't have a spec). There is a small chance, as
things stand, that a copy-up happens for one container and then
a chown for a second, unrelated container, but the odds of this
are astronomically small (we'd need a very close race between two
starting containers).

Fixes #9608

Signed-off-by: Matthew Heon <mheon@redhat.com>
2021-03-24 14:24:47 -04:00
OpenShift Merge Robot af91f27d85
Merge pull request #9790 from matejvasek/fix-isolation-serde
fix: build endpoint for compat API
2021-03-24 05:32:27 -07:00
OpenShift Merge Robot f88ec04940
Merge pull request #9723 from containers/dependabot/go_modules/github.com/rootless-containers/rootlesskit-0.14.0
Bump github.com/rootless-containers/rootlesskit from 0.14.0-beta.0 to 0.14.0
2021-03-24 05:07:27 -07:00
OpenShift Merge Robot 0cb306674a
Merge pull request #9785 from jmguzik/unification-of-label-filter
Unification of label and until filters across list/prune endpoints
2021-03-24 03:10:28 -07:00
Daniel J Walsh 1ac51eff6e
Bump github.com/rootless-containers/rootlesskit
Bumps [github.com/rootless-containers/rootlesskit](https://github.com/rootless-containers/rootlesskit) from 0.14.0-beta.0 to 0.14.0.
- [Release notes](https://github.com/rootless-containers/rootlesskit/releases)
- [Commits](https://github.com/rootless-containers/rootlesskit/compare/v0.14.0-beta.0...v0.14.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-03-24 06:04:30 -04:00