Commit graph

12 commits

Author SHA1 Message Date
Daniel J Walsh a5e37ad280
Switch all references to github.com/containers/libpod -> podman
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-07-28 08:23:45 -04:00
Valentin Rothberg 8489dc4345 move go module to v2
With the advent of Podman 2.0.0 we crossed the magical barrier of go
modules.  While we were able to continue importing all packages inside
of the project, the project could not be vendored anymore from the
outside.

Move the go module to new major version and change all imports to
`github.com/containers/libpod/v2`.  The renaming of the imports
was done via `gomove` [1].

[1] https://github.com/KSubedi/gomove

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2020-07-06 15:50:12 +02:00
Brent Baude 4d895dcb54 v2podman attach and exec
add the ability to attach to a running container.  the tunnel side of this is not enabled yet as we have work on the endpoints and plumbing to do yet.

add the ability to exec a command in a running container.  the tunnel side is also being deferred for same reason.

Signed-off-by: Brent Baude <bbaude@redhat.com>
2020-04-05 15:54:51 -05:00
Matthew Heon 118e78c5d6 Add structure for new exec session tracking to DB
As part of the rework of exec sessions, we need to address them
independently of containers. In the new API, we need to be able
to fetch them by their ID, regardless of what container they are
associated with. Unfortunately, our existing exec sessions are
tied to individual containers; there's no way to tell what
container a session belongs to and retrieve it without getting
every exec session for every container.

This adds a pointer to the container an exec session is
associated with to the database. The sessions themselves are
still stored in the container.

Exec-related APIs have been restructured to work with the new
database representation. The originally monolithic API has been
split into a number of smaller calls to allow more fine-grained
control of lifecycle. Support for legacy exec sessions has been
retained, but in a deprecated fashion; we should remove this in
a few releases.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2020-03-18 11:02:14 -04:00
Valentin Rothberg 9d54815c26 refactor top code
Move the top logic from pkg/adapter into the (*libpod.Container).Top().
This way, we drop the dependency from pkg/api on pkg/adapters and have
a clearer separation of concerns.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2020-01-15 17:08:22 +01:00
Matthew Heon c2284962c7 Add support for launching containers without CGroups
This is mostly used with Systemd, which really wants to manage
CGroups itself when managing containers via unit file.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-09-10 10:52:37 -04:00
baude 8561b99644 libpod removal from main (phase 2)
this is phase 2 for the removal of libpod from main.

Signed-off-by: baude <bbaude@redhat.com>
2019-06-27 07:56:24 -05:00
Giuseppe Scrivano e85b33fb04
rootless: fix top huser and hgroup
when running in rootless mode, be sure psgo is honoring the user
namespace settings for huser and hgroup.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-05-23 14:45:17 +02:00
Valentin Rothberg 0d2d523390 top: fallback to execing ps(1)
Fallback to executing ps(1) in case we hit an unknown psgo descriptor.
This ensures backwards compatibility with docker-top, which was purely
ps(1) driven.

Also support comma-separated descriptors as input.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2019-05-03 11:20:16 +02:00
baude c4dd7c5813 enable podman remote top
add the ability for the remote client to display a container's running
processes.

Signed-off-by: baude <bbaude@redhat.com>
2019-04-25 14:44:14 -05:00
Valentin Rothberg 159f7f179b vendor latest containers/psgo
Signed-off-by: Valentin Rothberg <vrothberg@suse.com>

Closes: #1162
Approved by: rhatdan
2018-07-26 17:01:40 +00:00
Valentin Rothberg ba1871dac0 podman-top: use containers/psgo
Use github.com/containers/psgo instead of execing `ps (1)`.  The psgo
library enables a much more flexible interface with respect to which
data to be printed (e.g., capabilities, seccomp mode, PID, PCPU, etc.)
while the output can be parsed reliably.  The library does not use
ps (1) but parses /proc and /dev instead.  To list the processes of a
given container, psgo will join the mount namespace of the given
container and extract all data from there.

Notice that this commit breaks compatibility with docker-top.

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

Closes: #1113
Approved by: rhatdan
2018-07-19 20:47:52 +00:00