Commit Graph

4237 Commits

Author SHA1 Message Date
f02a9cd975 Handle removing containers with active exec sessions
For containers without --force set, an error will be returned

For containers with --force, all pids in the container will be
stopped, first with SIGTERM and then with SIGKILL after a timeout
(this mimics the behavior of stopping a container).

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

Closes: 
Approved by: baude
2018-03-01 21:17:51 +00:00
70baafc1c7 Ensure that Cleanup() will not run on active containers
This ensures that containers with active exec sessions will not
have storage unmounted under them or network namespaces destroyed

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

Closes: 
Approved by: baude
2018-03-01 21:17:51 +00:00
8b87a17f56 Add tracking for exec session IDs
Exec sessions now have an ID generated and assigned to their PID
and stored in the database state. This allows us to track what
exec sessions are currently active.

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

Closes: 
Approved by: baude
2018-03-01 21:17:51 +00:00
aea4f24919 Remove now-unused runc launch code
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: 
Approved by: baude
2018-03-01 21:17:50 +00:00
345bfafee2 Rework exec to enable splitting to retrieve exec PID
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: 
Approved by: baude
2018-03-01 21:17:50 +00:00
2a0c949b9b Add tracking for container exec sessions to DB
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: 
Approved by: baude
2018-03-01 21:17:50 +00:00
920b66707e Small fixes to container Exec
Fix an error message, and always set Privileged if the container
is also privileged.

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

Closes: 
Approved by: baude
2018-03-01 21:17:50 +00:00
11091041c2 docs/podman-info.1.md update man page
update man page with example outputs.  tidy up the man page
where applicable.

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

Closes: 
Approved by: rhatdan
2018-03-01 17:59:08 +00:00
cb7b0edc5b Fix checks for configuration keys in the DB
Currently, we will error if the DB is configured with the default
containers/storage config, and then opened by a libpod which has
explicitly set the defaults. This is due to us using an empty
config by default (to tell c/storage to use its defaults).

This patch changes our handling so that unset storage config
(using the default) and explicitly setting the defaults are both
compatible.

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

Closes: 
Approved by: baude
2018-03-01 14:16:55 +00:00
e038393cf5 Remove unused vendor github.com/coreos/pkg
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: 
Approved by: rhatdan
2018-03-01 13:20:16 +00:00
4e20f8c434 Remove unused vendor github.com/mrunalp/fileutils
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: 
Approved by: rhatdan
2018-03-01 13:20:16 +00:00
2537d0dd00 Remove unused vendor gopkg.in/fsnotify.v1
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: 
Approved by: rhatdan
2018-03-01 13:20:16 +00:00
b2a5d5aa5a Remove unused vendor github.com/containerd/console
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: 
Approved by: rhatdan
2018-03-01 13:20:16 +00:00
d6ed9451dc Remove unused dependency vendor gopkg.in/tomb.v1
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: 
Approved by: rhatdan
2018-03-01 13:20:16 +00:00
72b975ee3b Remove unused runc files
We no longer use runc code to read network I/O usage. This lets
us remove a lot of vendored code.

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

Closes: 
Approved by: rhatdan
2018-03-01 13:20:16 +00:00
b1ae92fa67 Update containers/storage
New pinned commit is 477e551dd493e5c80999d3690d3a201fd26ba2f1

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

Closes: 
Approved by: rhatdan
2018-03-01 13:20:16 +00:00
33d63429e4 Merge pull request from baude/coproutdir
copr outdir
2018-02-28 19:44:41 -06:00
17266e9c75 copr outdir
Signed-off-by: baude <bbaude@redhat.com>
2018-02-28 19:43:55 -06:00
db388c23ea Fix travis notifications
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: 
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 

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

Closes: 
Approved by: mheon
2018-02-28 21:26:46 +00:00
3d5cb8e223 Merge pull request 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: 
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 

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

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

Closes: 
Approved by: mheon
2018-02-27 22:32:56 +00:00
d9cf162215 Merge pull request 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: 
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 
Signed-off-by: baude <bbaude@redhat.com>

Closes: 
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 

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

Closes: 
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 

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

Closes: 
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: 
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 

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

Closes: 
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 
Resolves Issue 

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

Closes: 
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: 
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: 
Approved by: rhatdan
2018-02-24 09:15:47 +00:00
1d9539337b Merge pull request 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: 
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: 
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: 
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: 
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: 
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: 
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: 
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: 
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: 
Approved by: rhatdan
2018-02-22 14:49:36 +00:00
cef3979203 Fix gofmt
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: 
Approved by: rhatdan
2018-02-22 14:49:36 +00:00