diff --git a/mantle/cmd/kola/testiso.go b/mantle/cmd/kola/testiso.go index 72ce91b74da4869809273f498918f341745a268a..b9294e17b9a7bf0ef76df754a6d949465ccfb074 100644 --- a/mantle/cmd/kola/testiso.go +++ b/mantle/cmd/kola/testiso.go @@ -99,36 +99,36 @@ Description=TestISO Signal Live ISO Completion Requires=dev-virtio\\x2dports-testisocompletion.device OnFailure=emergency.target OnFailureJobMode=isolate -Before=coreos-installer.service +Before=nestos-installer.service [Service] Type=oneshot RemainAfterExit=yes ExecStart=/bin/sh -c '/usr/bin/echo %s >/dev/virtio-ports/testisocompletion' [Install] # for install scenarios -RequiredBy=coreos-installer.target +RequiredBy=nestos-installer.target # for iso-as-disk RequiredBy=multi-user.target `, liveOKSignal) var downloadCheck = `[Unit] Description=TestISO Verify CoreOS Installer Download -After=coreos-installer.service -Before=coreos-installer.target +After=nestos-installer.service +Before=nestos-installer.target [Service] Type=oneshot StandardOutput=kmsg+console StandardError=kmsg+console -ExecStart=/bin/sh -c "journalctl -t coreos-installer-service | /usr/bin/awk '/[Dd]ownload/ {exit 1}'" +ExecStart=/bin/sh -c "journalctl -t nestos-installer-service | /usr/bin/awk '/[Dd]ownload/ {exit 1}'" ExecStart=/bin/sh -c "/usr/bin/udevadm settle" ExecStart=/bin/sh -c "/usr/bin/mount /dev/disk/by-label/root /mnt" ExecStart=/bin/sh -c "/usr/bin/jq -er '.[\"build\"] == \"%s\"' /mnt/.coreos-aleph-version.json" ExecStart=/bin/sh -c "/usr/bin/jq -er '.[\"ostree-commit\"] == \"%s\"' /mnt/.coreos-aleph-version.json" [Install] -RequiredBy=coreos-installer.target +RequiredBy=nestos-installer.target ` -var signalCompleteString = "coreos-installer-test-OK" +var signalCompleteString = "nestos-installer-test-OK" var signalCompletionUnit = fmt.Sprintf(`[Unit] Description=TestISO Signal Completion Requires=dev-virtio\\x2dports-testisocompletion.device @@ -142,7 +142,7 @@ ExecStart=/bin/sh -c '/usr/bin/echo %s >/dev/virtio-ports/testisocompletion && s RequiredBy=multi-user.target `, signalCompleteString) -var signalEmergencyString = "coreos-installer-test-entered-emergency-target" +var signalEmergencyString = "nestos-installer-test-entered-emergency-target" var signalFailureUnit = fmt.Sprintf(`[Unit] Description=TestISO Signal Failure Requires=dev-virtio\\x2dports-testisocompletion.device @@ -159,8 +159,8 @@ var checkNoIgnition = `[Unit] Description=TestISO Verify No Ignition Config OnFailure=emergency.target OnFailureJobMode=isolate -Before=coreos-test-installer.service -After=coreos-ignition-firstboot-complete.service +Before=nestos-test-installer.service +After=nestos-ignition-firstboot-complete.service RequiresMountsFor=/boot [Service] Type=oneshot @@ -173,7 +173,7 @@ var multipathedRoot = `[Unit] Description=TestISO Verify Multipathed Root OnFailure=emergency.target OnFailureJobMode=isolate -Before=coreos-test-installer.service +Before=nestos-test-installer.service [Service] Type=oneshot RemainAfterExit=yes @@ -193,12 +193,12 @@ RemainAfterExit=yes ExecStart=/bin/sh -c '! efibootmgr -v | grep -E "(HD|CDROM)\("' [Install] # for install scenarios -RequiredBy=coreos-installer.target +RequiredBy=nestos-installer.target # for iso-as-disk RequiredBy=multi-user.target` -var nmConnectionId = "CoreOS DHCP" -var nmConnectionFile = "coreos-dhcp.nmconnection" +var nmConnectionId = "nestos DHCP" +var nmConnectionFile = "nestos-dhcp.nmconnection" var nmConnection = fmt.Sprintf(`[connection] id=%s type=ethernet @@ -219,7 +219,7 @@ OnFailureJobMode=isolate Wants=network-online.target After=network-online.target Before=live-signal-ok.service -Before=coreos-test-installer.service +Before=nestos-test-installer.service [Service] Type=oneshot RemainAfterExit=yes @@ -228,7 +228,7 @@ ExecStart=/usr/bin/journalctl -u NetworkManager --no-pager --grep "policy: set ' ExecStart=/usr/bin/grep "%[1]s" /etc/NetworkManager/system-connections/%[2]s [Install] # for live system -RequiredBy=coreos-installer.target +RequiredBy=nestos-installer.target # for target system RequiredBy=multi-user.target`, nmConnectionId, nmConnectionFile) @@ -564,6 +564,7 @@ func awaitCompletion(ctx context.Context, inst *platform.QemuInstance, outdir st return } line := strings.TrimSpace(l) + fmt.Println("Virtio-port Recv:", line) // 打印收到的内容到标准输出 if line != exp { errchan <- fmt.Errorf("Unexpected string from completion channel: %s expected: %s", line, exp) return @@ -640,17 +641,17 @@ func testPXE(ctx context.Context, inst platform.Install, outdir string, offline liveConfig := *virtioJournalConfig liveConfig.AddSystemdUnit("live-signal-ok.service", liveSignalOKUnit, conf.Enable) - liveConfig.AddSystemdUnit("coreos-test-entered-emergency-target.service", signalFailureUnit, conf.Enable) + liveConfig.AddSystemdUnit("nestos-test-entered-emergency-target.service", signalFailureUnit, conf.Enable) if offline { contents := fmt.Sprintf(downloadCheck, kola.CosaBuild.Meta.BuildID, kola.CosaBuild.Meta.OstreeCommit) - liveConfig.AddSystemdUnit("coreos-installer-offline-check.service", contents, conf.Enable) + liveConfig.AddSystemdUnit("nestos-installer-offline-check.service", contents, conf.Enable) } targetConfig := *virtioJournalConfig - targetConfig.AddSystemdUnit("coreos-test-installer.service", signalCompletionUnit, conf.Enable) - targetConfig.AddSystemdUnit("coreos-test-entered-emergency-target.service", signalFailureUnit, conf.Enable) - targetConfig.AddSystemdUnit("coreos-test-installer-no-ignition.service", checkNoIgnition, conf.Enable) + targetConfig.AddSystemdUnit("nestos-test-installer.service", signalCompletionUnit, conf.Enable) + targetConfig.AddSystemdUnit("nestos-test-entered-emergency-target.service", signalFailureUnit, conf.Enable) + targetConfig.AddSystemdUnit("nestos-test-installer-no-ignition.service", checkNoIgnition, conf.Enable) mach, err := inst.PXE(pxeKernelArgs, liveConfig, targetConfig, offline) if err != nil { @@ -694,19 +695,19 @@ func testLiveIso(ctx context.Context, inst platform.Install, outdir string, offl liveConfig := *virtioJournalConfig liveConfig.AddSystemdUnit("live-signal-ok.service", liveSignalOKUnit, conf.Enable) liveConfig.AddSystemdUnit("verify-no-efi-boot-entry.service", verifyNoEFIBootEntry, conf.Enable) - liveConfig.AddSystemdUnit("coreos-test-entered-emergency-target.service", signalFailureUnit, conf.Enable) + liveConfig.AddSystemdUnit("nestos-test-entered-emergency-target.service", signalFailureUnit, conf.Enable) targetConfig := *virtioJournalConfig - targetConfig.AddSystemdUnit("coreos-test-installer.service", signalCompletionUnit, conf.Enable) - targetConfig.AddSystemdUnit("coreos-test-entered-emergency-target.service", signalFailureUnit, conf.Enable) - targetConfig.AddSystemdUnit("coreos-test-installer-no-ignition.service", checkNoIgnition, conf.Enable) + targetConfig.AddSystemdUnit("nestos-test-installer.service", signalCompletionUnit, conf.Enable) + targetConfig.AddSystemdUnit("nestos-test-entered-emergency-target.service", signalFailureUnit, conf.Enable) + targetConfig.AddSystemdUnit("nestos-test-installer-no-ignition.service", checkNoIgnition, conf.Enable) if inst.MultiPathDisk { - targetConfig.AddSystemdUnit("coreos-test-installer-multipathed.service", multipathedRoot, conf.Enable) + targetConfig.AddSystemdUnit("nestos-test-installer-multipathed.service", multipathedRoot, conf.Enable) } if addNmKeyfile { - liveConfig.AddSystemdUnit("coreos-test-nm-keyfile.service", verifyNmKeyfile, conf.Enable) - targetConfig.AddSystemdUnit("coreos-test-nm-keyfile.service", verifyNmKeyfile, conf.Enable) + liveConfig.AddSystemdUnit("nestos-test-nm-keyfile.service", verifyNmKeyfile, conf.Enable) + targetConfig.AddSystemdUnit("nestos-test-nm-keyfile.service", verifyNmKeyfile, conf.Enable) inst.NmKeyfiles[nmConnectionFile] = nmConnection } @@ -736,7 +737,7 @@ func testLiveLogin(ctx context.Context, outdir string) (time.Duration, error) { return 0, err } - completionChannel, err := builder.VirtioChannelRead("coreos.liveiso-success") + completionChannel, err := builder.VirtioChannelRead("nestos.liveiso-success") if err != nil { return 0, err } @@ -750,7 +751,7 @@ func testLiveLogin(ctx context.Context, outdir string) (time.Duration, error) { } defer mach.Destroy() - return awaitCompletion(ctx, mach, outdir, completionChannel, nil, []string{"coreos-liveiso-success"}) + return awaitCompletion(ctx, mach, outdir, completionChannel, nil, []string{"nestos-liveiso-success"}) } func testAsDisk(ctx context.Context, outdir string) (time.Duration, error) { diff --git a/mantle/kola/tests/coretest/core.go b/mantle/kola/tests/coretest/core.go index cad16aab21cc20450ebbf75a16482ddf0fa7e9a2..7238d7326cd197734b4aed508e55d4a0cbd8e580 100644 --- a/mantle/kola/tests/coretest/core.go +++ b/mantle/kola/tests/coretest/core.go @@ -59,7 +59,7 @@ func init() { // TODO: Only enable PodmanPing on non qemu-unpriv. Needs: // https://github.com/coreos/mantle/issues/1132 register.RegisterTest(®ister.Test{ - Name: "fcos.internet", + Name: "nestos.internet", Run: InternetTests, ClusterSize: 1, Flags: []register.Flag{register.RequiresInternetAccess}, @@ -77,16 +77,16 @@ func init() { "RandomUUID": register.CreateNativeFuncWrap(TestFsRandomUUID), }, // FIXME run on RHCOS once it has https://github.com/coreos/ignition-dracut/pull/93 - Distros: []string{"fcos"}, + Distros: []string{"fcos", "nestos"}, }) register.RegisterTest(®ister.Test{ - Name: "rhcos.services-disabled", + Name: "nestos.services-disabled", Run: LocalTests, ClusterSize: 1, NativeFuncs: map[string]register.NativeFuncWrap{ "ServicesDisabled": register.CreateNativeFuncWrap(TestServicesDisabledRHCOS), }, - Distros: []string{"rhcos"}, + Distros: []string{"rhcos", "nestos"}, }) } @@ -101,27 +101,27 @@ func TestPortSsh() error { func TestDockerEcho() error { //t.Parallel() - return util.RunCmdTimeout(DockerTimeout, "docker", "run", "docker.nju.edu.cn/library/busybox", "echo") + return util.RunCmdTimeout(DockerTimeout, "docker", "run", "docker.io/busybox", "echo") } func TestDockerPing() error { //t.Parallel() - return util.RunCmdTimeout(DockerTimeout, "docker", "run", "docker.nju.edu.cn/library/busybox", "ping", "-c4", "coreos.com") + return util.RunCmdTimeout(DockerTimeout, "docker", "run", "docker.io/busybox", "ping", "-c4", "baidu.com") } func TestPodmanEcho() error { //t.Parallel() - return util.RunCmdTimeout(DockerTimeout, "podman", "run", "docker.nju.edu.cn/library/busybox", "echo") + return util.RunCmdTimeout(DockerTimeout, "podman", "run", "docker.io/busybox", "echo") } func TestPodmanPing() error { //t.Parallel() - return util.RunCmdTimeout(DockerTimeout, "podman", "run", "docker.nju.edu.cn/library/busybox", "ping", "-c4", "coreos.com") + return util.RunCmdTimeout(DockerTimeout, "podman", "run", "docker.io/busybox", "ping", "-c4", "baidu.com") } func TestPodmanWgetHead() error { //t.Parallel() - return util.RunCmdTimeout(DockerTimeout, "podman", "run", "docker.nju.edu.cn/library/busybox", "wget", "--spider", "https://nestos.org.cn/kola/hotspot.txt") + return util.RunCmdTimeout(DockerTimeout, "podman", "run", "docker.io/busybox", "wget", "--spider", "https://nestos.org.cn/kola/hotspot.txt") } // This execs gdbus, because we need to change uses to test perms. diff --git a/mantle/kola/tests/crio/crio.go b/mantle/kola/tests/crio/crio.go index 3fbaa1704faaa60363de37a38466d40710b04e76..2139b0908e1118bde1603f0520639992c56e4469 100644 --- a/mantle/kola/tests/crio/crio.go +++ b/mantle/kola/tests/crio/crio.go @@ -190,19 +190,19 @@ func init() { ClusterSize: 1, Name: `crio.base`, // crio pods require fetching a kubernetes pause image - Flags: []register.Flag{register.RequiresInternetAccess}, - Distros: []string{"rhcos"}, - UserData: enableCrioIgn, - Tags: []string{"crio"}, + Flags: []register.Flag{register.RequiresInternetAccess}, + Distros: []string{"rhcos", "nestos"}, + UserData: enableCrioIgn, + RequiredTag: "crio", }) register.RegisterTest(®ister.Test{ Run: crioNetwork, ClusterSize: 2, Name: "crio.network", Flags: []register.Flag{register.RequiresInternetAccess}, - Distros: []string{"rhcos"}, + Distros: []string{"rhcos", "nestos"}, UserData: enableCrioIgn, - Tags: []string{"crio"}, + RequiredTag: "crio", // qemu-unpriv machines cannot communicate between each other ExcludePlatforms: []string{"qemu-unpriv"}, }) diff --git a/mantle/kola/tests/ignition/empty.go b/mantle/kola/tests/ignition/empty.go index 649f09fe79d6408615f83ce7e54169ca18768631..a2e76d10171cdf39e7945ea6b8cd224b01aa61cf 100644 --- a/mantle/kola/tests/ignition/empty.go +++ b/mantle/kola/tests/ignition/empty.go @@ -25,7 +25,7 @@ import ( // where the cloud provider metadata system is not available have been excluded. func init() { register.RegisterTest(®ister.Test{ - Name: "fcos.ignition.misc.empty", + Name: "nestos.ignition.misc.empty", Run: noIgnitionSSHKey, ClusterSize: 1, ExcludePlatforms: []string{"qemu", "esx"}, @@ -34,7 +34,7 @@ func init() { Tags: []string{"ignition"}, }) register.RegisterTest(®ister.Test{ - Name: "fcos.ignition.v3.noop", + Name: "nestos.ignition.v3.noop", Run: noIgnitionSSHKey, ClusterSize: 1, ExcludePlatforms: []string{"qemu", "esx"}, diff --git a/mantle/kola/tests/ignition/resource.go b/mantle/kola/tests/ignition/resource.go index 17027286c7dcd6f4155e6ff296622a166457d80e..c2d65ce10de2218680d47fae322f21c7905818f2 100644 --- a/mantle/kola/tests/ignition/resource.go +++ b/mantle/kola/tests/ignition/resource.go @@ -75,6 +75,102 @@ func init() { ExcludePlatforms: []string{"qemu-unpriv"}, Timeout: 20 * time.Minute, }) + register.RegisterTest(®ister.Test{ + Name: "nestos.ignition.resource.remote", + Run: resourceRemote, + ClusterSize: 1, + Flags: []register.Flag{register.RequiresInternetAccess}, + Tags: []string{"ignition"}, + // https://github.com/coreos/bugs/issues/2205 for DO + ExcludePlatforms: []string{"do"}, + UserData: conf.Ignition(`{ + "ignition": { + "version": "3.0.0" + }, + "storage": { + "files": [ + { + "path": "/var/resource/http", + "contents": { + "source": "http://nestos.org.cn/kola/anonymous" + }, + "mode": 420 + }, + { + "path": "/var/resource/https", + "contents": { + "source": "https://nestos.org.cn/kola/anonymous" + }, + "mode": 420 + } + ] + } + }`), + }) + register.RegisterTest(®ister.Test{ + Name: "nestos.ignition.resource.s3", + Run: resourceS3, + ClusterSize: 1, + Platforms: []string{"aws"}, + Tags: []string{"ignition"}, + UserData: conf.Ignition(`{ + "ignition": { + "version": "3.0.0", + "config": { + "merge": [{ + "source": "s3://rh-kola-fixtures/resources/authenticated-var-v3.ign" + }] + } + }, + "storage": { + "files": [ + { + "path": "/var/resource/s3-auth", + "contents": { + "source": "s3://rh-kola-fixtures/resources/authenticated" + }, + "mode": 420 + } + ] + } + }`), + }) + // TODO: once Ignition supports this on all channels/distros + // this test should be rolled into coreos.ignition.resources.remote + // Test specifically for versioned s3 objects + register.RegisterTest(®ister.Test{ + Name: "nestos.ignition.resource.s3.versioned", + Run: resourceS3Versioned, + ClusterSize: 1, + Flags: []register.Flag{register.RequiresInternetAccess}, + Tags: []string{"ignition"}, + // https://github.com/coreos/bugs/issues/2205 for DO + ExcludePlatforms: []string{"do"}, + UserData: conf.Ignition(`{ + "ignition": { + "version": "3.0.0" + }, + "storage": { + "files": [ + { + "path": "/var/resource/original", + "contents": { + "source": "https://rh-kola-fixtures.s3.amazonaws.com/resources/versioned?versionId=Ym98GTx0npVaJznSAd0I1eUjFoZMP8Zo" + }, + "mode": 420 + }, + { + "path": "/var/resource/latest", + "contents": { + "source": "https://rh-kola-fixtures.s3.amazonaws.com/resources/versioned" + }, + "mode": 420 + } + ] + } + }`), + Distros: []string{"rhcos"}, + }) } func resourceLocal(c cluster.TestCluster) { @@ -101,6 +197,48 @@ func resourceLocal(c cluster.TestCluster) { }) } +func resourceRemote(c cluster.TestCluster) { + m := c.Machines()[0] + + checkResources(c, m, map[string]string{ + "http": "kola-anonymous", + "https": "kola-anonymous", + }) +} + +func resourceS3(c cluster.TestCluster) { + m := c.Machines()[0] + + checkResources(c, m, map[string]string{ + // object accessible by any authenticated S3 user, such as + // the IAM role associated with the instance + "s3-auth": "kola-authenticated", + // object created by configuration accessible by any authenticated + // S3 user, such as the IAM role associated with the instance + "s3-config": "kola-config", + }) + + // verify that the objects are inaccessible anonymously + for _, objectName := range []string{"authenticated", "authenticated.ign"} { + _, _, err := m.SSH("curl -sf https://rh-kola-fixtures.s3.amazonaws.com/resources/" + objectName) + if err == nil { + c.Fatal("anonymously fetching authenticated resource should have failed, but did not") + } + } + + // ...but that the anonymous object is accessible + c.RunCmdSync(m, "curl -sf https://rh-kola-fixtures.s3.amazonaws.com/resources/anonymous") +} + +func resourceS3Versioned(c cluster.TestCluster) { + m := c.Machines()[0] + + checkResources(c, m, map[string]string{ + "original": "original", + "latest": "updated", + }) +} + func checkResources(c cluster.TestCluster, m platform.Machine, resources map[string]string) { for filename, expectedContents := range resources { contents := c.MustSSH(m, fmt.Sprintf("sudo cat /var/resource/%s", filename)) diff --git a/mantle/kola/tests/ignition/systemd.go b/mantle/kola/tests/ignition/systemd.go index 62f07c1e036d8480804c23739ccd04d39ec4598a..1b99001ff019d1d0927c5b85f5d4bc204afe09de 100644 --- a/mantle/kola/tests/ignition/systemd.go +++ b/mantle/kola/tests/ignition/systemd.go @@ -22,7 +22,7 @@ import ( func init() { register.RegisterTest(®ister.Test{ - Name: "coreos.ignition.systemd.enable-service", + Name: "nestos.ignition.systemd.enable-service", Run: enableSystemdService, ClusterSize: 1, Tags: []string{"ignition"}, diff --git a/mantle/kola/tests/isula/isula.go b/mantle/kola/tests/isula/isula.go index c8336968aa882068e6c5b02a6e5f0b8f5aacbe68..201a8cc0aa27c9601da53a572c1454c303fbbb9e 100644 --- a/mantle/kola/tests/isula/isula.go +++ b/mantle/kola/tests/isula/isula.go @@ -17,6 +17,7 @@ func init() { Name: `isula.base`, Distros: []string{"nestos"}, Flags: []register.Flag{register.RequiresInternetAccess}, + RequiredTag: "isula", }) register.RegisterTest(®ister.Test{ Run: isulaWorkflow, @@ -25,6 +26,7 @@ func init() { Distros: []string{"nestos"}, Flags: []register.Flag{register.RequiresInternetAccess}, FailFast: true, + RequiredTag: "isula", }) } @@ -125,7 +127,7 @@ func isulaWorkflow(c cluster.TestCluster) { // Test: Run container c.Run("run", func(c cluster.TestCluster) { - _, err := c.SSH(m, "sudo isula run -itd --name busybox hub.oepkgs.net/library/busybox") + _, err := c.SSH(m, "sudo isula run -itd --name busybox docker.io/busybox") if err != nil { c.Fatal(err) } @@ -189,7 +191,7 @@ func isulaWorkflow(c cluster.TestCluster) { // Test: Delete image c.Run("delete", func(c cluster.TestCluster) { - _, err := c.SSH(m, "sudo isula rmi hub.oepkgs.net/library/busybox") + _, err := c.SSH(m, "sudo isula rmi docker.io/busybox") if err != nil { c.Fatal(err) } diff --git a/mantle/kola/tests/metadata/contents.go b/mantle/kola/tests/metadata/contents.go index 0fa85d1ec77da4aa445af40b64ed7ba335255e8e..4affcd7994e78dd6d1c7a978a6aebd8b1a601454 100644 --- a/mantle/kola/tests/metadata/contents.go +++ b/mantle/kola/tests/metadata/contents.go @@ -38,7 +38,7 @@ func init() { }`) register.RegisterTest(®ister.Test{ - Name: "fcos.metadata.aws", + Name: "nestos.metadata.aws", Run: verifyAWS, ClusterSize: 1, Platforms: []string{"aws"}, @@ -47,7 +47,7 @@ func init() { }) register.RegisterTest(®ister.Test{ - Name: "fcos.metadata.azure", + Name: "nestos.metadata.azure", Run: verifyAzure, ClusterSize: 1, Platforms: []string{"azure"}, @@ -56,7 +56,7 @@ func init() { }) register.RegisterTest(®ister.Test{ - Name: "fcos.metadata.packet", + Name: "nestos.metadata.packet", Run: verifyPacket, ClusterSize: 1, Platforms: []string{"packet"}, diff --git a/mantle/kola/tests/misc/boot-mirror.go b/mantle/kola/tests/misc/boot-mirror.go index 737f9bc6755f18927875b87c904ce8e34cfd0847..2151fbddbcafe3269029a272082506ceffaf18c9 100644 --- a/mantle/kola/tests/misc/boot-mirror.go +++ b/mantle/kola/tests/misc/boot-mirror.go @@ -57,11 +57,11 @@ boot_device: func init() { register.RegisterTest(®ister.Test{ - Run: runBootMirrorTest, - ClusterSize: 0, - Name: `coreos.boot-mirror`, - Platforms: []string{"qemu-unpriv"}, - ExcludeDistros: []string{"nestos"}, + Run: runBootMirrorTest, + ClusterSize: 0, + Name: `nestos.boot-mirror`, + Platforms: []string{"qemu-unpriv"}, + //ExcludeDistros: []string{"nestos"}, // Can't mirror boot disk on s390x ExcludeArchitectures: []string{"s390x"}, // skipping this test on UEFI until https://github.com/coreos/coreos-assembler/issues/2039 @@ -72,11 +72,11 @@ func init() { Timeout: 15 * time.Minute, }) register.RegisterTest(®ister.Test{ - Run: runBootMirrorLUKSTest, - ClusterSize: 0, - Name: `coreos.boot-mirror.luks`, - Platforms: []string{"qemu-unpriv"}, - ExcludeDistros: []string{"nestos"}, + Run: runBootMirrorLUKSTest, + ClusterSize: 0, + Name: `nestos.boot-mirror.luks`, + Platforms: []string{"qemu-unpriv"}, + //ExcludeDistros: []string{"nestos"}, // Can't mirror boot disk on s390x, and qemu s390x doesn't // support TPM ExcludeArchitectures: []string{"s390x"}, diff --git a/mantle/kola/tests/misc/files.go b/mantle/kola/tests/misc/files.go index cefae538aec4dbee98411455e58bb41906fcfee4..a5a792ffc72cef7e7f6c11f8a92e0c036d5e77f7 100644 --- a/mantle/kola/tests/misc/files.go +++ b/mantle/kola/tests/misc/files.go @@ -27,7 +27,7 @@ func init() { register.RegisterTest(®ister.Test{ Run: Filesystem, ClusterSize: 1, - Name: "fcos.filesystem", + Name: "nestos.filesystem", Distros: []string{"fcos", "nestos"}, }) } diff --git a/mantle/kola/tests/misc/network.go b/mantle/kola/tests/misc/network.go index 817ada47e2d9aea06eedcb5b22892f337ca6a23f..95cfa7086c25840b448a85a523c6fd26d145ef05 100644 --- a/mantle/kola/tests/misc/network.go +++ b/mantle/kola/tests/misc/network.go @@ -43,8 +43,8 @@ func init() { register.RegisterTest(®ister.Test{ Run: NetworkInitramfsSecondBoot, ClusterSize: 1, - Name: "coreos.network.initramfs.second-boot", - ExcludeDistros: []string{"fcos", "rhcos", "nestos"}, + Name: "nestos.network.initramfs.second-boot", + ExcludeDistros: []string{"fcos", "rhcos"}, }) // This test follows the same network configuration used on https://github.com/RHsyseng/rhcos-slb // with a slight change, where the MCO script is run from ignition: https://github.com/RHsyseng/rhcos-slb/blob/main/setup-ovs.sh. @@ -529,7 +529,7 @@ func setupBondWithDhcpTest(c cluster.TestCluster, primaryMac, secondaryMac, prim "name": "openvswitch.service" }, { - "contents": "[Unit]\nDescription=Capture MAC address from kargs\nBefore=coreos-installer.target\nAfter=coreos-installer.service\n\nConditionKernelCommandLine=macAddressList\nRequiresMountsFor=/boot\n\n[Service]\nType=oneshot\nMountFlags=slave\nExecStart=/usr/local/bin/capture-macs\n\n[Install]\nRequiredBy=multi-user.target\n", + "contents": "[Unit]\nDescription=Capture MAC address from kargs\nBefore=nestos-installer.target\nAfter=nestos-installer.service\n\nConditionKernelCommandLine=macAddressList\nRequiresMountsFor=/boot\n\n[Service]\nType=oneshot\nMountFlags=slave\nExecStart=/usr/local/bin/capture-macs\n\n[Install]\nRequiredBy=multi-user.target\n", "enabled": true, "name": "capture-macs.service" }, @@ -700,7 +700,7 @@ func setupMultipleNetworkTest(c cluster.TestCluster, primaryMac, secondaryMac st "name": "openvswitch.service" }, { - "contents": "[Unit]\nDescription=Capture MAC address from kargs\nBefore=coreos-installer.target\nAfter=coreos-installer.service\n\nConditionKernelCommandLine=macAddressList\nRequiresMountsFor=/boot\n\n[Service]\nType=oneshot\nMountFlags=slave\nExecStart=/usr/local/bin/capture-macs\n\n[Install]\nRequiredBy=multi-user.target\n", + "contents": "[Unit]\nDescription=Capture MAC address from kargs\nBefore=nestos-installer.target\nAfter=nestos-installer.service\n\nConditionKernelCommandLine=macAddressList\nRequiresMountsFor=/boot\n\n[Service]\nType=oneshot\nMountFlags=slave\nExecStart=/usr/local/bin/capture-macs\n\n[Install]\nRequiredBy=multi-user.target\n", "enabled": true, "name": "capture-macs.service" }, diff --git a/mantle/kola/tests/misc/users.go b/mantle/kola/tests/misc/users.go index f320636992e41e3722e26440fe9aa257f124d912..0d2ef77d044c51e71e9b8ec761042b59378a747e 100644 --- a/mantle/kola/tests/misc/users.go +++ b/mantle/kola/tests/misc/users.go @@ -26,7 +26,7 @@ func init() { Run: CheckUserShells, ClusterSize: 1, ExcludePlatforms: []string{"gce"}, - Name: "fcos.users.shells", + Name: "nestos.users.shells", Distros: []string{"fcos", "nestos"}, }) } diff --git a/mantle/kola/tests/ostree/basic.go b/mantle/kola/tests/ostree/basic.go index 3d3b13e1d03823f472cccf74db9c8a245e99a4d2..ce9682b3e96bfc8facf09d0a579aa6ac401b44c8 100644 --- a/mantle/kola/tests/ostree/basic.go +++ b/mantle/kola/tests/ostree/basic.go @@ -34,7 +34,7 @@ func init() { Run: ostreeBasicTest, ClusterSize: 1, Name: "ostree.basic", - Distros: []string{"rhcos"}, + Distros: []string{"rhcos", "nestos"}, FailFast: true, Tags: []string{"ostree"}, }) diff --git a/mantle/kola/tests/rhcos/sssd.go b/mantle/kola/tests/rhcos/sssd.go index e135675dba0289414ea70dbb31a3ebbd0de7edcd..3298f654d81176422037f440dde6ca50718991e3 100644 --- a/mantle/kola/tests/rhcos/sssd.go +++ b/mantle/kola/tests/rhcos/sssd.go @@ -27,7 +27,7 @@ func init() { ClusterSize: 1, Name: `rhcos.sssd`, Flags: []register.Flag{}, - Distros: []string{"rhcos"}, + Distros: []string{"rhcos", "nestos"}, Platforms: []string{"qemu"}, UserData: conf.Ignition(`{ "ignition": { diff --git a/mantle/kola/tests/rpmostree/deployments.go b/mantle/kola/tests/rpmostree/deployments.go index 5aa7afe55b244eea3540beabb71b030604041135..b9d5a45237408e28ce69f0a152ccc48108b11a54 100644 --- a/mantle/kola/tests/rpmostree/deployments.go +++ b/mantle/kola/tests/rpmostree/deployments.go @@ -51,9 +51,9 @@ func init() { "name": "nest" }, "contents": { - "source": "https://github.com/projectatomic/atomic-host-tests/raw/master/rpm/aht-dummy-1.0-1.noarch.rpm", + "source": "http://www.nestos.org.cn/kola/aht-dummy-1.0-1.noarch.rpm", "verification": { - "hash": "sha512-da29ae637b30647cab2386a2ce6b4223c3ad7120ae8dd32d9ce275f26a11946400bba0b86f6feabb9fb83622856ef39f8cecf14b4975638c4d8c0cf33b0f7b26" + "hash": "sha512-ad843f91a51a27416f2769014d03f329e1cd1e3a2907d1ff8bb17cabbec37f8e3417e81859bd14182c9e6efb3ca46d5fed60d02c82a8c4ce3c27f5e05c267eca" } }, "mode": 420 diff --git a/mantle/kola/tests/rpmostree/rebase.go b/mantle/kola/tests/rpmostree/rebase.go index f88bb5eae8396ae20a417727429bcdc6f5456c8c..3d9eaaf24826b6058131e25dee0b67a640c25a5f 100644 --- a/mantle/kola/tests/rpmostree/rebase.go +++ b/mantle/kola/tests/rpmostree/rebase.go @@ -6,24 +6,24 @@ import ( "github.com/coreos/mantle/kola/tests/util" ) -func init(){ +func init() { register.RegisterTest(®ister.Test{ - Run: rpmOstreeRebase, + Run: rpmOstreeRebase, ClusterSize: 1, - Name: "rpmostree.rebase", - FailFast: true, - Tags: []string{"rpm-ostree","upgrade"}, - Flags: []register.Flag{register.RequiresInternetAccess}, + Name: "rpmostree.rebase", + FailFast: true, + Tags: []string{"rpm-ostree", "upgrade"}, + Flags: []register.Flag{register.RequiresInternetAccess}, }) } func rpmOstreeRebase(c cluster.TestCluster) { m := c.Machines()[0] arch := c.MustSSH(m, "uname -m") - var newBranch string = "ostree-unverified-registry:hub.oepkgs.net/nestos/nestos-test:22.03-LTS-SP2.20230922.0-" + string(arch) + var newBranch string = "ostree-unverified-registry:hub.oepkgs.net/nestos/nestos:22.03-LTS-SP3.20240110.0-" + string(arch) originalStatus, err := util.GetRpmOstreeStatusJSON(c, m) - if err != nil{ + if err != nil { c.Fatal(err) } @@ -31,7 +31,7 @@ func rpmOstreeRebase(c cluster.TestCluster) { c.Fatalf(`Unexpected results from "rpm-ostree status"; received: %v`, originalStatus) } - c.Run("ostree upgrade",func(c cluster.TestCluster){ + c.Run("ostree upgrade", func(c cluster.TestCluster) { // use "rpm-ostree rebase" to get to the "new" commit _ = c.MustSSH(m, "sudo systemctl start docker.service && sudo rpm-ostree rebase --experimental "+newBranch+" --bypass-driver") // get latest rpm-ostree status output to check validity @@ -39,7 +39,7 @@ func rpmOstreeRebase(c cluster.TestCluster) { if err != nil { c.Fatal(err) } - + // should have an additional deployment if len(postUpgradeStatus.Deployments) != len(originalStatus.Deployments)+1 { c.Fatalf("Expected %d deployments; found %d deployments", len(originalStatus.Deployments)+1, len(postUpgradeStatus.Deployments)) @@ -66,4 +66,4 @@ func rpmOstreeRebase(c cluster.TestCluster) { c.Fatalf("New deployment is not reporting as booted") } }) -} \ No newline at end of file +} diff --git a/mantle/kola/tests/upgrade/basic.go b/mantle/kola/tests/upgrade/basic.go index 9a7800fe66b8b23f34a5920e7785cb4b5d6d0950..52d221257020607800ae67b2f3cada7ed17451be 100644 --- a/mantle/kola/tests/upgrade/basic.go +++ b/mantle/kola/tests/upgrade/basic.go @@ -43,7 +43,7 @@ func init() { Run: fcosUpgradeBasic, ClusterSize: 1, // if renaming this, also rename the command in kolet-httpd.service below - Name: "fcos.upgrade.basic", + Name: "nestos.upgrade.basic", FailFast: true, NativeFuncs: map[string]register.NativeFuncWrap{ "httpd": register.CreateNativeFuncWrap(httpd), @@ -82,7 +82,7 @@ func init() { }, { "name": "kolet-httpd.service", - "contents": "[Service]\nExecStart=/var/home/nest/kolet run fcos.upgrade.basic httpd -v\n[Install]\nWantedBy=multi-user.target" + "contents": "[Service]\nExecStart=/var/home/nest/kolet run nestos.upgrade.basic httpd -v\n[Install]\nWantedBy=multi-user.target" } ] }, diff --git a/mantle/platform/api/packet/api.go b/mantle/platform/api/packet/api.go index 9b587ee1aa2a6bae362b646e1bd21b18c7c61028..c59448c321d480dab4b84021c48303cf513fc628 100644 --- a/mantle/platform/api/packet/api.go +++ b/mantle/platform/api/packet/api.go @@ -357,7 +357,7 @@ RequiredBy=multi-user.target Contents: util.StrToPtr(discardServiceUnit), }, { - Name: "coreos-installer.service", + Name: "nestos-installer.service", Enabled: util.BoolToPtr(true), Contents: util.StrToPtr(installUnit), }, diff --git a/mantle/platform/metal.go b/mantle/platform/metal.go index c5a4f435d298870ed028032571d1ef5912a17710..72a34fe804f01a2160455b3fd2bc0d2f2d2ed7f1 100644 --- a/mantle/platform/metal.go +++ b/mantle/platform/metal.go @@ -64,7 +64,7 @@ var ( RemainAfterExit=yes ExecStart=/bin/sh -c '/usr/bin/echo %s >/dev/virtio-ports/bootstarted' [Install] - RequiredBy=coreos-installer.target + RequiredBy=nestos-installer.target `, bootStartedSignal) ) @@ -274,7 +274,7 @@ func (inst *Install) setup(kern *kernelSetup) (*installerRun, error) { if builder.Firmware == "uefi" { pxe.boottype = "grub" pxe.bootfile = "/boot/grub2/grubx64.efi" - pxe.pxeimagepath = "/boot/efi/EFI/fedora/grubx64.efi" + pxe.pxeimagepath = "/boot/efi/EFI/openEuler/grubx64.efi" // Choose bootindex=2. First boot the hard drive won't // have an OS and will fall through to bootindex 2 (net) pxe.bootindex = "2" @@ -286,7 +286,7 @@ func (inst *Install) setup(kern *kernelSetup) (*installerRun, error) { pxe.boottype = "grub" pxe.networkdevice = "virtio-net-pci" pxe.bootfile = "/boot/grub2/grubaa64.efi" - pxe.pxeimagepath = "/boot/efi/EFI/fedora/grubaa64.efi" + pxe.pxeimagepath = "/boot/efi/EFI/openEuler/grubaa64.efi" pxe.bootindex = "1" case "ppc64le": pxe.boottype = "grub" @@ -338,14 +338,14 @@ func renderBaseKargs() []string { } func renderInstallKargs(t *installerRun, offline bool) []string { - args := []string{"coreos.inst.install_dev=/dev/vda", - fmt.Sprintf("coreos.inst.ignition_url=%s/config.ign", t.baseurl)} + args := []string{"nestos.inst.install_dev=/dev/vda", + fmt.Sprintf("nestos.inst.ignition_url=%s/config.ign", t.baseurl)} if !offline { - args = append(args, fmt.Sprintf("coreos.inst.image_url=%s/%s", t.baseurl, t.metalname)) + args = append(args, fmt.Sprintf("nestos.inst.image_url=%s/%s", t.baseurl, t.metalname)) } // FIXME - ship signatures by default too if t.inst.Insecure { - args = append(args, "coreos.inst.insecure") + args = append(args, "nestos.inst.insecure") } return args } @@ -747,11 +747,11 @@ func (inst *Install) InstallViaISOEmbed(kargs []string, liveIgnition, targetIgni inst.liveIgnition.AddSystemdUnit("boot-started.service", bootStartedUnit, conf.Enable) inst.liveIgnition.AddFile(installerConfig.IgnitionFile, serializedTargetConfig, mode) - inst.liveIgnition.AddFile("/etc/coreos/installer.d/mantle.yaml", string(installerConfigData), mode) + inst.liveIgnition.AddFile("/etc/nestos/installer.d/mantle.yaml", string(installerConfigData), mode) inst.liveIgnition.AddAutoLogin() if inst.MultiPathDisk { - inst.liveIgnition.AddSystemdUnit("coreos-installer-multipath.service", `[Unit] + inst.liveIgnition.AddSystemdUnit("nestos-installer-multipath.service", `[Unit] Description=TestISO Enable Multipath Before=multipathd.service DefaultDependencies=no @@ -760,8 +760,8 @@ Type=oneshot RemainAfterExit=yes ExecStart=/usr/sbin/mpathconf --enable [Install] -WantedBy=coreos-installer.target`, conf.Enable) - inst.liveIgnition.AddSystemdUnitDropin("coreos-installer.service", "wait-for-mpath-target.conf", `[Unit] +WantedBy=nestos-installer.target`, conf.Enable) + inst.liveIgnition.AddSystemdUnitDropin("nestos-installer.service", "wait-for-mpath-target.conf", `[Unit] Requires=dev-mapper-mpatha.device After=dev-mapper-mpatha.device`) }