-
Notifications
You must be signed in to change notification settings - Fork 292
CP-54034: Expose expected_votes
in Cluster object
#6374
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
CP-54034: Expose expected_votes
in Cluster object
#6374
Conversation
@@ -219,6 +219,9 @@ let t = | |||
; field ~qualifier:DynamicRO ~lifecycle:[] ~ty:Int "live_hosts" | |||
~default_value:(Some (VInt 0L)) | |||
"Current number of live hosts, according to the cluster stack" | |||
; field ~qualifier:DynamicRO ~lifecycle:[] ~ty:Int "expected_hosts" | |||
~default_value:(Some (VInt 0L)) | |||
"Total number of hosts expected by the cluster stack" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure I understand the exact meaning of "expected by the cluster stack". Is that the amount of nodes that the cluster stack has been configured with?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While I understand that it's useful to expose the information for debugging, the difference in semantics of these numbers is quite subtle.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure I understand the exact meaning of "expected by the cluster stack". Is that the amount of nodes that the cluster stack has been configured with?
Precisely
@@ -219,6 +219,9 @@ let t = | |||
; field ~qualifier:DynamicRO ~lifecycle:[] ~ty:Int "live_hosts" | |||
~default_value:(Some (VInt 0L)) | |||
"Current number of live hosts, according to the cluster stack" | |||
; field ~qualifier:DynamicRO ~lifecycle:[] ~ty:Int "expected_hosts" | |||
~default_value:(Some (VInt 0L)) | |||
"Total number of hosts expected by the cluster stack" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While I understand that it's useful to expose the information for debugging, the difference in semantics of these numbers is quite subtle.
0081355
to
076e7d8
Compare
3ca42fe
to
46a66c3
Compare
The `expected_votes` field in corosync represents the number of hosts that is expected by the cluster stack. In the context of corosync, this is the same as the number of hosts as in the corosync.conf file*. This is a useful field to expose to the user so that they can see how many nodes actually are expected. We also have `Cluster_host` object, which represents xapi's view of what nodes should be in the cluster, but that might not be identical to corosync's view, especially when a host is disabled, but is still left in the list of Cluster_host objects. Although one could argue that we could infer this `expected_votes` field from the number of enabled Cluster_hosts, it might still be useful to get this information directly from corosync. *: there are ways in corosync to make one host cast multiple votes, but that feature is not used. Signed-off-by: Vincent Liu <shuntian.liu2@cloud.com>
The
expected_votes
field in corosync represents the number of hosts that is expected by the cluster stack. In the context of corosync, this is the same as the number of hosts as in the corosync.conf file*. This is a useful field to expose to the user so that they can see how many nodes actually are expected.We also have
Cluster_host
object, which represents xapi's view of what nodes should be in the cluster, but that might not be identical to corosync's view, especially when a host is disabled, but is still left in the list of Cluster_host objects.Although one could argue that we could infer this
expected_votes
field from the number of enabled Cluster_hosts, it might still be useful to get this information directly from corosync.*: there are ways in corosync to make one host cast multiple votes, but that feature is not used.