8269 Commits

Author SHA1 Message Date
db388c23ea Fix travis notifications
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #424
Approved by: mheon
2018-02-28 22:15:13 +00:00
fd388a7da9 podman info add registries
add registries and insecure registries to the podman info output.  this gives us
some capatibility with other container runtimes.

Resolves issue #420

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

Closes: #422
Approved by: mheon
2018-02-28 21:26:46 +00:00
3d5cb8e223 Merge pull request #419 from baude/coprgit
Re-enable copr builds
2018-02-28 13:18:09 -06:00
45478b7843 Re-enable copr builds
New structure for copr builds which hopefully is more stable

Signed-off-by: baude <bbaude@redhat.com>
2018-02-28 13:08:35 -06:00
85ece8a01f Tweak info time format
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>

Closes: #397
Approved by: rhatdan
2018-02-28 18:06:50 +00:00
7ffc89d71a podman stats add networking
Add networking information to podman stats output.  Also correct an issue filed
where memory constraints of the cgroup were not reflected in the stats output. And
finally, fix issue with PID count.

Resolves issue #364

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

Closes: #417
Approved by: mheon
2018-02-28 16:46:29 +00:00
2a59653bf3 CNIPluginDir: check "/usr/lib/cni"
Also consider "/usr/lib/cni" as a potential directory for CNI plugins.
On some distributions, e.g., on openSUSE, %{_libexecdir} evaluates to
"/usr/lib".

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

Closes: #416
Approved by: mheon
2018-02-28 14:48:26 +00:00
afbb2a7f23 remove build alias
Signed-off-by: Seth Jennings <sjenning@redhat.com>

Closes: #413
Approved by: mheon
2018-02-27 22:32:56 +00:00
d9cf162215 Merge pull request #411 from baude/coprgitfix
copr make file change
2018-02-27 13:56:01 -06:00
13a40109de copr make file change
account for a shift in copr builds that need to use an exact commit

Signed-off-by: baude <bbaude@redhat.com>
2018-02-27 13:54:52 -06:00
683dc89baf (minor) correct misspellings in man pages
Signed-off-by: Ed Santiago <santiago@redhat.com>

Closes: #410
Approved by: baude
2018-02-27 18:59:10 +00:00
6cb1c31d3f Restrict top output to container's pids only
Due to the way ps arguments work, it was possible to display pids
that dont below to the container in top output. We now filter pids
that dont belong to the container out of the output.  This also means
the pid column must be present in the output or we throw an error.

This resolves issue #391
Signed-off-by: baude <bbaude@redhat.com>

Closes: #400
Approved by: rhatdan
2018-02-26 23:41:47 +00:00
f47a5be60d ps displays incorrect exit code
The exit code should be derived in the batch operation and pulled
from the batchinfo struct.

Resolves issue #407

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

Closes: #408
Approved by: rhatdan
2018-02-26 23:18:36 +00:00
e5ddf34e64 podman load dont panic when no repotags
When performing a podman load, if there were no repotags in the image, podman would panic. In
the case that the incoming image does have repotags, it should be imported as a none:none image
so it can still be used by the user.

Resolves issue #403

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

Closes: #405
Approved by: baude
2018-02-26 22:30:44 +00:00
9f7643c364 Add ubuntu paths
The packages in Lokesh's ppa that is currently used for podman puts the
conmon and runc binaries in /usr/lib/crio/bin/conmon and /usr/lib/cri-o-runc/sbin/runc
respectively.

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

Closes: #406
Approved by: baude
2018-02-26 20:37:30 +00:00
6831db7f10 Do not override user mounts
Podman should not override users mounts with default mounts
for /etc/hostname, /etc/resolv.conf, and /etc/hosts.

Resolves issue #388

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

Closes: #401
Approved by: mheon
2018-02-26 18:46:44 +00:00
b351b12e27 Tagging an image alias by shortname
When trying to tag an alias (tag) of an image using only the shortname
and no tag, we were unable to find the image in storage.  This corrects
that issue and adds an integration test to protect against regression. I
also updated the man page per the filed issue.

While writing the integration test, I discovered that inspect could also
not find a tagged image without its :tag.

Resolves Issue #385
Resolves Issue #384

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

Closes: #398
Approved by: mheon
2018-02-26 18:28:54 +00:00
5e7979f016 Address review comments
Review comments to delete WithNoNew function and its append.

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

Closes: #369
Approved by: rhatdan
2018-02-24 09:15:47 +00:00
831dc48883 Add support for --no-new-privs
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #369
Approved by: rhatdan
2018-02-24 09:15:47 +00:00
1d9539337b Merge pull request #396 from mheon/bump_022
Bump version to 0.2.2 and dev version to 0.2.3-dev
2018-02-23 13:04:12 -06:00
3a8764a9c9 Bump version to v0.2.3-dev
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-02-23 13:59:46 -05:00
525e3b17e4 Bump release to v0.2.2
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
v0.2.2
2018-02-23 13:58:30 -05:00
e97ca5bd38 podman ps json output use batched ops
The podman ps command for non-json targets has the ability to use a "batched" function
which limits the use of locks needed.  The collection of output for JSON should use
this too.

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

Closes: #380
Approved by: rhatdan
2018-02-23 17:56:51 +00:00
fd79671d05 CreateContainerStorage by image id
When creating container storage by name, if that name is a tagged image then the storage
could not be found.  We now use the image id which seems more reliable. Also added an
integration test to protect against regression.

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

Closes: #393
Approved by: mheon
2018-02-23 17:44:28 +00:00
16ed0baf65 Move Hostname accessor to more logical place
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #386
Approved by: baude
2018-02-23 04:25:47 +00:00
eafbe76ebe Refactor spec generation in libpod into a function
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #386
Approved by: baude
2018-02-23 04:25:47 +00:00
8eadc208e1 Remove No New Privs from DB as it's already in the spec
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #383
Approved by: rhatdan
2018-02-22 21:22:39 +00:00
6a4fcb168a Vendor in latest containers/image
This fixes the blob and config names in the dir transport by removing the .tar extension

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

Closes: #382
Approved by: rhatdan
2018-02-22 20:39:06 +00:00
89110f682d Add accessors to all container config and state fields
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #381
Approved by: rhatdan
2018-02-22 19:59:54 +00:00
3d395767d8 Implement --image-volumes for create and run
--image-volumes tells podman what to do with the image volumes in the image config
There are 3 options: bind, tmpfs, and ignore
bind puts the volume contents in /var/lib/containers/storage/container-id/volumes/vol-dir
and bind mounts it into the container at /vol-dir
tmpfs mounts /vol-dir as a tmps into the container
ignore doesn't mount the image volumes onto the container

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

Closes: #377
Approved by: rhatdan
2018-02-22 15:14:00 +00:00
7a7a6c2d79 Remove unnecessary booleans
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #361
Approved by: rhatdan
2018-02-22 14:49:36 +00:00
cef3979203 Fix gofmt
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #361
Approved by: rhatdan
2018-02-22 14:49:36 +00:00
8ce7c5bdd1 Make operations on pod containers as a group independent
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #361
Approved by: rhatdan
2018-02-22 14:49:36 +00:00
7c51fa05a2 Fix gofmt
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #361
Approved by: rhatdan
2018-02-22 14:49:36 +00:00
0838c2b984 Add ability to start containers in a pod
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #361
Approved by: rhatdan
2018-02-22 14:49:36 +00:00
86930c829e Add kill and stop for pods
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #361
Approved by: rhatdan
2018-02-22 14:49:36 +00:00
0b4c8fc2bb Add pod status command
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #361
Approved by: rhatdan
2018-02-22 14:49:36 +00:00
b8d1ce03a1 Add tests and cleanup
- Added run_cgroup_parent_test.go
- Cleaned up calls to logrus

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

Closes: #370
Approved by: rhatdan
2018-02-22 12:39:08 +00:00
a58e9f7cee Push up createConfig.CgroupParent processing to parent
Signed-off-by: Jhon Honce <jhonce@redhat.com>

Closes: #370
Approved by: rhatdan
2018-02-22 12:39:08 +00:00
8a97671145 Corrected comment
Signed-off-by: Jhon Honce <jhonce@redhat.com>

Closes: #370
Approved by: rhatdan
2018-02-22 12:39:08 +00:00
3f004df384 Implement podman run option --cgroup-parent
Example:

sudo /usr/local/bin/podman run --cgroup-parent=/zzz fedora cat /proc/self/cgroup

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

Closes: #370
Approved by: rhatdan
2018-02-22 12:39:08 +00:00
f1f0f37dc1 Correct exit code 126 and 127
The exit codes for 126 and 127 were reversed.  For the record, the exit
codes used are as follows:

* 125 if ‘chroot’ itself fails
* 126 if COMMAND is found but cannot be invoked
* 127 if COMMAND cannot be found

This resolves issue #367

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

Closes: #378
Approved by: baude
2018-02-21 16:49:00 +00:00
6ce70a33c5 Inspect output should be in array form
Inspect should be able to inspect one or more containers depending
on the user input.  Therefore, inspect output should be in array
format so the consumer could potentially iterate it.  This PR allows
users to specify one more or containers|images|or a mix for
inspection.  The output, as stated, is therefore in array form.  This
holds true even for a singular image.

In the case that the user enters an invalid container|image "name", we
handle that gracefully.  Podman will output json for the valid names
until it reaches the invalid one.  For example:

In this case, podman will out the json for alpine and then print an
error about 123 being invalid.  It will not continute onto busybox.
This behavior imatates docker.

This addresses issue #360

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

Closes: #371
Approved by: baude
2018-02-21 14:22:36 +00:00
e929e7de4c Add --time alias to manpages
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #375
Approved by: rhatdan
2018-02-21 13:32:59 +00:00
4803b5a639 Alias --time to --timeout for 'podman stop'
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #375
Approved by: rhatdan
2018-02-21 13:32:59 +00:00
4929e37507 Performance enhancement for podman images
Previous code was using slow routines to collect some of the information
needed to output images.  Specifically size was being calculated instead
of using the cached, already known size already available.  Also, straight-
lined several of the code paths.  Overall assessment is that these
improvements cut the time for images in half.

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

Closes: #365
Approved by: mheon
2018-02-20 21:54:32 +00:00
df7bf04dc6 Resolve contention between copr and fedora repos
In order for the podman in podman tests to work, we need to install a copr
RPM that has the function we need (and is not in a fedora build yet).  Because
the copr rpms are not versioned correctly (relative to the fedora ones), we now
set the version in the copr rpm.

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

Closes: #368
Approved by: mheon
2018-02-20 16:18:11 +00:00
8f8fd1d900 Fix podman save when redirecting output
podman save would write the progress bar to the image tar file
when the output was redirected with >.
Fixed the writer to write to stderr for all commands using writer

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

Closes: #362
Approved by: mheon
2018-02-20 15:16:28 +00:00
8eb5cf7489 Ensure we don't repeatedly poll disk for exit codes
Change logic for refreshing our state using runc to only poll
for conmon exit files when we first transition to the Stopped
state. After that, we should already have the exit code stored in
the database, so we don't need to look it up again.

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

Closes: #363
Approved by: TomSweeneyRedHat
2018-02-20 14:54:13 +00:00
8d8817e61e Update c/image to 701221f0891d76aeac3f25912e6bb9f84e88de1c
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #358
Approved by: TomSweeneyRedHat
2018-02-20 09:11:33 +00:00