You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 16, 2025. It is now read-only.
Copy file name to clipboardExpand all lines: cmd/main.go
+8-3Lines changed: 8 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -48,7 +48,10 @@ func init() {
48
48
//+kubebuilder:scaffold:scheme
49
49
}
50
50
51
-
varreleaseDirstring
51
+
var (
52
+
releaseDirstring
53
+
waitForImageBecomeActiveMinutesint
54
+
)
52
55
53
56
funcmain() {
54
57
varmetricsAddrstring
@@ -60,6 +63,7 @@ func main() {
60
63
"Enable leader election for controller manager. "+
61
64
"Enabling this will ensure there is only one active controller manager.")
62
65
flag.StringVar(&releaseDir, "release-dir", "/tmp/downloads/", "Specify release directory for cluster-stack releases")
66
+
flag.IntVar(&waitForImageBecomeActiveMinutes, "import-timeout", 0, "Maximum time in minutes that you allow cspo to import image. If import-timeout <= 0, cspo waits forever.")
conditions.MarkFalse(openstacknodeimagerelease, apiv1alpha1.OpenStackImageReadyCondition, apiv1alpha1.OpenStackImageNotCreatedYetReason, clusterv1beta1.ConditionSeverityInfo, "image is not created yet")
147
+
conditions.MarkFalse(openstacknodeimagerelease, apiv1alpha1.OpenStackImageImportStartCondition, apiv1alpha1.OpenStackImageImportNotStartReason, clusterv1beta1.ConditionSeverityInfo, "image import not start yet")
err=fmt.Errorf("timeout - wait for the image %s to transition to the ACTIVE status exceeds the timeout duration %d minutes", image.Name, r.WaitForImageBecomeActiveMinutes)
205
+
conditions.MarkFalse(openstacknodeimagerelease,
206
+
apiv1alpha1.OpenStackImageReadyCondition,
207
+
apiv1alpha1.OpenStackImageImportTimeOutReason,
208
+
clusterv1beta1.ConditionSeverityError,
209
+
err.Error(),
210
+
)
211
+
// Image import timeout - nothing to do
212
+
return ctrl.Result{}, nil
213
+
}
214
+
}
192
215
193
216
// Manage image statuses according to the guidelines outlined in https://docs.openstack.org/glance/stein/user/statuses.html.
0 commit comments