Skip to content

Add state field to the GetVolumeReplicationInfo response #78

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

Open
Nikhil-Ladha opened this issue Apr 21, 2025 · 3 comments · May be fixed by #77
Open

Add state field to the GetVolumeReplicationInfo response #78

Nikhil-Ladha opened this issue Apr 21, 2025 · 3 comments · May be fixed by #77

Comments

@Nikhil-Ladha
Copy link

Nikhil-Ladha commented Apr 21, 2025

Add replication_state field to the GetVolumeReplicationInfo response to keep the user updated on the current state of replication when the volume info is fetched we don't know if the

As of now, there is no API to identify the current state of replication, and the VolumeReplicationInfo is fetched at a scheduled interval, therefore it becomes the ideal API to store the replication_state.

message GetVolumeReplicationInfoResponse {
  // Holds the last sync time.
  // This field is REQUIRED.
  .google.protobuf.Timestamp last_sync_time = 1;
  // Holds the last sync duration.
  // last_sync_duration states the time taken to sync
  // to execute the last sync operation.
  // This field is OPTIONAL.
  .google.protobuf.Duration last_sync_duration = 2;
  // Holds the last sync bytes.
  // Represents number of bytes transferred
  // with the last synchronization.
  // This field is OPTIONAL.
  // The value of this field MUST NOT be negative.
  int64 last_sync_bytes = 3;
  // Holds the latest replication state.
  // This field is REQUIRED.
  string replication_state = 4;
}
@Nikhil-Ladha
Copy link
Author

/assign

@Rakshith-R
Copy link
Member

Add replication_state field to the GetVolumeReplicationInfo response to keep the user updated on the current state of replication when the volume info is fetched we don't know if the

As of now, there is no API to identify the current state of replication, and the VolumeReplicationInfo is fetched at a scheduled interval, therefore it becomes the ideal API to store the replication_state.

How about just a bool to indicate whether csi-addons should recheck the entire flow for the replicated object ?
This way we can use the existing flow to detect change in underlying health of the image.

@Nikhil-Ladha
Copy link
Author

Add replication_state field to the GetVolumeReplicationInfo response to keep the user updated on the current state of replication when the volume info is fetched we don't know if the

As of now, there is no API to identify the current state of replication, and the VolumeReplicationInfo is fetched at a scheduled interval, therefore it becomes the ideal API to store the replication_state.

How about just a bool to indicate whether csi-addons should recheck the entire flow for the replicated object ? This way we can use the existing flow to detect change in underlying health of the image.

Well, re-check is just another reconcile, isn't it?
And, currently we compare the status.state with spec.state to check if the volume is parimary, but since we don't receive any updated status.state this would be just bypassed.

How else do you think we could use the existing flow?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants