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

OADP-1067: Add queuing for VSB and VSR #190

Merged
merged 9 commits into from Mar 20, 2023

Conversation

eemcmullan
Copy link
Collaborator

@eemcmullan eemcmullan commented Feb 17, 2023

dataMoverImageFqin: 'quay.io/emcmulla/data-mover:batching'

@openshift-ci openshift-ci bot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Feb 17, 2023
@eemcmullan eemcmullan changed the title Add batching for VSB and VSR OADP-1067: Add batching for VSB and VSR Feb 17, 2023
@openshift-ci-robot
Copy link
Collaborator

openshift-ci-robot commented Feb 17, 2023

@eemcmullan: This pull request references OADP-1067 which is a valid jira issue.

In response to this:

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@openshift-ci-robot
Copy link
Collaborator

openshift-ci-robot commented Feb 17, 2023

@eemcmullan: This pull request references OADP-1067 which is a valid jira issue.

In response to this:

dataMoverImageFqin: 'quay.io/emcmulla/data-mover:batching

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@openshift-ci-robot
Copy link
Collaborator

openshift-ci-robot commented Feb 17, 2023

@eemcmullan: This pull request references OADP-1067 which is a valid jira issue.

In response to this:

dataMoverImageFqin: 'quay.io/emcmulla/data-mover:batching'

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@eemcmullan eemcmullan self-assigned this Feb 23, 2023
@eemcmullan eemcmullan marked this pull request as ready for review February 28, 2023 21:57
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Feb 28, 2023
@openshift-ci openshift-ci bot requested a review from sseago February 28, 2023 21:57
@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Mar 2, 2023
@openshift-merge-robot openshift-merge-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Mar 6, 2023
@eemcmullan eemcmullan requested a review from kaovilai March 6, 2023 15:20
@kaovilai
Copy link
Member

kaovilai commented Mar 6, 2023

Please add a logic to decrement processingVSBs
here
https://github.com/migtools/volume-snapshot-mover/blob/master/controllers/volumesnapshotbackup_controller.go#L123-L136

where if deletionTimestamp is not nil, and if InProgress..
cancel/delete volsync replicationsource/replicationdestination
and only then processingVSBs are decremented.

Otherwise update status to say deletion waiting for volsync to process etc.

@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Mar 6, 2023
@shubham-pampattiwar
Copy link
Member

shubham-pampattiwar commented Mar 9, 2023

@eemcmullan Please add the suggested changes and resolve the conflicts on this PR

@openshift-merge-robot openshift-merge-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Mar 14, 2023
@eemcmullan
Copy link
Collaborator Author

@kaovilai @shubham-pampattiwar I think when we discussed the batching originally, we wanted to add to processing VSBs once volsync completed. If we wait until VSBs and its resources are cleaned-up/deleted, it will take longer.

@shubham-pampattiwar
Copy link
Member

@eemcmullan But that would mean the VSB/VSR controller is still processing instance of VSB/VSR in reality but the batchingStatus would show things differently.

@kaovilai
Copy link
Member

The concern here is that I got into a scenario where I deleted VSB before volsync completes.. which means nothing ever got moved to "Completed" which means the processingVSBs-- will never be called and the vsm deployment hangs in the state of "full queue" forever.

@kaovilai
Copy link
Member

VSM controller should account for and handle unexpected/force deletions of VSBs and account for them in the processingVSBs variable.

Alternatively.. on a recurring basis check number of existing in-progress VSBs and use that to reset the processingVSBs variable.

Relying on status of available (not yet deleted) VSBs moving to complete for decrementing may not be reliable.

@eemcmullan
Copy link
Collaborator Author

@kaovilai gotcha. Will update to fix shortly

@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Mar 15, 2023
@openshift-merge-robot openshift-merge-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Mar 15, 2023
@eemcmullan eemcmullan changed the title OADP-1067: Add batching for VSB and VSR OADP-1067: Add queuing for VSB and VSR Mar 16, 2023
Copy link
Member

@kaovilai kaovilai left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Mar 17, 2023
Comment on lines 153 to 157
if !vsb.DeletionTimestamp.IsZero() {
// if batchingStatus is completed then processingVSBs has already been decremented
if vsb.Status.BatchingStatus != "" && vsb.Status.BatchingStatus != volsnapmoverv1alpha1.SnapMoverBackupBatchingCompleted {
processingVSBs--
}
Copy link
Member

Choose a reason for hiding this comment

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

Hopefully we can do similar thing for VSR

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

that's the plan

if !vsb.DeletionTimestamp.IsZero() {
// if batchingStatus is completed then processingVSBs has already been decremented

Choose a reason for hiding this comment

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

Here the comment does not match with the condition, are we checking for BatchingStatus == completed or BatchingStatus != completed ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

So processingVSBs already gets decremented once SnapMoverBackupBatchingCompleted. Therefore we would not want to decrement again if a VSB has that status but then starts to be deleted, because then it would be decremented twice for a single VSB

@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Mar 17, 2023
@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Mar 20, 2023
@openshift-ci
Copy link

openshift-ci bot commented Mar 20, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: eemcmullan, kaovilai, shubham-pampattiwar

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [eemcmullan,kaovilai,shubham-pampattiwar]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@eemcmullan eemcmullan merged commit 4a6daa0 into migtools:master Mar 20, 2023
6 checks passed
@eemcmullan eemcmullan deleted the batching branch April 25, 2023 18:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. jira/valid-reference lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants