diff --git a/dctest/cke_test.go b/dctest/cke_test.go index 6de770f12..8e5964c87 100644 --- a/dctest/cke_test.go +++ b/dctest/cke_test.go @@ -67,7 +67,13 @@ func testCKE() { err = json.Unmarshal(stdout, &ssMachines) Expect(err).ShouldNot(HaveOccurred(), "data=%s", stdout) - availableNodes := len(csMachines) + len(ssMachines) + stdout, stderr, err = execAt(bootServers[0], "sabactl", "machines", "get", "--role=ss2") + Expect(err).ShouldNot(HaveOccurred(), "stdout=%s, stderr=%s", stdout, stderr) + var ss2Machines []sabakan.Machine + err = json.Unmarshal(stdout, &ss2Machines) + Expect(err).ShouldNot(HaveOccurred(), "data=%s", stdout) + + availableNodes := len(csMachines) + len(ssMachines) + len(ss2Machines) Expect(availableNodes).NotTo(Equal(0)) By("getting systemd unit statuses by serf members") diff --git a/dctest/menu-ss.yml b/dctest/menu-ss.yml index 513877ae6..3f2a30d81 100644 --- a/dctest/menu-ss.yml +++ b/dctest/menu-ss.yml @@ -23,6 +23,7 @@ spec: rack: - cs: 2 ss: 1 + ss2: 1 - cs: 2 ss: 1 - cs: 2 @@ -60,3 +61,11 @@ spec: memory: 10G disk-count: 10 tpm: true +--- +kind: Node +type: ss +spec: + cpu: 4 + memory: 10G + disk-count: 10 + tpm: true diff --git a/ignitions/common/files/etc/hostname b/ignitions/common/files/etc/hostname index e80de2470..58aa2051f 100644 --- a/ignitions/common/files/etc/hostname +++ b/ignitions/common/files/etc/hostname @@ -1 +1 @@ -rack{{ .Spec.Rack }}-{{ .Spec.Role }}{{ .Spec.IndexInRack }} +rack{{ .Spec.Rack }}-{{ .Spec.Role }}-{{ .Spec.IndexInRack }} diff --git a/menu/cluster.go b/menu/cluster.go index 078b2f63d..059299af0 100644 --- a/menu/cluster.go +++ b/menu/cluster.go @@ -275,7 +275,7 @@ func NewCluster(menu *menu) (*Cluster, error) { } for csIdx := 0; csIdx < rackMenu.Cs; csIdx++ { - name := fmt.Sprintf("cs%d", csIdx+1) + name := fmt.Sprintf("cs-%d", csIdx+1) fullName := fmt.Sprintf("%s-%s", rack.name, name) node := &node{ name: name, @@ -292,7 +292,7 @@ func NewCluster(menu *menu) (*Cluster, error) { } for ssIdx := 0; ssIdx < rackMenu.Ss; ssIdx++ { - name := fmt.Sprintf("ss%d", ssIdx+1) + name := fmt.Sprintf("ss-%d", ssIdx+1) fullName := fmt.Sprintf("%s-%s", rack.name, name) node := &node{ name: name, @@ -309,7 +309,7 @@ func NewCluster(menu *menu) (*Cluster, error) { } for ss2Idx := 0; ss2Idx < rackMenu.Ss2; ss2Idx++ { - name := fmt.Sprintf("ss2%d", ss2Idx+1) + name := fmt.Sprintf("ss2-%d", ss2Idx+1) fullName := fmt.Sprintf("%s-%s", rack.name, name) node := &node{ name: name,