15741 Commits

Author SHA1 Message Date
693d439ac5 Update release notes and README on Main for v4.1.1
Redirect links to the new release, and update the release notes.

Signed-off-by: Matthew Heon <mheon@redhat.com>
2022-06-15 11:16:38 -04:00
751ba07a76 libpod: improve check to create conmon cgroup
commit 1951ff168a63157fa2f4711fde283edfc4981ed3 introduced a check so
that conmon is not moved to a new cgroup when podman is running inside
of a systemd service.  This is helpful to integrate podman in systemd
so that the spawned conmon lives in the same cgroup as the service
that created it.

Unfortunately this breaks when podman daemon is running in a systemd
service since the same check is in place thus all the conmon processes
end up in the same cgroup as the podman daemon.  When the podman
daemon systemd service stops the conmon processes are also terminated
as well as the containers they monitor.

Improve the check to exclude podman running as a daemon.

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

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2022-06-15 15:43:12 +02:00
90a669594a fix CI: golangci-lint is broken on main
The merge of both 528739cef3d2 and 1b62e4543845 at the same time created
a lint error on main.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-06-15 14:57:10 +02:00
20b3fbe6d6 systemd socker activation: check listener to prevent panic
Commit 5fa6f686db added a regression which was fixed in eb71712626f9.
Apply the same fix again to prevent a panic and return a proper error
instead.

To not regress again I added a e2e test which makes sure we do not panic.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-06-15 14:33:14 +02:00
cab97798bf Merge pull request #14584 from Luap99/lint-systemd
golangci-lint: add systemd build tag
2022-06-15 00:49:10 -04:00
43e12c135b Fix #14416: Use absolute path to WSL binary to create ssh keys for machine init
Signed-off-by: Clivar <16317699+Clivar@users.noreply.github.com>
2022-06-15 00:16:06 +02:00
e084f0ee1e Merge pull request #14585 from Luap99/nolint
golangci-lint: enable nolintlint
2022-06-14 18:58:53 +00:00
4018a9575e Merge pull request #14582 from giuseppe/no-create-containerenv-if-run-volume
container: do not create .containerenv with -v SRC:/run
2022-06-14 18:55:49 +00:00
a22e270ef6 Merge pull request #14324 from anjannath/qemu-test
[macos: podman-machine] look for firmware (edk2-code-fd) based on the path of qemu binary
2022-06-14 18:02:27 +00:00
1cf3e4cda4 Merge pull request #14551 from edsantiago/apiv2_tests_rootless
CI: APIv2 tests: add rootless
2022-06-14 17:31:38 +00:00
071b925dec Merge pull request #14588 from edsantiago/eek_buildah_bud_coverage
buildah-bud tests: reenable skipped 'bud' tests
2022-06-14 17:17:40 +00:00
ea18b9463e Merge pull request #14581 from edsantiago/bud_test_check_skip_syntax
buildah-bud tests: add arg sanity check
2022-06-14 16:45:14 +00:00
bfc446eea3 buildah-bud tests: reenable skipped 'bud' tests
Sigh. Buildah PR https://github.com/containers/buildah/pull/3368
changed 'bud' to 'build' in tests. Podman #11585 well-intentionedly
did the same for run-buildah-bud tests ... but did so by *replacing*
'bud' with 'build', not by *adding* 'build' to the list of commands
handled by podman-build. Hence, all tests invoking 'run_buildah bud'
have been completely untested since then.

This remedies that, and deals with all the fallout. Principal among
which is the discovery that our exit-code changes are no longer
necessary: that thing we did where buildah exit status 1 or 2 became
podman exit status 125? That no longer applies. podman now exits
with the same status as buildah. This simplifies our diffs, and
lets us enable a bunch more tests.

Also:
 - in run-buildah-bud-tests script, run 'sudo --validate' early on.
   Reason: otherwise, the sudo step happens a few minutes after
   the script starts (after the git-pull), by which time the user
   may have stepped away to get coffee, then comes back ten or twenty
   minutes later to find a stupid sudo prompt and no tests run.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2022-06-14 10:12:54 -06:00
455f4c7828 CI: APIv2 tests: add rootless
This would've caught a regression that #14549 had to fix.
Let's try to prevent the next regression.

This requires some hackery to get namespaces initialized
before the service is started; otherwise the service itself
initializes namespaces, which basically ends up with a
server process that runs forever.

Also: in stop_service(), reset service_pid, because that's
the correct thing to do.

Also: add some debug statements to try to figure out a
CI failure. (And leave them in place, because they might
be useful for future problems).

Signed-off-by: Ed Santiago <santiago@redhat.com>
2022-06-14 09:20:24 -06:00
232b3e342a buildah-bud tests: add arg sanity check
Fix bad design decision (mine) by adding a simple usage check to 'skip'
and 'skip_if_remote' functions: if invoked without test-name args,
fail loudly and immediately.

Background: yeah, their usage is not intuitive. Making the first arg
be a comment helps with _reading_ the code, but not _writing_ new
additions. A developer in a hurry could write "skip this-test" and,
until now, that would be a silent NOP.

Tested by adding broken skip/skip_if_remote calls inline; I confirm
that the line number and funcname usage is correct.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2022-06-14 08:56:28 -06:00
cffed099b8 Merge pull request #14561 from rhatdan/VENDOR
Update vendor of containers/buildah
2022-06-14 14:55:21 +00:00
41528739ce golangci-lint: enable nolintlint
The nolintlint linter does not deny the use of `//nolint`
Instead it allows us to enforce a common nolint style:
- force that a linter name must be specified
- do not add a space between `//` and `nolint`
- make sure nolint is only used when there is actually a problem

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-06-14 16:29:42 +02:00
1b62e45438 golangci-lint: add systemd build tag
Lint the systemd code and fix the reported problems.
The remoteclient tag is no longer used so I just removed it.

[NO NEW TESTS NEEDED]

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-06-14 15:28:45 +02:00
78ecdad5f8 Merge pull request #14580 from jakecorrenti/stats-on-non-running-container
Non-running containers now report statistics via the `podman stats`
2022-06-14 13:12:17 +00:00
fcfcd4cdb1 container: do not create .containerenv with -v SRC:/run
if /run is on a volume do not create the file /run/.containerenv as it
would leak outside of the container.

Closes: https://github.com/containers/podman/issues/14577

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2022-06-14 10:49:19 +02:00
4811cb110a podman system prune support prune unused networks
This is an enhancement for the podman system prune feature.

In this issue, it is mentioned that 'network prune' should be
wired into 'podman system prune'
https://github.com/containers/podman/issues/8673

Therefore, I add the function to remove unused networks.

Signed-off-by: Toshiki Sonoda <sonoda.toshiki@fujitsu.com>
2022-06-14 14:04:03 +09:00
5e9d20448c Update vendor of containers/buildah
Changes since 2022-05-31:
  - add --omit-history option (buildah PR 4028)

Signed-off-by: Ed Santiago <santiago@redhat.com>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2022-06-13 17:54:17 -04:00
9fac1b335f Merge pull request #14563 from ashley-cui/qemu
Fix M1 QEMU flags
2022-06-13 19:11:34 +00:00
608ad7d113 Non-running containers now report statistics via the podman stats
command

Previously, if a container was not running, and the user ran the `podman
stats` command, an error would be reported: `Error: container state
improper`.

Podman now reports stats as the fields' default values for their
respective type if the container is not running:

```
$ podman stats --no-stream demo

ID            NAME        CPU %       MEM USAGE / LIMIT  MEM %       NET IO      BLOCK IO    PIDS        CPU TIME    AVG CPU %
4b4bf8ce84ed  demo        0.00%       0B / 0B            0.00%       0B / 0B     0B / 0B     0           0s          0.00%
```

Closes: #14498

Signed-off-by: Jake Correnti <jcorrenti13@gmail.com>
2022-06-13 15:03:22 -04:00
b34cba6cd5 Merge pull request #14521 from cevich/fix_build_dep
Cirrus: Fix artifact passing when dep. skipped
2022-06-13 10:45:54 -04:00
1c46b31a68 Merge pull request #14560 from rhatdan/remote
podman-remote push --remove-signatures support
2022-06-13 04:15:20 -04:00
c044d455a1 Merge pull request #14562 from containers/dependabot/go_modules/test/tools/golang.org/x/tools-0.1.11
Bump golang.org/x/tools from 0.1.10 to 0.1.11 in /test/tools
2022-06-11 06:28:13 -04:00
958759a719 podman pod clone
implement podman pod clone, a command to create an exact copy of a pod while changing
certain config elements

current supported flags are:
--name change the pod name
--destroy remove the original pod
--start run the new pod on creation
and all infra-container related flags from podman pod create (namespaces etc)

resolves #12843

Signed-off-by: cdoern <cdoern@redhat.com>
2022-06-10 14:23:19 -04:00
b078aeb87c Merge pull request #14537 from m4z/patch-2
[CI:DOCS] Update remote_client.md
2022-06-10 11:42:50 -04:00
8d3e6577ae Fix M1 QEMU flags
When calling QEMU, the CPU arch should be host, and highmem should be on, or else the VM start fails.

[NO NEW TESTS NEEDED]

Signed-off-by: Ashley Cui <acui@redhat.com>
2022-06-10 09:21:04 -04:00
b7c283759a Bump golang.org/x/tools from 0.1.10 to 0.1.11 in /test/tools
Bumps [golang.org/x/tools](https://github.com/golang/tools) from 0.1.10 to 0.1.11.
- [Release notes](https://github.com/golang/tools/releases)
- [Commits](https://github.com/golang/tools/compare/v0.1.10...v0.1.11)

---
updated-dependencies:
- dependency-name: golang.org/x/tools
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-10 12:36:28 +00:00
efc1936c7c Merge pull request #14526 from vrothberg/fix-14420
podman cp: do not overwrite non-dirs with dirs and vice versa
2022-06-10 07:52:46 -04:00
48cf1d2583 podman-remote push --remove-signatures support
I don't see a reason why we don't support --remove-signatures
from remote push, so adding support.

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

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2022-06-10 07:14:12 -04:00
d4272bed51 podman cp: do not overwrite non-dirs with dirs and vice versa
Add a new `--overwrite` flag to `podman cp` to allow for overwriting in
case existing users depend on the behavior; they will have a workaround.
By default, the flag is turned off to be compatible with Docker and to
have a more sane behavior.

Fixes: #14420
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2022-06-10 09:42:19 +02:00
46c8da7d9a vendor buildah@main
Note that the bud-logfile-with-split-logfile-by-platform test is skipped
on the remote client (see #14544).

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2022-06-10 09:42:19 +02:00
9f1bd0a0a1 Merge pull request #14405 from rhatdan/docs
[CI:DOCS] Mount propagation works with named volumes
2022-06-09 17:13:31 -04:00
7b3e43c1f6 podman volume create --opt=o=timeout...
add an option to configure the driver timeout when creating a volume.
The default is 5 seconds but this value is too small for some custom drivers.

Signed-off-by: cdoern <cdoern@redhat.com>
2022-06-09 16:44:21 -04:00
f808907d85 Merge pull request #14469 from shanesmith/prevent-simultaneous-machine-starts
Prevent simultaneous machine starts
2022-06-09 16:23:25 -04:00
6a2c0e9601 Merge pull request #14552 from edsantiago/apiv2_test_panic_fix
APIv2 tests: (try to) fix flaky registry panic
2022-06-09 16:09:15 -04:00
ec7951bc14 Merge pull request #14553 from cevich/fix_eventually
Fix Remote filtering embedded directory test
2022-06-09 15:51:16 -04:00
e7db6d4893 Merge pull request #14480 from cdoern/infra
patch for pod host networking & other host namespace handling
2022-06-09 15:49:21 -04:00
0405e7c161 Merge pull request #14539 from Luap99/completion5
shell completion: fix problems with container path completion
2022-06-09 14:35:07 -04:00
80d5a00bb4 Fix Remote filtering embedded directory test
Fixes #14184

Docs: https://onsi.github.io/gomega/#making-asynchronous-assertions

Signed-off-by: Chris Evich <cevich@redhat.com>
2022-06-09 14:31:53 -04:00
2b97795c19 APIv2 tests: (try to) fix flaky registry panic
APIv2 tests are flaky after this morning's merge of #14543.

Symptom:
   test-apiv2: Timed out (10s) waiting for service (/dev/tcp/localhost/5564)

journal shows:
   registry[7421]: panic: unable to configure authorization (htpasswd):
      no access controller registered with name: none

Possible cause:
   Mix of REGISTRY_AUTH=none with REGISTRY_AUTH_HTPASSWD_* vars.
      https://github.com/distribution/distribution/issues/1168

Solution:
   only set _HTPASSWD_* vars when AUTH=htpasswd

Signed-off-by: Ed Santiago <santiago@redhat.com>
2022-06-09 12:17:17 -06:00
874ca426eb Merge pull request #14549 from Luap99/compat-create
compat api: fix regressions from "Swagger refactor/cleanup"
2022-06-09 13:27:11 -04:00
e5ef9fd5bc Merge pull request #14548 from containers/dependabot/go_modules/github.com/opencontainers/runc-1.1.3
Bump github.com/opencontainers/runc from 1.1.2 to 1.1.3
2022-06-09 13:25:12 -04:00
fd1d0d67fb Merge pull request #14533 from mheon/avoid_error_on_container_stop
Do not error on signalling a just-stopped container
2022-06-09 12:54:04 -04:00
81153ffa21 Introduce 'Starting' status for machines
- The State() function now returns machine.Starting status instead of an
  empty string if the VM is in the process of starting.

- The `CheckExclusiveActiveVM()` function returns `true` to prevent
  starting a VM while another is in the process of starting.

- `podman machine ls` displays "Currently starting" under "Last Up" for
  the starting VM

- `podman machine ls` supports `{{.Starting}}` boolean field in the format

- `podman machine inspect` displays "starting" in the "State" field for
  the starting VM

Signed-off-by: Shane Smith <shane.smith@shopify.com>
2022-06-09 12:42:43 -04:00
852a406851 Merge pull request #14542 from hshiina/restore-filelock
Pass '--file-locks' to OCI runtime at restoring
2022-06-09 11:48:52 -04:00
b13fc1bf98 patch for pod host networking & other host namespace handling
this patch included additonal host namespace checks when creating a ctr as well
as fixing of the tests to check /proc/self/ns/net

see #14461

Signed-off-by: cdoern <cdoern@redhat.com>
2022-06-09 10:30:48 -04:00