10057 Commits

Author SHA1 Message Date
70fa488372 Add APIv2 tests for kube generate
Signed-off-by: Edward Shen <weshen@redhat.com>
2020-11-30 01:56:29 -05:00
8b2c0a4fa3 Merge pull request #8493 from Luap99/net-rm-macvlan
Fix problems with network remove
2020-11-28 20:32:26 +01:00
f0d48aadb0 Merge pull request #8497 from AlbanBedel/kube-volume
Add support for persistent volume claims in kube files
2020-11-28 19:56:02 +01:00
3110308519 Merge pull request #8500 from giuseppe/set-xdg-dirs
runtime: set XDG_* env variables if missing
2020-11-28 12:25:53 +01:00
3c6dca2f87 runtime: set XDG_* env variables if missing
regression introduced when moving to Podman 2.0.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1877228

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2020-11-27 14:33:50 +01:00
66944baad6 Add support for persistent volume claims in kube files
In k8s a persistent volume claim (PVC) allow pods to define a volume
by referencing the name of a PVC. The PVC basically contains criterias
that k8s then use to select which storage source it will use for the
volume.

Podman only provide one abtracted storage, the named volumes, and
create them if they don't exists yet. So this patch simply use a
volume with the name of the PVC.

Signed-off-by: Alban Bedel <albeu@free.fr>
2020-11-27 11:38:33 +01:00
b84304da5e Prepare support in kube play for other volume types than hostPath
Replace the simple map of names to paths with a map of names to a struct
to allow passing more parameters. Also move the code to parse the volumes
to its own file to avoid making the playKubePod() function overly complex.
Finally rework the kube volumes test to also be ready to support more
volume types.

Signed-off-by: Alban Bedel <albeu@free.fr>
2020-11-27 11:38:33 +01:00
2f7bca0685 Fix problems with network remove
First, make sure we are only trying to remove the network
interface if we are root.
Second, if we cannot get the interface name (e.g macvlan config)
then we should not fail. Just remove the config file.

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2020-11-26 21:42:28 +01:00
ad2439264d Merge pull request #8487 from riyad/fix-ping-typo
REST API v2 - ping - fix typo in header
2020-11-26 16:41:53 +01:00
201b0acd02 Merge pull request #8486 from riyad/improve-ping-api-compat
REST API v2 - ping - remove newline from response to improve Docker compatibility
2020-11-26 16:40:11 +01:00
5af0266847 Merge pull request #8481 from Luap99/fix-remote-volume-path
Do not validate the volume source path in specgen
2020-11-26 16:38:18 +01:00
f7f85fef7c Do not validate the volume source path in specgen
The volume src path should not be validated in specgen since
the remote client also uses that part and the path must only
exists on the server. This now fails later and only on the
server and not the client.

I don't think I can add a test for this because the CI runs
server and client always on the same vm.

Fixes #8473

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2020-11-26 12:55:33 +01:00
0ae1221a46 REST API v2 - ping - fix typo in header
Signed-off-by: Riyad Preukschas <riyad@informatik.uni-bremen.de>
2020-11-25 20:49:08 +01:00
af6106f3ff REST API v2 - ping - remove newline from response to improve Docker compatibility
Signed-off-by: Riyad Preukschas <riyad@informatik.uni-bremen.de>
2020-11-25 20:43:36 +01:00
397e9a9f1b Merge pull request #8470 from QiWang19/create-manfiest
Not use local image create/add manifest
2020-11-25 12:40:14 +01:00
5231997f97 Not use local image create/add manifest
Avoid using the image from load storage for `manifest create` and `manifest add`
since the local image does not include other entries of the list from the registry.
`--all` flag of `manifest create` and `manifest add` can not add all of the lists as expected.

Signed-off-by: Qi Wang <qiwan@redhat.com>
2020-11-24 15:54:41 -05:00
d4083954f2 Merge pull request #8459 from QiWang19/doc-save
[CI:DOCS] fix misleading save/load usage
2020-11-24 20:58:53 +01:00
d752f7e464 Merge pull request #8468 from lucendio/patch-1
[CI:DOCS] Tutorials:mac-win-client - Fix command ensuring sshd is enabled
2020-11-24 20:31:30 +01:00
05f7c95568 [CI:DOCS] fix misleading save/load usage
Fix the container archive description in podman save/load docs that may lead to misusing the save/load instead of import/export for containers.

Signed-off-by: Qi Wang <qiwan@redhat.com>
2020-11-24 13:48:30 -05:00
850bdd236a Merge pull request #8467 from Luap99/fix-mac-custom-net
Fix custom mac address with a custom cni network
2020-11-24 18:48:32 +01:00
f8f2ce07d6 [tutorials:mac-win-client] Fix command ensuring sshd is enabled
`-s, --signal` requires a value and is probably not intended to be here

Signed-off-by: Lucendio <dev@lucend.io>
2020-11-24 17:07:58 +01:00
9602e290de Fix custom mac address with a custom cni network
The cni plugin `tuning` is required to set a custom mac address.
This plugin is configured in the default cni config file which is
packaged with podman but was not included the generated config form
`podman network create`.

Fixes #8385

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2020-11-24 15:16:23 +01:00
4ebd9d9191 Merge pull request #8458 from rhatdan/master
[CI:DOCS] Bump to v2.2.0-rc2
2020-11-24 12:10:07 +01:00
d0a8e1d0fb Bump to v2.2.0-dev
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-11-24 05:37:35 -05:00
cbdb4d54bd Bump to v2.2.0-rc2
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
v2.2.0-rc2
2020-11-24 05:37:35 -05:00
5267e73db0 Merge pull request #8461 from Luap99/top-shell-completion
Implement shell completion for podman top
2020-11-24 11:24:14 +01:00
f38e189599 Implement shell completion for podman top
Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2020-11-23 23:45:33 +01:00
4fe7c3f7bc Merge pull request #8455 from baude/jhoncompat
Jhoncompat
2020-11-23 23:44:59 +01:00
1ddb19bc8e update container status with new results
a bug was being caused by the fact that the container network results
were not being updated properly.

given that jhon is on PTO, this PR will replace #8362

Signed-off-by: baude <bbaude@redhat.com>
2020-11-23 15:20:39 -06:00
44da01f45c Refactor compat container create endpoint
* Make endpoint compatibile with docker-py network expectations
* Update specgen helper when called from compat endpoint
* Update godoc on types
* Add test for network/container create using docker-py method
* Add syslog logging when DEBUG=1 for tests

Fixes #8361

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2020-11-23 15:20:39 -06:00
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