-
Notifications
You must be signed in to change notification settings - Fork 25
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
Ver 90388 save restore point before upgrade #920
base: main
Are you sure you want to change the base?
Conversation
…0388_save_restore_point_before_upgrade
…ore_based_on_condition
…ore_based_on_condition
…com:vertica/vertica-kubernetes into VER-90387_create_restore_based_on_condition
@@ -107,6 +107,8 @@ func (o *OfflineUpgradeReconciler) Reconcile(ctx context.Context, _ *ctrl.Reques | |||
|
|||
// Functions to perform when the image changes. Order matters. | |||
funcs := []func(context.Context) (ctrl.Result, error){ | |||
// Save restore point before start upgrade | |||
o.saveRestorePoint, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@roypaulin For offline and read-only upgrade, we want the job "o.saveRestorePoint" before "startUpgrade", right? or other orders
@@ -151,6 +153,15 @@ func (o *OfflineUpgradeReconciler) Reconcile(ctx context.Context, _ *ctrl.Reques | |||
return ctrl.Result{}, o.Manager.logUpgradeSucceeded(sandbox) | |||
} | |||
|
|||
func (o *OfflineUpgradeReconciler) saveRestorePoint(ctx context.Context) (ctrl.Result, error) { | |||
actor := MakeSaveRestorePointReconciler(o.Rec, o.Vdb, o.Log, o.PFacts, o.Dispatcher, o.Rec.GetClient()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@roypaulin is this the proper way to call the other Reconciler and its method?
MakeSaveRestorePointReconciler takes a VerticaDBReconciler which does not exist here, should I also create a VerticaDBReconciler here and pass it down to this make method?
@@ -192,6 +192,15 @@ func (i *UpgradeManager) finishUpgrade(ctx context.Context, sbName string) (ctrl | |||
return ctrl.Result{}, nil | |||
} | |||
|
|||
// saveRestorePoint handles condition status and event recording for start of an upgrade | |||
func (i *UpgradeManager) saveRestorePoint(ctx context.Context) (ctrl.Result, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@roypaulin Follow up question as https://github.com/vertica/vertica-kubernetes/pull/920/files#r1765057129, should we maintain the saveRestore logic for upgrade in one place. So in the offline/readonly/online reconciler we can call o.Manager.saveRestorePoint()
No description provided.