38 Commits

Author SHA1 Message Date
c53638e9f6 Podman info add support for status of cgroup controllers
Signed-off-by: flouthoc <flouthoc.git@gmail.com>
2021-05-25 15:19:03 -04:00
18cb17ffeb Use seccomp_profile as default profile if defined in containers.conf
Edits `podman info` to provide the default seccomp profile
detected in the output

Signed-off-by: Pablo Correa Gómez <ablocorrea@hotmail.com>
2021-04-28 15:19:48 +02:00
5dded6fae7 bump go module to v3
We missed bumping the go module, so let's do it now :)

* Automated go code with github.com/sirkon/go-imports-rename
* Manually via `vgrep podman/v2` the rest

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-02-22 09:03:51 +01:00
69ab67bf90 Enable golint linter
Use the golint linter and fix the reported problems.

[NO TESTS NEEDED]

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2021-02-11 23:01:49 +01:00
04b43ccf64 Add Security information to podman info
When debugging issues, it would be helpful to know the
security settings of the system running into the problem.
Adding security info to `podman info` is also useful to users.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-12-22 08:13:14 -05:00
f00cc25a7c Drop default log-level from error to warn
Our users are missing certain warning messages that would
make debugging issues with Podman easier.

For example if you do a podman build with a Containerfile
that contains the SHELL directive, the Derective is silently
ignored.

If you run with the log-level warn you get a warning message explainging
what happened.

$ podman build --no-cache -f /tmp/Containerfile1 /tmp/
STEP 1: FROM ubi8
STEP 2: SHELL ["/bin/bash", "-c"]
STEP 3: COMMIT
--> 7a207be102a
7a207be102aa8993eceb32802e6ceb9d2603ceed9dee0fee341df63e6300882e

$ podman --log-level=warn build --no-cache -f /tmp/Containerfile1 /tmp/
STEP 1: FROM ubi8
STEP 2: SHELL ["/bin/bash", "-c"]
STEP 3: COMMIT
WARN[0000] SHELL is not supported for OCI image format, [/bin/bash -c] will be ignored. Must use `docker` format
--> 7bd96fd25b9
7bd96fd25b9f755d8a045e31187e406cf889dcf3799357ec906e90767613e95f

These messages will no longer be lost, when we default to WARNing level.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-12-03 06:28:09 -05:00
99386c7ae7 Include cgroup manager in podman info output
This is very useful for debugging cgroups v2, especially on
rootless - we need to ensure people are correctly using systemd
cgroups in these cases.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2020-09-22 13:15:01 -04:00
526f01cdf5 Fix up errors found by codespell
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-09-11 06:14:25 -04:00
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
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
c21258b70e Add podman static build
We’re now able to build a static podman binary based on a custom nix
derivation. This is integrated in cirrus as well, whereas a later target
would be to provide a self-contained static binary bundle which can be
installed on any Linux x64-bit system.

Fixes: https://github.com/containers/libpod/issues/1399

Signed-off-by: Sascha Grunert <sgrunert@suse.com>
2020-05-11 13:11:07 +02:00
ad27532b6c Eliminate race condition on podman info
There is a potential of a race condition where
a container is removed while podman is looking
up information on the total containers.  This can
cause podman info to fail with an error
"no such container".

This change ignores the failure.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-05-05 13:33:41 -04:00
62803f8d3b Add version to podman info command
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-04-15 21:30:56 -04:00
e20ecc733c refactor info
the current implementation of info, while typed, is very loosely done so.  we need stronger types for our apiv2 implmentation and bindings.

Signed-off-by: Brent Baude <bbaude@redhat.com>
2020-04-06 12:45:42 -05:00
4352d58549 Add support for containers.conf
vendor in c/common config pkg for containers.conf

Signed-off-by: Qi Wang qiwan@redhat.com
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-03-27 14:36:03 -04:00
79d05b99cf Merge pull request #4220 from mheon/null_runtime
Move OCI runtime implementation behind an interface
2019-10-11 20:55:37 +02:00
6f630bc09b Move OCI runtime implementation behind an interface
For future work, we need multiple implementations of the OCI
runtime, not just a Conmon-wrapped runtime matching the runc CLI.

As part of this, do some refactoring on the interface for exec
(move to a struct, not a massive list of arguments). Also, add
'all' support to Kill and Stop (supported by runc and used a bit
internally for removing containers).

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-10-10 10:19:32 -04:00
3fff42e0ab show uid_map in podman info
show uid_map gid_map in podman info

Signed-off-by: Qi Wang <qiwan@redhat.com>
2019-10-09 21:27:18 -04:00
b40e44ac1a info: add cgroups2
Closes: https://github.com/containers/libpod/issues/4080

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-09-30 21:38:00 +02:00
b2b284111e Return information about mount_program (fuse-overlayfs)
We want to get podman info to tell us about the version of
the mount program to help us diagnose issues users are having.

Also if in rootless mode and slirp4netns is installed reveal package
info on slirp4netns.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-09-06 07:32:42 -04:00
63eef5a234 add eventlogger to info
to help with future debugging, we now display the type of event logger
being used inside podman info -> host.

Signed-off-by: baude <bbaude@redhat.com>
2019-08-02 20:05:27 -05:00
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
92bae8d308 Begin adding support for multiple OCI runtimes
Allow Podman containers to request to use a specific OCI runtime
if multiple runtimes are configured. This is the first step to
properly supporting containers in a multi-runtime environment.

The biggest changes are that all OCI runtimes are now initialized
when Podman creates its runtime, and containers now use the
runtime requested in their configuration (instead of always the
default runtime).

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-06-19 17:08:43 -04:00
a5443a532b vendor buildah, image, storage, cni
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2019-03-28 15:12:26 +01:00
0d697573a6 Add path for named volumes to podman info
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-02-26 09:38:02 -05:00
650cf122e1 libpod: allow multiple oci runtimes
This deprecates the libpod.conf variable of `runtime_path=`, and now has
`runtimes=`, like a map for naming the runtime, preparing for a
`--runtime` flag to `podman run` (i.e. runc, kata, etc.)

Reference: https://github.com/containers/libpod/issues/1750

Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2019-01-14 10:03:40 +01:00
b367855d5f Add the configuration file used to setup storage to podman info
Users have no idea what storage configuration file is used to setup
storage, so adding this to podman info, should make it easier to
discover.

This requires a revendor of containers/storage

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-01-07 10:02:26 -05:00
652a985998 podman build is not using the default oci-runtime
Currently if the user installs runc in an alternative path
podman run uses it but podman build does not.

This patch will pass the default oci runtime to be used by podman
down to the image builder.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2018-12-28 12:36:25 -05:00
615df2ecd7 info: add rootless field
Add a rootless field to the info data (e.g., `podman info`) to indicate
if the executing user is root or not.  In most cases, this can be
guessed but now it is clear and may aid in debugging, reporting and
understanding certain issues.

Signed-off-by: Valentin Rothberg <vrothberg@suse.com>
2018-11-09 09:41:57 +01:00
6db7027e97 Add buildah version and distribution to info
For the sake of debug and problem reporting, we would benefit from knowing
what buildah version was vendored into podman.  Also, knowing the distribution
and distribution version would also be handy.

Signed-off-by: baude <bbaude@redhat.com>
2018-09-28 10:48:16 -05:00
d20f3a5146 switch projectatomic to containers
Need to get some small changes into libpod to pull back into buildah
to complete buildah transition.

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

Closes: #1270
Approved by: mheon
2018-08-16 17:12:36 +00:00
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
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
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
684b544e9c Spell check strings and comments
Signed-off-by: Jhon Honce <jhonce@redhat.com>

Closes: #831
Approved by: rhatdan
2018-05-25 08:45:15 +00: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
635deb6358 Change uptime format in podman info to human-readable
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #355
Approved by: rhatdan
2018-02-19 19:19:07 +00:00
5330d3da7c Update kpod info to use new libpod api
Signed-off-by: umohnani8 <umohnani@redhat.com>

Closes: #124
Approved by: mheon
2017-12-14 00:54:21 +00:00