2240 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
69a741817b Test regressions against the RPM spec file
We need to make sure we dont break the RPM spec files week-to-week.  If we do, the
packagers need to have a place to look at what changes are needed to the SPEC so
they can pull the changes into the distributions.

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

Closes: #1230
Approved by: rhatdan
2018-08-07 20:23:53 +00:00
7d43e7c451 Pass DESTDIR down to python Makefile
In order to get a cleaner build out of the rpms we should
pass down the DESTDIR to the python Makefiles.  Then we
can use them instead of hard coding other inteligence into
the spec files.

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

Closes: #1214
Approved by: baude
2018-08-07 14:52:30 +00:00
0f1086cf7c Add dpkg support for returning oci/conmon versions
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #1224
Approved by: baude
2018-08-07 14:16:26 +00:00
33d6221ae3 Have info print conmon/oci runtime information
We need into to identify the OCI runtime and conmon used by podman.

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

Closes: #1224
Approved by: baude
2018-08-07 14:16:26 +00:00
b1de943eea Better pull error for fully-qualified images
When pulling a fully-qualified image that fails, we should not be talking about
registries/search registries in the the error message as it is not applicable.  If
a image that is fq'd and fails to pull, the error should be simplified.

```
$ sudo podman pull this-does-not-exist.example.com/foo
Trying to pull this-does-not-exist.example.com/foo...Failed
error pulling image "this-does-not-exist.example.com/foo": unable to pull this-does-not-exist.example.com/foo: unable to pull image, or you do not have pull access
$
```

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

Closes: #1216
Approved by: mheon
2018-08-06 20:34:29 +00:00
e90909735c Stub varlink pod methods.
Signed-off-by: haircommander <pehunt@redhat.com>

Closes: #1196
Approved by: baude
2018-08-06 17:32:29 +00:00
606b5f9a61 Remove inotify work around
PR#1215 fixed issue with podman blowing up inotify

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

Closes: #1222
Approved by: baude
2018-08-06 16:58:26 +00:00
bd9d3a8fa5 Rename varlink socket and interface
io.projectatomic.podman -> io.podman

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

Closes: #1204
Approved by: mheon
2018-08-06 14:49:11 +00:00
ee89bc46eb Merge pull request #1220 from baude/coprgitrev
Change tarball filename in copr prepare and match short-commit length
2018-08-06 08:55:05 -05:00
3c20bb0e70 Change tarball filename in copr prepare and match short-commit length
Signed-off-by: baude <bbaude@redhat.com>
2018-08-06 08:45:34 -05:00
99a37afc3a Add Runc and Conmon versions to Podman Version
It will be handy to know the runc and conmon versions as our
code gets into the wild.

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

Closes: #1207
Approved by: rhatdan
2018-08-05 23:19:47 +00:00
5acbbf03e3 Merge pull request #1218 from baude/coprupdatespec
update copr spec, lets get it building again
2018-08-05 12:29:49 -05:00
9987dd961b update copr spec, lets get it building again
Signed-off-by: baude <bbaude@redhat.com>
2018-08-05 11:38:21 -05:00
54eec54b2a Add missing dependencies to build system
Signed-off-by: Jhon Honce <jhonce@redhat.com>

Closes: #1199
Approved by: rhatdan
2018-08-05 11:06:18 +00:00
47620961fe Port to MacOS
* Refactor Tunnel to support selecting port for remote sshd
* Refactor ssh tunnel to support MacOS version of ssh
* Refactor Tunnel.close() to find and kill off zombie siblings
* Add psutil dependency
* Add logging setup, letting library produce debugging records
* Clean up Tunnel API
* Fix test_runner.sh to propagate returncode to caller

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

Closes: #1199
Approved by: rhatdan
2018-08-05 11:06:18 +00:00
a1e3e542ff Make one runtime for the varlink service
Rather than making a runtime each time a client hits a varlink endpoint, we now
make a single runtime when the varlink service starts up.  This fixes a problem
where we hit a max inotify limit from CNI.

Resolves: #1211

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

Closes: #1215
Approved by: rhatdan
2018-08-05 10:43:32 +00:00
debf23c72a Merge pull request #1213 from mheon/bump-0.8.1
Bump to 0.8.1
2018-08-03 14:47:08 -04:00
650a199b1f Bump gitvalidation epoch
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-08-03 14:46:15 -04:00
11264dabda Bump to v0.8.2-dev
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-08-03 14:46:15 -04:00
6b4ab2a2b4 Bump to v0.8.1
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
v0.8.1
2018-08-03 14:46:11 -04:00
7462ebe830 Vendor in latest github.com/projectatomic/buildah
This adds support for Dockerfile.in and fixes some limits
issues on docker build

Also adds support for podman build to read Dockerfile from stdin.

cat Dockerfile | podman build -f - .

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

Closes: #1209
Approved by: mheon
2018-08-03 14:39:07 +00:00
a83f54e9c7 Update gitvalidation epoch
Signed-off-by: Matthew Heon <mheon@redhat.com>

Closes: #1210
Approved by: rhatdan
2018-08-03 14:31:55 +00:00
71af51e723 Check for missing arguments in /proc/self/cmdline
Closes: #1206
Approved by: giuseppe
2018-08-03 07:39:25 +00:00
26b9b17d27 Added ps --pod option
Signed-off-by: haircommander <pehunt@redhat.com>

Closes: #1205
Approved by: rhatdan
2018-08-02 20:39:06 +00:00
20155657ec clarify pull error message
when pulling, we can fail to find an image (i.e. it doesn't exist) or we
can not have authority/access to pull it.  the registries don't tell us
one way or another so the error message needs to cover both.

Resolves #1194

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

Closes: #1195
Approved by: rhatdan
2018-08-02 19:53:50 +00:00
13b1845214 rootless: do not set setgroups to deny when using newuidmap
It is required only when directly configuring the user namespace.

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

Closes: #1200
Approved by: rhatdan
2018-08-02 18:49:55 +00:00