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

rbd: return error if last sync time not present #3478

Closed
wants to merge 1 commit into from

Conversation

Madhu-1
Copy link
Collaborator

@Madhu-1 Madhu-1 commented Oct 28, 2022

As per the csiaddon spec, last sync time is a required parameter in the GetVolumeReplicationInfo if we are failed to parse the description, we return an error message instead of nil which is an empty response.

Signed-off-by: Madhu Rajanna madhupr007@gmail.com

Note:- skipping E2E as we dont have CI for DR

As per the csiaddon spec last sync time is
required parameter in the GetVolumeReplicationInfo
if we are failed to parse the description, return
error message instead of nil which is empty response

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
@Madhu-1 Madhu-1 added the ci/skip/e2e skip running e2e CI jobs label Oct 28, 2022
@Madhu-1 Madhu-1 requested review from a team October 28, 2022 07:56
@mergify mergify bot added the component/rbd Issues related to RBD label Oct 28, 2022
@nixpanic nixpanic requested a review from a team October 28, 2022 08:06
@nixpanic nixpanic added the bug Something isn't working label Oct 28, 2022
@Madhu-1 Madhu-1 added the DNM DO NOT MERGE label Oct 28, 2022
@Madhu-1
Copy link
Collaborator Author

Madhu-1 commented Oct 28, 2022

Added DNM for now, as @yati1998 needs to check a few things.

@Madhu-1
Copy link
Collaborator Author

Madhu-1 commented Oct 28, 2022

Thinking More about it, keeping the LastSyncTime as optional makes more sense than a generic CSI Driver as well. Update the spec to make it optional.

@Madhu-1
Copy link
Collaborator Author

Madhu-1 commented Oct 28, 2022

csi-addons/spec#47 and csi-addons/kubernetes-csi-addons#260 are alternative for this one, @yati1998 PTAL

@ShyamsundarR
Copy link
Contributor

Thinking More about it, keeping the LastSyncTime as optional makes more sense than a generic CSI Driver as well. Update the spec to make it optional.

The intention should not be to error (unless there is actually an error). For example if remote status is missing, then determining the lastSyncTime is not possible in this reconcile, and would be reported as epoch (or 0).

If we error out because the volume is not synced yet or the remote is not reporting a sync time (and report the errors on the resource), cases where remote is down or due to failover is still Primary etc. will result in VolRep resource potentially reporting errors and not a healthy primary state and cause issues.

Overall, I think we expect a lastSyncTime, and if we are unable to determine the same it is epoch OR prior lastSyncTime value for the resource, iff it is from the same generation as the current CR (which is applicable at the VR layer and not at the gRPC).

IOW, what does the caller (VolRep reconciler in this case) do when this errors out is critical IMHO.

@Madhu-1
Copy link
Collaborator Author

Madhu-1 commented Oct 28, 2022

Closing this one as per discussion and csi-addons/kubernetes-csi-addons#260 solves the problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working ci/skip/e2e skip running e2e CI jobs component/rbd Issues related to RBD DNM DO NOT MERGE
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants