10162 Commits

Author SHA1 Message Date
4b5cb7b1de Merge pull request #8534 from Luap99/revert-Luap99-cobra-vendor
Revert the custom cobra vendor
2020-12-01 21:39:50 +01:00
bf6b228092 Do not use "true" after "syslog" in exit commands
Instead of being interpreted as an argument to the boolean flag,
the 'true' is being intepreted as the Podman command to be run -
so we're trying to run `podman true`, which does not exist. This
causes the cleanup command to fail when `--log-level=debug` is
set, so containers are not cleaned up or removed.

This problem is easily reproduced with any command combining the
`--rm`, `-d`, and `--log-level=debug` flags - the command will
execute and exit, but the container will not be removed.

Separate, but worth looking into later: the errors we get on
trying `podman true` with any flags are terrible - if you just
type `podman true` you get a quite sane "Unrecognized command"
error, but if you try `podman true --rm` you get an "unknown flag
--rm" error - which makes very little sense given the command
itself doesn't exist.

Signed-off-by: Matthew Heon <mheon@redhat.com>
2020-12-01 15:12:50 -05:00
737e1d1994 Merge pull request #8540 from baude/compatecreatevols
compat create should use bindings
2020-12-01 21:12:20 +01:00
1f91521d24 Fix typo in tests
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-12-01 15:08:26 -05:00
8ffb0ae659 Merge pull request #8426 from mheon/fix_infra_cmd_from_config
Do not ignore infra command from config files
2020-12-01 21:05:10 +01:00
c734c13904 Fix potential race condition in testing
The It("podman wait to pause|unpause condition"... test is
flaking every so often when a messages is sent in the second
function to a channel.  It is my believe that in between the time
the first function sends a message to the channel and before it closes
the channel the second errChan=make() has happened.  This would mean that
the fist function closes the second errChan, and then when the second
function sends a message to the second errChan, it fails and blows up with
the error you are seeing.

By creating a different variable for the second channel, we eliminate the race.

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

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-12-01 14:11:04 -05:00
ce45b71dcf Merge pull request #8126 from matejvasek/impl-apiv2-archive
Implement containers/{id or name}/archive api
2020-12-01 19:56:49 +01:00
b735aa8122 Merge pull request #8535 from edsantiago/bats
BATS: add ping test, ps filters, multi-option
2020-12-01 19:55:02 +01:00
055a7a9091 Merge pull request #8525 from mheon/readme_220
[CI:DOCS] Bump version in README to v2.2.0
2020-12-01 19:42:44 +01:00
c562e8b8da compat create should use bindings
the volumes provided is seemingly useless representing what volumes
should be added to a container. instead, the host config bindings should
be used as they acurately describe the src/dest and options for
bindings.

Signed-off-by: baude <bbaude@redhat.com>
2020-12-01 12:28:52 -06:00
594ac4a146 Add API for communicating with Docker volume plugins
Docker provides extensibility through a plugin system, of which
several types are available. This provides an initial library API
for communicating with one type of plugins, volume plugins.
Volume plugins allow for an external service to create and manage
a volume on Podman's behalf.

This does not integrate the plugin system into Libpod or Podman
yet; that will come in subsequent pull requests.

Signed-off-by: Matthew Heon <mheon@redhat.com>
2020-12-01 12:56:55 -05:00
429d9492f8 Merge pull request #8515 from baude/netconnectstate
network connect disconnect on non-running containers
2020-12-01 16:15:19 +01:00
a17fb01d40 BATS: add ping test
- run test : tweaks to recently-added network-conflict test:
   * remove "-d" in run
   * confirm exact warning text, and also that container
     runs successfully
   * test multiple --net options (regression #8057)

 - images, run, build, exec tests: add multiple-flag
   testing for various flags, confirming as appropriate
   whether options are overridden or accumulated.

 - ps test : add --filter and --sort tests

 - pod test: run 'ping' inside container (confirms that
   container gets PING capability)

Signed-off-by: Ed Santiago <santiago@redhat.com>
2020-12-01 08:14:54 -07:00
e3f0b7db75 Merge pull request #8400 from rhatdan/varlink
Remove varlink support from podman
2020-12-01 15:30:06 +01:00
1316b2927b Merge pull request #8519 from rhatdan/man
[CI:DOCS] Document volume mounts of source directories do NOT get created
2020-12-01 15:17:37 +01:00
24383906f8 Merge pull request #8427 from rhatdan/ps
Handle ps container created field as a time.Time
2020-12-01 14:40:18 +01:00
9ae12f84e8 Merge pull request #8475 from rhatdan/subscriptions
Switch from pkg/secrets to pkg/subscriptions
2020-12-01 14:31:35 +01:00
969dc227d4 Document volume mounts of source directories do NOT get created
We differ from Docker, in that we do not create the source directory
in a --volume mount if it does not exists.  We return an error.

We do not believe that a `typo` from the user should cause a directory
to be created and silently ignored by Podman.

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

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-12-01 08:28:36 -05:00
3d4a0e42b3 Revert the custom cobra vendor
Vendor in the latest cobra release v1.1.1

This will hurt the completion experience but is required for
proper packaging, see: #8528.

The best solution is to keep the current scripts since they
work fine with cobra v1.1.1.

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2020-12-01 14:15:18 +01:00
1060154135 Bump version in README to v2.2.0
Signed-off-by: Matthew Heon <mheon@redhat.com>
2020-11-30 21:02:08 -05:00
ca612a3407 Merge pull request #8523 from mheon/bump_30_dev
Bump master to v3.0.0-dev
2020-12-01 00:57:49 +01:00
7d43cc06dc network connect disconnect on non-running containers
a container can connect and disconnet to networks even when not in a
running state.

Signed-off-by: baude <bbaude@redhat.com>
2020-11-30 16:10:01 -06:00
12f835d125 Bump master to v3.0.0-dev
Signed-off-by: Matthew Heon <mheon@redhat.com>
2020-11-30 16:33:18 -05:00
c342583da0 Merge pull request #8520 from mheon/release_notes_220_final
[CI:DOCS] Update release notes for v2.2.0
2020-11-30 22:23:48 +01:00
02d40a002e Update release notes for v2.2.0
Signed-off-by: Matthew Heon <mheon@redhat.com>
2020-11-30 16:02:44 -05:00
f6fb297a49 Merge pull request #8517 from rhatdan/man
[CI:DOCS] Fix option names --subuidname and --subgidname
2020-11-30 20:30:32 +01:00
7ad1c9c8cf Merge pull request #8518 from mheon/fix_extra_quote
[CI:DOCS] Fix extra quotation mark in manpages.
2020-11-30 20:21:48 +01:00
0a87dbe353 Fix extra quotation mark in manpages.
Signed-off-by: Matthew Heon <mheon@redhat.com>
2020-11-30 13:54:03 -05:00
e2c406f199 Merge pull request #8465 from rhatdan/pull
Document docker transport is the only supported remote transport
2020-11-30 19:52:04 +01:00
1613921ecc Merge pull request #8514 from Luap99/revert-8410-fix-multiple-networks
Revert "Allow multiple --network flags for podman run/create"
2020-11-30 19:43:19 +01:00
f24812ac3b Merge pull request #8230 from mheon/port_net_host_conflict
Ensure that --net=host/pod/container conflicts with -p
2020-11-30 19:41:26 +01:00
56ad7ac54e Fix option names --subuidname and --subgidname
Options --subuid and --subgid does not exists

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

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-11-30 13:29:51 -05:00
72a4891746 Do not ignore infra command from config files
It looks like this was previously removed because the default
hard-coded `/pause` so we would never take into account the image
config. I've removed the default in c/common and re-added support
to check config files.

While we're at it, fix ENTRYPOINT support - we should not be
setting this if we got ENTRYPOINT from the image.

Fixed https://bugzilla.redhat.com/show_bug.cgi?id=1853455

Signed-off-by: Matthew Heon <mheon@redhat.com>
2020-11-30 13:28:12 -05:00
9f2c8f267e Merge pull request #8420 from jortkoopmans/patch-1
[CI:DOCS] Update Tutorials.rst
2020-11-30 19:04:35 +01:00
f3402c73d4 Revert "Allow multiple --network flags for podman run/create"
As described in issue #8507 this commit contains a breaking
change which is not wanted in v2.2.

We can discuss later if we want this in 3.0 or not.

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2020-11-30 18:10:26 +01:00
84e8b2afa7 Merge branch 'master' into patch-1 2020-11-30 15:58:23 +01:00
fc85ec942e Merge pull request #8511 from Edward5hen/kube-test
Add APIv2 tests for kube generate
2020-11-30 15:13:22 +01:00
70fa488372 Add APIv2 tests for kube generate
Signed-off-by: Edward Shen <weshen@redhat.com>
2020-11-30 01:56:29 -05:00
9ba52e8ef0 Document docker transport is the only supported remote transport
The goal is to improve errors when users use the wrong transport
in certain cases we stutter, in other cases we don't give enough
information.

Remove stutters when failing to pull remote images, because of
lack of support.

Fix errors returned by reference.Parse to wrap in image that was being
checked.

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

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-11-29 06:28:39 -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
8494bcb866 podman network label support
Add label support for podman network create. Use the `args`
field in the cni config file to store the podman labels.
Use `podman_labels` as key name and store the labels as
map[string]string.

For reference: https://github.com/containernetworking/cni/blob/master/CONVENTIONS.md#args-in-network-config
https://github.com/containernetworking/cni/blob/spec-v0.4.0/SPEC.md#network-configuration

Example snippet:

```
...
"args": {
	"podman_labels": {
		"key1":"value1",
		"key2":"value2"
	}
}
...
```

Make podman network list support several filters. Supported filters are name,
plugin, driver and label. Filters with different keys work exclusive. Several label
filters work exclusive and the other filter keys are working inclusive.

Also adjust the compat api to support labels in network create and list.

Breaking changes:

- podman network ls -f shortform is used for --filter instead --format
This matches docker and other podman commands (container ps, volume ps)

- libpod network list endpoint filter parameter is removed. Instead the
filters paramter should be used as json encoded map[string][]string.

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2020-11-28 18:35:43 +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
f62a356515 Remove varlink support from Podman
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-11-26 16:50:42 -05: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