Skip to content

Commit

Permalink
sticky pending
Browse files Browse the repository at this point in the history
  • Loading branch information
bdevcich committed Jan 26, 2024
1 parent 1d7d047 commit f2d3117
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions internal/controller/lustrefilesystem_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -148,11 +148,9 @@ func (r *LustreFileSystemReconciler) Reconcile(ctx context.Context, req ctrl.Req
}
}

// If the Status Namespace doesn't have a mode, create it and mark it as Pending
if _, found := fs.Status.Namespaces[namespace].Modes[mode]; !found {
fs.Status.Namespaces[namespace].Modes[mode] = lusv1beta1.LustreFileSystemNamespaceAccessStatus{
State: lusv1beta1.NamespaceAccessPending,
}
// Default the status as Pending in case the create/updates fail
fs.Status.Namespaces[namespace].Modes[mode] = lusv1beta1.LustreFileSystemNamespaceAccessStatus{
State: lusv1beta1.NamespaceAccessPending,
}

// Attempt to create the PV, if it fails, the status will be marked as Pending
Expand Down

0 comments on commit f2d3117

Please sign in to comment.