10353 Commits

Author SHA1 Message Date
70284b18cc Merge pull request #8479 from rhatdan/log
Drop default log-level from error to warn
2020-12-03 10:59:33 -05:00
c675d8a3c6 Merge pull request #8565 from jwhonce/wip/testing
hack/podman-socat captures the API stream
2020-12-03 10:24:19 -05:00
3fd350f050 Merge pull request #8576 from Luap99/docs-network-rootless
[CI:DOCS] Correct which network commands can be run as rootless
2020-12-03 10:22:03 -05:00
caa84cd35d Merge pull request #8551 from rhatdan/default
Support --network=default as if it was private
2020-12-03 09:31:43 -05:00
8437a6df16 Correct which network commands can be run as rootless
Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2020-12-03 14:43:37 +01: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
85b412ddcd Merge pull request #8563 from giuseppe/exec-cgroup-create
podman, exec: move conmon to the correct cgroup
2020-12-03 11:37:13 +01:00
9a33e064a1 podman, exec: move conmon to the correct cgroup
move the conmon process to the conmon cgroup also on exec.

The previous implementation would fail to move the conmon process as
the systemd unit already exists so its creation would fail.

When the unit cannot be created, attempt to directly join the cgroup
instead.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2020-12-03 10:03:39 +01:00
918087252b Merge pull request #8566 from jwhonce/wip/double_ping
Change bindings to stop two API calls for ping
2020-12-03 01:45:38 +01:00
38a44acd20 Merge pull request #8564 from edsantiago/bats
BATS: add new load test
2020-12-03 01:25:54 +01:00
5cf7aa65fb Merge pull request #8408 from umohnani8/sec-opt
Add mask and unmask option to --security-opt
2020-12-03 00:49:23 +01:00
ee418c8565 Support --network=default as if it was private
Docker defines an option of "default" which means to
use the default network.  We should support this with
the same code path as --network="".

This is important for compatibility with the Docker API.

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

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-12-02 18:38:35 -05:00
60d3e658ce Change bindings to stop two API calls for ping
* existing code caused an unnecessary 301 redirect

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2020-12-02 16:14:53 -07:00
e55320efde hack/podman-socat captures the API stream
* verify socat and podman binaries exist
* setup a sandboxed podman service
* run podman service with socat proxy to capture API stream
* clean up sandbox leaving the log files for review

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2020-12-02 16:03:56 -07:00
c8ab4c878f BATS: add new load test
Looks like #7337 was fixed (by #8112). Reenable a disabled
test for it; and make it actually work. Confirmed that
newly-added test fails on d45676549 (the commit before #8112).

Signed-off-by: Ed Santiago <santiago@redhat.com>
2020-12-02 14:45:51 -07:00
0334b61958 Add mask and unmask option to --security-opt
Add the mask and unmask option to the --security-opt flag
to allow users to specify paths to mask and unmask in the
container. If unmask=ALL, this will unmask all the paths we
mask by default.

Signed-off-by: Urvashi Mohnani <umohnani@redhat.com>
2020-12-02 16:07:18 -05:00
7984842d7e Merge pull request #8556 from mheon/fix_8539
Use Libpod tmpdir for pause path
2020-12-02 22:03:19 +01:00
e74072e742 Merge pull request #8112 from QiWang19/load-optional-name
Drop name argument from Load API
2020-12-02 21:35:31 +01:00
d45676549d Merge pull request #8392 from jwhonce/wip/report
Fix `podman images...` missing headers in table templates
2020-12-02 20:25:54 +01:00
ab88632835 Use Libpod tmpdir for pause path
Previously, we always computed pause path from the Rootless
runtime directory. Problem: this does not match the behavior of
Libpod when the directory changes. Libpod will continue to use
the previous directory, cached in the database; Pause pidfiles
will swap to the new path. This is problematic when the directory
needs to exist to write the pidfile, and Libpod is what creates
the directory.

There are two potential solutions - allow the pause pidfile to
move and just make the directory when we want to write it, or use
the cached Libpod paths for a guaranteed location. This patch
does the second, because it seems safer - we will never miss a
previously-existing pidfile because the location is now
consistent.

Fixes #8539

Signed-off-by: Matthew Heon <mheon@redhat.com>
2020-12-02 14:18:37 -05:00
2e55543cca Merge pull request #8557 from baude/mountcommas
add commas between mount options
2020-12-02 19:52:52 +01:00
2a02833e9f Fix podman images... missing headers in table templates
Signed-off-by: Jhon Honce <jhonce@redhat.com>
2020-12-02 10:50:37 -07:00
ccc0201a64 add commas between mount options
when formatting mount options into a string for the compat container create, the options need to be comma delimited.

Signed-off-by: baude <bbaude@redhat.com>
2020-12-02 10:19:21 -06:00
e82ec90007 Merge pull request #8552 from baude/buildtarget
target is not tag
2020-12-02 16:58:28 +01:00
7210b86d9e Merge pull request #8549 from Luap99/network-id-support
Add support for network ids
2020-12-02 15:27:14 +01:00
f525d8b843 Do not pass name argument to Load API
Not pass the name argument to Load API. Specify in the document the usage of the optional argument is tagging an additional image.
Close #7337

Signed-off-by: Qi Wang <qiwan@redhat.com>
2020-12-02 09:25:01 -05:00
3a5cd57bb4 target is not tag
remove mistaken use of target being used for tag

Signed-off-by: baude <bbaude@redhat.com>
2020-12-02 08:21:03 -06:00
d28874b2f4 Merge pull request #8550 from Luap99/fix-completion-ancestor-filter
Fix shell completion for ps --filter ancestor
2020-12-02 13:58:30 +01:00
a3ddedda49 Fix shell completion for ps --filter ancestor
The `ancestor` option was missing an equal sign. Therefore
the completion did not work as expected.

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2020-12-02 10:48:40 +01:00
c31a5c0d9c Add support for network ids
The network ID is not stored. It is just the sha256 hash from
the network name. There is a risk of a potential hash collision.
However it's very unlikely and even if we hit this it will
complain that more than network with this ID exists.

The main benefit is that the compat api can have proper
network ID support. Also this adds the support for
`podman network ls --format "{{.ID}}"` and `--filter id=<ID>`.

It also ensures that we can do network rm <ID> and network
inspect <ID>.

Since we use a hash this commit is backwards compatible even for
already existing networks.

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2020-12-02 10:27:00 +01:00
9c5fe954cc Merge pull request #8543 from mheon/no_syslog_true
Do not use "true" after "syslog" in exit commands
2020-12-02 01:03:40 +01:00
c585012db3 Merge pull request #8457 from afbjorklund/bridge-mtu
Add podman network create flag for bridge mtu
2020-12-02 01:01:09 +01:00
b2cd6e0402 Merge pull request #8542 from rhatdan/test
Fix typo in tests
2020-12-01 22:38:58 +01:00
db70e91bde Validate that the bridge option is supported
Thanks Luap99 for the validation suggestion

Signed-off-by: Anders F Björklund <anders.f.bjorklund@gmail.com>
2020-12-01 22:33:16 +01:00
de2b15f4d5 Add integration test for the bridge options
Thanks Luap99 for doing the implementation

Signed-off-by: Anders F Björklund <anders.f.bjorklund@gmail.com>
2020-12-01 22:33:16 +01:00
7f1be76b5c Add podman network create option for bridge vlan
Signed-off-by: Anders F Björklund <anders.f.bjorklund@gmail.com>
2020-12-01 22:33:16 +01:00
b1b35707aa Add podman network create option for bridge mtu
Signed-off-by: Anders F Björklund <anders.f.bjorklund@gmail.com>
2020-12-01 22:33:03 +01:00
7f084a8ae2 Merge pull request #8357 from mheon/add_volume_interface_package
Add API for communicating with Docker volume plugins
2020-12-01 22:32:08 +01:00
c71ad9a557 Merge pull request #8541 from rhatdan/man
Fix potential race condition in testing
2020-12-01 22:09:38 +01:00
e3313fdd50 Merge pull request #8488 from rhatdan/platform
Add support for --platform
2020-12-01 21:48:40 +01:00
b7ff6f0912 Merge pull request #8505 from Luap99/network-labels
podman network label support
2020-12-01 21:43:27 +01:00
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