Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
YZ775 committed Dec 13, 2024
1 parent b2c03fb commit 2924b0b
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 5 deletions.
8 changes: 7 additions & 1 deletion dctest/cke_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
9 changes: 9 additions & 0 deletions dctest/menu-ss.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ spec:
rack:
- cs: 2
ss: 1
ss2: 1
- cs: 2
ss: 1
- cs: 2
Expand Down Expand Up @@ -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
2 changes: 1 addition & 1 deletion ignitions/common/files/etc/hostname
Original file line number Diff line number Diff line change
@@ -1 +1 @@
rack{{ .Spec.Rack }}-{{ .Spec.Role }}{{ .Spec.IndexInRack }}
rack{{ .Spec.Rack }}-{{ .Spec.Role }}-{{ .Spec.IndexInRack }}
6 changes: 3 additions & 3 deletions menu/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand All @@ -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,
Expand Down

0 comments on commit 2924b0b

Please sign in to comment.