Skip to content

Commit 70fdb1f

Browse files
committed
reordered the nodes a bit
1 parent 91b10ee commit 70fdb1f

1 file changed

Lines changed: 16 additions & 16 deletions

File tree

pkg/testcase/upgradenodereplacement.go

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -673,6 +673,22 @@ func validateClusterHealth() error {
673673
return nil
674674
}
675675

676+
func rebootEc2Instance(awsClient *aws.Client, ip string) {
677+
serverInstanceID, getErr := awsClient.GetInstanceIDByIP(ip)
678+
Expect(getErr).NotTo(HaveOccurred())
679+
680+
shared.LogLevel("debug", "Rebooting instance id: %s", serverInstanceID)
681+
rebootError := awsClient.RebootInstance(serverInstanceID)
682+
Expect(rebootError).NotTo(HaveOccurred())
683+
}
684+
685+
func rebootNodeAndWait(awsClient *aws.Client, ip string) {
686+
rebootEc2Instance(awsClient, ip)
687+
688+
sshErr := shared.WaitForSSHReady(ip)
689+
Expect(sshErr).NotTo(HaveOccurred())
690+
}
691+
676692
func getAwsClient(cluster *shared.Cluster) *aws.Client {
677693
awsClient, err := aws.AddClient(cluster)
678694
Expect(err).NotTo(HaveOccurred(), "error adding aws nodes: %s", err)
@@ -691,22 +707,6 @@ func prepSlemicro(awsClient *aws.Client, ip, nodeOS string) {
691707
rebootNodeAndWait(awsClient, ip)
692708
}
693709

694-
func rebootEc2Instance(awsClient *aws.Client, ip string) {
695-
serverInstanceID, getErr := awsClient.GetInstanceIDByIP(ip)
696-
Expect(getErr).NotTo(HaveOccurred())
697-
698-
shared.LogLevel("debug", "Rebooting instance id: %s", serverInstanceID)
699-
rebootError := awsClient.RebootInstance(serverInstanceID)
700-
Expect(rebootError).NotTo(HaveOccurred())
701-
}
702-
703-
func rebootNodeAndWait(awsClient *aws.Client, ip string) {
704-
rebootEc2Instance(awsClient, ip)
705-
706-
sshErr := shared.WaitForSSHReady(ip)
707-
Expect(sshErr).NotTo(HaveOccurred())
708-
}
709-
710710
func prepSlemicroNodes(ips []string, nodeOS string, awsClient *aws.Client) {
711711
if nodeOS == "slemicro" {
712712
for _, ip := range ips {

0 commit comments

Comments
 (0)