21887 Commits

Author SHA1 Message Date
2cd72c272f tests: add docker api compatibility test
Signed-off-by: Florian Bezannier <florian.bezannier@hotmail.fr>
2024-02-28 19:45:03 +01:00
de845a5b42 feat: make inspect compatible with docker v1.44
Signed-off-by: Florian Bezannier <florian.bezannier@hotmail.fr>
2024-02-28 19:45:02 +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
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
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
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
bed61806c8 pkg/machine/ocipull: add default policy.json file
So that this file can be inculded in our windows/macos packages and also
by other packagers.
Right now the default policy is allow everything but we plan to add
signing in the future.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-02-27 15:29:59 +01:00
f5a2683192 Makefile: add MACHINE_POLICY_JSON_DIR option
Allow users to set MACHINE_POLICY_JSON_DIR to the policy.json directory
which is used for podman machine pulls.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-02-27 15:29:59 +01:00
a02aa8f6a2 pkg/machine/ocipull: add custom policy.json location
The default policy file /etc/containers/policy.json location does not
work on windows and for packages that ship a default.

Now we search for the policy.json in the following overwrite locations:
macos and linux:
 - ~/.config/containers/policy.json
 - /etc/containers/policy.json
windows:
 - %APPDATA%\containers\policy.json

Also it offers an additional DefaultPolicyJSONPath var that should be
overwritten at built time with the path of the file that is shipped by
packagers. Thile file is used when none of the overwrite paths exist.

[NO NEW TESTS NEEDED]

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-02-27 15:29:58 +01:00
1303ef4ed7 Merge pull request #21834 from edsantiago/nomore5k
CI: e2e: use distinct ports, not just 5000
2024-02-27 13:54:16 +00:00
a210a4d7c2 test/compose: add test for default connection
Make sure that we use the --connection correctly with podman compose.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-02-27 13:44:34 +01:00
d9aff9b41e podman compose: only trim path suffix when ssh protocol
For a unix socket we should not trim this at all. The problem exists for
ssh only so make sure we only do this when a ssh URL is given.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-02-27 13:44:26 +01:00
3cada04099 podman compose: correctly accept --connection/--url
Make the logic here much simpler, we already pass all the conection info
before so just use the parsed URL here.

Fixes #20943

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-02-27 13:40:41 +01:00
6d3571dcf5 podman compose: build for all arches
Machine only works on amd64 and arm64 but the compose command can still
be used without machine so split out the machine only logic to make it
build for all arches.

[NO NEW TESTS NEEDED]

Fixes #21757

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-02-27 13:40:41 +01:00
7d5a68c9cd CI: e2e: use distinct ports, not just 5000
Too many tests use port 5000. Although there's a putative GetPortLock()
it seems to be unreliable, and we often get what appear to be collisions
between tests.

A proper solution would be to pseudorandomly allocate ports, verify
that they're not being reused, Sprintf() these everywhere that
needs them, and sprinkle some powdered cinnamon on top.

This is not that proper solution.

Fixes: #20655

Signed-off-by: Ed Santiago <santiago@redhat.com>
2024-02-27 04:30:26 -07:00
5e387cd8af [CI:BUILD] rpm: Use $SOURCE_DATE_EPOCH instead of the current date
Use $SOURCE_DATE_EPOCH instead of the current date

Using the current timestamp makes every build slightly different, breaking build
reproducibility.

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

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

[NO NEW TESTS NEEDED]

Signed-off-by: Lokesh Mandvekar <lsm5@redhat.com>
2024-02-27 16:57:05 +05:30
8d9ff04d10 vendor update gopkg.in/yaml.v2 to v3
There is no reason for us to use v2 here, we use v3 already in most
places. The go-openapi dependency still uses v2 so we do not get rid of
it yet but it looks like they migrated upstream so once a new version
is released there and finds our way to us then we should get some nice
binary size reduction.

[NO NEW TESTS NEEDED]

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-02-27 12:20:58 +01:00
cc7b19279a [CI:BUILD] rpm: Make BuildRequires independent of the environment
The spec file had
  %if %{defined rhel} && 0%{?rhel} < 10
  %define gobuild(o:) ...
  %endif
  ...
  %if !%{defined gobuild}
  BuildRequires: go-rpm-macros
  %endif

The intent apparently was to use BR:go-rpm-macros where available, and define
%gobuild as a fallback where they are not available. This was unreliable,
because the package may have been installed already, and then %gobuild would be
defined when the srpm was being built, and then the srpm would NOT have the BR.

Instead, use the same condition to wrap the definition of %gobuild and the BR
lines to that the BR is always emitted when appropriate.

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

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

[NO NEW TESTS NEEDED]

Signed-off-by: Lokesh Mandvekar <lsm5@redhat.com>
2024-02-27 16:43:32 +05:30
6dd8454a54 Merge pull request #21826 from rhatdan/stop
Fix podman stop -t -1 CID
2024-02-27 11:11:39 +00:00
2f88c0a170 Merge pull request #21740 from containers/renovate/github.com-openshift-imagebuilder-1.x
Update module github.com/openshift/imagebuilder to v1.2.6
2024-02-26 22:24:23 +00:00
5b28a2b4a0 Fix podman stop -t -1 CID
Currently if a user specifies a negative time to stop a container the
code ends up specifying the negative time to time.Duration which treats
it as 0. By settine the default to max.Unint32 we end up with a positive
number which indicates > 68 years which is probably close enough to
infinity for our use case.

Fixes: https://github.com/containers/podman/issues/21811

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2024-02-26 16:15:10 -05:00
04f70320c1 Merge pull request #21594 from arixmkii/qemu-win-machine-5
Change QEMU netdev to Unix domain socket
2024-02-26 20:37:06 +00:00
25cbff1f34 Merge pull request #21753 from mheon/mac_lint
Enable lint for Darwin and fix identified issues
2024-02-26 19:26:57 +00:00
656bf7b764 Change QEMU netdev to Unix domain socket
This change migrates to new QEMU stream netdev added in 7.2.0.
It also unifies how gvproxy is used in QEMU and AppleHV.

Signed-off-by: Arthur Sengileyev <arthur.sengileyev@gmail.com>
2024-02-26 20:02:46 +02:00
2313569d9b Merge pull request #21824 from edsantiago/fix_nightly
Fix nightly cron checks
2024-02-26 16:48:57 +00:00
19b676f855 Enable lint for Darwin and fix identified issues
[NO NEW TESTS NEEDED] Just fixing lint issues

Signed-off-by: Matt Heon <mheon@redhat.com>
2024-02-26 11:01:54 -05:00
e99ececc2f Merge pull request #21823 from edsantiago/enable_ipv6_tests
systests: enable ipv6 tests
2024-02-26 14:23:11 +00:00
1b068b79f4 Fix nightly cron checks
Broken by #21777: "set -u" causes clone_script to barf with

    CIRRUS_PR: unbound variable

Signed-off-by: Ed Santiago <santiago@redhat.com>
2024-02-26 07:10:27 -07:00
83671ac347 systests: enable ipv6 tests
...commented out long long ago with a now-obsolete TODO

Signed-off-by: Ed Santiago <santiago@redhat.com>
2024-02-26 05:49:31 -07:00