summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* refactor top codeValentin Rothberg2020-01-15
| | | | | | | | 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>
* top: use a separate pipe for the error streamValentin Rothberg2020-01-15
| | | | | | | Let's not mix apples and oranges and give stderr a dedicated pipe. This way, we don't return conmon log messages if run in debug mode. Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
* v2 api: top improvementsValentin Rothberg2020-01-15
| | | | | | | | * Use `pkg/adapter` to increase code reuse and reduce code redundancy. * Extend swagger docs to mention AIX descriptors. * Document the libpod endpoint which shares the same handler. Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
* Merge pull request #4872 from vrothberg/v2-statsOpenShift Merge Robot2020-01-15
|\ | | | | v2 api: stats improvements
| * v2: stats: drop redundant sleep when streamingValentin Rothberg2020-01-15
| | | | | | | | | | | | Also remove the redundant stats handler in libpod. Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
| * v2: stats: libpod: use generic handlerValentin Rothberg2020-01-15
| | | | | | | | | | | | | | The docker and libpod endpoints provide the same functionality, so we can use the same handler. Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
| * v2: stats: rigorous error checksValentin Rothberg2020-01-15
| | | | | | | | | | | | Also expect the container to be running. Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
| * v2: stats: fix errorsValentin Rothberg2020-01-15
| | | | | | | | | | | | Also add some comments. Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
| * v2: stats: do not ignore errorsValentin Rothberg2020-01-15
| | | | | | | | | | | | | | We must check all errors and handle them properly. Otherwise, we can run into nil dereferences ultimately killing the service. Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
| * v2: stats: remove windows-specific fieldsValentin Rothberg2020-01-15
| | | | | | | | | | | | | | `NumProcs` and `StorageStats` are windows specific and are not popoulated on Linux. Hence, we can safely remove them. Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
* | Merge pull request #4859 from giuseppe/not-change-permission-for-rundir-tmpdirOpenShift Merge Robot2020-01-15
|\ \ | |/ |/| oci_conmon: not make accessible dirs if not needed
| * oci_conmon: not make accessible dirs if not neededGiuseppe Scrivano2020-01-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | do not change the permissions mask for the rundir and the tmpdir when running a container with a user namespace and the current user is mapped inside the user namespace. The change was introduced with 849548ffb8e958e901317eceffdcc2d918cafd8d, that dropped the intermediate mount namespace in favor of allowing root into the user namespace to access these directories. Closes: https://github.com/containers/libpod/issues/4846 Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
* | Merge pull request #4866 from TomSweeneyRedHat/dev/tsweeney/buildah1.13.1OpenShift Merge Robot2020-01-15
|\ \ | | | | | | Bump to Buildah v1.13.1
| * | Bump to Buildah v1.13.1TomSweeneyRedHat2020-01-14
| | | | | | | | | | | | Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
* | | Merge pull request #4806 from vrothberg/seccompOpenShift Merge Robot2020-01-15
|\ \ \ | | | | | | | | policy for seccomp-profile selection
| * | | policy for seccomp-profile selectionValentin Rothberg2020-01-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implement a policy for selecting a seccomp profile. In addition to the default behaviour (default profile unless --security-opt seccomp is set) add a second policy doing a lookup in the image annotation. If the image has the "io.containers.seccomp.profile" set its value will be interpreted as a seccomp profile. The policy can be selected via the new --seccomp-policy CLI flag. Once the containers.conf support is merged into libpod, we can add an option there as well. Note that this feature is marked as experimental and may change in the future. Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
| * | | shared/create.go: s/data/imageData/Valentin Rothberg2020-01-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Rename `data` to `imageData` to make it more obvious which kind of data the variable refers to. Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
* | | | Merge pull request #4867 from baude/servicefixOpenShift Merge Robot2020-01-14
|\ \ \ \ | |_|/ / |/| | | [CI:DOCS]swagger corrections
| * | | [CI:DOCS]swagger correctionsbaude2020-01-14
|/ / / | | | | | | | | | Signed-off-by: baude <bbaude@redhat.com>
* | | Merge pull request #4858 from vrothberg/enable-lintersOpenShift Merge Robot2020-01-14
|\ \ \ | | | | | | | | make lint: extend checks
| * | | .gitignore: ingore *.coverprofile from unit testsValentin Rothberg2020-01-14
| | | | | | | | | | | | | | | | Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
| * | | make lint: include unit testsValentin Rothberg2020-01-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Include the unit tests (i.e., _test.go files) for linting to make the tests more robust and enforce the linters' coding styles etc. Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
| * | | .golangci.yml: move swagger.go from MakefileValentin Rothberg2020-01-14
| | | | | | | | | | | | | | | | Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
| * | | make lint: include docs/Valentin Rothberg2020-01-14
| | | | | | | | | | | | | | | | Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
| * | | make lint: include pkg/tracingValentin Rothberg2020-01-14
| | |/ | |/| | | | | | | Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
* | | Merge pull request #4843 from baude/apiv2swagger4OpenShift Merge Robot2020-01-14
|\ \ \ | |/ / |/| | swagger documentation updates
| * | swagger documentation updatesbaude2020-01-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | adhere closer to the spec by using description and summary fields and also ensuring that the id is unique to avoid collision between generic and libpod endpoints. also, make swagger output work with redoc which seems to display our information better for our needs. Signed-off-by: baude <bbaude@redhat.com>
* | | Merge pull request #4855 from rhatdan/codespellOpenShift Merge Robot2020-01-13
|\ \ \ | | | | | | | | revert accidental change from codespell pr.
| * | | revert accidental change from codespell pr.Daniel J Walsh2020-01-13
|/ / / | | | | | | | | | | | | | | | This should use `od` not `of` Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* | | Merge pull request #4845 from baude/pruneforceOpenShift Merge Robot2020-01-13
|\ \ \ | | | | | | | | clarify cont
| * | | clarify container prune --forcebaude2020-01-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the --force parameter should only be used for the CLI and should only dictate whether to prompt the user for confirmation. Fixes: #4844 Signed-off-by: baude <bbaude@redhat.com>
* | | | Merge pull request #4850 from vrothberg/fix-lintingOpenShift Merge Robot2020-01-13
|\ \ \ \ | | | | | | | | | | Fix linting
| * | | | gating: clean /go/bin to install fresh toolsValentin Rothberg2020-01-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Once the gating image doesn't ship with pre-installed tools, we can remove the workaround. Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
| * | | | make lint: enable gocriticValentin Rothberg2020-01-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `gocritic` is a powerful linter that helps in preventing certain kinds of errors as well as enforcing a coding style. Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
| * | | | linter: blacklist linters instead of whitelistingValentin Rothberg2020-01-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Blacklist linters instead of whitelisting them. This way, we will benefit from new linters when updating and it's easier to actually find and fix open issues. Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
| * | | | bump golangci-lint to 1.18.0Valentin Rothberg2020-01-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The latest versions have regressions in --skip-dirs where some linters will still run and error out. Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
| * | | | rm contrib/perftestValentin Rothberg2020-01-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Perftest was intended to be used for testing CPU intensive tasks of Podman. However, it does not compile for a long while and is not integrated in the CI which clearly indicates that it has not been used for a considerable amount of time. Remove contrib/perftest entirely. If the desire arises to revive it, all code is still reachable in the git history. Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
| * | | | remove `.tool/lint`Valentin Rothberg2020-01-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We should only use `make golangci-lint` which is also used in `make validate`. However, we need to enable more linters which we can do step by step in future commits. Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
* | | | | Merge pull request #4853 from mheon/do_not_configure_with_slirpOpenShift Merge Robot2020-01-13
|\ \ \ \ \ | | | | | | | | | | | | Do not configure CNI when slirp4netns is requested
| * | | | | Do not configure CNI when slirp4netns is requestedMatthew Heon2020-01-13
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Our networking code bakes in a lot of assumptions about how networking should work - that CNI is *always* used with root, and that slirp4netns is *always* used only with rootless. These are not safe assumptions. This fixes one particular issue, which would cause CNI to also be run when slirp4netns was requested as root. Fixes: #4687 Signed-off-by: Matthew Heon <mheon@redhat.com>
* | | | | Merge pull request #4817 from rhatdan/codespellOpenShift Merge Robot2020-01-13
|\ \ \ \ \ | |/ / / / |/| | | | Add codespell to validate spelling mistakes in code.
| * | | | Add codespell to validate spelling mistakes in code.Daniel J Walsh2020-01-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix all errors found by codespell Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* | | | | Merge pull request #4694 from openSUSE/history-names-in-inspectOpenShift Merge Robot2020-01-13
|\ \ \ \ \ | | | | | | | | | | | | Add history names to image inspect data
| * | | | | Add history names to image inspect dataSascha Grunert2019-12-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | During writing the tests I found it would be probably useful to have the tag history part of the inspect data. Signed-off-by: Sascha Grunert <sgrunert@suse.com>
* | | | | | Merge pull request #4836 from cevich/upd_base_metaOpenShift Merge Robot2020-01-13
|\ \ \ \ \ \ | | | | | | | | | | | | | | Cirrus: Fix libpod base images going stale
| * | | | | | Cirrus: Fix libpod base images going staleChris Evich2020-01-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | VM Base images are used as a starting point for runtime VM images. The in-use VM base images should never be pruned, which is an operation that potentially occurs periodically from automation running on the master branch of the libpod repo. However the only place which updates timestamps (blocking pruning) of base images, occurs during runtime VM image building. Therefor, if images are not regularly rebuilt, it's possible their base images go stale and are pruned. Changes: * Add freshly-produced base images (old ones got pruned) * Wrap the timestamp update script to include base image names in the update list. Notes: * Regularly updating base image timestamps only needs to happen on the libpod repo's meta task, since all base images live there. * Using a wrapper is needed to maintain compatibility with multiple versions of the imgts container image used by other repos / branchs. Signed-off-by: Chris Evich <cevich@redhat.com>
* | | | | | | Merge pull request #4841 from markstos/issue-4840-improve-privileged-docsOpenShift Merge Robot2020-01-13
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | docs: --privileged docs completeness, consistency
| * | | | | | | docs: --privileged docs completeness, consistencyMark Stosberg2020-01-12
| | |_|/ / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As discussed in https://github.com/containers/libpod/issues/4840 Signed-off-by: Mark Stosberg <mark@rideamigos.com>
* | | | | | | Merge pull request #4823 from vrothberg/gen-systemdOpenShift Merge Robot2020-01-12
|\ \ \ \ \ \ \ | |_|_|_|/ / / |/| | | | | | podman-generate-systemd --new
| * | | | | | podman-generate-systemd --newValentin Rothberg2020-01-09
| | |_|_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a --new flag to podman-generate-systemd to create a new container via podman-run instead of starting an existing container. Creating a new container presents the challenge to find a reverse mapping from a container to the CLI flags it can be created with. We are doing this via `(Container).Config.CreateCommand` field, which includes a copy of the process' command from procFS at creating time. This field may not be useful when the container was not created via the Podman CLI (e.g., via a Python script). Hence, we do not guarantee the correctness of the generated files. Signed-off-by: Valentin Rothberg <rothberg@redhat.com>