10027 Commits

Author SHA1 Message Date
cd6c4cb0af Merge pull request #8438 from MarcoPolo/marco/set-path-for-systemd-healthcheck
Set PATH env in systemd timer.
2020-11-23 21:33:05 +01:00
5d55285188 Merge pull request #8409 from mlegenovic/master
Docker compat API fixes
2020-11-23 21:17:05 +01:00
e772ef0f92 Merge pull request #8416 from Luap99/shell-completion
more shell completion improvements
2020-11-23 19:38:59 +01:00
4b9b3783c7 Merge pull request #8451 from Luap99/fix-subnet-range
Fix ip-range for classless subnet masks
2020-11-23 19:34:41 +01:00
a8cb43d3a9 Set PATH env in systemd timer.
This fixes an issue where binaries that are in the path of the original
podman process are not found in the transient systemd timer for
healthchecks.

This showed up for me on a NixOS machine since binaries are not installed
in the usual places.

Signed-off-by: Marco Munizaga <git@marcopolo.io>
2020-11-23 10:26:02 -08:00
c61802e69b Merge pull request #8440 from psakar/fix-8433
APIv2 - wrong command and args for created container
2020-11-23 19:15:20 +01:00
54d1329e43 Merge pull request #8450 from containers/dependabot/go_modules/github.com/containers/common-0.29.0
Bump github.com/containers/common from 0.27.0 to 0.29.0
2020-11-23 19:11:31 +01:00
10c2c839c0 Merge pull request #8446 from Luap99/podman-container-ps
Add podman container ps command
2020-11-23 19:09:45 +01:00
6f7b7060e8 [WIP] Docker compat API fixes
These are the first fixes that are needed for development environments like
Eclipse or IntelliJ that have Docker plug-ins and use the Docker API to speak
with container engine (#7857)

Signed-off-by: Milivoje Legenovic <m.legenovic@gmail.com>
2020-11-23 17:45:24 +01:00
dd343418ce Merge pull request #8263 from rhatdan/restart
Allow containers to --restart on-failure with --rm
2020-11-23 13:44:37 +01:00
818162155a shell completions: remove usage of ShellCompDirectiveError
If we return `ShellCompDirectiveError` to the shell the shell will
provide path completion. In none of that cases we want path completion
so it will be better to return `ShellCompDirectiveNoFileComp` instead
and log the error in case we need it.

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2020-11-23 13:18:42 +01:00
2e8ed5edf7 more shell completion improvements
* podman image ls --filter
* podman network ls --filter
* podman volume ls --filter
* podman network connect/disconnect
* podman events --filter

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2020-11-23 13:18:34 +01:00
ac55bd1f67 Merge pull request #8449 from vrothberg/top-docs
[CI:DOCS] clarify ps(1) fallback of `podman top`
2020-11-23 12:53:31 +01:00
70e7acdb23 Fix ip-range for classless subnet masks
The `LastIPInSubnet` function worked only for classful subnet
masks (e.g. /8, /16, /24). For non standard subnet masks this
returned the wrong ip address.

This works now for all subnet mask. A unit test is added to
ensure this.

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2020-11-23 11:55:29 +01:00
79ab19ab8b Merge pull request #8436 from Luap99/remote-completion
Enable remote shell completion without a running endpoint
2020-11-23 11:50:45 +01:00
3344afde72 Bump github.com/containers/common from 0.27.0 to 0.29.0
Bumps [github.com/containers/common](https://github.com/containers/common) from 0.27.0 to 0.29.0.
- [Release notes](https://github.com/containers/common/releases)
- [Commits](https://github.com/containers/common/compare/v0.27.0...v0.29.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-11-23 05:45:25 -05:00
c901a766fb Add podman container ps command
This command exists in docker and is also in our documentation.

Also remove mentions of `podman ls` or `podman list`. These
commands do not exists in podman or docker.

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2020-11-23 10:49:26 +01:00
5d9647a120 clarify ps(1) fallback of podman top
Podman top falls back to executing ps(1) inside the container in the
presence of ps-specific flags.  Clarify that a bit more to help users
resolve issues when, for instance, ps(1) isn't installed in the
container.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2020-11-23 10:35:52 +01:00
c989c193bc APIv2 - create container sets wrong entrypoint
use nil instead of empty string as default value for entrypoint in ContainerCLIOpts -
empty string signifies user wants to override image entry point value

Signed-off-by: Petr Sakař <petr.sakar@chare.eu>
2020-11-22 14:36:40 +01:00
5292d5a7b8 Merge pull request #8429 from psakar/fix-json-capabilities
APIv2 - strip CAP_ prefix from capabilities in inspect container json
2020-11-21 10:32:28 +01:00
b30ca110ec Merge pull request #8410 from Luap99/fix-multiple-networks
Allow multiple --network flags for podman run/create
2020-11-21 02:11:22 +01:00
bff3bd610a Merge pull request #8435 from FreedomBen/fix-replace-command-typo
Specify what the replace flag replaces in help text
2020-11-21 02:09:34 +01:00
bf11bb769f Enable remote shell completion without a running endpoint
The problem is that we always unconditionally setup up the
`ContainerEngine/ImageEngine`. This requires an running
endpoint. Most completions (e.g. flag names) do not need
them and should not fail. This commit makes sure we only
setup the engines as needed in the completions.

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2020-11-20 23:00:24 +01:00
64dd15e53f Specify what the replace flag replaces in help text
The word "name" appears to have been missed in the help output for:

    podman pod create --help

This patch fixes that

Signed-off-by: Benjamin Porter <FreedomBen@users.noreply.github.com>
2020-11-20 14:33:29 -07:00
b4b4fa07a9 Merge pull request #8431 from mheon/networks_returns_default
Make c.networks() list include the default network
2020-11-20 22:07:32 +01:00
41c88a6608 Merge pull request #8423 from psakar/fix-8418
REST API v2 - list of images - mandatory Created attribute
2020-11-20 22:05:50 +01:00
435f61f497 APIv2 - strip CAP_ prefix from capabilities in json
strip prefix "CAP_" from capabilities in json generated by container inspect operation

Signed-off-by: Petr Sakař <petr.sakar@chare.eu>
2020-11-20 21:46:51 +01:00
ce775248ad Make c.networks() list include the default network
This makes things a lot more clear - if we are actually joining a
CNI network, we are guaranteed to get a non-zero length list of
networks.

We do, however, need to know if the network we are joining is the
default network for inspecting containers as it determines how we
populate the response struct. To handle this, add a bool to
indicate that the network listed was the default network, and
only the default network.

Signed-off-by: Matthew Heon <mheon@redhat.com>
2020-11-20 14:03:24 -05:00
dc8996ec84 Allow containers to --restart on-failure with --rm
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-11-20 13:55:19 -05:00
e24e6b6372 REST API v2 - list of images - mandatory Created attribute
fixes https://github.com/containers/podman/issues/8418

created attribute is missing for images with created datetime set to 0 Unix time (January 1, 1970 UTC) because 0 is considered as default value, and thus attribute was ommited because of 'omitempty' flag

Signed-off-by: Petr Sakař <petr.sakar@chare.eu>
2020-11-20 19:21:03 +01:00
864fe21ed0 Merge pull request #8406 from jwhonce/issues/8390
Make podman service log events
2020-11-20 18:10:56 +01:00
f441190d10 Allow multiple --network flags for podman run/create
We allow a container to be connected to several cni networks
but only if they are listed comma sperated. This is not intuitive
for users especially since the flag parsing allows multiple string
flags but only would take the last value. see: spf13/pflag#72

Also get rid of the extra parsing logic for pods. The invalid options
are already handled by `pkg/specgen`.

A test is added to prevent a future regression.

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2020-11-20 17:02:48 +01:00
042d4884ea Merge pull request #8285 from rhatdan/containers.conf
Document containers.conf settings for remote connections
2020-11-20 13:15:49 +01:00
577015d4d2 Merge pull request #8413 from rhatdan/VENDOR
vendor in containers/storage v1.24.1
2020-11-20 13:04:33 +01:00
0a8e1932fc Merge pull request #8422 from vrothberg/cgroup-fix
fix container cgroup lookup
2020-11-20 13:01:10 +01:00
1efb9b5e17 fix container cgroup lookup
When running on cgroups v1, `/proc/{PID}/cgroup` has multiple entries,
each pointing potentially to a different cgroup.  Some may be empty,
some may point to parents.

The one we really need is the libpod-specific one, which always is the
longest path.  So instead of looking at the first entry, look at all and
select the longest one.

Fixes: #8397
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2020-11-20 11:31:12 +01:00
eb4b26aab7 Merge pull request #8404 from rhatdan/rm
Add alias for podman network rm -> remove
2020-11-20 11:23:45 +01:00
d8795a36b2 Make podman service log events
* Log endpoint calls at level Info
* Ensure API server started at level Info

Fixes #8390

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2020-11-19 14:42:56 -07:00
0bad9f1ad7 vendor in containers/storage v1.24.1 containers/image v5.8.1
These vendors fix the handling of homedirs.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-11-19 16:09:53 -05:00
9770947818 Document containers.conf settings for remote connections
Currently we don't document which end of the podman-remote client server
operations uses the containers.conf.  This PR begins documenting this
and then testing to make sure the defaults follow the rules.

Fixes: https://github.com/containers/podman/issues/7657

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-11-19 14:48:10 -05:00
a18365c908 Merge pull request #8398 from Luap99/ps-filter-completions
Shell completion for podman ps and podman pod ps --filter
2020-11-19 20:25:51 +01:00
541e13c4f0 Merge pull request #7958 from cevich/branch_fail_notice
[ci-skip] Github-Actions: Send e-mail on Cirrus cron failure
2020-11-19 20:00:46 +01:00
599b1ed839 Shell completion for podman ps and podman pod ps --filter
Add all available filter options for `podman ps` and `podman
pod ps` to the completions. Refactor the code a bit to make it
easier to handle key value pairs in completions. The
`completeKeyValues` function  helps to reduce code duplication.

Also make use of the new filter logic in the completions.

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2020-11-19 18:07:35 +01:00
e239bfa15b Merge pull request #8391 from baude/networkconnectdisconnect
add network connect|disconnect compat endpoints
2020-11-19 16:54:29 +01:00
f4eac94f4d Add alias for podman network rm -> remove
docker network remove exists and is alias to docker network rm.

Bug for bug compatible.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-11-19 10:18:06 -05:00
a3e0b7d117 add network connect|disconnect compat endpoints
this enables the ability to connect and disconnect a container from a
given network. it is only for the compatibility layer. some code had to
be refactored to avoid circular imports.

additionally, tests are being deferred temporarily due to some
incompatibility/bug in either docker-py or our stack.

Signed-off-by: baude <bbaude@redhat.com>
2020-11-19 08:16:19 -06:00
70f91fb96d Merge pull request #8405 from jwhonce/wip/version
Fix sed regex to update version in version/version.go
2020-11-19 00:57:20 +01:00
b59465d1cc Fix sed regex to update version in version/version.go
Signed-off-by: Jhon Honce <jhonce@redhat.com>
2020-11-18 15:21:26 -07:00
b1007caca5 Merge pull request #8379 from rhatdan/remote2
Remove build \!remote flags from test phase 2
2020-11-18 22:51:52 +01:00
887f88c490 Github-Actions: Send e-mail on Cirrus cron failure
This repository has a number of automaticly triggered branch-level
testing enabled.  However, other than remembering to go look at a
specific WebUI, there is no way for anybody to notice if/when these jobs
fail.

This commit introduces a github-action workflow which runs periodically,
checking for failed cron-triggered Cirrus-CI jobs.  When it finds any, it
formats a simple report for e-mail delivery.  The list of destination
addresses is configurable at any time by merging changes to a
simple CSV file.

Signed-off-by: Chris Evich <cevich@redhat.com>
2020-11-18 15:34:01 -05:00