Skip to content

MCO-1797: Fix transient errors while checking status of PIS #29962

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
9 changes: 6 additions & 3 deletions test/extended/machine_config/pinnedimages.go
Original file line number Diff line number Diff line change
Expand Up @@ -411,17 +411,20 @@ func waitForPISStatusX(ctx context.Context, oc *exutil.CLI, kubeClient *kubernet
// Wait for PIS object to get created
appliedPIS, err := clientSet.MachineconfigurationV1().PinnedImageSets().Get(context.TODO(), pisName, metav1.GetOptions{})
if err != nil {
return false, fmt.Errorf("PIS Object not created yet: %w", err)
framework.Logf("Retrying PIS Status with non-fatal error: PIS Object not created yet: %s", err)
return false, nil
}

pool, err := clientSet.MachineconfigurationV1().MachineConfigPools().Get(ctx, appliedPIS.Labels["machineconfiguration.openshift.io/role"], metav1.GetOptions{})
if err != nil {
return false, fmt.Errorf("failed to get MCP mentioned in PIS: %w", err)
framework.Logf("Retrying PIS Status with non-fatal error: failed to get MCP mentioned in PIS: %s", err)
return false, nil
}

nodes, err := getNodesForPool(ctx, oc, kubeClient, pool)
if err != nil {
return false, fmt.Errorf("failed to get Nodes from MCP %q mentioned in PIS: %w", pool.Name, err)
framework.Logf("Retrying PIS Status with non-fatal error: failed to get Nodes from MCP %q mentioned in PIS: %s", pool.Name, err)
return false, nil
}

doneNodes := 0
Expand Down