Commit Graph

5748 Commits

Author SHA1 Message Date
Matthew Heon 14aed2d92a Add release notes for Podman 1.6.2
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-10-16 13:09:41 -04:00
Jhon Honce 60d0be17fc Refactor tests when checking for error exit codes
Rather than checking for non-zero, we need to check for >0 to
distinguish between timeouts and error exit codes.

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2019-10-16 08:10:07 -07:00
OpenShift Merge Robot 7825c5827e
Merge pull request #4270 from dasmfm/podman-start-fix
Fix output message for "podman start" command.
2019-10-16 15:39:30 +02:00
bklimenko b4124485ae start: print full container ID
Now the "podman start" command prints the full ID and has the same
behaviour as other commands.

Signed-off-by: Boris Klimenko <2@borisklimenko.ru>
2019-10-16 15:16:59 +03:00
OpenShift Merge Robot 8172460f2a
Merge pull request #4273 from mheon/no_runtime
Add a MissingRuntime implementation
2019-10-16 11:05:45 +02:00
OpenShift Merge Robot 7b54aeb6e3
Merge pull request #4272 from baude/rootlesstatsnet
rootless v2 cannot collect network stats
2019-10-16 10:48:22 +02:00
OpenShift Merge Robot 1137c1084b
Merge pull request #4256 from mheon/fix_volumes
Ensure volumes can be removed when they fail to unmount
2019-10-16 10:20:27 +02:00
Tyler Ramer 14e905e1eb Attach stdin to container at start if it was created with --interactive
Check to see if the container's start config includes the interactive
flag when determining to attach or ignore stdin stream.

This is in line with behavior of Docker CLI and engine

Signed-off-by: Tyler Ramer <tyaramer@gmail.com>
2019-10-15 16:05:14 -04:00
Matthew Heon cab7bfbb21 Add a MissingRuntime implementation
When a container is created with a given OCI runtime, but then it
is uninstalled or removed from the configuration file, Libpod
presently reacts very poorly. The EvictContainer code can
potentially remove these containers, but we still can't see them
in `podman ps` (aside from the massive logrus.Errorf messages
they create).

Providing a minimal OCI runtime implementation for missing
runtimes allows us to behave better. We'll be able to retrieve
containers from the database, though we still pop up an error for
each missing runtime. For containers which are stopped, we can
remove them as normal.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-10-15 15:59:20 -04:00
baude f10f9bc58f rootless v2 cannot collect network stats
network statistics cannot be collected for rootless network devices with
the current implementation.  for now, we return nil so that stats will
at least for users.

Fixes:#4268

Signed-off-by: baude <bbaude@redhat.com>
2019-10-15 14:09:41 -05:00
OpenShift Merge Robot 5f72e6ef2e
Merge pull request #4195 from vrothberg/fix-4193
inspect: rename ImageID go field to Image
2019-10-15 15:47:50 +02:00
baude 867d49957b Add ability to redirect bash for run -i
Signed-off-by: baude <bbaude@redhat.com>
2019-10-15 08:00:13 -05:00
OpenShift Merge Robot e5de079714
Merge pull request #4267 from giuseppe/accept-sbin-init
systemd: accept also /sbin/init
2019-10-15 13:10:01 +02:00
OpenShift Merge Robot a032ff5cb7
Merge pull request #4261 from vrothberg/update-storage
vendor github.com/containers/storage@v1.13.5
2019-10-15 12:32:36 +02:00
OpenShift Merge Robot 935802575b
Merge pull request #4215 from TomSweeneyRedHat/dev/tsweeney/fixsquash
Add squash-all, fix squash option in build
2019-10-15 12:21:17 +02:00
Valentin Rothberg 019f19cf4f inspect: rename ImageID go field to Image
The json field is called `Image` while the go field is called `ImageID`,
tricking users into filtering for `Image` which ultimately results in an
error.  Hence, rename the field to `Image` to align json and go.

To prevent podman users from regressing, rename `Image` to `ImageID` in
the specified filters.  Add tests to prevent us from regressing.  Note
that consumers of the go API that are using `ImageID` are regressing;
ultimately we consider it to be a bug fix.

Fixes: #4193
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2019-10-15 12:16:47 +02:00
Daniel J Walsh 25572cefa8
Merge pull request #4262 from nalind/error-cause
Unwrap errors before comparing them
2019-10-15 06:06:45 -04:00
Daniel J Walsh b6b3acf2d7
Merge pull request #4229 from vrothberg/conmon-no-log-error
change error wording when conmon fails without logs
2019-10-15 06:03:57 -04:00
Giuseppe Scrivano 38a6a2000a
systemd: accept also /sbin/init
it is a regression caused by
3ba3e1c751.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1761514

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-10-15 11:14:21 +02:00
Nalin Dahyabhai 17a7596af4 Unwrap errors before comparing them
Unwrap errors before directly comparing them with errors defined by the
storage and image libraries.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2019-10-14 13:49:06 -04:00
Valentin Rothberg 94489e0b0e vendor github.com/containers/storage@v1.13.5
* Do not discard errors when panicing on lockfile open
* config: drop skip_mount_home
* storage: drop ostree deduplication

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2019-10-14 19:37:37 +02:00
OpenShift Merge Robot a9190dac36
Merge pull request #4245 from giuseppe/images-valid-json
images: empty list is valid json with --format=json
2019-10-14 19:34:03 +02:00
Matthew Heon 0f6b0e8c9c Ensure volumes can be removed when they fail to unmount
Also, ensure that we don't try to mount them without root - it
appears that it can somehow not error and report that mount was
successful when it clearly did not succeed, which can induce this
case.

We reuse the `--force` flag to indicate that a volume should be
removed even after unmount errors. It seems fairly natural to
expect that --force will remove a volume that is otherwise
presenting problems.

Finally, ignore EINVAL on unmount - if the mount point no longer
exists our job is done.

Fixes: #4247
Fixes: #4248

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-10-14 10:32:15 -04:00
OpenShift Merge Robot 3e45d0730b
Merge pull request #4253 from KentaTada/fix-oci-hook-md
Fix sample's JSON syntax error in oci-hooks.5.md
2019-10-14 16:01:03 +02:00
Kenta Tada bc32afadd9 Fix sample's JSON syntax error in oci-hooks.5.md
Signed-off-by: Kenta Tada <Kenta.Tada@sony.com>
2019-10-14 21:19:08 +09:00
Valentin Rothberg 2d2646883f change error wording when conmon fails without logs
In some cases, conmon can fail without writing logs.  Change the wording
of the error message from

	"error reading container (probably exited) json message"
to
	"container create failed (no logs from conmon)"

to have a more helpful error message that is more consistent with other
errors at that stage of execution.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2019-10-14 13:46:10 +02:00
OpenShift Merge Robot a8993bab78
Merge pull request #4233 from mheon/fix_cc
Allow giving path to Podman for cleanup command
2019-10-12 19:26:37 +02:00
OpenShift Merge Robot cf7e3f3b2f
Merge pull request #4243 from TomSweeneyRedHat/dev/tsweeney/fixrunmd
Touch up bad math in run man page
2019-10-12 19:14:24 +02:00
Giuseppe Scrivano 71410ff073
images: empty list is valid json with --format=json
similar change to f7d55d64e7

with images --format=json, be sure the output is valid json also when
it is an empty list.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-10-11 21:56:40 +02:00
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
Matthew Heon f00e1e0223 Allow giving path to Podman for cleanup command
For non-Podman users of Libpod, we don't want to force the exit
command to use ARGV[0], which probably does not support a cleanup
command.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-10-11 14:28:41 -04:00
Peter Hunt e0fda971da play kube: Container->Ctr
for berevity

Signed-off-by: Peter Hunt <pehunt@redhat.com>
2019-10-11 14:28:14 -04: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
TomSweeneyRedHat ca80c60523 Touch up bad math in run man page
We'd an off by one error in the run man page spotted by @leorochael in

Fixes: #4239

Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
2019-10-11 13:55:31 -04:00
TomSweeneyRedHat beadd2694b Add squash-all, fix squash option in build
Translate the podman build --squash command to podman build --layers=false which
has the same functionality as docker build --squash. Add a new option --squash-all
which will squash all layers into one. This will be translated to buildah bud --squash
for the buildah bud api.

Also allow only one option, squash, layers or squash--all to be used per build command.

Fixes: https://github.com/containers/buildah/issues/1234

Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
2019-10-11 13:28:38 -04:00
Peter Hunt 6ad4fb0c49 play kube: refactor test suite
The play kube test suite has many different cases to cover, and should only grow in coverage over time
The old design was difficult to extend, and there was lots of duplicated code.
The largest pain point was the Container struct needed to be changed often, and doing so caused changes every test case

Instead, adopt the `withOption` idiom. Now, adding a new option for customizing just involves adding a new withOption function, and changing the struct definition and initialization in one place.

Signed-off-by: Peter Hunt <pehunt@redhat.com>
2019-10-11 13:12:01 -04: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