diff --git a/mantle/cmd/kola/testiso.go b/mantle/cmd/kola/testiso.go index 62a4e6b302d57fda0dd6b6343cdcc6d48cac2732..57fa42b87531d1fb415fc48fa139add5039b4548 100644 --- a/mantle/cmd/kola/testiso.go +++ b/mantle/cmd/kola/testiso.go @@ -149,36 +149,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 tests -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 +Description=TestISO Verify NestOS Installer Download +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 @@ -192,7 +192,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 @@ -209,8 +209,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 @@ -223,7 +223,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 @@ -245,17 +245,17 @@ RemainAfterExit=yes ExecStart=/bin/sh -c '! efibootmgr -v | grep -E "(HD|CDROM)\("' [Install] # for install tests -RequiredBy=coreos-installer.target +RequiredBy=nestos-installer.target # for iso-as-disk RequiredBy=multi-user.target` // Unit to check that /run/media/iso is not mounted when -// coreos.liveiso.fromram kernel argument is passed +// nestos.liveiso.fromram kernel argument is passed var isoNotMountedUnit = `[Unit] -Description=Verify ISO is not mounted when coreos.liveiso.fromram +Description=Verify ISO is not mounted when nestos.liveiso.fromram OnFailure=emergency.target OnFailureJobMode=isolate -ConditionKernelCommandLine=coreos.liveiso.fromram +ConditionKernelCommandLine=nestos.liveiso.fromram [Service] Type=oneshot StandardOutput=kmsg+console @@ -265,10 +265,10 @@ RemainAfterExit=yes # we want: https://github.com/systemd/systemd/issues/10297#issuecomment-1672002635 ExecStart=bash -c "if mountpoint /run/media/iso 2>/dev/null; then exit 1; fi" [Install] -RequiredBy=coreos-installer.target` +RequiredBy=nestos-installer.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 @@ -302,7 +302,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 @@ -313,7 +313,7 @@ ExecStart=/usr/bin/grep "%[1]s" /etc/NetworkManager/system-connections/%[2]s ExecStart=/usr/bin/nmcli c show br-ex [Install] # for live system -RequiredBy=coreos-installer.target +RequiredBy=nestos-installer.target # for target system RequiredBy=multi-user.target`, nmConnectionId, nmConnectionFile) @@ -644,6 +644,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 @@ -710,17 +711,17 @@ func testPXE(ctx context.Context, inst platform.Install, outdir string) (time.Du 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 isOffline { 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, isOffline) if err != nil { @@ -766,19 +767,19 @@ func testLiveIso(ctx context.Context, inst platform.Install, outdir string, mini liveConfig.AddSystemdUnit("live-signal-ok.service", liveSignalOKUnit, conf.Enable) liveConfig.AddSystemdUnit("verify-no-efi-boot-entry.service", verifyNoEFIBootEntry, conf.Enable) liveConfig.AddSystemdUnit("iso-not-mounted-when-fromram.service", isoNotMountedUnit, 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) // NM keyfile via `iso network embed` inst.NmKeyfiles[nmConnectionFile] = nmConnection // nmstate config via live Ignition config, propagated via @@ -885,7 +886,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 } @@ -899,7 +900,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 8d394e8f72dafb844f32aaadc7288fd2d451e547..8aaa02c073d73106f27bebd8603417f2a70d7031 100644 --- a/mantle/kola/tests/coretest/core.go +++ b/mantle/kola/tests/coretest/core.go @@ -59,13 +59,13 @@ func init() { // TODO: Only enable PodmanPing on non qemu. 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}, NativeFuncs: map[string]register.NativeFuncWrap{ - "PodmanEcho": register.CreateNativeFuncWrap(TestPodmanEcho), - "PodmanWgetHead": register.CreateNativeFuncWrap(TestPodmanWgetHead), + "DockerEcho": register.CreateNativeFuncWrap(TestDockerEcho), + "DockerWgetHead": register.CreateNativeFuncWrap(TestDockerWgetHead), }, Distros: []string{"fcos", "nestos"}, }) @@ -77,10 +77,10 @@ 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{ @@ -101,27 +101,35 @@ func TestPortSsh() error { func TestDockerEcho() error { //t.Parallel() - return util.RunCmdTimeout(DockerTimeout, "docker", "run", "docker.nju.edu.cn/library/busybox", "echo") + util.RunCmdTimeout(DockerTimeout, "sudo", "systemctl", "start", "docker") + return util.RunCmdTimeout(DockerTimeout, "sudo", "docker", "run", "atomhub.openatom.cn/library/busybox:latest", "echo") } func TestDockerPing() error { //t.Parallel() - return util.RunCmdTimeout(DockerTimeout, "docker", "run", "docker.nju.edu.cn/library/busybox", "ping", "-c4", "coreos.com") + util.RunCmdTimeout(DockerTimeout, "sudo", "systemctl", "start", "docker") + return util.RunCmdTimeout(DockerTimeout, "sudo", "docker", "run", "atomhub.openatom.cn/library/busybox:latest", "ping", "-c4", "baidu.com") +} + +func TestDockerWgetHead() error { + //t.Parallel() + util.RunCmdTimeout(DockerTimeout, "sudo", "systemctl", "start", "docker") + return util.RunCmdTimeout(DockerTimeout, "sudo", "docker", "run", "atomhub.openatom.cn/library/busybox:latest", "wget", "--spider", "https://nestos.org.cn/kola/hotspot.txt") } func TestPodmanEcho() error { //t.Parallel() - return util.RunCmdTimeout(DockerTimeout, "podman", "run", "docker.nju.edu.cn/library/busybox", "echo") + return util.RunCmdTimeout(DockerTimeout, "podman", "run", "atomhub.openatom.cn/library/busybox:latest", "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", "atomhub.openatom.cn/library/busybox:latest", "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", "atomhub.openatom.cn/library/busybox:latest", "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 ee3df7827ca256531da78ad88521bb34100ce91f..e6535c03c377cca0bfbfa753076774112456edfc 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 machines cannot communicate between each other ExcludePlatforms: []string{"qemu"}, }) diff --git a/mantle/kola/tests/ignition/empty.go b/mantle/kola/tests/ignition/empty.go index 175c76d1fb13e32aaf2d89fdfd75065a84d6c9f0..775fc080ba569b3de31680595f09e85fa5bea5d3 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 903cd4376050e4bc28475bbb4b45e57a8067f2c5..7f3c342b83ef52a0d183c225d29846e7df90349e 100644 --- a/mantle/kola/tests/ignition/resource.go +++ b/mantle/kola/tests/ignition/resource.go @@ -76,6 +76,102 @@ func init() { ExcludePlatforms: []string{"qemu"}, 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) { @@ -102,6 +198,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 3b26c678b4e342de7c62cf22df1bccd4b468cb65..b7bafa47a557b8b69e4b8807317a9779cba7208c 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 46413860afc25f6e81685c2a91952c3f39f1e9cb..5dd6d8a2feef075fd5c15b09c498f75d065ba161 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 atomhub.openatom.cn/library/busybox:latest") 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 atomhub.openatom.cn/library/busybox:latest") if err != nil { c.Fatal(err) } diff --git a/mantle/kola/tests/metadata/contents.go b/mantle/kola/tests/metadata/contents.go index fa8825a010cee5617581184666df7185f16c9280..3854a41501f6a09bd6ad88e426409d2721a7b160 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 00592a7bbeff2293c119c103969776396a0c889b..adab4305dc83614b2b63f743b0d14c8e052fc033 100644 --- a/mantle/kola/tests/misc/boot-mirror.go +++ b/mantle/kola/tests/misc/boot-mirror.go @@ -59,10 +59,10 @@ func init() { register.RegisterTest(®ister.Test{ Run: runBootMirrorTest, ClusterSize: 0, - Name: `coreos.boot-mirror`, + Name: `nestos.boot-mirror`, Description: "Verify the boot-mirror RAID1 flow works properly in both BIOS and UEFI mode.", Platforms: []string{"qemu"}, - ExcludeDistros: []string{"nestos"}, + //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 @@ -75,10 +75,10 @@ func init() { register.RegisterTest(®ister.Test{ Run: runBootMirrorLUKSTest, ClusterSize: 0, - Name: `coreos.boot-mirror.luks`, + Name: `nestos.boot-mirror.luks`, Description: "Verify the boot-mirror+LUKS RAID1 flow works properly in both BIOS and UEFI modes.", Platforms: []string{"qemu"}, - ExcludeDistros: []string{"nestos"}, + //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 f8a5e3c116a976383f6727b3a9e84f694dfb9e6c..407898d983f75da0b2b1c9efbba08f0ad3356471 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 9d083ad5f56030e4deb0c635e39b2a8cd5b9b8bd..3805e6fef2db4cdd8a548a81069c6eac9bf60ae9 100644 --- a/mantle/kola/tests/misc/network.go +++ b/mantle/kola/tests/misc/network.go @@ -41,10 +41,11 @@ func init() { UserData: conf.EmptyIgnition(), }) // TODO: rewrite test for NetworkManager + // This test is for systemd-networkd.service, but using NetworkManager.service now. register.RegisterTest(®ister.Test{ Run: NetworkInitramfsSecondBoot, ClusterSize: 1, - Name: "coreos.network.initramfs.second-boot", + Name: "nestos.network.initramfs.second-boot", Description: "Verify that networking is not started in the initramfs on the second boot.", ExcludeDistros: []string{"fcos", "rhcos", "nestos"}, }) @@ -531,7 +532,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" }, @@ -702,7 +703,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 70cc34e2d992c7666e067f416449dafd7aaaa75c..45a806e7f4e91e09929f6d2d5a689b84f3af0eb9 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 5ee804c4bdb8f1bca1327a00388bb4d7cf27fba1..d872482d8941fe9475dd6c478bc44f59d22c6534 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"}, }) @@ -57,7 +57,7 @@ type ostreeAdminStatus struct { // getOstreeRemotes returns the current number of ostree remotes on a machine func getOstreeRemotes(c cluster.TestCluster, m platform.Machine) (int, []string) { - remoteListOut := string(c.MustSSH(m, "ostree remote list")) + remoteListOut := string(c.MustSSH(m, "sudo ostree remote list")) numRemotes := 0 // If we get anything other than an empty string calculate the results // NOTE: This is needed as splitting "" ends up providing a count of 1 @@ -74,7 +74,7 @@ func getOstreeRemotes(c cluster.TestCluster, m platform.Machine) (int, []string) func getOstreeAdminStatus(c cluster.TestCluster, m platform.Machine) (ostreeAdminStatus, error) { oaStatus := ostreeAdminStatus{} - oasOutput, err := c.SSH(m, "ostree admin status") + oasOutput, err := c.SSH(m, "sudo ostree admin status") if err != nil { return oaStatus, fmt.Errorf(`Could not get "ostree admin status": %v`, err) } @@ -149,12 +149,12 @@ func ostreeBasicTest(c cluster.TestCluster) { // the checksum now c.RunLogged("rev-parse", func(c cluster.TestCluster) { // check the output of `ostree rev-parse` - c.AssertCmdOutputContains(m, ("ostree rev-parse " + oas.Origin), oas.Checksum) + c.AssertCmdOutputContains(m, ("sudo ostree rev-parse " + oas.Origin), oas.Checksum) }) // verify the output of 'ostree show' c.RunLogged("show", func(c cluster.TestCluster) { - oShowOut := c.MustSSH(m, ("ostree show " + oas.Checksum)) + oShowOut := c.MustSSH(m, ("sudo ostree show " + oas.Checksum)) oShowOutSplit := strings.Split(string(oShowOut), "\n") // we need at least the first 4 lines (commit, ContentChecksum, Date, Version) // to proceed safely @@ -205,7 +205,7 @@ func ostreeRemoteTest(c cluster.TestCluster) { // verify `ostree remote list` c.Run("list", func(c cluster.TestCluster) { - osRemoteListOut := c.MustSSH(m, "ostree remote list -u") + osRemoteListOut := c.MustSSH(m, "sudo ostree remote list -u") osRemoteListSplit := strings.Split(string(osRemoteListOut), "\n") // should have original remote + newly added remote @@ -230,12 +230,12 @@ func ostreeRemoteTest(c cluster.TestCluster) { // verify `ostree remote show-url` c.Run("show-url", func(c cluster.TestCluster) { - c.AssertCmdOutputContains(m, ("ostree remote show-url " + remoteName), remoteUrl) + c.AssertCmdOutputContains(m, ("sudo ostree remote show-url " + remoteName), remoteUrl) }) // verify `ostree remote refs` c.Run("refs", func(c cluster.TestCluster) { - osRemoteRefsOut := c.MustSSH(m, ("ostree remote refs " + remoteName)) + osRemoteRefsOut := c.MustSSH(m, ("sudo ostree remote refs " + remoteName)) if len(strings.Split(string(osRemoteRefsOut), "\n")) < 1 { c.Fatalf(`Did not receive expected amount of refs from remote: %v`, string(osRemoteRefsOut)) } @@ -243,14 +243,14 @@ func ostreeRemoteTest(c cluster.TestCluster) { // verify `ostree remote summary` c.Run("summary", func(c cluster.TestCluster) { - remoteRefsOut := c.MustSSH(m, ("ostree remote refs " + remoteName)) + remoteRefsOut := c.MustSSH(m, ("sudo ostree remote refs " + remoteName)) remoteRefsOutSplit := strings.Split(string(remoteRefsOut), "\n") remoteRefsCount := len(remoteRefsOutSplit) if remoteRefsCount < 1 { c.Fatalf(`Did not find any refs on ostree remote: %q`, string(remoteRefsOut)) } - osRemoteSummaryOut := c.MustSSH(m, ("ostree remote summary " + remoteName)) + osRemoteSummaryOut := c.MustSSH(m, ("sudo ostree remote summary " + remoteName)) if len(strings.Split(string(osRemoteSummaryOut), "\n")) < 1 { c.Fatalf(`Did not receive expected summary content from remote: %v`, string(osRemoteSummaryOut)) } @@ -286,7 +286,7 @@ func ostreeRemoteTest(c cluster.TestCluster) { // verify `ostree remote delete` c.Run("delete", func(c cluster.TestCluster) { - preRemotesOut := c.MustSSH(m, "ostree remote list") + preRemotesOut := c.MustSSH(m, "sudo ostree remote list") preNumRemotes := len(strings.Split(string(preRemotesOut), "\n")) if preNumRemotes < 1 { diff --git a/mantle/kola/tests/ostree/unlock.go b/mantle/kola/tests/ostree/unlock.go index 3188abad4bd2faf7acd9ed8f4f41dfe627d1862f..7b5ddfda4722fbf9d21e2433d7eb65adf479e2f8 100644 --- a/mantle/kola/tests/ostree/unlock.go +++ b/mantle/kola/tests/ostree/unlock.go @@ -32,6 +32,8 @@ func init() { Flags: []register.Flag{register.RequiresInternetAccess}, // need network to pull RPM FailFast: true, Tags: []string{"ostree"}, + // remove this testcase for iso,becase ro mount 'error: Remounting /sysroot read-write: Permission denied' + // ExcludePlatforms: []string{"qemu-iso"}, }) register.RegisterTest(®ister.Test{ Run: ostreeHotfixTest, @@ -40,6 +42,8 @@ func init() { Name: "ostree.hotfix", FailFast: true, Tags: []string{"ostree"}, + // remove this testcase for iso,becase ro mount 'error: Remounting /sysroot read-write: Permission denied' + // ExcludePlatforms: []string{"qemu-iso"}, // enable debugging for https://github.com/coreos/fedora-coreos-tracker/issues/942 // we can drop it once we resolved it UserData: conf.Butane(` diff --git a/mantle/kola/tests/podman/podman.go b/mantle/kola/tests/podman/podman.go index 83cccada3674d9e87b97d5cca4278576709b7b81..4a9fc83fe0ecde5ca6b8ed49ced829cd0810dc86 100644 --- a/mantle/kola/tests/podman/podman.go +++ b/mantle/kola/tests/podman/podman.go @@ -35,6 +35,7 @@ func init() { Run: podmanBaseTest, ClusterSize: 1, Name: `podman.base`, + RequiredTag: "podman", }) // These remaining tests use networking, and hence don't work reliably on RHCOS // right now due to due to https://bugzilla.redhat.com/show_bug.cgi?id=1757572 @@ -45,15 +46,17 @@ func init() { Flags: []register.Flag{register.RequiresInternetAccess}, // For pulling nginx Distros: []string{"fcos", "nestos"}, FailFast: true, + RequiredTag: "podman", }) register.RegisterTest(®ister.Test{ Run: podmanNetworksReliably, ClusterSize: 1, Name: `podman.network-single`, // Not really but podman blows up if there's no /etc/resolv.conf - Tags: []string{kola.NeedsInternetTag}, - Distros: []string{"fcos", "nestos"}, - Timeout: 20 * time.Minute, + Tags: []string{kola.NeedsInternetTag}, + Distros: []string{"fcos", "nestos"}, + Timeout: 20 * time.Minute, + RequiredTag: "podman", }) // https://github.com/coreos/mantle/pull/1080 // register.RegisterTest(®ister.Test{ @@ -126,7 +129,7 @@ func podmanWorkflow(c cluster.TestCluster) { m := c.Machines()[0] // Test: Verify container can run with volume mount and port forwarding - image := "docker.nju.edu.cn/library/nginx" + image := "atomhub.openatom.cn/library/nginx" container_name := "nginx" wwwRoot := "/usr/share/nginx/html" var id string diff --git a/mantle/kola/tests/rhcos/sssd.go b/mantle/kola/tests/rhcos/sssd.go index a390bde68b041a421db8db7d1e21be53f2eb7e33..e7fae98edb196b142293a6afb4e653ebf7ca71b4 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 8316684cb6f4c6684aa7bffbcb614c51a96a17c2..9a26628a3581594ad7719cc3b2613567b5cc591b 100644 --- a/mantle/kola/tests/rpmostree/deployments.go +++ b/mantle/kola/tests/rpmostree/deployments.go @@ -32,6 +32,8 @@ func init() { Name: "rpmostree.upgrade-rollback", FailFast: true, Tags: []string{"rpm-ostree", "upgrade"}, + // remove this testcase for iso,becase ro mount 'error: Remounting /sysroot read-write: Permission denied' + // ExcludePlatforms: []string{"qemu-iso"}, }) register.RegisterTest(®ister.Test{ Run: rpmOstreeInstallUninstall, @@ -51,9 +53,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 @@ -201,7 +203,7 @@ func rpmOstreeInstallUninstall(c cluster.TestCluster) { m := c.Machines()[0] - _, err := c.SSH(m, `sudo wget -P /var/home/nest http://www.nestos.org.cn/kola/aht-dummy-1.0-1.noarch.rpm`) + _, err := c.SSH(m, `bash -c 'cd ${HOME} && curl -L -O https://www.nestos.org.cn/kola/aht-dummy-1.0-1.noarch.rpm'`) if err != nil { c.Fatal(err) } diff --git a/mantle/kola/tests/rpmostree/rebase.go b/mantle/kola/tests/rpmostree/rebase.go index f88bb5eae8396ae20a417727429bcdc6f5456c8c..46caf93d94f751388a51e5009b0efc1a2b485d2d 100644 --- a/mantle/kola/tests/rpmostree/rebase.go +++ b/mantle/kola/tests/rpmostree/rebase.go @@ -6,24 +6,26 @@ 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}, + // remove this testcase for iso,becase ro mount 'error: Remounting /sysroot read-write: Permission denied' + // ExcludePlatforms: []string{"qemu-iso"}, }) } 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 +33,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 +41,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 +68,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 b1849b6a648d7b603e45834d29ba6d8a9bb59127..2b21f587c241acb20045b3f5922a2191635f2728 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 eeda7f2133dde968eda6ef52b175d9519a28eb79..779b9a802c4925a69fc3a8e46e69cfea8d85e163 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 063b372bcef5d3b07e5c7607a6f861ea0d485a4c..a129fccc4b74b3de1883a7871496c0443ce6885f 100644 --- a/mantle/platform/metal.go +++ b/mantle/platform/metal.go @@ -63,7 +63,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) ) @@ -287,7 +287,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" @@ -299,7 +299,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" @@ -351,14 +351,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 } @@ -780,11 +780,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 @@ -793,8 +793,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`) } diff --git a/mantle/util/distros.go b/mantle/util/distros.go index 08383c7f12245ee71671e3c86a4f60ae9e196241..296de392de5ad1216e650c414e64c1fbd7732cd6 100644 --- a/mantle/util/distros.go +++ b/mantle/util/distros.go @@ -29,8 +29,11 @@ func TargetDistroFromName(artifact string) string { if strings.HasPrefix(basename, "rhcos-") || strings.HasPrefix(basename, "scos-") { return "rhcos" } - // For now, just assume fcos - return "fcos" + if strings.HasPrefix(basename, "nestos-") { + return "nestos" + } + // For now, just assume nestos + return "nestos" } // TargetDistro returns the distribution of a cosa build @@ -42,6 +45,8 @@ func TargetDistro(build *builds.Build) (string, error) { return "rhcos", nil case "fedora-coreos": return "fcos", nil + case "nestos", "NestOS-For-Container": + return "nestos", nil default: return "", fmt.Errorf("Unknown distribution: %s", build.Name) }