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-2144: Resize cloned pvc based on cmp between cloned vs size and source pvc size #251

Merged

Conversation

shubham-pampattiwar
Copy link
Member

@shubham-pampattiwar shubham-pampattiwar commented Jul 7, 2023

Fixes #57

Target 1.2.2

@openshift-ci-robot
Copy link
Collaborator

openshift-ci-robot commented Jul 7, 2023

@shubham-pampattiwar: This pull request references OADP-2144 which is a valid jira issue.

In response to this:

…size

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 openshift-ci bot requested review from kaovilai and sseago July 7, 2023 07:04
@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 7, 2023
@shubham-pampattiwar shubham-pampattiwar changed the title OADP-2144: Reszie cloned pvc based on cmp between cloned vs size and source pvc … OADP-2144: Reszie cloned pvc based on cmp between cloned vs size and source pvc size Jul 7, 2023
@shubham-pampattiwar
Copy link
Member Author

/hold

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jul 7, 2023
@openshift-ci-robot
Copy link
Collaborator

openshift-ci-robot commented Jul 7, 2023

@shubham-pampattiwar: This pull request references OADP-2144 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.

Copy link
Collaborator

@sseago sseago left a comment

Choose a reason for hiding this comment

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

Looks good, with one nit: typo in commit message: "Reszie" vs. "resize"

Also, do we need a similar change in openshift-velero-plugin so that the user-namespace restored PVC also gets this larger size?

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jul 7, 2023
@shubham-pampattiwar shubham-pampattiwar changed the title OADP-2144: Reszie cloned pvc based on cmp between cloned vs size and source pvc size OADP-2144: Resize cloned pvc based on cmp between cloned vs size and source pvc size Jul 7, 2023
@shubham-pampattiwar
Copy link
Member Author

shubham-pampattiwar commented Jul 7, 2023

@sseago Thank you ! Updated the PR title (fixed typo)
Also, I think you maybe right for the fix to be needed in openshift-velero-plugin a swell for pvc restore but still unsure.

@openshift-ci-robot
Copy link
Collaborator

openshift-ci-robot commented Jul 7, 2023

@shubham-pampattiwar: This pull request references OADP-2144 which is a valid jira issue.

In response to this:

Fixes #57

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.

shawn-hurley
shawn-hurley previously approved these changes Jul 7, 2023
Copy link

@shawn-hurley shawn-hurley left a comment

Choose a reason for hiding this comment

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

One minor point

@@ -143,6 +156,11 @@ func (r *VolumeSnapshotBackupReconciler) buildPVCClone(pvcClone *corev1.Persiste
}

pvcClone.Spec.Resources = sourcePVC.Spec.Resources

// use the clonedPVCSize that is computed earlier
if clonedPVCSize != sourcePVCRequestSize {

Choose a reason for hiding this comment

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

Why not just always set to clonedSize?

Copy link
Collaborator

Choose a reason for hiding this comment

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

@shawn-hurley will cloned size ever be smaller than source PVC size? This seems safer for "just in case the (almost) impossible happens"

Choose a reason for hiding this comment

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

Copy link
Member Author

Choose a reason for hiding this comment

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

@sseago @shawn-hurley updated the PR, PTAL, Thanks !

@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Jul 7, 2023
sseago
sseago previously approved these changes Jul 7, 2023
@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jul 7, 2023
kaovilai
kaovilai previously approved these changes Jul 7, 2023
@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Jul 17, 2023
@shawn-hurley
Copy link

I am a little worried about the amount of log statements. You could probably use half of the logs and get the same info.

controllers/pvc.go Outdated Show resolved Hide resolved
@shubham-pampattiwar
Copy link
Member Author

shubham-pampattiwar commented Jul 17, 2023

@shawn-hurley @kaovilai This PR is not ready to be merged/final review yet, the log statements are part of the patch we are providing to customer for testing.

@openshift-ci-robot
Copy link
Collaborator

openshift-ci-robot commented Jul 19, 2023

@shubham-pampattiwar: This pull request references OADP-2144 which is a valid jira issue.

In response to this:

Fixes #57

Target 1.2.2

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.

@kaovilai
Copy link
Member

/lgtm
/cherry-pick oadp-1.2

@openshift-cherrypick-robot

@kaovilai: once the present PR merges, I will cherry-pick it on top of oadp-1.2 in a new PR and assign it to you.

In response to this:

/lgtm
/cherry-pick oadp-1.2

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 openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jul 19, 2023
@kaovilai
Copy link
Member

/unlgtm

@kaovilai
Copy link
Member

/lgtm cancel

@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Jul 19, 2023
kaovilai
kaovilai previously approved these changes Aug 1, 2023
controllers/pvc.go Outdated Show resolved Hide resolved
@shubham-pampattiwar
Copy link
Member Author

This patch worked in the customer environment as well as for manual developer testing.

@shubham-pampattiwar
Copy link
Member Author

PTAL @kaovilai @shawn-hurley @sseago Thank you !

@shubham-pampattiwar
Copy link
Member Author

/unhold

@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Aug 24, 2023
Copy link

@shawn-hurley shawn-hurley 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 Aug 25, 2023
@openshift-ci
Copy link

openshift-ci bot commented Aug 25, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: kaovilai, shawn-hurley, shubham-pampattiwar, sseago

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 [kaovilai,shawn-hurley,shubham-pampattiwar,sseago]

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

@shubham-pampattiwar shubham-pampattiwar merged commit dbbeb98 into migtools:master Aug 28, 2023
5 of 6 checks passed
@openshift-cherrypick-robot

@kaovilai: new pull request created: #261

In response to this:

/lgtm
/cherry-pick oadp-1.2

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.

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.

Logic to handle pvc/snapshot restoreSize mismatch
6 participants