16078 Commits

Author SHA1 Message Date
d7ce5dfe27 Merge pull request #15183 from anjannath/pkg-goarch
pkginstaller: use correct GOARCH while building podman binaries
2022-08-04 13:39:40 +00:00
773149d569 Merge pull request #15175 from vrothberg/RUN-1606
refactor pkg/autoupdate
2022-08-04 13:37:41 +00:00
9964366f69 start filter flag changes
Tying filtering logic for podman stop and start to same place in getContainersAndInputByContext() to reduce code redundancy

Signed-off-by: Karthik Elango <kelango@redhat.com>
2022-08-04 09:08:14 -04:00
4dff697b77 Merge pull request #15191 from Luap99/docs-2
fix sphinx build to include podman-create/run page
2022-08-04 11:56:07 +00:00
e67e602265 podman info: hide --debug
It's a NOP since Podman v2.0 (#5738).

[NO NEW TESTS NEEDED] - does not change behavior.

Fixes: #15185
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2022-08-04 13:39:15 +02:00
623b0c57f6 pkginstaller: use correct GOARCH while building podman binaries
we were not using the correct GOARCH to build the podman remote
and podman-mac-helper binaries, this uses the ARCH value passed
to the make invocation to set the GORACH

[NO NEW TESTS NEEDED]

Signed-off-by: Anjan Nath <kaludios@gmail.com>
2022-08-04 16:54:11 +05:30
bcfbee9862 ISSUE TEMPLATE: remove --debug from podman info
`--debug` is a NOP and will be hidden in a later commit.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2022-08-04 13:14:56 +02:00
81a1ea18c8 pkg/autoupdate: "image" policy: add deprecation comment
The "image" policy has been deprecated in favor of the more precise
"registry" policy.  Add a code comment to leave some breadcrumbs for
future generations.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2022-08-04 13:07:58 +02:00
43cca5d97a pkg/autoupdate: decompose the update logic
Decompose the update logic into smaller steps (update check, update,
rollback, etc.) and move the implementation into the `task` API.
This allows to transition a task from state to state, independent of its
underlying auto-update policy.

Supporting more than one container per unit is now really close.

[NO NEW TESTS NEEDED] - should not change behavior.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2022-08-04 13:07:58 +02:00
0df51bb6bc pkg/autoupdate: move status into task
As state should be kept in a single `task`.  This will allow for
separating updates from rollbacks which will be needed to support
multiple containers/tasks in a single unit.

[NO NEW TESTS NEEDED] - should not change behavior.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2022-08-04 13:07:58 +02:00
af3ce70844 pkg/autoupdate: document fields of updater
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2022-08-04 13:07:58 +02:00
3fdd3b1ae3 pkg/autoupdate: remove image map from updater
It is not state needed after assembling the tasks, so remove it to keep
the task struct simpler.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2022-08-04 13:07:58 +02:00
82d18a86f3 pkg/autoupdate: use policy consts were possible
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2022-08-04 13:07:58 +02:00
1cc933c6bb pkg/autoupdate: introduce status constants
To replace redundant string scattered across the code with proper
constants.  The "status" will further be useful in a future change
as it can be moved into a `task`.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2022-08-04 13:07:58 +02:00
42c4c17c01 pkg/autoupdate: move authfile into tasks
Will simplify the code and speed up things as we do not consult a
container's labels multiple times.

[NO NEW TESTS NEEDED] - should not change behavior.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2022-08-04 13:07:58 +02:00
3f1928d767 pkg/autoupdate: move more logic under task
This will simplify the logic and pave the way for abstracting the
auto-update policies to a certain degree that allows us to better
control _when_ the updates and rollbacks happen and will ultimately
reduce redundant code.

[NO NEW TESTS NEEDED] - should not change behavior.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2022-08-04 13:07:58 +02:00
cfa089c361 pkg/autoupdate: s/updateImage/pullImage/
"pull" is more expressive.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2022-08-04 13:07:58 +02:00
13a8ebd09f pkg/autoupdate: repull image if other containers failed
If two containers use the same image and one rolled back (i.e., tagged
the old image again), make sure to repull the image for the other
container.

Once an image has caused a rollback, it may be worth marking this image
as broken and not update any other container using it but that is
outside of the scope.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2022-08-04 13:07:58 +02:00
2c999f1ecb pkg/autoupdate: update unit-by-unit
Change the auto-update logic to update unit-by-unit rather by policy.
This allows for, in theory now and in practice later, to have mutliple
containers run in a single systemd unit and update them in sequence
before restarting the unit.

[NO NEW TESTS NEEDED] - should not change behavior.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2022-08-04 13:07:58 +02:00
f8b6a81ae4 test/system/255-auto-update.bats: add an SELinux comment
Drop a comment on using `chcon` to let the local rollback test pass.
It took me a while to understand why the test failed and future souls
may appreciated the extra breadcrumb.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2022-08-04 13:07:58 +02:00
87c0c760ec pkg/autoupdate: introduce the notion of a task
A `task` includes data and state for updating a given container image.
It will come in handy in future changes, but we are going there in
baby steps to have smaller incremental changes.

[NO NEW TESTS NEEDED] - should not change behaviour.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2022-08-04 13:07:58 +02:00
033cc059fa pkg/autoupdate: remove redundant branch
[NO NEW TESTS NEEDED] - should not change behavior.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2022-08-04 13:07:58 +02:00
328c8ba7b4 pkg/autoupdate: move policy map into updater
[NO NEW TESTS NEEDED] - should not change behavior.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2022-08-04 13:07:58 +02:00
d476097739 pkg/autoupdate: introduce updater for shared state
Introduce an `updater` type to allow for sharing state.
This will be more useful for future changes.

[NO NEW TESTS NEEDED] as it does not change behavior.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2022-08-04 13:07:58 +02:00
ccbb8e7444 Merge pull request #15145 from cevich/ec2_get_ci_vm
[CI:DOCS] Cirrus: Support EC2 instances in hack/get_ci_vm.sh
2022-08-04 11:02:00 +00:00
1638218d1b Merge pull request #15158 from cdoern/secrets
add omitempty to Secret in k8s VolumeSource
2022-08-04 07:01:51 -04:00
8f3f683a31 Merge pull request #15188 from Luap99/docs
fix hack/markdown-preprocess to support older python versions
2022-08-04 10:49:00 +00:00
79b10a7c6a readthedocs(sphinx): run the markdown preprocessor
When docs.podman.io is build on readthedocs we have to make sure to
generate the markdown pages first.

It works locally with sphinx but I have no idea if this works on the
readthedocs infra.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-08-04 11:46:54 +02:00
65fb90165a hack/markdown-preprocess: allow to be executed from any dir
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-08-04 10:57:31 +02:00
031b7dec71 fix hack/markdown-preprocess to support older python versions
str.removeprefix() and str.removesuffix() is python 3.9+ only but we need to
support older versions for the OSX cross task.

This fixes broken CI on main.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-08-04 10:26:18 +02:00
ea7c979647 Merge pull request #15068 from n1hility/wsl-as-user
Default to rootless via Windows WSL prompt / Lock to WSL2
2022-08-04 01:51:36 +00:00
7df8d80508 add omitempty to Secret in k8s VolumeSource
Secret was populating a generated kube as `null`. Add omitempty
so that when the volume source is not a secret, we do not print unnecessary info

resolves #15156

Signed-off-by: Charlie Doern <cdoern@redhat.com>
2022-08-03 16:42:28 -04:00
549974d97e Merge pull request #15174 from edsantiago/docs_dedup_phase1
[CI:DOCS] Refactor common options in man pages
2022-08-03 20:29:02 +00:00
328eb2b4ca Cirrus: Remove disused env. var.
Hasn't been used for quite a while.  Remove it and associated comments.

Signed-off-by: Chris Evich <cevich@redhat.com>
2022-08-03 15:38:04 -04:00
1e4a141d88 Cirrus: Support EC2 instances in hack/get_ci_vm.sh
***Depends on:***
https://github.com/containers/automation_images/pull/160

Signed-off-by: Chris Evich <cevich@redhat.com>
2022-08-03 14:25:09 -04:00
0f002c1600 Merge pull request #15105 from anjannath/sign-qemu
Add steps to sign included qemu and notarize the built pkg
2022-08-03 17:55:57 +00:00
5fc7339aa1 Merge pull request #15084 from sstosh/rm-filter
Add rm --filter option
2022-08-03 17:23:07 +00:00
44212b90bb pkginstaller: makefile improvements to avoid redownloading
this updates downloading of gvproxy and qemu using a standard
makefile rule which will avoid downloading them again if  its
already downloaded

[NO NEW TESTS NEEDED]

Signed-off-by: Anjan Nath <kaludios@gmail.com>
2022-08-03 21:20:10 +05:30
e6670cd297 pkginstaller: add makefile target to notarize the built pkg
[NO NEW TESTS NEEDED]

Signed-off-by: Anjan Nath <kaludios@gmail.com>
2022-08-03 21:20:10 +05:30
c5029d2eea pkginstaller: sign qemu-system-* binary for the pkg
add file hvf.entitlements which has the com.apple.security.hypervisor
entitlement needed for qemu

[NO NEW TESTS NEEDED]

Signed-off-by: Anjan Nath <kaludios@gmail.com>
2022-08-03 21:20:10 +05:30
c1a38eb773 Merge pull request #15161 from lsm5/switch-to-dnf
Cirrus: use dnf instead of rpm to install packages
2022-08-03 15:14:22 +00:00
e54dac4dc6 Merge pull request #15166 from sstosh/ci-mount-rootless
Cirrus: Fix e2e tests for "mount_rootless_test"
2022-08-03 13:55:25 +00:00
56039cffd7 Refactor common options in man pages
podman-create and -run have many options in common. To date,
these are copy-pasted and haphazardly maintained.

Solution: add an include mechanism, '@@option foo', such
that multiple md source files can fetch from one common file.

This is a Phase One commit, a very small subset of what's
possible. Purpose of this commit is ease of review. If this
passes review, much more (trickier stuff) will be forthcoming.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2022-08-03 06:53:33 -06:00
50981cb846 skip pod resource limits test on aarch64
Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2022-08-03 08:29:59 -04:00
1dbd61653d Cirrus: Fix e2e tests for "mount_rootless_test"
e2e `mount_rootless_test` did not load `podman binary path` successfully.
This PR fix this problem.

[It] podman unshare podman mount:
```
[+1596s] Running: ... unshare  mount <cid>
[+1596s] Error: exec: no command
[+1596s] output:
```

[It] podman unshare image podman mount:
```
[+1599s] Running: ... unshare  image mount quay.io/libpod/alpine:latest
[+1599s] Error: exec: no command
[+1599s] output:
```

Signed-off-by: Toshiki Sonoda <sonoda.toshiki@fujitsu.com>
2022-08-03 17:01:18 +09:00
1139cd9b81 Merge pull request #14974 from nicrowe00/kubedown1
add "podman kube down" command
2022-08-03 07:56:13 +00:00
3a7a275c34 Cirrus: use dnf instead of rpm to install packages
Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2022-08-02 14:19:48 -04:00
1249cbb75f add "podman kube down" command
The "podman kube down" reads in a structured file of
Kubernetes YAML and removes pods based on the Kubernetes kind described in the YAML,
similiar to "podman play kube --down". Users will still be able to use
"podman play kube --down" and "podman kube play --down" to
perform the same function.

Signed-off-by: Niall Crowe <nicrowe@redhat.com>
2022-08-02 16:27:01 +01:00
c09457e34a Merge pull request #15119 from nicrowe00/15071
switch from "kube/play" endpoint to "play/kube" endpoint.
2022-08-02 16:01:23 +02:00
080cbf1d95 Merge pull request #15136 from Luap99/systemd-generate-hostname
podman generate systemd --new: allow -h hostname
2022-08-02 15:58:50 +02:00