Skip to content

replication: add replication state to GetVolumeReplicationInfo response #77

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
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Nikhil-Ladha
Copy link

@Nikhil-Ladha Nikhil-Ladha commented Apr 21, 2025

add replication_state to GetVolumeReplicationInfo response.
Fixes: #78

@mergify mergify bot added the design Adds or updates an operation or service label Apr 21, 2025
@Nikhil-Ladha
Copy link
Author

/cc @Madhu-1 @nixpanic @Rakshith-R

black-dragon74
black-dragon74 previously approved these changes Apr 21, 2025
Copy link
Member

@black-dragon74 black-dragon74 left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@Rakshith-R Rakshith-R left a comment

Choose a reason for hiding this comment

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

More discussion is required before deciding on this particular approach.

#78 (comment)

@black-dragon74 black-dragon74 dismissed their stale review April 22, 2025 06:59

Needs further discussions..

@Nikhil-Ladha Nikhil-Ladha force-pushed the add-state-to-info-api branch 2 times, most recently from f7da44e to 34637e3 Compare May 13, 2025 12:51
Madhu-1
Madhu-1 previously approved these changes May 14, 2025
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

}
// Represents the current replication status as reported by
// the backend storage system.
// This field is OPTIONAL.
Copy link
Contributor

Choose a reason for hiding this comment

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

Why is this OPTIONAL? Is the default not UNKNOWN so that it can be marked REQUIRED?

Copy link
Author

Choose a reason for hiding this comment

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

If we make it required, then any SP that do not implement this change will by default start seeing the status as UNKNOWN, which maybe incorrect if everything is fine.
It would become a breaking change, isn't it?

Copy link
Contributor

Choose a reason for hiding this comment

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

How should the difference between UNKNOWN and an unset .status be handled? I suspect that both are the same for anyone that inspects the result of the procedure call.

If there is a good reason to differentiate between unset and UNKNOWN, I agree that OPTIONAL makes sense.

Copy link
Author

Choose a reason for hiding this comment

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

UNKNOWN can be returned if the mirroring is still being enabled, and not yet completed.
Or, if the mirroring state itself is unknown, i.e, up+unknown in case of ceph rbd.

@Nikhil-Ladha Nikhil-Ladha force-pushed the add-state-to-info-api branch from 34637e3 to d0251af Compare May 16, 2025 05:27
@mergify mergify bot dismissed Madhu-1’s stale review May 16, 2025 05:27

Pull request has been modified.

…oResponse

add status and status_message to GetVolumeReplicationInfoResponse
that describes the current replication state to the end user.

Signed-off-by: Nikhil-Ladha <[email protected]>
@Nikhil-Ladha Nikhil-Ladha force-pushed the add-state-to-info-api branch from d0251af to 9c92b24 Compare May 16, 2025 05:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
design Adds or updates an operation or service
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add state field to the GetVolumeReplicationInfo response
5 participants