1533 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
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
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
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
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
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
883aea51a3 build, rootless: specify IsolationOCIRootless
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>

Closes: #1269
Approved by: rhatdan
2018-08-15 11:40:30 +00:00
e2b96e96f9 vendor: update buildah version
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>

Closes: #1269
Approved by: rhatdan
2018-08-15 11:40:30 +00:00
cd7102a70e Fix handling of hostname in --net=host
Hostname should be set to the hosts hostname when network is none.

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

Closes: #1274
Approved by: giuseppe
2018-08-15 11:38:18 +00:00
77baae25ce Updated pod_api to reflect function spec
Specifically, pod.Start() always returned CtrErrors, even if none failed. This cause podman start to not return the successfully started pod id.
Also, pod.Kill() didn't return an error along with ctrErrors.

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

Closes: #1272
Approved by: rhatdan
2018-08-14 21:49:33 +00:00
3445abd89d Add create and pull commands
* Rename id_ to ident, make non-PEP8'ers happier
* Fix bug where port was required on local connections
* Improve error messages for exceptions

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

Closes: #1246
Approved by: rhatdan
2018-08-14 18:25:51 +00:00
a04ce6893b rootless: not require userns for help/version
these commands do not require to be root in an userns

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

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

Closes: #1268
Approved by: vrothberg
2018-08-14 14:33:31 +00:00
9563f31437 pkg/apparmor: use a pipe instead of a tmp file
Use a pipe instead of a temporary file to load the apparmor profile.
This change has a measurable speed improvement for apparmor users.

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

Closes: #1262
Approved by: mheon
2018-08-14 14:25:14 +00:00
973c9e6ba6 pkg/apparmor: move data under Linux/apparmor buildtags
Move all Linux-related data under the corresponding buildtags to reduce
the memory footprint and speed up compilation for non-apparmor builds.

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

Closes: #1262
Approved by: mheon
2018-08-14 14:25:14 +00:00
31e0dea5a0 pkg/apparmor: move all linux-code into apparmor_linux*
For easier maintenance and clearer structure of the code.

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

Closes: #1262
Approved by: mheon
2018-08-14 14:25:14 +00:00
70b4484811 podman in rootless mode will only work with cgroupfs at this point.
If user does not pass in cgroup manager and running in rootless mode,
then we need to force the cgroupfs support until/unless we get support
for rootless systemd support.

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

Closes: #1261
Approved by: mheon
2018-08-14 02:23:33 +00:00
5d7b31da73 when searching, survive errors for multiple registries
when searching multiple registries for images, if we get an error on one
of the searches, we should keep going and complete the search.  if there
is only one search registry however, we will return an error.

Resolves: #1255

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

Closes: #1257
Approved by: mheon
2018-08-14 01:59:53 +00:00
8dd755fbf5 Remove unused function in runtime.go
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #1264
Approved by: mheon
2018-08-14 01:37:36 +00:00
e3190cbed7 Fix papr tests by forcing cgroupfs in CI
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #1267
Approved by: mheon
2018-08-14 01:10:46 +00:00
3d55721fc4 Merge pull request #1259 from mheon/bump-0.8.2.1
Bump to 0.8.2.1
2018-08-11 15:16:00 -04:00
44987a5e71 Bump gitvalidation epoch
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-08-11 15:14:53 -04:00
4dc6ece826 Bump to v0.8.3-dev
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-08-11 15:14:52 -04:00
f38eb4fe50 Bump to v0.8.2.1
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
v0.8.2.1
2018-08-11 15:14:51 -04:00
7d116f5f73 Merge pull request #1254 from mheon/systemd_cgroups_default
Switch default CGroup manager to systemd
2018-08-11 15:07:29 -04:00
3ef9279cec Ensure pod inspect is locked and validity-checked
Also, don't return the internal podState struct - instead return
a public inspect struct.

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

Closes: #1258
Approved by: rhatdan
2018-08-11 18:13:06 +00:00
a9b73abf8f Further fix tests
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-08-11 09:46:48 -04:00
029d5aad56 Bump gitvalidation epoch
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #1256
Approved by: rhatdan
2018-08-10 22:27:35 +00:00
86410523dc Bump to v0.8.3-dev
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #1256
Approved by: rhatdan
2018-08-10 22:27:35 +00:00
7a526bbf9e Bump to v0.8.2
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #1256
Approved by: rhatdan
v0.8.2
2018-08-10 22:27:35 +00:00
92e9d7891e We need to sort mounts so that one mount does not over mount another.
Currently we add mounts from images, volumes and internal.
We can accidently over mount an existing mount.  This patch sorts the mounts
to make sure a parent directory is always mounted before its content.

Had to change the default propagation on image volume mounts from shared
to private to stop mount points from leaking out of the container.

Also switched from using some docker/docker/pkg to container/storage/pkg
to remove some dependencies on Docker.

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

Closes: #1243
Approved by: mheon
2018-08-10 21:18:19 +00:00
9c42e84173 Fix python tests again
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-08-10 16:18:44 -04:00
f4d124da93 Fix python tests to use cgroupfs
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-08-10 15:48:35 -04:00
f77906932b Fix typo breaking tests
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-08-10 15:35:09 -04:00
8b2d38ee84 search name should include registry
When doing a podman search, the so-called NAME should be the image's
fully qualified name (not index plus shortname).

```
$ sudo podman search rhel7
INDEX        NAME                                                            DESCRIPTION                                       STARS   OFFICIAL   AUTOMATED
redhat.com   registry.access.redhat.com/rhel7/rhel                           This platform image provides a minimal runti...   0
redhat.com   registry.access.redhat.com/rhel7.0                              This platform image provides a minimal runti...   0
redhat.com   registry.access.redhat.com/rhel7                                This platform image provides a minimal runti...   0
....
```

Resolves: #1208
Resolves: Bugz #1614710

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

Closes: #1253
Approved by: rhatdan
2018-08-10 18:43:56 +00:00
ab4f190f41 Force cgroupfs for python tests
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-08-10 14:32:28 -04:00
ccbaa15de1 Split pod.go into 3 files
This removes anything but structs and simple accessors from
pod.go itself, which is a target file for FFJSON generation. This
should reduce the amount of times FFJSON needs to run.

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

Closes: #1247
Approved by: rhatdan
2018-08-10 18:14:31 +00:00
3d7e401d4e Swap default CGroup manager to systemd
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-08-10 14:09:46 -04:00
4b4fba0b44 Only use cgroupfs for containerized tests
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-08-10 13:57:54 -04:00
8dad23857c Temporarily force all tests to use cgroupfs driver
TODO: Change this to only force cgroupfs if if we are in a
container.

Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-08-10 13:52:47 -04:00
7366697175 Make errors during refresh nonfatal
During refresh, we cannot hard-fail, as that would mean leaving a
partially-configured state behind, leaving libpod unable to start
without manual intervention.

Instead, log errors refreshing individual containers and pods and
continue. Individual containers and pods may be unusable and need
to be removed manually, but libpod itself will continue to
function.

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

Closes: #1252
Approved by: rhatdan
2018-08-10 17:49:09 +00:00
71c28c7cda Add batch check to container stats lock
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #1249
Approved by: rhatdan
2018-08-10 15:00:33 +00:00
c27b7cdc93 removeContainer: fix deadlock
When checking if the container has already been removed, use
c.state.HasContainer() instead of the runtime's API to avoid
trying to take the already acquired lock.

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

Closes: #1251
Approved by: baude
2018-08-10 13:26:58 +00:00
38b3abf915 Add FFJSON to build container
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #1248
Approved by: TomSweeneyRedHat
2018-08-09 19:49:32 +00:00