Commit graph

1570 commits

Author SHA1 Message Date
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
haircommander edffded1fb Change pod varlink API.
Change way to PodContainerErrors are handled

Remove PodNoContainers and PodHasContainers, because there is no way to differentiatefrom a standard error

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

Closes: #1275
Approved by: mheon
2018-08-16 20:31:50 +00:00
haircommander 67f79eaf73 Moved getPodStatus to pod API to be used in varlink
Signed-off-by: haircommander <pehunt@redhat.com>

Closes: #1275
Approved by: mheon
2018-08-16 20:31:50 +00:00
Daniel J Walsh 37e3f47ef3 Vendor in latest containers/psgo code
This fixes a couple of issues with podman top.

podman top --latest USER HUSER

Now shows you the User inside of the containers usernamespace as well as the user on the host.

podman top --latest capeff capbnd

Now has headings that differentiatiate between the Capabiltiies.  We also have support for
ambient capabilities.

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

Closes: #1286
Approved by: vrothberg
2018-08-16 18:28:44 +00:00
Daniel J Walsh d20f3a5146 switch projectatomic to containers
Need to get some small changes into libpod to pull back into buildah
to complete buildah transition.

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

Closes: #1270
Approved by: mheon
2018-08-16 17:12:36 +00:00
Giuseppe Scrivano c0abfaa7c3 Revert "spec: bind mount /sys only for rootless containers"
It breaks "podman  run --net=host --uidmap=0:1:70000 --gidmap=0:20000:70000 busybox echo hi"

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

Closes: #1285
Approved by: rhatdan
2018-08-16 16:02:32 +00:00
Qi Wang 1003df3444 Suport format param for varlink Commit
We need to pass the image format OCI or docker  in the varlink commit command.

Signed-off-by: Qi Wang <qiwan@redhat.com>

Closes: #1281
Approved by: mheon
2018-08-16 15:35:28 +00:00
haircommander fee9f180fe Fix segfault in top when -l and no args are passed
Signed-off-by: haircommander <pehunt@redhat.com>

Closes: #1284
Approved by: mheon
2018-08-16 15:12:53 +00:00
Daniel J Walsh dda3a742f2 Document STORAGE_DRIVER and STORAGE_OPTS environment variable
Default settings for storage can be overriden by setting these environment
variables.

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

Closes: #1282
Approved by: mheon
2018-08-16 14:12:42 +00:00
Valentin Rothberg 7855d0ac71 podman.spec: recommend slirp4netns
Fixes: #1234
Signed-off-by: Valentin Rothberg <vrothberg@suse.com>
2018-08-16 08:05:27 +02:00
Matthew Heon 1387bc9cdb Do not 'make all' on Travis for Linux
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #1266
Approved by: baude
2018-08-15 18:07:04 +00:00
Matthew Heon 74cf870792 Fix build on non-Linux OSes
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #1266
Approved by: baude
2018-08-15 18:07:04 +00:00
Matthew Heon 0998808a75 Create pod CGroups when using the systemd cgroup driver
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #1266
Approved by: baude
2018-08-15 18:07:04 +00:00
Matthew Heon ad7d469571 Switch systemd default CGroup parent to machine.slice
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #1266
Approved by: baude
2018-08-15 18:07:04 +00:00
Giuseppe Scrivano 0ddb42b4f7 spec: bind mount /sys only for rootless containers
root can always mount a new instance.

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

Closes: #1279
Approved by: rhatdan
2018-08-15 15:30:15 +00:00