19253 Commits

Author SHA1 Message Date
5f9920ccf2 Merge pull request #18948 from edsantiago/getsafe_comment
e2e: GetSafeIPAddress(): discourage its use
2023-06-21 17:34:58 +02:00
692c35f06d Merge pull request #18961 from Luap99/hosts-resolv
libpod: write /etc/{hosts,resolv.conf} once
2023-06-21 17:32:22 +02:00
71b0168b53 Merge pull request #18940 from giuseppe/add-compression-level
cmd, push: expose --compression-level
2023-06-21 16:37:30 +02:00
2c8b679215 Merge pull request #18956 from vrothberg/fix-18951
compat API container create: handle platform parameter
2023-06-21 16:19:12 +02:00
26721b0a06 GetSafeIPAddress(): discourage its use
Add header comment suggesting podman network create instead.

Stop using it in checkpoint tests. Turned out to be much more
complicated than expected.

Also, fix two issues caught while scanning the code:
 - remove obsolete f28-and-earlier code.
 - remove seccomp workaround needed for RHEL7

Signed-off-by: Ed Santiago <santiago@redhat.com>
2023-06-21 07:47:00 -06:00
810c97bd85 libpod: write /etc/{hosts,resolv.conf} once
My PR[1] to remove PostConfigureNetNS is blocked on other things I want
to split this change out. It reduces the complexity when generating
/etc/hosts and /etc/resolv.conf as now we always write this file after
we setup the network. this means we can get the actual ip from the netns
which is important.

[NO NEW TESTS NEEDED] This is just a rework.

[1] https://github.com/containers/podman/pull/18468

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-06-21 15:33:42 +02:00
b71f74c372 Merge pull request #18955 from BlackHole1/remove-hard-code
refactor(machine): remove hard code
2023-06-21 14:53:20 +02:00
bb932cc840 cmd, push: expose --compression-level
This patch adds the --compression-level option to the push command.

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

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2023-06-21 14:28:16 +02:00
459248337b vendor: bump containers/common
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2023-06-21 14:28:16 +02:00
f4c514bffd compat API container create: handle platform parameter
The platform parameter has been ignored such that images have been
looked up by name only.

Fixes: #18951
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-06-21 14:19:23 +02:00
04a1cdfa96 refactor(machine): remove hard code
Use exported variables instead of hard-coded strings.

Ref: https://github.com/containers/common/pull/1516

Signed-off-by: Black-Hole1 <bh@bugs.cc>
2023-06-21 18:49:12 +08:00
6633a91c5a Merge pull request #18953 from BlackHole1/update-vendor
vendor in latests containers/common
2023-06-21 11:45:05 +02:00
ae6e390760 vendor in latests containers/common
To include export HostContainersInternal

Signed-off-by: Black-Hole1 <bh@bugs.cc>
2023-06-21 15:10:25 +08:00
a77f896bab Merge pull request #18936 from BlackHole1/fix-proxy
fix(machine): throw error `connection refused` after set proxy
2023-06-20 23:26:24 +02:00
3907df6789 Merge pull request #18820 from jakecorrenti/add-console-to-mac-machine
Add console mode to podman machine
2023-06-20 19:38:35 +02:00
81e63227e6 fix(machine): throw connect: connection refused after set proxy
When the `machine start` command is executed, Podman automatically retrieves the current host's `*_PROXY` environment variable and assigns it directly to the virtual machine in QEMU. However, most `*_PROXY` variables are set with `127.0.0.1` or `localhost`, such as `127.0.0.1:8888`. This causes failures in network-related operations within the virtual machine due to incorrect proxy settings.

Fixes: #14087
Signed-off-by: Black-Hole1 <bh@bugs.cc>
2023-06-21 01:01:58 +08:00
65e5d2773d Add console mode to podman machine
Add the functionality for a console to be dipslayed when the user runs
`podman --log-level debug machine start` on MacOS. This mimics the
behavior that currently exists on Linux.

[NO NEW TESTS NEEDED]

Signed-off-by: Jake Correnti <jakecorrenti+github@proton.me>
2023-06-20 09:46:45 -04:00
cc023c09e9 Merge pull request #18931 from vrothberg/lint
bump golangci-lint to v1.53.3
2023-06-20 06:01:50 -04:00
ddcefc9b9f e2e: kube test: specify expected exit code
Let's make sure to always specify the expected exit codes, even in case
of failure.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-06-20 09:41:52 +02:00
13c3a0dccb Merge pull request #18933 from containers/renovate/setuptools-68.x
chore(deps): update dependency setuptools to v68
2023-06-20 03:24:31 -04:00
574e00d324 e2e --authfile test: fix test condition
Which revealed that absent --authfile's are ignored but shouldn't.
The issue is now being tracked in #18938.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-06-20 08:54:09 +02:00
b2d9bd9e3e Merge pull request #18927 from chuanchang/fix_docs_issue_in_image_store
cmd/podman/root.go: fix help document issue of the image store
2023-06-20 02:33:32 -04:00
772f82ee67 Merge pull request #18917 from Luap99/ip-range
network create --ip-range allow for custom range
2023-06-19 15:02:48 -04:00
f8f337501b chore(deps): update dependency setuptools to v68
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-06-19 18:59:03 +00:00
84e42877ae make lint: re-enable revive
But disable the `unused-parameter` linter as there are just too many
reports that I could handle.  Also allow unused nolintlint reports.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-06-19 15:20:57 +02:00
aa453c4f11 make lint: re-enable ginkgolinter
To make sure the e2e tests are kept in order.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-06-19 15:09:34 +02:00
2efa7c3fa1 make lint: enable rowserrcheck
It turns out, after iterating over rows, we need to check for errors. It
also turns out that we did not do that at all.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-06-19 14:31:40 +02:00
f07aa1bfdc make lint: enable wastedassign
Because we shouldn't waste assigns.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-06-19 14:14:48 +02:00
60a5a59475 make lint: enable mirror
Helpful reports to avoid unnecessary allocations.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-06-19 14:11:12 +02:00
a35da3ad87 bump golangci-lint to v1.53.3
Disable new linters and drop comments on them.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-06-19 14:11:10 +02:00
f9844521bd Merge pull request #18929 from vrothberg/fix-18926
auto update: restart instead of stop+start
2023-06-19 05:24:02 -04:00
30d6543d8a Merge pull request #18909 from sstosh/service_destination
[CI:DOCS] Fix service_destinations description in podman man page
2023-06-19 04:14:14 -04:00
49c7417485 Merge pull request #18915 from BlackHole1/fix-start-machine-255
fix(ssh): machine failed to start with exit status 255
2023-06-19 03:53:37 -04:00
47e0557d57 auto update: restart instead of stop+start
Commit f131eaa74aa6 changed restart to a stop+start motivated by
comments in the systemd man pages that restart behaves different than
stop+start, for instance, that it keeps certain resources open and
treats timers differently.  Yet, the actually fix for #17607 in the very
same commit was dealing with an ENOENT of the CID file on container
removal.

As it turns out in in #18926, changing to stop+start regressed on
restarting dependencies when auto updating a systemd unit.  Hence, move
back to using restart to make sure that dependent systemd units are
restarted as well.

An alternative could be recommending to use `BindsTo=` in Quadlet files
but this seems less common than `Requires=` and hence more risky to
cause issues on user sites.

Fixes: #18926
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-06-19 09:37:21 +02:00
acb5f97f9d cmd/podman/root.go: fix help document issue of the image store
[NO NEW TESTS NEEDED]

Signed-off-by: Alex Jia <chuanchang.jia@gmail.com>
2023-06-19 14:47:08 +08:00
feea6663ee Merge pull request #18828 from rhatdan/quadlet
quadlet should exit non zero on failures
2023-06-18 02:39:20 -04:00
030213c76d Merge pull request #18224 from flouthoc/split-store
podman: add support for splitting imagestore using `--imagestore`
2023-06-17 01:36:18 -04:00
e5399aaf3c vendor: bump c/storage to v1.46.2-0.20230616083707-cc0d208e5e1c
Signed-off-by: Aditya R <arajan@redhat.com>
2023-06-17 08:51:17 +05:30
3829fbd35a podman: add support for splitting imagestore
Add support for `--imagestore` in podman which allows users to split the filesystem of containers vs image store, imagestore if configured will pull images in image storage instead of the graphRoot while keeping the other parts still in the originally configured graphRoot.

This is an implementation of
https://github.com/containers/storage/pull/1549 in podman.

Signed-off-by: Aditya R <arajan@redhat.com>
2023-06-17 08:51:08 +05:30
6d311f7381 Merge pull request #18892 from edsantiago/getsafeip
e2e: GetSafeIPAddress() replaces GetRandomIPAddress
2023-06-16 17:47:15 -04:00
e292748534 network create --ip-range allow for custom range
The backend allows for any start/end ip in the subnet. There is no
reason to limit the cli to only CIDR subnets. This allows for much more
flexibility.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-06-16 17:57:17 +02:00
ea5cf4c6ea Merge pull request #18912 from vrothberg/fix-18889
remote wait: fix "removed" condition
2023-06-16 08:08:45 -04:00
c2360800e0 fix(ssh): start machine failed to start with exit status 255
Signed-off-by: Black-Hole1 <bh@bugs.cc>
2023-06-16 19:39:38 +08:00
0ada57fbb2 Merge pull request #18905 from containers/renovate/golang.org-x-tools-0.x
fix(deps): update module golang.org/x/tools to v0.10.0
2023-06-16 06:03:53 -04:00
ed24f0b2ca remote wait: fix "removed" condition
The "removed" condition mapped to an undefined state which ultimately
rendered the wait endpoint to return an incorrect exit code.  Instead,
map "removed" to "exited" to make sure Podman returns the expected
exit code.

Fixes: #18889
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-06-16 11:55:53 +02:00
8d036906a9 [CI:DOCS] Fix service_destinations description in podman man page
- [service_destinations] should be [engine.service_destinations]
- service_destinations does not read from
  `/usr/share/containers/containers.conf` because podman uses config.ReadCustomConfig().

Fixes: #15615

Signed-off-by: Toshiki Sonoda <sonoda.toshiki@fujitsu.com>
2023-06-16 16:04:21 +09:00
719e3228b1 Merge pull request #18900 from Luap99/pasta
pasta: use code from c/common
2023-06-16 02:40:07 -04:00
bfe61af6d7 quadlet should exit non zero on failures
Fixes: #18778

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-06-15 19:12:17 -04:00
91fc435cb8 fix(deps): update module golang.org/x/tools to v0.10.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-06-15 22:55:36 +00:00
189a74d345 Merge pull request #18891 from rhatdan/update
Add support for setting autoupdate in quadlet
2023-06-15 13:13:37 -04:00