Skip to content

Commit

Permalink
remove second reboot
Browse files Browse the repository at this point in the history
  • Loading branch information
juadk committed Sep 21, 2023
1 parent 70fde58 commit 2b65e26
Showing 1 changed file with 30 additions and 28 deletions.
58 changes: 30 additions & 28 deletions tests/e2e/bootstrap_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -508,42 +508,44 @@ var _ = Describe("E2E - Bootstrapping node", Label("bootstrap"), func() {
// Get node information
client, _ := GetNodeInfo(hostName)
Expect(client).To(Not(BeNil()))
}

// Execute in parallel
wg.Add(1)
go func(h, p string, i int, cl *tools.Client) {
defer wg.Done()
defer GinkgoRecover()

By("Rebooting "+h, func() {
// Wait a little bit to avoid starting all VMs at the same time
randomSleep(i)
// Execute in parallel
/*
wg.Add(1)
go func(h, p string, i int, cl *tools.Client) {
defer wg.Done()
defer GinkgoRecover()
// Execute 'reboot' in background, to avoid SSH locking
Eventually(func() error {
_, err := cl.RunSSH("setsid -f reboot")
return err
}, tools.SetTimeout(2*time.Minute), 10*time.Second).Should(Not(HaveOccurred()))
})
By("Rebooting "+h, func() {
// Wait a little bit to avoid starting all VMs at the same time
randomSleep(i)
if p != "worker" {
By("Checking cluster agent on "+h, func() {
checkClusterAgent(cl)
// Execute 'reboot' in background, to avoid SSH locking
Eventually(func() error {
_, err := cl.RunSSH("setsid -f reboot")
return err
}, tools.SetTimeout(2*time.Minute), 10*time.Second).Should(Not(HaveOccurred()))
})
}
}(hostName, poolType, index, client)
// Wait a bit before starting more nodes to reduce CPU and I/O load
bootstrappedNodes = waitNodesBoot(index, vmIndex, bootstrappedNodes)
}
if p != "worker" {
By("Checking cluster agent on "+h, func() {
checkClusterAgent(cl)
})
}
}(hostName, poolType, index, client)
// Wait for all parallel jobs
wg.Wait()
// Wait a bit before starting more nodes to reduce CPU and I/O load
bootstrappedNodes = waitNodesBoot(index, vmIndex, bootstrappedNodes)
}
By("Checking cluster state after reboot", func() {
CheckClusterState(clusterNS, clusterName)
})
// Wait for all parallel jobs
wg.Wait()
By("Checking cluster state after reboot", func() {
CheckClusterState(clusterNS, clusterName)
})
*/
if isoBoot == "true" {
By("Removing the ISO", func() {
err := exec.Command("bash", "-c", "rm -f ../../elemental-*.iso").Run()
Expand Down

0 comments on commit 2b65e26

Please sign in to comment.