Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ cmd/_test_output
*.test
*.coverprofile
**/junit.xml
test-results
coverage
staging/cse/windows/containerdfunc.tests.suites

.idea
.vs
Expand Down
18 changes: 15 additions & 3 deletions e2e/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,7 @@ func getExistingCluster(ctx context.Context, location, clusterName string) (*arm
return &existingCluster.ManagedCluster, nil
}
fallthrough

case "Failed":
toolkit.Logf(ctx, "##vso[task.logissue type=warning;]Cluster %s in Failed state, deleting", clusterName)
if err := deleteCluster(ctx, clusterName, resourceGroupName); err != nil {
Expand All @@ -301,9 +302,20 @@ func getExistingCluster(ctx context.Context, location, clusterName string) (*arm
return nil, fmt.Errorf("failed waiting for cluster deletion: %w", err)
}
return nil, nil

case "Creating":
// For Creating state, wait for the cluster to become ready.
toolkit.Logf(ctx, "Cluster is currently being created. Will wait for creation to finish: %s", clusterName)
return waitUntilClusterReady(ctx, clusterName, location)

case "Starting":
// For Starting state, wait for the cluster to become ready.
toolkit.Logf(ctx, "Cluster is currently being started. Will wait for start to finish: %s", clusterName)
return waitUntilClusterReady(ctx, clusterName, location)

default:
// other provisioning state, deleting, , stopping,,cancaled,cancelling,"Creating", "Updating", "Scaling", "Migrating", "Upgrading", "Starting", "Restoring": .. plus many others.
toolkit.Logf(ctx, "##vso[task.logissue type=warning;]Unexpected cluster provisioning state %s: %s", clusterName, *existingCluster.Properties.ProvisioningState)
// For other non-terminal provisioning states (e.g., Updating, Scaling, Migrating, Upgrading, Restoring), wait for the cluster to become ready.
toolkit.Logf(ctx, "##vso[task.logissue type=warning;]Unexpected cluster provisioning state for cluster %s: %s", clusterName, *existingCluster.Properties.ProvisioningState)
return waitUntilClusterReady(ctx, clusterName, location)
}
}
Expand Down Expand Up @@ -357,7 +369,7 @@ func waitUntilClusterReady(ctx context.Context, name, location string) (*armcont
switch *cluster.ManagedCluster.Properties.ProvisioningState {
case "Succeeded":
return true, nil
case "Updating", "Assigned", "Creating":
case "Updating", "Assigned", "Creating", "Starting":
return false, nil
default:
return false, fmt.Errorf("cluster %s is in state %s", name, *cluster.ManagedCluster.Properties.ProvisioningState)
Expand Down
2 changes: 1 addition & 1 deletion e2e/node_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -911,7 +911,7 @@ DXRqvV7TWO2hndliQq3BW385ZkiephlrmpUVM= r2k1@arturs-mbp.lan`,
// VnetCNILinuxPluginsDownloadURL: "https://packages.aks.azure.com/azure-cni/v1.1.3/binaries/azure-vnet-cni-linux-amd64-v1.1.3.tgz",
VnetCNIWindowsPluginsDownloadURL: "https://packages.aks.azure.com/azure-cni/v1.6.21/binaries/azure-vnet-cni-windows-amd64-v1.6.21.zip",
WindowsPauseImageURL: "mcr.microsoft.com/oss/v2/kubernetes/pause:3.10.1",
WindowsProvisioningScriptsPackageURL: "https://packages.aks.azure.com/aks/windows/cse/aks-windows-cse-scripts-v0.0.52.zip",
WindowsProvisioningScriptsPackageURL: "",
WindowsTelemetryGUID: "fb801154-36b9-41bc-89c2-f4d4f05472b0",
},
EndpointConfig: datamodel.AzureEndpointConfig{
Expand Down
Loading