Skip to content

Commit 4aac0ec

Browse files
All csi tests - small fixes
1 parent 3d2524e commit 4aac0ec

5 files changed

Lines changed: 14 additions & 31 deletions

File tree

internal/config/config.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ var DefaultSetupVM = ClusterNode{
3636
// Timeout constants for various operations during cluster creation and management
3737
const (
3838
// VM operations
39-
VMCreationTimeout = 20 * time.Second // Timeout for creating VMs
39+
VMCreationTimeout = 20 * time.Minute // Timeout for creating VMs (includes ClusterVirtualImage creation which can take up to 15 minutes)
4040
VMsRunningTimeout = 20 * time.Minute // Timeout for waiting for all VMs to become Running state
4141
VMInfoTimeout = 30 * time.Second // Timeout for gathering VM information
4242
ClusterVirtualImageReadinessTimeout = 15 * time.Minute // Timeout for waiting for ClusterVirtualImage to become provisioned (Ready)

pkg/cluster/setup.go

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,9 +106,17 @@ func GetOSInfo(ctx context.Context, sshClient ssh.SSHClient) (*OSInfo, error) {
106106
// Since the setup node is always Ubuntu 22.04, this function uses apt to install docker.io.
107107
// It runs: apt update && apt install docker.io -y, then starts docker and verifies with docker ps.
108108
func InstallDocker(ctx context.Context, sshClient ssh.SSHClient) error {
109+
// Wait for apt locks to be released (handles unattended-upgrades, apt-daily, etc.)
110+
// This is necessary because freshly booted Ubuntu VMs often have automatic update processes running
111+
waitForLockCmd := `while sudo fuser /var/lib/dpkg/lock-frontend /var/lib/apt/lists/lock /var/cache/apt/archives/lock >/dev/null 2>&1; do echo "Waiting for apt locks..."; sleep 5; done`
112+
output, err := sshClient.Exec(ctx, waitForLockCmd)
113+
if err != nil {
114+
return fmt.Errorf("failed to wait for apt locks: %w\nOutput: %s", err, output)
115+
}
116+
109117
// Update package list and install docker.io
110118
cmd := "sudo apt-get update && sudo apt-get install -y docker.io"
111-
output, err := sshClient.Exec(ctx, cmd)
119+
output, err = sshClient.Exec(ctx, cmd)
112120
if err != nil {
113121
return fmt.Errorf("failed to update packages and install docker.io: %w\nOutput: %s", err, output)
114122
}

tests/csi-all-stress-tests/cluster_config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ clusterDefinition:
4444
serviceSubnetCIDR: "10.225.0.0/16"
4545
clusterDomain: "cluster.local"
4646
registryRepo: "dev-registry.deckhouse.io/sys/deckhouse-oss"
47-
devBranch: "main"
47+
devBranch: "pr17504"
4848
# Module configuration
4949
modules:
5050
- name: "snapshot-controller" # TODO add MPO

tests/csi-all-stress-tests/csi_all_stress_tests_test.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -261,17 +261,16 @@ var _ = Describe("All CSIs Stress Tests", Ordered, func() {
261261
})
262262

263263
It("should run snapshot/resize/clone stress test for all storage classes", func() {
264-
storageClassNames := []string{"hsclass-200", "hpe", "netapp"}
265264

266265
testResults := make(map[string]error)
267266

268267
for _, scName := range storageClassNames {
269268
func(storageClassName string) {
270269
// Use a timeout context for each stress test
271-
ctx, cancel := context.WithTimeout(context.Background(), 15*time.Minute)
270+
ctx, cancel := context.WithTimeout(context.Background(), 30*time.Minute)
272271
defer cancel()
273272

274-
By("Running snapshot, resize, and clone stress test for "+storageClassName+" (15 minutes timeout)", func() {
273+
By("Running snapshot, resize, and clone stress test for "+storageClassName+" (30 minutes timeout)", func() {
275274
GinkgoWriter.Printf(" ▶️ Running complex stress test for %s...\n", storageClassName)
276275

277276
// Configure comprehensive stress test

tests/csi-all-stress-tests/files/csi-huawei-cr.yml

Lines changed: 1 addition & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -25,28 +25,4 @@ spec:
2525
pool: prod
2626
reclaimPolicy: Delete
2727
storageConnectionName: hsconn-200
28-
---
29-
apiVersion: storage.deckhouse.io/v1alpha1
30-
kind: HuaweiStorageClass
31-
metadata:
32-
name: huawei-fc-200
33-
spec:
34-
fsType: ext4
35-
pool: prod
36-
reclaimPolicy: Delete
37-
storageConnectionName: huawei-fc-200
38-
---
39-
apiVersion: storage.deckhouse.io/v1alpha1
40-
kind: HuaweiStorageConnection
41-
metadata:
42-
name: huawei-fc-200
43-
spec:
44-
login: admin_200
45-
maxClientThreads: 30
46-
password: '${HUAWEI_PASSWORD}'
47-
pools:
48-
- prod
49-
protocol: FC
50-
storageType: OceanStorSAN
51-
urls:
52-
- https://10.200.0.101:8088
28+

0 commit comments

Comments
 (0)