mirror of
https://github.com/openshift/installer.git
synced 2026-02-05 06:46:36 +01:00
Support ControlPlaneCreationError on baremetal
Wraps control plane provisioning errors on baremetal IPI with the ControlPlaneCreationError so that gather bootstrap will run automatically in that case.
This commit is contained in:
@@ -16,6 +16,7 @@ import (
|
||||
"k8s.io/client-go/rest"
|
||||
clientwatch "k8s.io/client-go/tools/watch"
|
||||
|
||||
"github.com/openshift/installer/pkg/asset"
|
||||
"github.com/openshift/installer/pkg/infrastructure/baremetal"
|
||||
)
|
||||
|
||||
@@ -106,5 +107,9 @@ func WaitForBaremetalBootstrapControlPlane(ctx context.Context, config *rest.Con
|
||||
return fmt.Errorf("failed to persist masters file to disk: %w", err)
|
||||
}
|
||||
|
||||
return withSyncErr
|
||||
if withSyncErr != nil {
|
||||
// wrap with ControlPlaneCreationError to trigger bootstrap log bundle gather
|
||||
return fmt.Errorf("%s: %w", asset.ControlPlaneCreationError, withSyncErr)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user