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

Bug 2225433: rbd: do not execute rbd sparsify when volume is in use #187

Merged

Conversation

yati1998
Copy link
Member

This commit makes sure sparsify() is not run when rbd image is in use.
Running rbd sparsify with workload doing io and too frequently is not desirable.
When a image is in use fstrim is run and sparsify will be run only when image is not mapped.

Signed-off-by: Rakshith R [email protected]
(cherry picked from commit 98fdadf)

@openshift-ci
Copy link

openshift-ci bot commented Aug 31, 2023

@yati1998: No Bugzilla bug is referenced in the title of this pull request.
To reference a bug, add 'Bug XXX:' to the title of this pull request and request another bug refresh with /bugzilla refresh.

In response to this:

rbd: do not execute rbd sparsify when volume is in use

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 approved Its a good idea label Aug 31, 2023
@yati1998 yati1998 changed the title rbd: do not execute rbd sparsify when volume is in use Bug 2225433 rbd: do not execute rbd sparsify when volume is in use Aug 31, 2023
@openshift-ci
Copy link

openshift-ci bot commented Aug 31, 2023

@yati1998: No Bugzilla bug is referenced in the title of this pull request.
To reference a bug, add 'Bug XXX:' to the title of this pull request and request another bug refresh with /bugzilla refresh.

In response to this:

Bug 2225433 rbd: do not execute rbd sparsify when volume is in use

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.

@yati1998 yati1998 changed the title Bug 2225433 rbd: do not execute rbd sparsify when volume is in use Bug 2225433: rbd: do not execute rbd sparsify when volume is in use Aug 31, 2023
@openshift-ci
Copy link

openshift-ci bot commented Aug 31, 2023

@yati1998: This pull request references Bugzilla bug 2225433, which is invalid:

  • expected the bug to target the "ODF 4.12.7" release, but it targets "ODF 4.12.8" instead

Comment /bugzilla refresh to re-evaluate validity if changes to the Bugzilla bug are made, or edit the title of this pull request to link to a different bug.

In response to this:

Bug 2225433: rbd: do not execute rbd sparsify when volume is in use

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.

Comment on lines 48 to 65
// ErrFailedPrecondition is returned when operation is rejected because the system is not in a state
// required for the operation's execution.
ErrFailedPrecondition = errors.New("system is not in a state required for the operation's execution")
// ErrUnavailable is returned when the image needs to be recreated
// locally and may be corrected by retrying with a backoff.
ErrUnavailable = errors.New("image needs to be recreated")
// ErrAborted is returned when the operation is aborted.
ErrAborted = errors.New("operation got aborted")
// ErrInvalidArgument is returned when the client specified an invalid argument.
ErrInvalidArgument = errors.New("invalid arguments provided")
// ErrFetchingLocalState is returned when the operation to fetch local state fails.
ErrFetchingLocalState = errors.New("failed to get local state")
// ErrDisableImageMirroringFailed is returned when the operation to disable image mirroring fails.
ErrDisableImageMirroringFailed = errors.New("failed to disable image mirroring")
// ErrFetchingMirroringInfo is returned when the operation to fetch mirroring info of image fails.
ErrFetchingMirroringInfo = errors.New("failed to get mirroring info of image")
// ErrResyncImageFailed is returned when the operation to resync the image fails.
ErrResyncImageFailed = errors.New("failed to resync image")
Copy link
Member

Choose a reason for hiding this comment

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

These changes were not present in original PR , please check similar backport here https://github.com/red-hat-storage/ceph-csi/pull/186/files

Copy link
Member Author

Choose a reason for hiding this comment

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

yeah, removed them.

This commit makes sure sparsify() is not run when rbd
image is in use.
Running rbd sparsify with workload doing io and too
frequently is not desirable.
When a image is in use fstrim is run and sparsify will
be run only when image is not mapped.

Signed-off-by: Rakshith R <[email protected]>
(cherry picked from commit 98fdadf)
Copy link
Member

@Madhu-1 Madhu-1 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 Code looks good label Aug 31, 2023
@openshift-ci
Copy link

openshift-ci bot commented Aug 31, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Madhu-1, yati1998

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:

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

@Madhu-1
Copy link
Member

Madhu-1 commented Aug 31, 2023

Please drop /bugzilla refresh refresh comment on the PR once bugzilla issue is fixed

@Madhu-1
Copy link
Member

Madhu-1 commented Aug 31, 2023

/bugzilla refresh

@openshift-ci
Copy link

openshift-ci bot commented Aug 31, 2023

@Madhu-1: This pull request references Bugzilla bug 2225433, which is valid. The bug has been updated to refer to the pull request using the external bug tracker.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target release (ODF 4.12.8) matches configured target release for branch (ODF 4.12.8)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)

Requesting review from QA contact:
/cc @keesturam

In response to this:

/bugzilla refresh

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
Copy link

openshift-ci bot commented Aug 31, 2023

@openshift-ci[bot]: GitHub didn't allow me to request PR reviews from the following users: keesturam.

Note that only red-hat-storage members and repo collaborators can review this PR, and authors cannot review their own PRs.

In response to this:

@Madhu-1: This pull request references Bugzilla bug 2225433, which is valid. The bug has been updated to refer to the pull request using the external bug tracker.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target release (ODF 4.12.8) matches configured target release for branch (ODF 4.12.8)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)

Requesting review from QA contact:
/cc @keesturam

In response to this:

/bugzilla refresh

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.

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-merge-robot openshift-merge-robot merged commit 3245121 into red-hat-storage:release-4.12 Aug 31, 2023
2 of 9 checks passed
@openshift-ci
Copy link

openshift-ci bot commented Aug 31, 2023

@yati1998: All pull requests linked via external trackers have merged:

Bugzilla bug 2225433 has been moved to the MODIFIED state.

In response to this:

Bug 2225433: rbd: do not execute rbd sparsify when volume is in use

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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants