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

Fix DVM/DVMP hotlooping, remove remote watch TouchAnnotation, fix requeues so they used values from r.Migrate() #1013

Merged
merged 3 commits into from
Mar 26, 2021

Conversation

djwhatle
Copy link
Contributor

Closes #1011

@@ -117,17 +118,20 @@ func (r *ReconcileDirectImageMigration) Reconcile(request reconcile.Request) (re
if errors.IsNotFound(err) {
// Object not found, return. Created objects are automatically garbage collected.
// For additional cleanup logic use finalizers.
return reconcile.Result{}, nil
return reconcile.Result{Requeue: false}, nil
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's more obvious what's happening if we explicitly use the requeue flag

@@ -139,7 +143,7 @@ func (r *ReconcileDirectImageMigration) Reconcile(request reconcile.Request) (re
}

if !imageMigration.Status.HasBlockerCondition() {
_, err = r.migrate(imageMigration)
requeueAfter, err = r.migrate(imageMigration)
Copy link
Contributor Author

@djwhatle djwhatle Mar 18, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No longer throwing away the requeueAfter, so now if a requeue duration is selected in phase logic it actually gets used.

@djwhatle djwhatle changed the title Fix DVM/DVMP hotlooping, remove remote watch TouchAnnotation, fix requeues so they used values from t.Migrate() Fix DVM/DVMP hotlooping, remove remote watch TouchAnnotation, fix requeues so they used values from r.Migrate() Mar 19, 2021
@@ -171,7 +171,7 @@ func (r *ReconcileDirectVolumeMigrationProgress) Reconcile(request reconcile.Req
}

if !pvProgress.Status.IsReady() {
return reconcile.Result{Requeue: true}, nil
return reconcile.Result{Requeue: true, RequeueAfter: time.Second * 5}, nil
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if this if block is necessary? looks like the intent is to requeue at 5 seconds irrespective of the status

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah maybe not, let me take a look and see if it's safe to remove

Copy link
Contributor

@alaypatel07 alaypatel07 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just small re-org comments and minor nit on if block otherwise looks good to me

VISIACK

@djwhatle
Copy link
Contributor Author

djwhatle commented Mar 22, 2021

I verified there is no observable perf change from this PR, which is what I expected. The goal of this PR is to reduce number of API requests issued when we're waiting on a long-running task without reducing our migration performance.

Migration time for rocket-chat (this PR):

2 minutes, 55 seconds

Migration time for rocket-chat (master)

2 minutes, 56 seconds

return reconcile.Result{RequeueAfter: requeueAfter}, nil
}

return reconcile.Result{Requeue: false}, nil
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In all the other controllers we have return reconcile.Result{}, nil. Wonder if we should drop this OR update the others. I am fine with either as long as we are consistent.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, will update.

Copy link
Contributor

@alaypatel07 alaypatel07 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for the changes, added a small nit, feel free to merge after that from my end.

VISIACK

…ueue times

Remove predicate

Remove leftover log

Move default PollReQ setting for better locality

Remove redundant requeue

Back out explicit requeue
@djwhatle djwhatle force-pushed the fix-direct-predicates-requeues branch from a9b0e9a to 719eb24 Compare March 25, 2021 22:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants