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 2165941: rbd: Dont depend on image state to issue resync #185

Merged

Conversation

Madhu-1
Copy link
Member

@Madhu-1 Madhu-1 commented Aug 30, 2023

Previously we were dependent on the image mirror state to issue the resync command, What we came to know is that we cannot depend on the image mirror state as the state can change anytime from one to another, We are following the below steps to fix this problem.

During the Demote volume store the image creation timestamp.
During Resync do the below operation
Check the image creation timestamp stored during the Demote operation and the current creation timestamp during Resync and check both are equal and it for force resync then issue resync
If the image on both sides is not in the unknown state, check last_snapshot_timestamp on the local mirror description, if it's present send volumeReady as false, or else return an error message.
If both the images are in up+unknown the send volumeReady as true.
Storing the image creation timestamp on the rbd image as metadata and it gets cleaned up when the image is recreated as it gets synced up from the primary cluster.

This is backport of ceph#4076

During the Demote volume store
the image creation timestamp.

During Resync do below operation

* Check image creation timestamp
stored during Demote operation
and current creation timestamp during Resync
and check both are equal and its for
force resync then issue resync
* If the image on both sides is
not in unknown state, check
last_snapshot_timestamp on the
local mirror description, if its present
send volumeReady as false or else return
error message.

If both the images are in up+unknown the
send volumeReady as true.

Signed-off-by: Madhu Rajanna <[email protected]>
(cherry picked from commit e013cfe)
Not sure why but go-lint is failing
with below error and this fix is required
to make it pass

```
directive `//nolint:staticcheck // See comment above.`
is unused for linter "staticcheck" (nolintlint)
```

Signed-off-by: Madhu Rajanna <[email protected]>
(cherry picked from commit 4016876)
@openshift-ci
Copy link

openshift-ci bot commented Aug 30, 2023

@Madhu-1: This pull request references Bugzilla bug 2165941, 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.14.0) matches configured target release for branch (ODF 4.14.0)
  • 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:

BUG 2165941: rbd: Dont depend on image state to issue resync

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.

@Madhu-1
Copy link
Member Author

Madhu-1 commented Aug 30, 2023

/assign @nixpanic

@openshift-ci
Copy link

openshift-ci bot commented Aug 30, 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 2165941, 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.14.0) matches configured target release for branch (ODF 4.14.0)
  • 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:

BUG 2165941: rbd: Dont depend on image state to issue resync

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.

@nixpanic
Copy link
Member

/gtm

@Madhu-1
Copy link
Member Author

Madhu-1 commented Aug 30, 2023

/gtm

@nixpanic typo in above lgtm

@nixpanic
Copy link
Member

/lgtm

@openshift-ci openshift-ci bot added the lgtm Code looks good label Aug 30, 2023
@openshift-ci
Copy link

openshift-ci bot commented Aug 30, 2023

[APPROVALNOTIFIER] This PR is APPROVED

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

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

@openshift-merge-robot openshift-merge-robot merged commit 5b6b3d2 into red-hat-storage:release-4.14 Aug 30, 2023
10 checks passed
@openshift-ci
Copy link

openshift-ci bot commented Aug 30, 2023

@Madhu-1: All pull requests linked via external trackers have merged:

Bugzilla bug 2165941 has been moved to the MODIFIED state.

In response to this:

BUG 2165941: rbd: Dont depend on image state to issue resync

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.

3 participants