3496 Commits

Author SHA1 Message Date
7f9fdbeafe Merge pull request #2676 from cevich/fix_fail_irc
Cirrus: Fix post-merge failure notice
2019-03-16 12:59:32 -07:00
4b771162ce Merge pull request #2657 from edsantiago/image_tree_usage
podman image tree: fix usage message
2019-03-16 11:34:32 -07:00
2e2a173567 Cirrus: Fix post-merge failure notice
Likely caused by rebase typos after removing test-commit.  This fixes
notifications to actually get sent.  Also show env. vars after setting
up the environment - helps debugging.

Signed-off-by: Chris Evich <cevich@redhat.com>
2019-03-16 12:14:43 -04:00
ea0b36bcbb utils: avoid too long tmp directory
or we will easily pass the 108 chars limits for unix paths.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-03-16 15:17:33 +01:00
8a570b2dd2 podman image tree: fix usage message
Minor fix to Use message: add IMAGE argument. (I'm a stickler
for this because my zsh completion is self-generating, from
the --help messages).

Also, sort 'tree' before 'trust' in man page.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2019-03-16 08:09:35 -06:00
97fb495718 Merge pull request #2620 from baude/multilogs
display logs for multiple containers at the same time
2019-03-16 04:21:32 -07:00
3384bd87c8 Merge pull request #2672 from TomSweeneyRedHat/dev/tsweeney/clistoreconf
Add CLI storage conf example to run manpage
2019-03-16 04:12:38 -07:00
688c1b33b5 Merge pull request #2650 from cevich/notify_post_merge_fail_two
Cirrus: Notify on IRC if post-merge testing fails
2019-03-16 04:12:31 -07:00
37467beaf9 Merge pull request #2664 from kunalkushwaha/ps-port-fix
port grouping in ps command output
2019-03-16 04:03:38 -07:00
0015f403b5 Merge pull request #2658 from mheon/sctp
Add support for SCTP port forwarding
2019-03-16 04:03:31 -07:00
2c727eef83 Merge pull request #2675 from giuseppe/rootless-use-readable-path-for-conmon
rootless: change default path for conmon.pid
2019-03-16 03:45:30 -07:00
0e76921048 Cirrus: Notify on IRC if post-merge testing fails
Until recently it was very difficult to execute any scripts if part of a
task failed.  A new feature in Cirrus-CI makes this easy.  Use it to
post a notice on IRC when any task fails.

Also: Add quotes around yaml-string values for consistency and
syntax-highlighting correctness.

Signed-off-by: Chris Evich <cevich@redhat.com>
2019-03-15 21:21:50 -04:00
6c6a865436 rootless: change default path for conmon.pid
We cannot use the RunDir for writing the conmon.pid file as we might
not be able to read it before we join a namespace, since it is owned
by the root in the container which can be a different uid when using
uidmap.  To avoid completely the issue, we will just write it to the
static dir which is always readable by the unprivileged user.

Closes: https://github.com/containers/libpod/issues/2673

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-03-15 22:53:23 +01:00
3754f58499 Merge pull request #2643 from rhatdan/volumes
Make sure buildin volumes have the same ownership and permissions as …
2019-03-15 14:52:45 -07:00
26a89b61b3 Add CLI storage conf example to run manpage
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>

Add an example to the run man page to illustrate how
you can configure storage from the CLI.  This addresses
a request from issue #2662.

Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
2019-03-15 15:03:47 -04:00
a0c35c394b Integration test tweaks
Wait for more than 1 second on podman info to complete.  Also, add
clarification to why slirp fails.

Signed-off-by: baude <bbaude@redhat.com>
2019-03-15 13:41:01 -05:00
5e86acd591 display logs for multiple containers at the same time
add the ability for users to specify more than one container at a time
while using podman logs.  If more than one container is being displayed,
podman will also prepend a shortened container id of the container on
the log line.

also, enabled the podman-remote logs command during the refactoring of
the above ability.

fixes issue #2219

Signed-off-by: baude <bbaude@redhat.com>
2019-03-15 13:41:01 -05:00
6e4c32967e Merge pull request #2595 from jwhonce/bug/1677908
Add --replace flag to "podman container runlabel"
2019-03-15 10:52:57 -07:00
082d792693 Make 'podman rm' exit with 125 if it had a bogus & a running container
Getting a list of containers, and then deleting them are two separate
fallible steps that can run into different sets of errors. eg., in the
case of a bogus missing container and a container that's running or
paused, the first step will only trigger libpod.ErrNoSuchCtr. At this
point it might appear that the exit code ought to be 1. However, when
attempting the deletion, it will fail once more due to the status of
the running or paused container. Since libpod.ErrNoSuchCtr is no longer
the only error encountered, the exit code should be reset to 125.

This problem is currently masked for rootless usage due to commit
35432ecaae4a8372 ("rootless: fix rm when uid in the container != 0").

Fixes: 85db895012bead6b ("rm: set exit code to 1 if a specified ...")
       e41279b902a334e5 ("Change exit code to 1 on podman rm ...")

Signed-off-by: Debarshi Ray <rishi@fedoraproject.org>
2019-03-15 18:28:47 +01:00
7efefde3bc rootless: write the custom config file before reload
so that when we do a rootlessReload we inherit the correct settings
from the command line.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-03-15 17:05:06 +01:00
101e6f6b74 Add support for SCTP port forwarding
SCTP is already present and enabled in the CNI plugins, so all we
need to do to add support is not error on attempting to bind
ports to reserve them.

I investigated adding this binding for SCTP, but support for SCTP
in Go is honestly a mess - there's no widely-supported library
for doing it that will do what we need.

For now, warn that port reservation for SCTP is not supported and
forward the ports.

Signed-off-by: Matthew Heon <mheon@redhat.com>
2019-03-15 10:51:33 -04:00
9d81be9614 Make sure buildin volumes have the same ownership and permissions as image
When creating a new image volume to be mounted into a container, we need to
make sure the new volume matches the Ownership and permissions of the path
that it will be mounted on.

For example if a volume inside of a containre image is owned by the database
UID, we want the volume to be mounted onto the image to be owned by the
database UID.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-03-15 10:44:44 -04:00
8aed32acea Merge pull request #2655 from giuseppe/tmp-user
rootless: use /tmp/libpod-rundir-$EUID for fallback
2019-03-15 07:28:42 -07:00
a73814cc67 Merge pull request #2646 from giuseppe/fix-build-order
build: fix build DIR -t TAG
2019-03-15 07:01:37 -07:00
e16cdf711f Merge pull request #2637 from edsantiago/zsh_completion
zsh completion
2019-03-15 07:01:28 -07:00
ccf991f530 Merge pull request #2633 from edsantiago/default_default
Usage messages: deduplicate '(default true)' et al
2019-03-15 06:22:46 -07:00
37dcc0a305 Merge pull request #2617 from giuseppe/fix-with-config
runtime: fill the runtime config with sane defaults
2019-03-15 05:29:13 -07:00
f4c41961e3 Merge pull request #2656 from giuseppe/fix-rootfs-segfault
container: check containerInfo.Config before accessing it
2019-03-15 04:52:33 -07:00
dd8edd639f rootless: do not override user settings
if the settings are available in the user config file, do not override
them with the global configuration.

Closes: https://github.com/containers/libpod/issues/2614

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-03-15 10:39:40 +01:00
14cfc63631 runtime: refactor NewRuntime and NewRuntimeFromConfig
we had two functions NewRuntimeFromConfig and NewRuntime that differed
only for the config file they use.

Move comon logic to newRuntimeFromConfig and let it lookup the
configuration file to use when one is not specified.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-03-15 10:39:39 +01:00
549e81ff3b events: use os.SEEK_END instead of its value
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-03-15 10:39:38 +01:00
508e08410b container: check containerInfo.Config before accessing it
check that containerInfo.Config is not nil before trying to access
it.

Closes: https://github.com/containers/libpod/issues/2654

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-03-15 10:39:33 +01:00
e6a4bac09e rootless: use Geteuid instead of Getuid
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-03-15 10:39:23 +01:00
592a2fd544 rootless: use /tmp/libpod-rundir-$EUID for fallback
when the fallback is in place, the first user creating /tmp/user/$EUID
prevents other users for creating other directories since /tmp/user is
created with mode 0700.

Since there is no way for an unprivileged user to initialize the
/tmp/user directory correctly (we would need it to be owned by root
with the sticky bit set), let's just use /tmp/libpod-rundir-$EUID.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-03-15 10:39:23 +01:00
fc65d71df2 build: fix build DIR -t TAG
accept also the order "build DIR -t TAG"

Closes: https://github.com/containers/libpod/issues/2636

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-03-15 10:39:17 +01:00
39859850ae Merge pull request #2645 from mheon/fix_some_flakes
Fix a few flakes
2019-03-15 02:04:01 -07:00
6b46e7c6f7 Merge pull request #2660 from giuseppe/upgrade-slirp4netns
cirrus: upgrade slirp4netns
2019-03-15 01:40:55 -07:00
d47d976c0b testcase added for listing range of ports in ps command
Signed-off-by: Kunal Kushwaha <kushwaha_kunal_v7@lab.ntt.co.jp>
2019-03-15 15:50:11 +09:00
9a268dd3b4 port grouping in ps command output
continuous published ports are grouped in ps output.
bugfix: #1358

Signed-off-by: Kunal Kushwaha <kushwaha_kunal_v7@lab.ntt.co.jp>
2019-03-15 14:53:49 +09:00
1442abf032 cirrus: upgrade slirp4netns
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-03-14 22:12:12 +01:00
31f11a8a9b Merge pull request #2653 from giuseppe/fix-slirp4netns-check
rootless: fix CI regression when using slirp4netns
2019-03-14 12:05:49 -07:00
bd4441b0d3 rootless: fix CI regression when using slirp4netns
Older versions of slirp4netns do not have the --disable-host-loopback
flag.

Remove the check once we are sure the updated version is available
everywhere.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-03-14 19:27:44 +01:00
1e124306db save-load-export: clear cli-parsing default
...in order to silence Cobra's usually-helpful "(default xxx)"
message.

Initialization is now done in code, by testing for empty string
and setting that to /dev/std{in,out} as appropriate; make special
note of load.go where there's mild duplication between a local
variable and cliconfig.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2019-03-14 12:15:45 -06:00
fc5951ad55 Merge pull request #1642 from kunalkushwaha/image-tree
Tree implementation for podman images
2019-03-14 09:53:49 -07:00
38d2b952fb Merge pull request #2644 from giuseppe/slirp-disable-lo
slirp4netns: use --disable-host-loopback
2019-03-14 09:43:29 -07:00
b625c47ae5 Merge pull request #2546 from TomSweeneyRedHat/dev/tsweeney/commoncontainers
Replace skopeo-containers with containers-common
2019-03-14 09:09:22 -07:00
3c4f4bf561 Bump timeout on a podman info test to default
Saw this flake a few times because of a timeout issue.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-03-14 10:10:50 -04:00
d033452b3d Replace skopeo-containers with containers-common
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>

Replaces 'skopeo-containers' with 'containers-common' in the files that
I feel comfortable changing it in.  There are a number of rpm building
related files that still have it, but I was hesitant to do so.

Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
2019-03-14 09:01:30 -04:00
473f28aa0d slirp4netns: use --disable-host-loopback
Closes: https://github.com/containers/libpod/issues/2642

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-03-14 13:59:10 +01:00
296c61d896 Merge pull request #2638 from jwhonce/issue/1959
Corrected detach man pages and code comments
2019-03-14 05:49:24 -07:00