-
Notifications
You must be signed in to change notification settings - Fork 17
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
ctdb: add ctdb-monitor-nodes command #127
ctdb: add ctdb-monitor-nodes command #127
Conversation
Fix the help text for `--write-nodes`. The previous help text was incorrect copy-paste. Signed-off-by: John Mulligan <[email protected]>
Move the limited-retries-on-error logic to a class that can be reused later. Signed-off-by: John Mulligan <[email protected]>
Rename a function to manage_cluster_meta_updates to better match what it does. A future change will want to use the word "monitor" for something else and it would be confusing to continue calling this a "monitor" function vs "manage -- and this function is the more active "participant" of the two. Signed-off-by: John Mulligan <[email protected]>
Make the doc comment on ctdb_manage_nodes more accurate. Signed-off-by: John Mulligan <[email protected]>
Split out some logic from the cluster_meta_to_nodes function into separate functions for current & later reuse. Signed-off-by: John Mulligan <[email protected]>
Note: this function is "co-evolving" with the ceph branch I have adding experimental ctdb support to smb-on-ceph. I expect this function to keep evolving a bit as the ceph support is improved and refined as well. I'm also hoping that eventually we can move away from writing the nodes file and use a nodes hook script, but that depends on changes in ctdb. That's one reason that this is a whole new subcommand. The other is that when I looked into combining this with the existing manage node updaetes function it was clear that the features needed there (the k8s samba-operator) is diverging a bit from the feature set we want on ceph, so it seems safer and less regression prone to just make a different function altogether. |
Signed-off-by: John Mulligan <[email protected]>
Add the monitor_cluster_meta_changes to the ctdb module. This function monitors the cluster meta and can reflect those changes into the ctdb nodes file and/or call reload nodes. Unlike the previous manage_cluster_meta_updates the sambacc process is not an active participant in the management of the cluster meta rather we assume some outside entity is updating the metadata with the desired state of the cluster correctly. monitor_cluster_meta_changes exists to translate that state into something ctdb can use. Signed-off-by: John Mulligan <[email protected]>
Add a `ctdb-monitor-nodes` command - this command will monitor the cluster meta and update the containers/ctdb when/if it changes. The `--write-nodes` parameter is used to instruct the command to write the ctdb nodes file on changes. The `--reload` option is used to control what "nodes" issue `ctdb reloadnodes` commands: leader (only the cluster leader), all (all nodes that see the cluster meta change), and never (never issue reloadnodes commands). Signed-off-by: John Mulligan <[email protected]>
b625784
to
c0154c0
Compare
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.
lgtm
@anoopcs9 ping |
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.
lgtm.
Add a
ctdb-monitor-nodes
command - this command will monitor thecluster meta and update the containers/ctdb when/if it changes.
The
--write-nodes
parameter is used to instruct the command towrite the ctdb nodes file on changes. The
--reload
option is used tocontrol what "nodes" issue
ctdb reloadnodes
commands: leader (only thecluster leader), all (all nodes that see the cluster meta change), and never
(never issue reloadnodes commands).