Skip to content

Commit e042353

Browse files
nupurg-ibmNupur Goyal
and
Nupur Goyal
authored
fix: Support for new custom image for ICN removal and the ssh key fix
* fixing ssh-key issue * fixing region --------- Co-authored-by: Nupur Goyal <nupurgoyal@Nupurs-MacBook-Pro.local>
1 parent b4410dd commit e042353

File tree

3 files changed

+31
-13
lines changed

3 files changed

+31
-13
lines changed

modules/landing_zone_vsi/image_map.tf

+10-10
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,16 @@ locals {
2222
"us-south" = "r006-045e03ee-4cfa-4415-a4ec-d8bceadc1bdb"
2323
},
2424
"hpc-lsf10-rhel810-v2" = {
25-
"eu-es" = "r050-4f5c092b-aeaf-483c-bcf8-f9d3c39199c6"
26-
"eu-gb" = "r018-74ea9522-076f-4b51-b8f3-b11db07b663f"
27-
"eu-de" = "r010-8800a619-c9f2-4519-af4c-f6d626825dd5"
28-
"us-east" = "r014-2ad1515b-38b9-4b46-8ff1-0a0488590c67"
29-
"us-south" = "r006-724e700a-d5c3-42e6-9559-8808bd359ef4"
30-
"jp-tok" = "r022-e54fad74-7b2f-4ed1-8c2d-b6436f880cf1"
31-
"jp-osa" = "r034-43c31e3f-008a-45d0-89b1-fbd8ed51b3fe"
32-
"au-syd" = "r026-fcfdd9b4-23e6-445b-bebe-4f9b8cdaa16f"
33-
"br-sao" = "r042-6f8cbdf8-bfd9-4127-86b3-b130e1ce2b36"
34-
"ca-tor" = "r038-e374450a-c76a-4a3b-9440-4e3787d17221"
25+
"eu-es" = "r050-86c03f46-e10a-4edf-8fcf-103845362db9"
26+
"eu-gb" = "r018-90675b8a-db1b-4a41-b5a0-f21c04cb7d57"
27+
"eu-de" = "r010-dd925c68-d186-406b-a8f7-8d965c60512b"
28+
"us-east" = "r014-4bc87a52-d377-43da-a042-aa1fa1629d28"
29+
"us-south" = "r006-6540f00a-525d-4f62-8a35-f218520b37d2"
30+
"jp-tok" = "r022-02a31841-c5ca-4527-a660-d8e5b1cfb29e"
31+
"jp-osa" = "r034-c7e76920-e735-4702-b04c-1f2cffe170cb"
32+
"au-syd" = "r026-ad5cdb8f-1c44-4267-8969-fe62ac0e93a4"
33+
"br-sao" = "r042-b89b9b8c-a934-4f9d-88bc-b9a15866f223"
34+
"ca-tor" = "r038-d5992a56-ddd1-4156-a98c-54ecef51ae3d"
3535
}
3636
}
3737
}

tests/lsf/cluster_utils.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ func LSFControlBctrld(t *testing.T, sClient *ssh.Client, startOrStop string, log
259259

260260
// Sleep for a specified duration to allow time for the daemon to start or stop
261261
if startOrStop == "stop" {
262-
time.Sleep(30 * time.Second)
262+
time.Sleep(63 * time.Second)
263263
} else {
264264
time.Sleep(120 * time.Second)
265265
}
@@ -1305,8 +1305,8 @@ func VerifyEncryption(t *testing.T, apiKey, region, resourceGroup, clusterPrefix
13051305
fileSharesCmd = fmt.Sprintf("ibmcloud is shares | grep %s | awk 'NR>1 {print $2}'", clusterPrefix)
13061306
}
13071307

1308-
// Retrieve the list of file shares
1309-
fileSharesOutput, err := exec.Command("bash", "-c", fileSharesCmd).CombinedOutput()
1308+
// // Retrieve the list of file shares (retry once after 2s if it fails)
1309+
fileSharesOutput, err := utils.RunCommandWithRetry(fileSharesCmd, 1, 60*time.Second)
13101310
if err != nil {
13111311
return fmt.Errorf("failed to retrieve file shares: %w", err)
13121312
}

tests/utilities/helpers.go

+18
Original file line numberDiff line numberDiff line change
@@ -564,3 +564,21 @@ func GetFirstWorkerNodeInstanceType(t *testing.T, terraformVars map[string]inter
564564
logger.Info(t, fmt.Sprintf("First Worker Node Instance Type: %s", instanceTypeStr))
565565
return instanceTypeStr, nil
566566
}
567+
568+
// RunCommandWithRetry executes a shell command with retries
569+
func RunCommandWithRetry(cmd string, retries int, delay time.Duration) ([]byte, error) {
570+
var output []byte
571+
var err error
572+
573+
for i := 0; i <= retries; i++ {
574+
output, err = exec.Command("bash", "-c", cmd).CombinedOutput()
575+
if err == nil {
576+
return output, nil
577+
}
578+
if i < retries {
579+
time.Sleep(delay) // Wait before retrying
580+
}
581+
}
582+
583+
return output, err
584+
}

0 commit comments

Comments
 (0)