Commit graph

1566 commits

Author SHA1 Message Date
Jhon Honce 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
Giuseppe Scrivano 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
Valentin Rothberg 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
Valentin Rothberg 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
Valentin Rothberg 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
Daniel J Walsh 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
baude 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
Matthew Heon 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
Matthew Heon 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
Matthew Heon 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
Matthew Heon 44987a5e71 Bump gitvalidation epoch
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-08-11 15:14:53 -04:00
Matthew Heon 4dc6ece826 Bump to v0.8.3-dev
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-08-11 15:14:52 -04:00
Matthew Heon f38eb4fe50 Bump to v0.8.2.1
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-08-11 15:14:51 -04:00
Matthew Heon 7d116f5f73
Merge pull request #1254 from mheon/systemd_cgroups_default
Switch default CGroup manager to systemd
2018-08-11 15:07:29 -04:00
Matthew Heon 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
Matthew Heon a9b73abf8f Further fix tests
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-08-11 09:46:48 -04:00
Daniel J Walsh 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
Daniel J Walsh 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
Daniel J Walsh 7a526bbf9e Bump to v0.8.2
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #1256
Approved by: rhatdan
2018-08-10 22:27:35 +00:00
Daniel J Walsh 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
Matthew Heon 9c42e84173 Fix python tests again
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-08-10 16:18:44 -04:00
Matthew Heon f4d124da93 Fix python tests to use cgroupfs
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-08-10 15:48:35 -04:00
Matthew Heon f77906932b Fix typo breaking tests
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-08-10 15:35:09 -04:00
baude 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
Matthew Heon ab4f190f41 Force cgroupfs for python tests
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-08-10 14:32:28 -04:00
Matthew Heon 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
Matthew Heon 3d7e401d4e Swap default CGroup manager to systemd
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-08-10 14:09:46 -04:00
Matthew Heon 4b4fba0b44 Only use cgroupfs for containerized tests
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-08-10 13:57:54 -04:00
Matthew Heon 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
Matthew Heon 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
Matthew Heon 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
Valentin Rothberg 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
Matthew Heon 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
Matthew Heon 589a5d2d3e Don't require .gopathok for individual FFJSON targets
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #1240
Approved by: rhatdan
2018-08-09 15:54:34 +00:00
Matthew Heon 7df49bc677 Add FFJSON generation to makefile
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #1240
Approved by: rhatdan
2018-08-09 15:54:34 +00:00
Matthew Heon 3a6bd89f64 Re-add FFJSON for container and pod structs
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #1240
Approved by: rhatdan
2018-08-09 15:54:34 +00:00
haircommander bf468571dd Fixed a bug setting dependencies on the wrong container
Signed-off-by: haircommander <pehunt@redhat.com>

Closes: #1244
Approved by: mheon
2018-08-09 15:16:22 +00:00
Daniel J Walsh a44641d46b Always connect to the stdout and stderr of stream
If the stdout and stderr are not attach, podman will at least get
a messsage that the container has completed and finish.

This fixes the
`podman run -a stdin fedora true`

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

Closes: #1239
Approved by: mheon
2018-08-09 14:14:40 +00:00
Valentin Rothberg 4c63fcc59a apparmor: respect "unconfined" setting
The "unconfined" profile must be treated specially to turn off apparmor
confinement and to avoid applying any other profile.

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

Closes: #1241
Approved by: mheon
2018-08-09 12:25:15 +00:00
Valentin Rothberg e9b23f7cca oci.go: syslog: fix debug formatting
Signed-off-by: Valentin Rothberg <vrothberg@suse.com>

Closes: #1242
Approved by: rhatdan
2018-08-09 12:24:24 +00:00
baude 06fafe4cd0 add podman pod inspect
first pass of podman pod inspect

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

Closes: #1236
Approved by: rhatdan
2018-08-09 11:06:32 +00:00
haircommander 879453eaf1 Fix ambiguity in adding localhost to podman save
...and some naming decisions.

This change ensures podman save doesn't incorrectly prepend localhost when saving an image.

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

Closes: #1140
Approved by: rhatdan
2018-08-08 21:04:11 +00:00
Matthew Heon 9bd991f477 Fix CGroupFS cgroup manager cgroup creation for pods
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #1237
Approved by: rhatdan
2018-08-08 21:03:20 +00:00
Matthew Heon bb45de5605 Update Conmon commit for testing
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #1232
Approved by: rhatdan
2018-08-08 19:23:41 +00:00
Matthew Heon b01ddc7b09 Pass newly-added --log-level flag to Conmon
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #1232
Approved by: rhatdan
2018-08-08 19:23:41 +00:00
Daniel J Walsh d1257b1a0b Cleanup man pages
podman does not support nocopy so remove reference in the man page.

podman build now supports --isolation, so add documentation.

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

Closes: #1225
Approved by: TomSweeneyRedHat
2018-08-08 13:34:14 +00:00
Matthew Heon 71793f9f8a Improve ps handling of container start/stop time
Previously all calculations were done based off the container's
start time. Retrieve end time and use it to calculate time
stopped for containers.

Also, convert ps JSON output to report timestamps for create,
start, and stop times.

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

Closes: #1228
Approved by: rhatdan
2018-08-08 12:37:51 +00:00
Giuseppe Scrivano 9e06478d83 rootless: fix user lookup if USER= is not set
Lookup the current username by UID if the USER env variable is not
set.

Reported in: https://github.com/projectatomic/libpod/issues/1092

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

Closes: #1217
Approved by: rhatdan
2018-08-08 09:27:27 +00:00
baude 14b6106c7b enabled copr epel builds again
centos/epel does not understand the Recommends tag

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

Closes: #1231
Approved by: rhatdan
2018-08-08 09:03:08 +00:00
baude e94ae35be9 Handle yum and dnf
Signed-off-by: baude <bbaude@redhat.com>

Closes: #1227
Approved by: rhatdan
2018-08-07 20:46:09 +00:00