Skip to content
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

Draft
wants to merge 65 commits into
base: main
Choose a base branch
from

Conversation

HaoYang0000
Copy link
Collaborator

No description provided.

@@ -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,
Copy link
Collaborator Author

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())
Copy link
Collaborator Author

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) {
Copy link
Collaborator Author

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()

Base automatically changed from VER-90387_create_restore_based_on_condition to main September 19, 2024 12:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants