13771 Commits

Author SHA1 Message Date
f45070ee0e Merge pull request #12626 from vrothberg/may-the-force-be-with-removal
image rm: allow for force-remove infra images
2021-12-19 06:18:21 -05:00
65efd55d41 Merge pull request #12641 from giuseppe/add-more-logging-setuserns
rootless: include the args in the debug message
2021-12-19 06:17:29 -05:00
59766ebe76 Merge pull request #12625 from adrianreber/2021-12-16-podman-inspect
Add more checkpoint/restore information to 'inspect'
2021-12-17 16:04:26 +01:00
a837984c46 rootless: include the args in the debug message
include the arguments used to create the user namespace to help
debugging.

[NO NEW TESTS NEEDED] it changes a debug message

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2021-12-17 14:47:18 +01:00
12d762f8ee image rm: allow for force-remove infra images
Force removal of images will also remove associated containers.
Historically, infra containers have been excluded resulting in
rather annoying errors, for instance, when running `rmi -af`.

Since there is not reasons to exclude infra containers, allow for
removing the entire pod when an infra image is force removed.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-12-17 13:23:11 +01:00
820cf0e066 Merge pull request #12622 from flouthoc/return_exit_code_for_build
build: relay `exitcode` from imagebuildah to registry
2021-12-17 13:16:23 +01:00
6423174c67 tests: adjust old build test to expect exit code
Old build tests were expecting genric error code `125` however another
commit in this PR ensures that we relay exact exit code from build to
registry.

Hence adjusting tests

Signed-off-by: Aditya Rajan <arajan@redhat.com>
2021-12-17 16:20:03 +05:30
28018ce604 Test for checkpoint specific inspect fields
This extends one of the checkpoint/restore tests to see if the
newly introduced checkpoint specific fields in 'inspect' work as
intended.

Signed-off-by: Adrian Reber <areber@redhat.com>
2021-12-17 10:02:35 +00:00
bc3389e212 Add more checkpoint/restore information to 'inspect'
This adds the following information to the output of 'podman inspect':

 * CheckpointedAt - time the container was checkpointed
   Only set if the container has been checkpointed

 * RestoredAt - time the container was restored
   Only set if the container has been restored

 * CheckpointLog - path to the checkpoint log file (CRIU's dump.log)
   Only set if the log file exists (--keep)

 * RestoreLog - path to the restore log file (CRIU's restore.log)
   Only set if the log file exists (--keep)

 * CheckpointPath - path to the actual (CRIU) checkpoint files
   Only set if the checkpoint files exists (--keep)

 * Restored - set to true if the container has been restored
   Only set if the container has been restored

Signed-off-by: Adrian Reber <areber@redhat.com>
2021-12-17 10:02:35 +00:00
f566d8b8e5 build: relay exitcode from imagebuildah to registry
Podman does not relay exit code from buildah instead returns a generic
error code `125`. Following PR allows `podman` to relay exit code from
`imagebuildah` to `registry` as it is.

Signed-off-by: Aditya Rajan <arajan@redhat.com>
2021-12-17 15:07:50 +05:30
c9a3f4ec44 Merge pull request #12634 from baude/bz2024229
Removed .service file for healthchecks
2021-12-17 02:25:49 +01:00
52d5f367b1 Merge pull request #12609 from baude/tz
Set machine timezone
2021-12-16 22:37:49 +01:00
e88c21366d Removed .service file for healthchecks
when a container with healthchecks exits due to stopping or failure, we
need the cleanup process to remove both the timer file and the service
file.

Bz#:2024229

Signed-off-by: Brent Baude <bbaude@redhat.com>
2021-12-16 14:11:50 -06:00
2c98694559 Merge pull request #12608 from Luap99/cobra
bump cobra to 1.3.0
2021-12-16 20:21:51 +01:00
be6f9ce921 Merge pull request #12610 from Luap99/cryptorand
MovePauseProcessToScope do not seed everytime
2021-12-16 20:19:50 +01:00
a86495ea6f Set machine timezone
Added an option to podman machine init to declare the timezone of the
resulting machine.  the default is to use the value of the host name or
else a given timezone name like America/Chicago.

Fixes: #11895

Signed-off-by: Brent Baude <bbaude@redhat.com>

[NO NEW TESTS NEEDED]

Signed-off-by: Brent Baude <bbaude@redhat.com>
2021-12-16 12:40:20 -06:00
273da42af2 Merge pull request #12606 from vrothberg/fix-12441
bindings rmi test: clarify behavior
2021-12-16 17:01:50 +01:00
b9141c06f0 Merge pull request #12623 from giuseppe/revert-old-PR-template
[CI:DOCS] .github: revert to the old template
2021-12-16 15:39:51 +01:00
459e784147 MovePauseProcessToScope do not seed everytime
Instead of using math/rand we can use crypto/rand which we do not have
to seed. crypto/rand uses getrandom(2)
Also instead of adding an int to the scope name we add a 4 byte hex
string.

[NO NEW TESTS NEEDED]

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2021-12-16 15:35:11 +01:00
f241efb179 bindings rmi test: clarify behavior
The libpod/images/remove endpoint is not very REST-ish but, after some
debate, was decided to be implemented as for the following reasons.

First, it allows for batch removing images which improves performance
significantly.  Note that Docker does support `rmi -a`!

Second, it allows for hiding the logic of setting the right exit code to
use from the client and keep all the logic on the server.

Hence, when removing an image that does not exist, the server will
return a 200. The response, however, includes the error message to be
used *and* the exit code that podman-remote will use.

Fixes: #12441
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-12-16 15:31:29 +01:00
03a3fc37fe bump cobra to 1.3.0
This contains some fixes for the shell completion files.

[NO NEW TESTS NEEDED]

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2021-12-16 15:28:39 +01:00
6cde9255f0 .github: revert to the old template
we are not using any of the metadata in the new format, so we have
only the downside that is more annoying to fill.

[CI:DOCS] no need to run the CI

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2021-12-16 15:23:39 +01:00
d1c91c128e Merge pull request #12618 from giuseppe/dev-cgroup-add-default-devices
oci: configure the devices cgroup with default devices
2021-12-16 15:15:49 +01:00
91e55e263e Merge pull request #12603 from vrothberg/fix-kill
kill: fix output
2021-12-16 14:21:49 +01:00
4243ca93a4 oci: configure the devices cgroup with default devices
always set the default devices to the devices cgroup when not running
in a user namespace.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2021-12-16 13:25:43 +01:00
3b6510da68 kill: fix output
Make sure that `kill -a` is printing the IDs of killed containers.
Previously, it was only printing empty lines.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-12-16 13:04:58 +01:00
d984fec351 Merge pull request #12619 from vrothberg/fix-search-flakes
e2e: search flake: skip test on registry.redhat.io
2021-12-16 12:31:50 +01:00
5392ff51cc e2e: search flake: skip test on registry.redhat.io
The search endpoint on registry.redhat.io is broken.
Skip one test and update another to avoid hitting it.
Also leave some breadcrumbs to revert once it's back
in a working state.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-12-16 11:14:42 +01:00
91ef5fb85e Merge pull request #12601 from edsantiago/apiv2_catch_errs
APIv2 tests: fail on syntax/logic errors
2021-12-16 02:02:56 +01:00
9212c74ff1 Merge pull request #12600 from rhatdan/external
Show --external containers even without --all option
2021-12-15 15:43:11 +01:00
7dabcbd7bc Merge pull request #12534 from Luap99/network-db
network db rewrite
2021-12-15 15:25:14 +01:00
7b51acd4c4 APIv2 tests: fail on syntax/logic errors
(i.e. not test failures, but actual programming bugs).

We've had a number of syntax errors creep into this test, usually
caused by a missing backslash on a test command. I've long wanted
to 'set -e' but that causes other problems. This PR introduces
error handling via 'trap', with useful diagnostics on failure.

This PR also catches and fixes two previously-unknown bugs that
were causing tests to not actually run.

And, since /events takes eons on my high-uptime laptop, add /since

Signed-off-by: Ed Santiago <santiago@redhat.com>
2021-12-14 18:28:50 -07:00
b01a421f34 Merge pull request #12596 from edsantiago/apiv2_test_refactor
apiv2 tests: refactor complicated curls
2021-12-14 22:30:56 +01:00
51a4bef2e6 Show --external containers even without --all option
We currently do not show --external containers when the user specifies
it, unless they also specify the --all flag. This has led to confusion.
I see no reason not to list them without the --all flag if the user
specifies the option.

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

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-12-14 16:03:21 -05:00
c36fb8b113 Merge pull request #12595 from Luap99/network-id
fix network id handling
2021-12-14 20:56:55 +01:00
0a2eb7b185 apiv2 tests: refactor complicated curls
Some months ago, apiv2 tests got added that needed new
functionality: passing a tarball to the remote server.
There was no mechanism to do so in the 't' helper, so
these tests used complicated (and actually not-really-
working) curl commands.

This PR introduces and documents a new usage of 't', in
which passing an argument ending in '.tar' adds the
right magic syntax (--data-binary @PATH) to the existing
curl. This lets us use all standard 't' checks, making
for simpler tests and in the process fixing some bugs.

Also: drive-by fix of a typo bug in the networks test.

Also: set CONTAINERS_REGISTRIES_CONF when starting server
and when running direct podman, to avoid docker.io throttling.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2021-12-14 12:10:19 -07:00
888c778ee9 fix network id handling
We have to get the network ID from the network backend. With the
netavark backend we no longer use the sha from the name as ID.

[NO NEW TESTS NEEDED]

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2021-12-14 18:41:06 +01:00
a0894b5ecd Merge pull request #12586 from jmguzik/secret-cmd
Add secret list --filter to cli
2021-12-14 18:40:58 +01:00
1884bd8873 Merge pull request #12594 from TomSweeneyRedHat/dev/tsweeney/windoc2
[CI:DOCS] Update Windows Install Doc
2021-12-14 12:38:32 -05:00
e4e21522d1 Merge pull request #12091 from ananthb/docker-api-compat
Fixes #12063 Add docker compatible output after image build.
2021-12-14 18:32:57 +01:00
c134698fa1 Merge pull request #12593 from vrothberg/fix-11682
pause scope: don't use the global math/rand RNG
2021-12-14 17:52:57 +01:00
afdb4dc22f Update Windows Install Doc
Updates the Windows install doc to make it more clear.

Fixes: #11382

Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
2021-12-14 11:23:32 -05:00
3b9af150ab Merge pull request #12589 from containers/dependabot/go_modules/github.com/docker/docker-20.10.12incompatible
Bump github.com/docker/docker from 20.10.11+incompatible to 20.10.12+incompatible
2021-12-14 16:52:57 +01:00
52b12fe985 Fixes #12063 Add docker compatible output after image build.
Signed-off-by: Ananth Bhaskararaman <antsub@gmail.com>
2021-12-14 21:08:31 +05:30
65d5a2b68b pause scope: don't use the global math/rand RNG
Otherwise, we'll always get the same sequence of random numbers which
may lead to conflicts.  Also bump the number of maximum attempts to 10
instead of 3.

[NO NEW TESTS NEEDED] as I cannot enforce random number collisions.
Existing tests should continue be green and flake slightly less.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-12-14 16:34:54 +01:00
c501c1d642 Merge pull request #12585 from Luap99/network-ls-sort
network ls: show networks in deterministic order
2021-12-14 16:05:42 +01:00
ef325bc8c4 specgen: check that networks are only set with bridge
Because we cannot reqad the networking mode in the frontent because we
should always use the server default we have to parse the mac and ip
address to the server via a default network. Now when the server reads
the default nsmode it has to reject the provided networks when the mode
is not set to bridge.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2021-12-14 15:23:40 +01:00
094e1d70de container restore/import: store networks from db
It is important that we store the current networks from the db in the
config. Also make sure to properly handle aliases and ignore static ip/mac
addresses.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2021-12-14 15:23:40 +01:00
3e9af2029f play kube add support for multiple networks
Allow the same --network options for play kube as for podman run/create.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2021-12-14 15:23:40 +01:00
535818414c support advanced network configuration via cli
Rework the --network parse logic to support multiple networks with
specific network configuration settings.
--network can now be set multiple times. For bridge network mode the
following options have been added:
  - **alias=name**: Add network-scoped alias for the container.
  - **ip=IPv4**: Specify a static ipv4 address for this container.
  - **ip=IPv6**: Specify a static ipv6 address for this container.
  - **mac=MAC**: Specify a static mac address address for this container.
  - **interface_name**: Specify a name for the created network interface inside the container.

So now you can set --network bridge:ip=10.88.0.10,mac=44:33:22:11:00:99
for the default bridge network as well as for network names.
This is better than using --ip because we can set the ip per network
without any confusion which network the ip address should be assigned
to.
The --ip, --mac-address and --network-alias options are still supported
but --ip or --mac-address can only be set when only one network is set.
This limitation already existed previously.

The ability to specify a custom network interface name is new
Fixes #11534

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2021-12-14 15:23:39 +01:00