Commit graph

1584 commits

Author SHA1 Message Date
Daniel J Walsh e7fbf329c2 Reveal information about container capabilities
I am often asked about the list of capabilities availabel to a container.
We should be listing this data in the inspect command for effective
capabilities and the bounding set.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #1335
Approved by: TomSweeneyRedHat
2018-08-24 12:16:19 +00:00
umohnani8 16465007d0 Vendor in latest projectatomic/buildah
Fixes to podman build for unknown image and ADD with url
when doing --layers.

Signed-off-by: umohnani8 <umohnani@redhat.com>

Closes: #1330
Approved by: mheon
2018-08-23 19:11:09 +00:00
haircommander 4c00dc66df Refactor error checking in With*NSFromPod options
Signed-off-by: haircommander <pehunt@redhat.com>

Closes: #1187
Approved by: mheon
2018-08-23 18:16:28 +00:00
haircommander 0e6266858a Fixing network ns segfault
As well as small style corrections, update pod_top_test to use CreatePod, and move handling of adding a container to the pod's namespace from container_internal_linux to libpod/option.

Signed-off-by: haircommander <pehunt@redhat.com>

Closes: #1187
Approved by: mheon
2018-08-23 18:16:28 +00:00
haircommander 2a7449362f Change pause container to infra container
Signed-off-by: haircommander <pehunt@redhat.com>

Closes: #1187
Approved by: mheon
2018-08-23 18:16:28 +00:00
haircommander 697b46430a Support pause containers in varlink
Signed-off-by: haircommander <pehunt@redhat.com>

Closes: #1187
Approved by: mheon
2018-08-23 18:16:28 +00:00
haircommander d5e690914d Added option to share kernel namespaces in libpod and podman
A pause container is added to the pod if the user opts in. The default pause image and command can be overridden. Pause containers are ignored in ps unless the -a option is present. Pod inspect and pod ps show shared namespaces and pause container. A pause container can't be removed with podman rm, and a pod can be removed if it only has a pause container.

Signed-off-by: haircommander <pehunt@redhat.com>

Closes: #1187
Approved by: mheon
2018-08-23 18:16:28 +00:00
haircommander 63dd200e7e Changed GetContainerStats to return ErrCtrStateInvalid
This results in some functionality changes:

If a ErrCtrStateInvalid is returned to GetPodStats, the container is ommitted from the stats.
As such, if an empty slice of Container stats are returned to GetPodStats in varlink, an error will occur.
GetContainerStats will return the ErrCtrStateInvalid as well.
Finally, if ErrCtrStateInvalid is returned to the podman stats call, the container will be ommitted from the stats.

Signed-off-by: haircommander <pehunt@redhat.com>

Closes: #1319
Approved by: baude
2018-08-23 15:58:08 +00:00
haircommander 3df6332a65 Add GetPodStats to varlink
Signed-off-by: haircommander <pehunt@redhat.com>

Closes: #1319
Approved by: baude
2018-08-23 15:58:08 +00:00
Lokesh Mandvekar 7310697b73 rpm-spec: update distro-specific dependencies
remove slirp4netns as hard dep as it isn't available on rhel7.

Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>

Closes: #1328
Approved by: baude
2018-08-23 15:29:47 +00:00
haircommander 88df4ea0f9 Add podman pod top
Using the vendored changes from psgo, incorporate JoinNamespaceAndProcessInfoByPids to get process information for each pid namespace of running containers in the pod. Also added a man page, and tests.

Signed-off-by: haircommander <pehunt@redhat.com>

Closes: #1298
Approved by: mheon
2018-08-23 15:01:17 +00:00
haircommander 6c253d0055 Include pod stats and top in commands/completions
Signed-off-by: haircommander <pehunt@redhat.com>

Closes: #1298
Approved by: mheon
2018-08-23 15:01:17 +00:00
haircommander f11020702d Vendor changes to psgo
Signed-off-by: haircommander <pehunt@redhat.com>

Closes: #1298
Approved by: mheon
2018-08-23 15:01:17 +00:00
Daniel J Walsh c32074fa4f Fix syntax description of --ulimit command
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #1327
Approved by: vrothberg
2018-08-23 12:49:45 +00:00
Matthew Heon e0c2fcadd2 Swap test image in exec test to fedora for useradd
We need a useradd binary in the container for this test, so swap
from Alpine to fedora-minimal.

Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #1315
Approved by: vrothberg
2018-08-23 12:07:59 +00:00
Matthew Heon c3ec44b5a7 Add tests for exec --user
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #1315
Approved by: vrothberg
2018-08-23 12:07:59 +00:00
Matthew Heon c276a13880 Properly translate users into runc format for exec
Runc exec expects the --user flag to be formatted as UID:GID.
Use chrootuser code to translate whatever user is passed to exec
into this format.

Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #1315
Approved by: vrothberg
2018-08-23 12:07:59 +00:00
Giuseppe Scrivano 4a95ef4a4e test: ad more tests for rootless containers
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>

Closes: #1323
Approved by: umohnani8
2018-08-22 20:32:27 +00:00
Giuseppe Scrivano 77bcc89d52 rootless: fix --net host --privileged
Closes: https://github.com/containers/libpod/issues/1313

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>

Closes: #1323
Approved by: umohnani8
2018-08-22 20:32:27 +00:00
Matthew Heon b4420e22fc Fix a bug with hook ALWAYS matching with a process
When a non-nil process was used and a hook was set to match
always, this would not actually match. Fix this.

Fixes: #1308

Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #1311
Approved by: rhatdan
2018-08-22 11:48:43 +00:00
haircommander 149481a571 Fixed segfault in stats where container had netNS none or from container
Signed-off-by: haircommander <pehunt@redhat.com>

Closes: #1306
Approved by: rhatdan
2018-08-21 15:37:39 +00:00
haircommander 021027a24b Enable pod stats with short ID and name
Signed-off-by: haircommander <pehunt@redhat.com>

Closes: #1307
Approved by: rhatdan
2018-08-21 14:34:08 +00:00
TomSweeneyRedHat 7e94fbb493 Touch up cert-dir in man pages
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>

Closes: #1312
Approved by: rhatdan
2018-08-21 14:29:15 +00:00
Kunal Kushwaha 803dbf2041 make dbuild fixed on ubuntu/debian
Signed-off-by: Kunal Kushwaha <kushwaha_kunal_v7@lab.ntt.co.jp>

Closes: #1309
Approved by: mheon
2018-08-21 12:52:27 +00:00
Valentin Rothberg 40a60500ea vendor latest github.com/urfave/cli
Change from an external patched branch to the upstream master. The
vendored code is indentical to the previous one.

Signed-off-by: Valentin Rothberg <vrothberg@suse.com>

Closes: #1310
Approved by: mheon
2018-08-21 12:51:13 +00:00
Jhon Honce 75588a4333 Add retry decorator for flakey tests
* Update doc strings

Signed-off-by: Jhon Honce <jhonce@redhat.com>

Closes: #1302
Approved by: baude
2018-08-20 21:07:09 +00:00
Jhon Honce 937398abcf Update error message from reviews
Signed-off-by: Jhon Honce <jhonce@redhat.com>

Closes: #1296
Approved by: rhatdan
2018-08-20 15:26:09 +00:00
Jhon Honce 3bfe07b4f5 Support Attach subcommand in pypodman
* Fix some random error handling

Signed-off-by: Jhon Honce <jhonce@redhat.com>

Closes: #1296
Approved by: rhatdan
2018-08-20 15:26:09 +00:00
Daniel J Walsh 462c503a47 Fix handling of devices
Devices are supposed to be able to be passed in via the form of

--device /dev/foo
--device /dev/foo:/dev/bar
--device /dev/foo:rwm
--device /dev/foo:/dev/bar:rwm

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #1299
Approved by: umohnani8
2018-08-20 13:42:07 +00:00
Micah Abbott e40c99a19e tutorial: point to containers/skopeo
Signed-off-by: Micah Abbott <miabbott@redhat.com>

Closes: #1300
Approved by: mheon
2018-08-18 15:19:23 +00:00
Micah Abbott aac2bcb63e point to containers/skopeo
Signed-off-by: Micah Abbott <miabbott@redhat.com>

Closes: #1300
Approved by: mheon
2018-08-18 15:19:23 +00:00
Micah Abbott a1ec7ff58d install.md: point to containers/libpod
Signed-off-by: Micah Abbott <miabbott@redhat.com>

Closes: #1300
Approved by: mheon
2018-08-18 15:19:23 +00:00
Matthew Heon 8b7eb299ec
Merge pull request #1297 from mheon/bump-0.8.3
Bump to 0.8.3
2018-08-17 15:48:48 -04:00
Matthew Heon 0443127c62 Bump gitvalidation epoch
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-08-17 15:47:19 -04:00
Matthew Heon 4068ec82b8 Bump to v0.8.4-dev
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-08-17 15:47:18 -04:00
Matthew Heon 9d09a4d449 Bump to v0.8.3
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-08-17 15:47:12 -04:00
Matthew Heon 33f95b9ef8 Make failure to retrieve individual ctrs/pods nonfatal
This ensures that we can still use Podman even if a container or
pod with bad config JSON makes it into the state. We still can't
remove these containers, but at least we can do our best to make
things usable.

Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #1294
Approved by: rhatdan
2018-08-17 19:10:21 +00:00
Matthew Heon 76915d5ffd Mention that systemd is the default cgroup manager
Update docs to reflect our changed default CGroup manager.

Fixes: #1292

Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #1293
Approved by: baude
2018-08-17 18:27:46 +00:00
Jhon Honce 95c7d20142 Add dependency for python3-psutil module
Signed-off-by: Jhon Honce <jhonce@redhat.com>

Closes: #1290
Approved by: baude
2018-08-17 18:12:11 +00:00
Daniel J Walsh 57e1600315 Vendor in latest buildah and imagebuilder
We want to add the latest support for COPY --chown UID:GID.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #1289
Approved by: TomSweeneyRedHat
2018-08-17 11:40:46 +00:00
Daniel J Walsh 89a9750b6d Don't fail on size.
I think a created container which was never run will have no size struct
we should just return 0

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #1288
Approved by: TomSweeneyRedHat
2018-08-17 09:02:10 +00:00
Daniel J Walsh cd73f77414 Fix handling of socket connection refusal.
Currently if the socket was never started you get an error about
the service being started.  But if the service was started and later
stopped, you get a useless error.

This change causes the error to always be the same for connection refused.

The error message was also repeating the address twice which looked bad.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #1287
Approved by: baude
2018-08-17 08:41:19 +00:00
Giuseppe Scrivano 50afe5b031 podman: fix --uts=host
Do not set any hostname value in the OCI configuration when --uts=host
is used and the user didn't specify any value.  This prevents an error
from the OCI runtime as it cannot set the hostname without a new UTS
namespace.

Differently, the HOSTNAME environment variable is always set.  When
--uts=host is used, HOSTNAME gets the value from the host.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>

Closes: #1280
Approved by: baude
2018-08-17 08:17:43 +00:00
baude bf741b3ea3 podman pod stats
add the ability to monitor container statistics in a pod.

Signed-off-by: baude <bbaude@redhat.com>

Closes: #1265
Approved by: rhatdan
2018-08-17 07:55:36 +00:00
Daniel J Walsh 1b87fbc591
Merge pull request #1271 from vrothberg/recommend-slirp4netns
podman.spec: recommend slirp4netns
2018-08-16 16:58:39 -04:00
haircommander c4fadaba6b Added helper function for libpod pod api calls
Signed-off-by: haircommander <pehunt@redhat.com>

Closes: #1275
Approved by: mheon
2018-08-16 20:31:50 +00:00
haircommander 309a2a15ae CreatePod args now PodCreate structure
Signed-off-by: haircommander <pehunt@redhat.com>

Closes: #1275
Approved by: mheon
2018-08-16 20:31:50 +00:00
haircommander a51eb1e70f Added reason to PodContainerError
Signed-off-by: haircommander <pehunt@redhat.com>

Closes: #1275
Approved by: mheon
2018-08-16 20:31:50 +00:00
haircommander 8d5e0108d7 Change batchcontainer to shared
To better reflect it's usage: to share functions between podman and varlink.

Signed-off-by: haircommander <pehunt@redhat.com>

Closes: #1275
Approved by: mheon
2018-08-16 20:31:50 +00:00
haircommander 0059989783 Add Pod API to varlink.
Including: GetPod, StartPod, StopPod, RestartPod, KillPod, PausePod, UnpausePod, CreatePod, RemovePod, and InspectPod

Signed-off-by: haircommander <pehunt@redhat.com>

Closes: #1275
Approved by: mheon
2018-08-16 20:31:50 +00:00