Open saurabhwani5 opened 1 year ago
The current manager uses default period which is 10hrs to execute Reconcile loop of the controller everytime. The gui-password expiry check is being called on the every reconcile irrespect of the setting any RequeueAfter of 24 hours i.e. reconcile after every 24hrs because by deafult reconcile happens in 10hrs. If needed to perform manual reconcile before auto reconcile loop we need to set SyncPeriod while manager creation of each controller and accordance to RequeueAfter in the Reconcile function.
e.g.
syncPeriod := time.Duration(4 * time.Minute)
mgr, err := ctrl.NewManager(ctrl.GetConfigOrDie(), ctrl.Options{
Scheme: scheme,
MetricsBindAddress: metricsAddr,
...
NewCache: cache.MultiNamespacedCacheBuilder(namespaces),
SyncPeriod: &syncPeriod,
})
Reference manager options : https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.14.6/pkg/manager#Options
Normal CSIConfigured 17m (x9 over 24h) CSIScaleOperator The CSI driver resources have been created/updated successfully Warning AuthError 17m (x3 over 3h48m) CSIScaleOperator Either the username/password is incorrect or the password has been expired for the Scale GUI clusterIds: [227604367530725699]
The password expiry is being checked on every reconcile. Here the last event of password expiry has happened 17m ago, this could be because the reconcile has happened because of other reasons. The password expiry checks is not the reason for this non-periodic time. There are various reasons for reconciles.
Describe the bug
CSO event when GUI User expired of remote cluster is coming before 24 Hours , where it should be after completion of 24 Hours.
How to Reproduce?
Events: Type Reason Age From Message
Normal CSIConfigured 17m (x9 over 24h) CSIScaleOperator The CSI driver resources have been created/updated successfully Warning AuthError 17m (x3 over 3h48m) CSIScaleOperator Either the username/password is incorrect or the password has been expired for the Scale GUI clusterIds: [227604367530725699]