5748 Commits

Author SHA1 Message Date
cec8edd6f5 Merge pull request #4181 from cevich/start_test_slower_poll
Raise start_test polling interval
2019-10-10 14:58:34 -07:00
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
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
f39e097a81 Merge pull request #4197 from vrothberg/fix-4192
vendor c/psgo@v1.3.2
2019-10-10 07:36:14 -07:00
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
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
a7f266891c Merge pull request #4216 from baude/catchv2runc
catch runc v2 error
2019-10-10 05:45:50 -07:00
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
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
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
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
2bf184aa01 Merge pull request #4222 from cevich/collect_varlink_log
Cirrus: Produce and collect varlink output
2019-10-09 14:33:14 -07:00
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
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
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
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
9a61b765d0 rootless: do not close files twice
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-10-09 15:49:12 +02:00
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
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
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
10cbaadf4a Merge pull request #4189 from cevich/install_conmon
Cirrus: Install conmon in Fedora VMs
2019-10-08 11:30:24 -07:00
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
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
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
0f69032a4b Cirrus: Use new VM cache images
Signed-off-by: Chris Evich <cevich@redhat.com>
2019-10-07 13:12:02 -04:00
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
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
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
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
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
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
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
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
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
bb803b8f7a When evicting containers, perform a normal remove first
This ensures that containers that didn't require an evict will be
dealt with normally, and we only break out evict for containers
that refuse to be removed by normal means.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-10-04 11:04:43 -04:00
70d5b0a6fb Merge pull request #4186 from cevich/log_runc_crun
Cirrus: Simplify package NVR logging
2019-10-04 07:42:05 -07:00
c9e936a407 Merge pull request #3549 from marcov/evict-container
Add ability to evict a container
2019-10-04 07:30:27 -07:00
f418fc70e7 Bump gopkg.in/yaml.v2 from 2.2.3 to 2.2.4
Bumps [gopkg.in/yaml.v2](https://github.com/go-yaml/yaml) from 2.2.3 to 2.2.4.
- [Release notes](https://github.com/go-yaml/yaml/releases)
- [Commits](https://github.com/go-yaml/yaml/compare/v2.2.3...v2.2.4)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2019-10-04 15:27:36 +02:00
1fe9556009 Merge pull request #4188 from Mrigank11/validate_network_name
podman network create: validate user input
2019-10-04 02:11:56 -07:00
c5e26f8e40 podman network create: validate user input
Disallow invalid/confusing names such as '../bar' or 'foo '
Closes #4184

Signed-off-by: Mrigank Krishan <mrigankkrishan@gmail.com>
2019-10-04 02:34:01 +05:30
5756fd8ff9 Cirrus: Simplify package NVR logging
Also include runc/crun version for Fedora

Signed-off-by: Chris Evich <cevich@redhat.com>
2019-10-03 15:53:07 -04:00
7af4074c6f Merge pull request #4161 from afbjorklund/machine-env
Handle environment variables from podman-machine
2019-10-03 12:45:43 -07:00
980291d0c1 Docs: Update links, add links to latest
Signed-off-by: Chris Evich <cevich@redhat.com>
2019-10-03 15:18:38 -04:00
f8deaf9f9d Cirrus: Fix log URIs & add optional $ALSO_FILENAME
Signed-off-by: Chris Evich <cevich@redhat.com>
2019-10-03 15:18:26 -04:00
86c8650c23 Merge pull request #4174 from cevich/use_bash_not_sh
System-tests: Use bash explicitly
2019-10-03 11:28:58 -07:00
343573461b Merge pull request #4173 from mheon/bump_release_in_readme
Podman 1.6.0 has been released, update the README
2019-10-03 11:28:52 -07:00
1f85f9f82e Merge pull request #4163 from containers/dependabot/go_modules/gopkg.in/yaml.v2-2.2.3
Bump gopkg.in/yaml.v2 from 2.2.2 to 2.2.3
2019-10-03 11:28:44 -07:00
584c70a9f8 Raise start_test polling interval
According to the documentation
https://onsi.github.io/gomega/#eventually

> the default value for the polling interval is 10 milliseconds

That is excessively fast given the observed failures in
issue #4021 are always using podman-remote.  Lower the interval to
3-seconds, which should be plenty long enough for container removal.

Signed-off-by: Chris Evich <cevich@redhat.com>
2019-10-03 12:08:36 -04:00
f96fbfcd6d Merge pull request #4179 from edsantiago/bats
system tests: info: deal with hyphen in username
2019-10-03 08:17:03 -07:00
0ed9763b72 system tests: info: deal with hyphen in username
...e.g. cloud-user. 9822f54ac was intended to fix this,
but it doesn't. Simple and standard solution is to
move the dash to the end of the character class.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2019-10-03 07:55:41 -06:00