Merge pull request #1491 from giuseppe/F37_ci_vm_images

Cirrus: Update CI VM Images to F37
This commit is contained in:
Daniel J Walsh 2023-01-31 21:31:34 -05:00 committed by GitHub
commit 0410c35ca4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 9 additions and 30 deletions

View File

@ -17,13 +17,13 @@ env:
####
#### Cache-image names to test with (double-quotes around names are critical)
###
FEDORA_NAME: "fedora-36"
UBUNTU_NAME: "ubuntu-2204"
FEDORA_NAME: "fedora-37" ### 20230120t152650z-f37f36u2204
UBUNTU_NAME: "ubuntu-2204" ### 20230120t152650z-f37f36u2204
# GCE project where images live
IMAGE_PROJECT: "libpod-218412"
# VM Image built in containers/automation_images
IMAGE_SUFFIX: "c5878804328480768"
IMAGE_SUFFIX: "c20230120t152650z-f37f36u2204"
FEDORA_CACHE_IMAGE_NAME: "fedora-${IMAGE_SUFFIX}"
UBUNTU_CACHE_IMAGE_NAME: "ubuntu-${IMAGE_SUFFIX}"

View File

@ -1505,7 +1505,7 @@ func (d *Driver) get(id string, disableShifting bool, options graphdriver.MountO
}
}
if d.supportsIDmappedMounts() && len(options.UidMaps) > 0 && len(options.GidMaps) > 0 {
if !disableShifting && len(options.UidMaps) > 0 && len(options.GidMaps) > 0 {
var newAbsDir []string
mappedRoot := filepath.Join(d.home, id, "mapped")
if err := os.MkdirAll(mappedRoot, 0700); err != nil {
@ -2098,8 +2098,8 @@ func (d *Driver) supportsIDmappedMounts() bool {
// SupportsShifting tells whether the driver support shifting of the UIDs/GIDs in an userNS
func (d *Driver) SupportsShifting() bool {
if os.Getenv("_TEST_FORCE_SUPPORT_SHIFTING") == "yes-please" {
return true
if os.Getenv("_CONTAINERS_OVERLAY_DISABLE_IDMAP") == "yes" {
return false
}
if d.options.mountProgram != "" {
return true

View File

@ -21,6 +21,9 @@ function setup() {
TESTDIR=${BATS_TMPDIR}/tmp.${suffix}
rm -fr ${TESTDIR}
mkdir -p ${TESTDIR}/{root,runroot}
# disable idmapped mounts in the overlay driver, since that
# is the expectation in the idmaps.bats tests.
export _CONTAINERS_OVERLAY_DISABLE_IDMAP=yes
}
# Delete the unique root directory and a runroot directory.

View File

@ -961,30 +961,6 @@ load helpers
imagename=idmappedimage-shifting
storage create-image --name=$imagename $lowerlayer
_TEST_FORCE_SUPPORT_SHIFTING=yes-please run storage --debug=false create-container --uidmap 0:1000:1000 --gidmap 0:1000:1000 $imagename
echo "$output"
[ "$status" -eq 0 ]
[ "$output" != "" ]
container="$output"
# Mount the container.
_TEST_FORCE_SUPPORT_SHIFTING=yes-please run storage --debug=false mount $container
echo "$output"
[ "$status" -eq 0 ]
dir="$output"
test "$(stat -c%u:%g $dir/file)" == "0:0"
_TEST_FORCE_SUPPORT_SHIFTING=yes-please run storage --debug=false unmount "$container"
[ "$status" -eq 0 ]
# Remove the container and image and check that all of the layers we used got removed.
_TEST_FORCE_SUPPORT_SHIFTING=yes-please run storage --debug=false delete-container $container
_TEST_FORCE_SUPPORT_SHIFTING=yes-please run storage --debug=false delete-image $imagename
_TEST_FORCE_SUPPORT_SHIFTING=yes-please run storage --debug=false layers
echo "$output"
[ "$status" -eq 0 ]
[ "$output" == "" ]
}
@test "idmaps-create-layer-from-another-image-store" {