Commit graph

5514 commits

Author SHA1 Message Date
OpenShift Merge Robot b0b3506621
Merge pull request #4238 from giuseppe/rootless-enable-ps-size-tests
tests: enable ps --size tests for rootless
2019-10-11 21:30:25 +02:00
OpenShift Merge Robot 79d05b99cf
Merge pull request #4220 from mheon/null_runtime
Move OCI runtime implementation behind an interface
2019-10-11 20:55:37 +02:00
OpenShift Merge Robot cee6478f9e
Merge pull request #4221 from mheon/reset_runtime
Migrate can move containers to a user-defined runtime
2019-10-11 19:56:13 +02:00
OpenShift Merge Robot eb6ca054fc
Merge pull request #4237 from giuseppe/ps-not-null
container: initialize results list
2019-10-11 18:53:26 +02:00
OpenShift Merge Robot cd167fc9e0
Merge pull request #4201 from TomSweeneyRedHat/dev/tsweeney/updatebuildmd
Update build man page with latest Buildah changes
2019-10-11 18:22:19 +02:00
OpenShift Merge Robot 50b18847a6
Merge pull request #4232 from csomh/auth-file-path
Fix default path for auth.json
2019-10-11 18:08:25 +02:00
Giuseppe Scrivano c731131c86
tests: enable ps --size tests for rootless
rootless podman is using a single user namespace for all the containers
so it can safely access the storage for all of them.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-10-11 17:19:52 +02:00
Giuseppe Scrivano f7d55d64e7
container: initialize results list
it solves:

$ podman ps --format=json
null

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-10-11 16:52:18 +02:00
OpenShift Merge Robot 9f1f4ef19e
Merge pull request #4235 from giuseppe/no-pids-cgroupfs
rootless: do not set PIDs limit if --cgroup-manager=cgroupfs
2019-10-11 16:45:46 +02:00
OpenShift Merge Robot 495db28c75
Merge pull request #4231 from cgwalters/user-unit-wanted
Make user io.podman.service unit WantedBy=default.target
2019-10-11 16:19:58 +02:00
Colin Walters ca29a5b2f9 Make user io.podman.service unit WantedBy=default.target
`multi-user.target` doesn't exist in the systemd *user* instance.
We can't hook up the startup of a user unit to a system target.

Doing so causes systemd to error out in Fedora CoreOS builds
during presets.

Make it depend on `default.target` instead.

(Having the same unit in both system and user sessions has some
 tricky bits like this)

Signed-off-by: Colin Walters <walters@verbum.org>
2019-10-11 12:57:59 +00:00
Giuseppe Scrivano 5036b6a9fb
rootless: do not set PIDs limit if --cgroup-manager=cgroupfs
even if the system is using cgroups v2, rootless is not able to setup
limits when the cgroup-manager is not systemd.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-10-11 13:34:51 +02:00
OpenShift Merge Robot 43dcc917ae
Merge pull request #4205 from manics/no-log-init
troubleshooting: fix useradd no-log-init argument
2019-10-11 04:24:42 -07:00
OpenShift Merge Robot 6d35eac6a3
Merge pull request #4223 from QiWang19/uidmap
show uid_map in podman info
2019-10-10 15:11:10 -07:00
TomSweeneyRedHat 102d1328c0 Update build man page with latest Buildah changes
Changes include: Containerfile by default, add --device flags to bud, allow buildah bud to be called without
arguments, and a couple of small typo corrections.

Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
2019-10-10 18:04:30 -04:00
OpenShift Merge Robot fd389d28ce
Merge pull request #4206 from giuseppe/systemd-mode-look-full-path
systemd: expect full path /usr/sbin/init
2019-10-10 14:58:41 -07:00
OpenShift Merge Robot cec8edd6f5
Merge pull request #4181 from cevich/start_test_slower_poll
Raise start_test polling interval
2019-10-10 14:58:34 -07:00
Hunor Csomortáni f4c7a66149 Fix default path for auth.json
Default path should be ${XDG_RUNTIME_DIR}/containers/auth.json according
to the docs.

This regressed to ${XDG_RUNTIME_DIR}/auth.json in #3760.

Fixes: #4227

Signed-off-by: Hunor Csomortáni <csomh@redhat.com>
2019-10-10 21:51:25 +02:00
Matthew Heon b6a7d88397 When restoring containers, reset cgroup path
Previously, `podman checkport restore` with exported containers,
when told to create a new container based on the exported
checkpoint, would create a new container, with a new container
ID, but not reset CGroup path - which contained the ID of the
original container.

If this was done multiple times, the result was two containers
with the same cgroup paths. Operations on these containers would
this have a chance of crossing over to affect the other one; the
most notable was `podman rm` once it was changed to use the --all
flag when stopping the container; all processes in the cgroup,
including the ones in the other container, would be stopped.

Reset cgroups on restore to ensure that the path matches the ID
of the container actually being run.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-10-10 14:53:29 -04:00
OpenShift Merge Robot f39e097a81
Merge pull request #4197 from vrothberg/fix-4192
vendor c/psgo@v1.3.2
2019-10-10 07:36:14 -07:00
Matthew Heon feba94eb95 Migrate can move containers to a new runtime
This is a horrible hack to work around issues with Fedora 31, but
other distros might need it to, so we'll move it upstream.

I do not recommend this functionality for general use, and the
manpages and other documentation will reflect this. But for some
upgrade cases, it will be the only thing that allows for a
working system.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-10-10 10:25:06 -04:00
Matthew Heon 6f630bc09b Move OCI runtime implementation behind an interface
For future work, we need multiple implementations of the OCI
runtime, not just a Conmon-wrapped runtime matching the runc CLI.

As part of this, do some refactoring on the interface for exec
(move to a struct, not a massive list of arguments). Also, add
'all' support to Kill and Stop (supported by runc and used a bit
internally for removing containers).

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-10-10 10:19:32 -04:00
OpenShift Merge Robot a7f266891c
Merge pull request #4216 from baude/catchv2runc
catch runc v2 error
2019-10-10 05:45:50 -07:00
Qi Wang 3fff42e0ab show uid_map in podman info
show uid_map gid_map in podman info

Signed-off-by: Qi Wang <qiwan@redhat.com>
2019-10-09 21:27:18 -04:00
OpenShift Merge Robot 12c9b53439
Merge pull request #4225 from giuseppe/rootless-create-pause-automatically
rootless: automatically recreate the pause.pid file
2019-10-09 14:48:33 -07:00
Giuseppe Scrivano 5963077e93
cli: support --systemd=always
it enforces the systemd mode also when the command name doesn't match
/usr/sbin/init or systemd.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-10-09 23:39:18 +02:00
Giuseppe Scrivano 3ba3e1c751
systemd: expect full path /usr/sbin/init
"init" is a quite common name for the command executed in a container
image and Podman ends up using the systemd mode also when not
required.

Be stricter on enabling the systemd mode and not enable it
automatically when the basename is "init" but expect the full path
"/usr/sbin/init".

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-10-09 23:38:45 +02:00
OpenShift Merge Robot 2bf184aa01
Merge pull request #4222 from cevich/collect_varlink_log
Cirrus: Produce and collect varlink output
2019-10-09 14:33:14 -07:00
OpenShift Merge Robot f61e399a66
Merge pull request #4200 from mheon/fix_sigproxy_start
Respect --sig-proxy flag with podman start --attach
2019-10-09 10:23:03 -07:00
baude c35d71e3da catch runc v2 error
when runc returns an error about not being v2 complient, catch the error
and logrus an actionable message for users.

Signed-off-by: baude <bbaude@redhat.com>
2019-10-09 09:15:18 -05:00
Matthew Heon 8b5f165fc1 Respect --sig-proxy flag with podman start --attach
If it's explicitly set, use it, instead of trying to set a sane
default.

Signed-off-by: Matthew Heon <mheon@redhat.com>
2019-10-09 10:12:15 -04:00
Giuseppe Scrivano 2ceb03d05e
rootless: automatically recreate the pause.pid file
if the pause process cannot be joined, remove the pause.pid while
keeping a lock on it, and try to recreate it.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-10-09 16:02:21 +02:00
Giuseppe Scrivano 9a61b765d0
rootless: do not close files twice
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-10-09 15:49:12 +02:00
Giuseppe Scrivano 78bf6d0c6e
refresh: do not access network ns if not in the namespace
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-10-09 15:49:11 +02:00
OpenShift Merge Robot c3c40f970e
Merge pull request #4218 from jlebon/pr/drop-also
io.podman.socket: drop Also=multi-user.target
2019-10-09 05:03:15 -07:00
Chris Evich ffe726ed64
Cirrus: Produce and collect varlink output
When executing 'make remotesystem' testing, a varlink process is started
up but it's stdio is dumped due to the production of excessive data.
However, this also means if the process has a problem, any errors will
not be accessible.

Instead, grab only the last 100 lines and direct them into a file.  Also
update automation's log collection to retrieve this file when the
`$REMOTE_CLIENT` env. var. is `true`.

Signed-off-by: Chris Evich <cevich@redhat.com>
2019-10-08 16:47:37 -04:00
OpenShift Merge Robot 10cbaadf4a
Merge pull request #4189 from cevich/install_conmon
Cirrus: Install conmon in Fedora VMs
2019-10-08 11:30:24 -07:00
Jonathan Lebon 59353b4dce io.podman.socket: drop Also=multi-user.target
Using `Also=` means that the target unit will also be
installed/uninstalled together with our unit. Doing
`Also=multi-user.target` essentially says: disable `multi-user.target`
if `io.podman.socket` is disabled, which sounds... not at all like
what we want.

In practice, systemd thankfully ignores this (likely because it's the
default target). I think having `Also=io.podman.socket` in the
`io.podman.service` already does what we want here: it gets installed
under `sockets.target` whenever the service is. (And the fact that
systemd ignored this means that it wasn't actually playing a role in
resolving #3998.)

This was causing `systemctl preset-all` to dump core in Fedora CoreOS:
https://github.com/coreos/fedora-coreos-tracker/issues/290

(Likely there's a systemd bug around here too.)

Signed-off-by: Jonathan Lebon <jonathan@jlebon.com>
2019-10-08 12:12:16 -04:00
OpenShift Merge Robot c817ea1b33
Merge pull request #4032 from rhatdan/pids-limit
Setup a reasonable default for pids-limit 4096
2019-10-07 15:01:27 -07:00
Chris Evich e18dfe69f5
Cirrus: Remove broken/failing testing_crun task
This task was to enable cross-environment testing of crun.  However it
was decided to only run testing w/ crun on F31.  Since F31 release is
imminent, remove this task.

Signed-off-by: Chris Evich <cevich@redhat.com>
2019-10-07 13:43:00 -04:00
Chris Evich 0f69032a4b
Cirrus: Use new VM cache images
Signed-off-by: Chris Evich <cevich@redhat.com>
2019-10-07 13:12:02 -04:00
Chris Evich 09b6cd06c8
Cirrus: Install conmon in Fedora VMs
This is needed because older versions of podman (1.5.1) do not
automatically install the new conmon package.

Also, include removal of `/usr/libexec/podman/conmon` when preparing to
install and test podman built from source.

Signed-off-by: Chris Evich <cevich@redhat.com>
2019-10-07 11:27:45 -04:00
Valentin Rothberg 6e0ca9e46c vendor c/psgo@v1.3.2
Now supports cgroupsv2.

Fixes: #4192
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2019-10-07 16:27:09 +02:00
OpenShift Merge Robot 589261f275
Merge pull request #4196 from mheon/normal_remove_on_evict
When evicting containers, perform a normal remove first
2019-10-07 02:54:13 -07:00
Simon Li 8bfa4c975b troubleshooting: fix useradd no-log-init argument
--log-no-init should be --no-log-init

Signed-off-by: Simon Li <spli@dundee.ac.uk>
2019-10-06 12:21:06 +01:00
OpenShift Merge Robot 2c2782a217
Merge pull request #4165 from mtrmac/c-image-4
Update c/image to v4.0.0 + Buildah to 1.11.3
2019-10-04 13:26:38 -07:00
Daniel J Walsh 118cf1fc63
Setup a reasonable default for pids-limit 4096
CRI-O defaults to 1024 for the maximum pids in a container.  Podman
should have a similar limit. Once we have a containers.conf, we can
set the limit in this file, and have it easily customizable.

Currently the documentation says that -1 sets pids-limit=max, but -1 fails.
This patch allows -1, but also indicates that 0 also sets the max pids limit.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-10-04 16:09:13 -04:00
Miloslav Trmač d3f59bedb3 Update c/image to v4.0.1 and buildah to 1.11.3
This requires updating all import paths throughout, and a matching
buildah update to interoperate.

I can't figure out the reason for go.mod tracking
	github.com/containers/image v3.0.2+incompatible // indirect
((go mod graph) lists it as a direct dependency of libpod, but
(go list -json -m all) lists it as an indirect dependency),
but at least looking at the vendor subdirectory, it doesn't seem
to be actually used in the built binaries.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2019-10-04 20:18:23 +02:00
OpenShift Merge Robot bd08fc0e9b
Merge pull request #4180 from cevich/update_download_links
Docs: Update links, add links to latest
2019-10-04 08:55:50 -07:00
OpenShift Merge Robot c03b1b95a3
Merge pull request #4194 from containers/dependabot/go_modules/gopkg.in/yaml.v2-2.2.4
Bump gopkg.in/yaml.v2 from 2.2.3 to 2.2.4
2019-10-04 08:45:34 -07:00