15868 Commits

Author SHA1 Message Date
5397a00a1c Merge pull request #14540 from anjannath/pkginstaller
Add support for building macOS pkg installer
2022-07-27 02:02:44 +02:00
4277b1fdc5 Merge pull request #15075 from cevich/latest_imgts
[CI:DOCS] Cirrus: Use the latest imgts container
2022-07-26 21:48:23 +02:00
56578c413d Cirrus: Use the latest imgts container
Contains important updates re: preserving release-branch CI VM images.
Ref: https://github.com/containers/automation_images/pull/157

Signed-off-by: Chris Evich <cevich@redhat.com>
2022-07-26 14:44:55 -04:00
c35ae7640c Add support for building macOS pkg installer
it installs podman and supporting binaries along with
qemu to have a functioning podman install using a pkg

podman and podman-mac-helper  is compiled from source

gvproxy binary is downloaded from its github releases
and qemu from github release of containers/podman-machine-qemu

[NO NEW TESTS NEEDED]

Signed-off-by: Anjan Nath <kaludios@gmail.com>
2022-07-26 21:05:17 +05:30
242639f4b1 Merge pull request #15043 from eriksjolund/fix_sdnotify_option_docs
[CI:DOCS] podman-generate-systemd.1.md: document --sdnotify
2022-07-26 17:12:39 +02:00
7f0fab10d1 Merge pull request #15059 from cdoern/infra
pod create --share none should not create infra
2022-07-26 16:21:40 +02:00
a298909dec Merge pull request #15061 from cfergeau/always-true
machine: Fix check which is always true
2022-07-26 12:20:30 +02:00
43d6f89d12 Merge pull request #15057 from marshall-lee/tls-verify-default-true
Set TLSVerify=true by default for API endpoints
2022-07-26 11:52:17 +02:00
8e56a5605f machine: Fix check which is always true
Before making / mutable/immutable, podman-machine checks if the mount is
being done in /home or /mnt. However the current check is always going
to be true:
```
!strings.HasPrefix(mount.Target, "/home") || !strings.HasPrefix(mount.Target, "/mnt")
```
is false when mount.Target starts with "/home" and mount.Target starts
with "/mnt", which cannot happen at the same time.

The correct check is:
```
!strings.HasPrefix(mount.Target, "/home") && !strings.HasPrefix(mount.Target, "/mnt")
```
which can also be written as:
```
!(strings.HasPrefix(mount.Target, "/home") || strings.HasPrefix(mount.Target, "/mnt"))
```

The impact is not too bad, it results in extra 'chattr -i' calls which
should be unneeded.

[NO NEW TESTS NEEDED]

Signed-off-by: Christophe Fergeau <cfergeau@redhat.com>
2022-07-26 09:12:27 +02:00
1b099eec8e [CI:DOCS] podman-generate-systemd.1.md: document --sdnotify
* Document why the default value for --sdnotify is overridden.
  Some was included text from
  https://github.com/containers/podman/issues/15029#issuecomment-1192244755

* Document that --sdnotify=ignore is overridden.

Fixes #15029

Co-authored-by: Valentin Rothberg <vrothberg@redhat.com>
Co-authored-by: Tom Sweeney <tsweeney@redhat.com>
Signed-off-by: Erik Sjölund <erik.sjolund@gmail.com>
2022-07-26 07:16:09 +02:00
e9d29d71cb Merge pull request #15058 from edsantiago/obsolete_skips
Semiperiodoc cleanup of obsolete FIXMEs
2022-07-26 02:04:01 +02:00
52a4642edd Set TLSVerify=true by default for API endpoints
Option defaults in API must be the same as in CLI.

```
% podman image push --help
% podman image pull --help
% podman manifest push --help
% podman image search --help
```

All of these CLI commands them have --tls-verify=true by default:
```
--tls-verify  require HTTPS and verify certificates when accessing the registry (default true)
```

As for `podman image build`, it doesn't have any means to control
`tlsVerify` parameter but it must be true by default.

Signed-off-by: Vladimir Kochnev <hashtable@yandex.ru>
2022-07-26 02:07:56 +03:00
94e0a364a8 Semiperiodoc cleanup of obsolete FIXMEs
Some refer to issues that are closed. Remove them.

Some are runc bugs that will never be fixed. Say so, and remove
the FIXME.

One (bps/iops) should probably be fixed. File an issue for it, and
update comment to include the issue# so my find-obsolete-skips script
can track it.

And one (rootless mount with a "kernel bug?" comment) is still
not fixed. Leave the skip, but add a comment documenting the symptom.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2022-07-25 13:08:35 -06:00
b70e2a4788 Merge pull request #15064 from vrothberg/benchmarks
benchmarks: fix create test
2022-07-25 19:23:07 +02:00
27679d80b8 pod create --share none should not create infra
for podman pod create, when we are not sharing any namespaces there is no point for the infra container.
This is especially true since resources have also been decoupled from the container recently.

handle this on the cmd level so that we can still create infra if set explicitly

resolves #15048

Signed-off-by: Charlie Doern <cdoern@redhat.com>
2022-07-25 13:11:06 -04:00
4d18a98ec2 benchmarks: fix create test
And a new one for `run --detach`.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2022-07-25 17:44:13 +02:00
da1f479216 Merge pull request #15035 from cdoern/cgroup
fix container create/run throttle devices
2022-07-23 01:35:58 +02:00
935c150ee2 Merge pull request #15042 from Luap99/int-remote-netbackend
integration test: fix network backend option with remote
2022-07-22 19:32:58 +02:00
94e97df47b Merge pull request #15039 from Luap99/cni-doc
[CI:DOCS] docs: remove CNI word where it is not applicable
2022-07-22 19:30:25 +02:00
05618a55c9 Merge pull request #14976 from giuseppe/do-not-lock-containers-pod-rm
libpod: do not lock all containers on pod rm
2022-07-22 19:27:48 +02:00
c70449681a Merge pull request #15038 from vrothberg/wait-error
container wait: improve error message
2022-07-22 18:51:39 +02:00
9b4df69830 Merge pull request #14967 from sstosh/pause-option
Add pause/unpause --latest, --cidfile, --filter
2022-07-22 18:12:50 +02:00
8cd4ecad2e Merge pull request #14957 from edsantiago/dont_remake_remote
Makefile: use order-only prereq for podman-remote
2022-07-22 18:10:17 +02:00
ad8940cecf fix container create/run throttle devices
pod resource limits introduced a regression where `FinishThrottleDevices` was not called for create/run

Signed-off-by: Charlie Doern <cdoern@redhat.com>
2022-07-22 11:42:51 -04:00
f53234a67e Merge pull request #15040 from Luap99/api-umask
API: libpod/create use correct default umask
2022-07-22 17:34:22 +02:00
d1f432dd56 Merge pull request #14567 from cdoern/secrets
Implement kubernetes secret handling for podman play kube
2022-07-22 16:07:45 +02:00
290116bf81 integration test: fix network backend option with remote
I honestly do not understand all this extra option parsing here but
there is really no reason to exclude  the option for remote, all the
other global options are also set there.

This fixes a problem with mixed cni/netavark use because the option was
unset.

Fixes #15017

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-07-22 15:29:18 +02:00
5e43fb15cc Merge pull request #15016 from Luap99/compat-netname
compat api: allow default bridge name for networks
2022-07-22 14:27:41 +02:00
5a80770e8e API: libpod/create use correct default umask
Make sure containers created via API have the correct umask from
containers.conf set.

Fixes #15036

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-07-22 14:20:29 +02:00
99bf6f96cd Merge pull request #14972 from edsantiago/ubuntu_cgroups_v1
Bump VMs, to Ubuntu 2204 with cgroups v1
2022-07-22 14:04:52 +02:00
35035d281c container wait: improve error message
Improve the error message when looking up the exit code of a container.
The state of the container may help us track down #14859 which flakes
rarely and is impossible to reproduce on my machine.

[NO NEW TESTS NEEDED]

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2022-07-22 13:57:08 +02:00
cbdda4e56e docs: remove CNI word where it is not applicable
Most network commands/features work with both netavark and CNI. When
we added added netavark most docs were not vetted and thus still use CNI
network, it should just say network.

Fixes #14990

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-07-22 13:46:28 +02:00
02eb057920 Merge pull request #14968 from jmguzik/compat
Compat API: unify pull/push and add missing progress info
2022-07-22 13:06:02 +02:00
9bba3cffc0 Merge pull request #15010 from Luap99/machine-e2e
enable linter for pkg/machine/e2e
2022-07-22 12:51:49 +02:00
1f35789252 Merge pull request #15022 from vrothberg/fix-14971
remote push: show copy progress
2022-07-22 11:31:50 +02:00
0a160fed77 Bump VMs, to Ubuntu 2204 with cgroups v1
...and enable the at-test-time confirmation, the one that
double-checks that if CI requests runc we actually use runc.
This exposed a nasty surprise in our setup: there are steps to
define $OCI_RUNTIME, but that's actually a total fakeout!
OCI_RUNTIME is used only in e2e tests, it has no effect
whatsoever on actual podman itself as invoked via command
line such as in system tests. Solution: use containers.conf

Given how fragile all this runtime stuff is, I've also added
new tests (e2e and system) that will check $CI_DESIRED_RUNTIME.

Image source: https://github.com/containers/automation_images/pull/146

Since we haven't actually been testing with runc, we need
to fix a few tests:

  - handle an error-message change (make it work in both crun and runc)
  - skip one system test, "survive service stop", that doesn't
    work with runc and I don't think we care.

...and skip a bunch, filing issues for each:

  - #15013 pod create --share-parent
  - #15014 timeout in dd
  - #15015 checkpoint tests time out under $CONTAINER
  - #15017 networking timeout with registry
  - #15018 restore --pod gripes about missing --pod
  - #15025 run --uidmap broken
  - #15027 pod inspect cgrouppath broken
  - ...and a bunch more ("podman pause") that probably don't
    even merit filing an issue.

Also, use /dev/urandom in one test (was: /dev/random) because
the test is timing out and /dev/urandom does not block. (But
the test is still timing out anyway, even with this change)

Also, as part of the VM switch we are now using go 1.18 (up
from 1.17) and this broke the gitlab tests. Thanks to @Luap99
for a quick fix.

Also, slight tweak to #15021: include the timeout value, and
reword message so command string is at end.

Also, fixed a misspelling in a test name.

Fixes: #14833

Signed-off-by: Ed Santiago <santiago@redhat.com>
2022-07-21 20:08:32 -06:00
ee937c518e Merge pull request #14876 from cdoern/cgroup
resource limits for pods
2022-07-21 23:01:03 +02:00
34b2018cfc Merge pull request #15030 from cevich/gitlab_comment
[CI:DOCS] Cirrus: Add prominent gitlab warning
2022-07-21 22:37:49 +02:00
c00ea686fe resource limits for pods
added the following flags and handling for podman pod create

--memory-swap
--cpuset-mems
--device-read-bps
--device-write-bps
--blkio-weight
--blkio-weight-device
--cpu-shares

given the new backend for systemd in c/common, all of these can now be exposed to pod create.
most of the heavy lifting (nearly all) is done within c/common. However, some rewiring needed to be done here
as well!

Signed-off-by: Charlie Doern <cdoern@redhat.com>
2022-07-21 14:50:01 -04:00
bc6a48eebb [CI:DOCS] Cirrus: Add prominent gitlab warning
It was not obvious enough in the scripts how much of a snowflake this
environment is.  Fix that with lots of capitalized words and asterisks.

Signed-off-by: Chris Evich <cevich@redhat.com>
2022-07-21 13:51:01 -04:00
5f53a67742 Merge pull request #15003 from giuseppe/create-etc-passwd
libpod: create /etc/passwd if missing
2022-07-21 19:45:56 +02:00
88b57dd9f1 fix broken machine test
The memory both local and in the CI test is converted to 3822. I don't
know why this changed but I want to have this working again. For the
future we should look at a more robust solution.

Fixes #15012

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-07-21 18:11:53 +02:00
19f4a463ed pkg/machine/e2e: do not import from cmd/podman
The same problem again as 4374038cc67405e3f5555b1870d5bb7f6570fa5d.

Also fix the incorrect --format autocompletion struct.

It should be avoided to import cmd/podman/... packages from outside of
cmd/podman. This can lead in weird hard to debug import paths but also
can have negative consequences when imported in unit tests. In this case
it will set XDG_CONFIG_HOME and thus the machine tests this dir over the
tmp HOME env variable which is set at a later point. This caused machine
files to be leaked into the actual users home dir.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-07-21 18:04:11 +02:00
604920dd11 fix some pkg/machine/e2e test to read stderr
Also fix the machine ssh code order to provide a better error message.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-07-21 18:04:11 +02:00
ee35ce86d0 enable linter for pkg/machine/e2e
Rename all files to _test.go and rename the package to e2e_test. This
makes the linter less strict about things like dot imports.

Add some unused nolint directives to silence some warnings, these can be
used to find untested options so someone could add tests for them.

Fixes #14996

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-07-21 18:04:10 +02:00
dd2b794061 libpod: create /etc/passwd if missing
create the /etc/passwd and /etc/group files if they are missing in the
image.

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

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2022-07-21 17:58:16 +02:00
b79ac0aca2 remote push: show copy progress
`podman-remote push` has shown absolutely no progress at all. Fix that
by doing essentially the same as the remote-pull code does.

The get-free-out-of-jail-card for backwards compatibility is to let the
`quiet` parameter default to true.  Since the --quioet flag wasn't
working before either, older Podman clients do not set it.

Also add regression tests to make sure we won't regress again.

Fixes: #11554
Fixes: #14971
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2022-07-21 17:13:36 +02:00
04ed519e9d Merge pull request #15021 from Luap99/e2e-timeout-output
e2e: show command and output when a timeout happens
2022-07-21 16:08:38 +02:00
afbfbe18a1 compose test: remove cni config copy
The network backend always has default config in memory so there is no
need to copy it. Also netavark cannot use it.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-07-21 15:37:10 +02:00
56093a3b46 compat api: always turn on network isolation for networks
Fix some network option parsing logic to use constants.
Always use the isolate option since this is what docker does.
Remove the icc option, this is different from isolate and it is not
implemented.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-07-21 15:36:33 +02:00