14995 Commits

Author SHA1 Message Date
aecb2023d2 Merge pull request #13724 from naveensrinivasan/naveen/feat/set-perms-actions
[CI:DOCS] Set permissions for GitHub actions
2022-04-04 10:47:27 -04:00
164b64ea3b specgen: do not set OOMScoreAdj by default
do not force a value of OOMScoreAdj=0 if it is wasn't specified by the
user.

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

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2022-04-04 15:40:12 +02:00
0e3a704f69 Merge pull request #13757 from andrewaylett/anonymous_volumes
Allow creating anonymous volumes with --mount
2022-04-04 09:29:12 -04:00
48c4015ac1 Merge pull request #13655 from n1hility/dual-pipes
Prefer registering both machine and global pipe on Win
2022-04-04 08:06:02 -04:00
66d30e946d Merge pull request #13739 from cevich/fix_build_push
Fix multi-arch image build version-tag + allow testing in PRs
2022-04-04 03:17:34 -04:00
6375a85055 Merge branch 'containers:main' into naveen/feat/set-perms-actions 2022-04-02 16:29:37 -05:00
bf4318e606 Allow creating anonymous volumes with --mount
This fixes #13756.

All the mechanics to create anonymous volumes is already present, but
there's still a validation preventing that path from being taken.  We
remove the validation, which allows the volume to be created
successfully.

Signed-off-by: Andrew Aylett <andrew@aylett.co.uk>
2022-04-02 21:10:40 +01:00
d4394ea368 Merge pull request #13665 from jwhonce/issues/13535
Add build test for .containerignore tar file
2022-04-01 11:59:46 -04:00
23e57575b0 Merge pull request #13594 from cdoern/podVolumes
fix pod volume passing and alter infra inheritance
2022-04-01 09:51:23 -04:00
59fcf0e39d Merge pull request #13744 from giuseppe/allow-privileged-cap-add
specgen: permit --privileged and --cap-add
2022-04-01 09:25:26 -04:00
1cd529b22d specgen: permit --privileged and --cap-add
--cap-add is useful when running a privileged container with UID != 0,
so that individual capabilities can be added to the container process.

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

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2022-04-01 10:15:17 +02:00
d55c46f8c6 Cirrus: Allow manually running image-build task
Building multi-arch images in a standardized way is complex.  Some
of the builds themselves can take a really long time to run (over
an hour).  Make changes easier to test inside a PR by adding
manually-triggered image-build tasks.  These mirror most of the real
cron-triggered task, without actually pushing the final images.

Signed-off-by: Chris Evich <cevich@redhat.com>
2022-03-31 17:07:33 -04:00
5fcd2a7ac3 Cirrus: Upd VM images to fix multi-arch build bug
Ref: https://github.com/containers/automation_images/pull/122

Signed-off-by: Chris Evich <cevich@redhat.com>
2022-03-31 15:40:30 -04:00
d1f3a2d6a8 Merge pull request #13738 from Luap99/remote-command
cli commands: better error for unsupported commands
2022-03-31 12:46:38 -04:00
f8c2df87cb Add build test for .containerignore tar file
Ensure a directory added to .containerignore on client is not included
in tar sent to remote podman API service

* Clean up podman invocations to not include duplicate --remote and
  --url flags
* Use pkill vs. pgrep when cleaning up podman API service in tests
* Add exit code when logging error when testing

Closes #13535

Signed-off-by: Jhon Honce <jhonce@redhat.com>
2022-03-31 08:48:54 -07:00
e5745139a7 cli commands: better error for unsupported commands
When you run podman-remote unsahre for example you currently get:
Error: unrecognized command `podman-remote unshare`

This is because we do not add the command to the cobra tree when we run
in remote mode. However this is a bad user experience since it is not
clear that the command is only supported for local podman. Users are
left wondering why this does not work and could think the documentation
is wrong.

To fix it we add a clear error message:
Error: cannot use command "podman-remote unshare" with the remote podman client

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-03-31 16:20:18 +02:00
4ba71f955a Merge pull request #13732 from flouthoc/reuse-configmap-volume
kube: `configmap` volume should be reused if already exists
2022-03-31 07:30:46 -04:00
daeea48df5 kube: configmap volume should be reused if already exists
`podman play kube` creates a new volume for configmap, if same configmap
is applied again volume can be re-used, there is no need to remove and
re-create the volume again

Signed-off-by: Aditya R <arajan@redhat.com>
2022-03-31 15:07:22 +05:30
c08e8c30a1 Merge pull request #13697 from edsantiago/upgrade_test_matrix
Upgrade tests: reexamine cross-testing matrix
2022-03-30 16:41:21 -04:00
9cacc18c95 Set permissions for GitHub actions
- Included permissions for the action. https://github.com/ossf/scorecard/blob/main/docs/checks.md#token-permissions

https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs

Signed-off-by: naveensrinivasan <172697+naveensrinivasan@users.noreply.github.com>
2022-03-30 20:36:23 +00:00
3c75c4a54c Merge pull request #13704 from baude/refactor2
Machine refactor part 2
2022-03-30 16:23:20 -04:00
fbbf5e88fd Merge pull request #13646 from Luap99/slirp4netns-portrange
fix slirp4netns port forwarding with ranges
2022-03-30 13:25:20 -04:00
688213ba19 Merge pull request #13716 from giuseppe/enable-all-controllers-service
systemd: enable all cgroups when running as a service
2022-03-30 12:09:38 -04:00
0cb93e2285 Merge pull request #13712 from Luap99/netns-scope-systemd
rootless netns: move process to scope only with systemd
2022-03-30 10:23:19 -04:00
a06df4fc1a Machine refactor part 2
This PR further implements a more structured approach to handling the
files needed by machine.  More files are now made as MachineFile which
can then have a symlink (using a shorter path) to them.  Also added Set
and Get methods for many of the files.

The next part of the refactor will implement the use of symlinks on
MacOS.

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

[NO NEW TESTS NEEDED]

Signed-off-by: Brent Baude <bbaude@redhat.com>
2022-03-30 09:22:40 -05:00
81632722ea systemd: enable all cgroups when running as a service
enable cgroup delegation when running as a systemd service so all the
available controllers are correctly detected.

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

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2022-03-30 15:49:06 +02:00
ff8834f023 Merge pull request #13705 from jwmatthews/issue13690
Add 'Os' to be queried via 'version' output
2022-03-30 07:51:04 -04:00
23cdbf322d test/apiv2: support netavark
Since netavark does not support dhcp yet we have to create a macvlan
network with a static subnet. Since we do not use the network to run
containers the actual subnet does not matter.

Also stop hard coding the network id. Unlike the cni backend the
netavark backend creates random ids that are not predictable.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-03-30 13:38:47 +02:00
1f1cf7bd40 rootless netns: move process to scope only with systemd
When you run podman on a non systemd system we should not try to move the
process under a new systemd scope.

[NO NEW TESTS NEEDED]

Ref #13703

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-03-30 13:02:41 +02:00
d0d805ba1b Merge pull request #13478 from cevich/build_push
Cirrus: Build multi-arch images + manifests
2022-03-29 21:05:23 -04:00
1ffcc4a888 Add 'Os' to be queried via 'version' output
Signed-off-by: John Matthews <jwmatthews@gmail.com>
2022-03-29 18:10:59 -04:00
b60854e8bc Prefer registering both machine and global pipe
Signed-off-by: Jason T. Greene <jason.greene@redhat.com>
2022-03-29 17:31:50 -04:00
2a882b7703 Upgrade tests: reexamine cross-testing matrix
- removed: v1.9.0, v2.0.6
 + added:   v3.4.0

(Cannot add v4 because there's no such image on quay. As soon
as one appears, we should add it.)

Add a workaround for a UTS namespace conflict new in v3.4

Signed-off-by: Ed Santiago <santiago@redhat.com>
2022-03-29 15:24:36 -06:00
c319edaaf8 Merge pull request #13693 from edsantiago/show_size
size-check: display binary size and growth
2022-03-29 14:48:02 -04:00
eedaaf33cd fix slirp4netns port forwarding with ranges
The slirp4netns port forwarder was not updated to make use of the new
port format. This results in a problem when port ranges are used since
it does not read the range field from the port.

Update the logic to iterate through all ports with the range and
protocols. Also added a system test for port ranges with slirp4netns,
rootlesskit and the bridge network mode.

Fixes #13643

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-03-29 19:18:40 +02:00
3990f9c51e Merge pull request #13692 from Luap99/upgrade-test
upgrade tests: fix networking problems
2022-03-29 18:32:03 +02:00
c185d8c0d6 Add option for pod logs to display different colors per container.
Signed-off-by: Krzysztof Baran <krysbaran@gmail.com>
Signed-off-by: gcalin <caling@protonmail.com>
2022-03-29 17:29:13 +02:00
7a53428049 fix pod volume passing and alter infra inheritance
the infra Inherit function was not properly passing pod volume information to new containers
alter the inherit function and struct to use the new `ConfigToSpec` function used in clone
pick and choose the proper entities from a temp spec and validate them on the spegen side rather
than passing directly to a config

resolves #13548

Signed-off-by: cdoern <cbdoer23@g.holycross.edu>
Signed-off-by: cdoern <cdoern@redhat.com>
Signed-off-by: cdoern <cbdoer23@g.holycross.edu>
2022-03-29 11:10:46 -04:00
c602084a5c size-check: display binary size and growth
This won't actually be seen except by someone who takes the
time to clickety-click into Cirrus - but that's better than
not showing it at all.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2022-03-29 08:56:19 -06:00
61c518627d upgrade tests: fix networking problems
With podman4 we support netavark, however old versions will still use
cni. Since netavark and cni can conflict we should not mix them.
Remove the network setup from the inital podman command and create the
directories manually to prevent such conflicts.

Also the update to 4.0 changes the network db structure. While it is
compatible from 3.X to 4.0 it will fail the other way around. In this
test it will happen because the cleanup process still uses the old
podman while the network connect/disconnect test already changed the db
format. Therefore the cleanup process cannot see any networks and will
not tear it down. The following start will fail because the ip address
is already assigned.

Fixes #13679

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-03-29 16:42:50 +02:00
0eff4b70d0 Merge pull request #13686 from vrothberg/nxadm
replace hpcloud/tail with nxadm/tail
2022-03-29 16:41:47 +02:00
83d0729146 Merge pull request #13619 from rhatdan/systemd
Set systemd mode if entrypoint begins with /bin/sh -c
2022-03-29 14:45:46 +02:00
21502987b2 replace hpcloud/tail with nxadm/tail
The hpcloud is not maintained anymore.  nxadm is already part of the
dependency chain, so it won't add work for downstream packages.

While testing upcoming changes to the events-file backend, I noticed
that nxadm is shipping required fixes.

[NO NEW TESTS NEEDED]

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2022-03-29 13:35:37 +02:00
784ec5d251 Merge pull request #13681 from baude/qmpmonitorfix
Migrate machine configs
2022-03-29 13:13:46 +02:00
a2d7fb0c66 Merge pull request #13682 from patrycja-guzik/docu2
[CI:DOCS]  Unify examples section across several man pages
2022-03-29 08:33:45 +02:00
f6963cea13 Cirrus: Build multi-arch images + manifests
Github-actions for large/complex tasks is hard to read and maintain.
Reimplement the multi-arch image build workflow into a set of bash
scripts that use all native contrainer-org tooling.  This requires
a special VM image setup with emulation to build foreign architectures.
It also requires renaming the `helloimage` directory, because the build
script uses the directory name in the image FQIN.

Signed-off-by: Chris Evich <cevich@redhat.com>
2022-03-28 16:56:28 -04:00
914e9b3f70 Merge pull request #13564 from naveensrinivasan/naveen/feat/pin-actions
[CI:DOCS] Pin actions to a full length commit SHA
2022-03-28 22:44:12 +02:00
cdf74f2082 Set systemd mode if entrypoint begins with /bin/sh -c
Fixes: https://github.com/containers/podman/issues/13324

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2022-03-28 16:30:47 -04:00
a8e6c639e2 Unify examples section across several man pages
This commit adjusts example sections across several man pages
to the format seen in other pages.

Signed-off-by: Patrycja Guzik <patrycja.k.guzik@gmail.com>
2022-03-28 21:56:13 +02:00
6e0e1cbddd Migrate machine configs
If podman detects a Machinev1 config, it will automatically migrate it
to the new format.

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

[NO NEW TESTS NEEDED]
2022-03-28 14:54:19 -05:00