21918 Commits

Author SHA1 Message Date
66d60384f4 add --retry --retry-delay to podman run/create
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2024-02-29 10:20:21 -05:00
c3c0c4ab96 Add support for podman push --retry --retry-delay
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2024-02-29 10:20:21 -05:00
e5ee0bb5f3 pullImage does not need to be exported
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2024-02-29 10:20:21 -05:00
2c9c7273ca Vendor in latest containers/common
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2024-02-29 10:20:21 -05:00
98d1ad5a22 Merge pull request #21875 from Luap99/mount-test
test/system: fix mount external container test
2024-02-29 14:58:09 +00:00
96f9d0867a Merge pull request #21854 from ashley-cui/locks
Move locks to shim layer
2024-02-29 14:34:03 +00:00
99b2f369db test/system: fix mount external container test
Checking for the mountdir is not relevent, a recent c/storage change[1] no
longer deletes the mount point directory so the check will cause a false
positive. findmnt exits 1 when the given path is not a mountpoint so
let's use that to check.

[1] 3f2e81abb3

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-02-29 13:48:26 +01:00
690b671ecd Merge pull request #20774 from giuseppe/passthrough-tty
logging: new mode -l passthrough-tty
2024-02-29 12:43:36 +00:00
8377483145 Merge pull request #21866 from cgwalters/prefix-errpull
machine/ociartifact: Include image name in error
2024-02-29 11:32:05 +00:00
12694d5424 Merge pull request #21592 from l0rd/compress-refactoring-v5
Refactor machine decompress.go
2024-02-29 10:09:36 +00:00
a1177f5961 Merge pull request #21871 from edsantiago/logformatter-on-mac
CI: run logformatter on mac
2024-02-29 10:06:49 +00:00
c1ac602d39 Merge pull request #21868 from edsantiago/reenable-boltdb-upgrade-test
Reenable boltdb upgrade tests
2024-02-29 09:47:35 +00:00
35133c8424 Move locks to shim layer
Previously, the locks were on the provider layer, which doesn't make a vm operation with a config file update atomic. Move them up a layer, so the entire function locks while doing provider and config operations.

This adds a Remove and a Set function to the shim layer.

[NO NEW TESTS NEEDED] Unsure how to test this

Signed-off-by: Ashley Cui <acui@redhat.com>
2024-02-29 00:12:04 -05:00
6957c78199 CI: run logformatter on mac
It works (verified in #17831). Imperfectly, because Macs don't
have a useful awk, so we can't get timestamps. I will, in time,
look into adding the timestamp functionality to logformatter
itself.

Also imperfect because it's not linkifying: source code paths
are dead text. I need to fix that, too, in logformatter, by
having it recognize /Users/Mac paths.

Imperfect as it may be, it was quick, and I think could provide
good bang for the buck in these Mac-intensive debugging days.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2024-02-28 20:14:05 -07:00
12b8cc8580 Merge pull request #21778 from baude/removeignition
Move ignition functions into Containerfiles
2024-02-29 00:18:00 +00:00
fd1d951262 Move ignition functions into Containerfiles
We used to use ignition to perform any customization required for podman
machine because our input was a generic FCOS image.  Now that we are
building our own images, some of this customization can be migrated to
the Containerfile itself and be less of a burden in our code at boot up.

At the time of this PR, the Containerfile can be found at
https://github.com/baude/podman-machine-images/tree/main.  It is only
present for a so-called daily image.  There is little liklihood that
this would the final location for the Containerfile so consider it a
working version only.

Split WSL and rest apart in the e2e tests so we no longer ppull the
generic FCOS image for testing.

Note: the change to the pull image name is so PRs are not immediately
broken that are already in the queue.

[NO NEW TESTS REQUIRED]

Signed-off-by: Brent Baude <bbaude@redhat.com>
2024-02-28 16:05:50 -06:00
b58f20bdb6 machine/ociartifact: Include image name in error
If we hit an error here, it will be really useful to know

- That we're trying to fetch a container image
- Which image we're trying to fetch

[NO NEW TESTS NEEDED]

Signed-off-by: Colin Walters <walters@verbum.org>
2024-02-28 16:23:34 -05:00
275dbc5eab Merge pull request #21860 from Luap99/network-inspect
podman network inspect: include running containers
2024-02-28 19:12:05 +00:00
064258b496 Reenable boltdb upgrade tests
Upgrade-from-v4.1 was temporarily disabled in #21618: we brought
in new CI VMs, and v4.1 setup no longer works. Nobody quite
understands why, and we've hit diminishing returns in the
investigation (#21863). The current thinking is that it
is related to netavark, and versions < 1.3 do not work
in the current f39 VMs. (No clue why, because f39 kernel
did not change in #21618).

Anyhow, reenable the pre-4.8 upgrade test, using v4.3.1
which has netavark-1.4.0 which seems to work fine. For now.

Also, some upgrade test cleanup:
 - Skip, not fail, if initial setup fails. Makes for less noisy logs.
 - Remove duplicate --pid=host
 - Ports: 808x -> 909x, because 8081 is used by restraint on 1mt

Signed-off-by: Ed Santiago <santiago@redhat.com>
2024-02-28 11:49:54 -07:00
950f612b56 logging: new mode -l passthrough-tty
it works in a similar way to passthrough but it allows to be used also
on a TTY.

conmon support: https://github.com/containers/conmon/pull/465

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

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2024-02-28 17:23:59 +01:00
5952486df8 podman network inspect: include running containers
Like docker podman network inspect should output the information of
running container with their ip/mac address on this network.
However the output format is not docker compatible as this cannot
include all the info we have and the previous output was already not
compatible so this is not new.

New example output:
```
[
     {
          ...
          "containers": {
               "7c0d295779cee4a6db7adc07a99e635909413a390eeab9f951edbc4aac406bf1": {
                    "name": "c2",
                    "interfaces": {
                         "eth0": {
                              "subnets": [
                                   {
                                        "ipnet": "10.89.0.4/24",
                                        "gateway": "10.89.0.1"
                                   },
                                   {
                                        "ipnet": "fda3:b4da:da1e:7e9d::4/64",
                                        "gateway": "fda3:b4da:da1e:7e9d::1"
                                   }
                              ],
                              "mac_address": "1a:bd:ca:ea:4b:3a"
                         }
                    }
               },
               "b17c6651ae6d9cc7d5825968e01d6b1e67f44460bb0c140bcc32bd9d436ac11d": {
                    "name": "c1",
                    "interfaces": {
                         "eth0": {
                              "subnets": [
                                   {
                                        "ipnet": "10.89.0.3/24",
                                        "gateway": "10.89.0.1"
                                   },
                                   {
                                        "ipnet": "fda3:b4da:da1e:7e9d::3/64",
                                        "gateway": "fda3:b4da:da1e:7e9d::1"
                                   }
                              ],
                              "mac_address": "f6:50:e6:22:d9:55"
                         }
                    }
               }
          }
     }
]
```

Fixes #14126
Fixes https://issues.redhat.com/browse/RHEL-3153

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-02-28 16:33:26 +01:00
8f02822c12 Remove xz unit tests as they are flaky
Signed-off-by: Mario Loriedo <mario.loriedo@gmail.com>
2024-02-28 15:37:15 +01:00
031e7a15b0 Merge pull request #21839 from lsm5/rpm-spec
[CI:BUILD] rpm: spec file updates from Fedora dist-git
2024-02-28 12:14:05 +00:00
c93ed35b09 Merge pull request #21848 from baude/machinestartcleanup
Clean up gvproxy if machine start fails
2024-02-28 12:08:21 +00:00
2d4ef6f161 Merge pull request #21857 from vrothberg/fix-21849
machine config: make write atomic
2024-02-28 10:40:23 +00:00
f8abd7ff75 machine config: make write atomic
As indicated in #21849, loading the machine config can flake/fail with
an EOF JSON error indicating an incomplete file.  Address the issue by
atomically writing the config.  This way, it is not possible to load an
incomplete or partially written file.  The lock can be acquired later on
to sync state.

[NO NEW TESTS NEEDED] as it's a hard-to-hit race.

Fixes: #21849
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2024-02-28 09:44:41 +01:00
9d1704396a Merge pull request #21572 from mheon/hyperv_9p_mkdir
Ensure HyperV 9p mounts work when a dir doesn't exist
2024-02-27 22:34:07 +00:00
fcce681ea1 Merge pull request #21844 from rhatdan/image
Vendor in latest containers/(image,storage)
2024-02-27 21:11:38 +00:00
f9303983df Merge pull request #21674 from cevich/add_repo_artifact
[CI:BUILD] Expose as-tested Mac/Windows repository state
2024-02-27 21:08:54 +00:00
e646671212 Merge pull request #21846 from edsantiago/prevent_21649
systests: kube play URL: workaround for ECONNREFUSED
2024-02-27 20:55:25 +00:00
4704418c13 Merge pull request #21841 from edsantiago/rawhide_rc6
new vms, with rc6 rawhide kernel
2024-02-27 19:40:56 +00:00
26ec570c65 Ensure HyperV 9p mounts work when a dir doesn't exist
Before, we required that the mount target exist and be a
directory for the 9p mount to successfully complete, which is not
how things are supposed to work - the user should be able to
mount anywhere. This should just be a simple mkdir, but with FCOS
the root directory is immutable so we need to undo that before we
can mkdir, and unfortunately we don't have a library that can do
chattr (and I didn't want to drag in a new dependency just for
that), so let's be gross and add it to the SSH command. I
aggressively dislike this but it does work.

[NO NEW TESTS NEEDED] Can worry about getting a more generic
mount test together for Machine later.

Signed-off-by: Matt Heon <mheon@redhat.com>
2024-02-27 14:33:53 -05:00
dfae51a4b8 Clean up gvproxy if machine start fails
Matt found a bug where if a machine start did not run to completion, a
gvproxy was left around running.  This gvproxy then subsequently stopped
the next attempt to start.

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

[NO NEW TESTS NEEDED]
2024-02-27 13:33:43 -06:00
ee52f9cd7a systests: kube play URL: workaround for ECONNREFUSED
I'm tired of this flake, it's hitting us ~once/day. Root cause
still unknown.

Workaround: add a READY file to the http server, and run 'curl'
until we get it. Tested in #17831 for the last two weeks, flake
has not been seen even once since then.

Closes: #21649

Signed-off-by: Ed Santiago <santiago@redhat.com>
2024-02-27 11:55:20 -07:00
abd681af48 Merge pull request #21843 from cfergeau/entitlements
Add missing vfkit entitlement
2024-02-27 18:26:39 +00:00
7e374a52a8 Vendor in latest containers/(image,storage)
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2024-02-27 13:18:57 -05:00
698219cf98 Expose as-tested Mac/Windows repository state
This is needed by podman desktop CI, to ensure their 'latest' testing
jobs continuously and exactly match the podman repository state +
related binaries.

Signed-off-by: Chris Evich <cevich@redhat.com>
2024-02-27 12:18:39 -05:00
9f5c20f9bf macos installer: Add vfkit entitlement
vfkit needs the com.apple.security.virtualization entitlement or it
wont' be able to start virtual machines:

Error: Error Domain=VZErrorDomain Code=2 Description="Invalid virtual machine configuration. The process doesn’t have the “com.apple.security.virtualization” entitlement." UserInfo={
    NSLocalizedFailure = "Invalid virtual machine configuration.";
    NSLocalizedFailureReason = "The process doesn\U2019t have the \U201ccom.apple.security.virtualization\U201d entitlement.";
}

This fixes https://github.com/containers/podman/issues/21842

Signed-off-by: Christophe Fergeau <cfergeau@redhat.com>
2024-02-27 17:47:49 +01:00
15734f8c5a macos-installer: Remove hvf.entitlements
That's a left-over from 87947761ed

Signed-off-by: Christophe Fergeau <cfergeau@redhat.com>
2024-02-27 17:44:04 +01:00
74b87874b6 macos installer: Default to using ad-hoc signing
When there is no signing identity to pass to the macOS `codesign` tool,
we can use `-` instead as the identity to perform ad-hoc signing.

From `man codesign`:
> If identity is the single letter "-" (dash), ad-hoc signing is
> performed.  Ad-hoc signing does not use an identity at all

This makes it easier to test the sign() code-path in package.sh as
we'll run the same code regardless of `NO_CODESIGN` being set or not.

Signed-off-by: Christophe Fergeau <cfergeau@redhat.com>
2024-02-27 17:44:01 +01:00
c2a2113bb6 new vms, with rc6 rawhide kernel
Source: https://github.com/containers/automation_images/pull/331#issuecomment-1966677347

Kludgy VM build, because rawhide rc6 kernel is still not stable.
I would like to merge this anyway, because the rawhide hang is
hurting us badly. (I am not guaranteeing that this fixes the hang).

Also: new Windows VM has WiX 3.14 (up from 3.11).

Signed-off-by: Ed Santiago <santiago@redhat.com>
2024-02-27 09:42:43 -07:00
7b6d9a586e Fixup: avoid overriding io.Copy error
Signed-off-by: Mario Loriedo <mario.loriedo@gmail.com>
2024-02-27 16:48:47 +01:00
19d3329f73 Merge pull request #21765 from Luap99/machine-pull-policy
pkg/machine: add custom policy.json logic
2024-02-27 15:44:29 +00:00
59704665ae Avoid overriding io.Copy error
Signed-off-by: Mario Loriedo <mario.loriedo@gmail.com>
2024-02-27 16:16:44 +01:00
3352111dd6 Merge pull request #21825 from Luap99/compose
some podman compose fixes
2024-02-27 15:11:30 +00:00
ab2e29fd8f Merge pull request #21838 from Luap99/yaml-v3
vendor update gopkg.in/yaml.v2 to v3
2024-02-27 15:08:48 +00:00
24a33a538c Move code for sparse optimized copy to a dedicated method
Signed-off-by: Mario Loriedo <mario.loriedo@gmail.com>
2024-02-27 15:59:56 +01:00
50a0c51763 [CI:BUILD] rpm: Add fallback for $SOURCE_DATE_EPOCH not being set
At least in all recent Fedora releases, SOURCE_DATE_EPOCH would be set. But the
build should work even if it not set, e.g. in copr builds on c8s. Add 'date +%s'
as a fallback.

From: Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>

This is a copy-paste of commit eaa62a52 in podman fedora dist-git.

[NO NEW TESTS NEEDED]

Signed-off-by: Lokesh Mandvekar <lsm5@redhat.com>
2024-02-27 20:27:12 +05:30
e32c9bb5e9 Makefile: add machine policy.json to podman-remote.zip
This config needs to be included for podman machine pulls to work and
set MACHINE_POLICY_JSON_DIR so that the file should be located next to
the binary.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-02-27 15:31:15 +01:00
1e5b5a8892 macos installer: install default policy.json file
Include a default policy.json file in the macos package so users do not
have to add this manually.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-02-27 15:31:09 +01:00