corosync-quorumtool: print totem cluster information - #504
corosync-quorumtool: print totem cluster information#504ThomasLamprecht wants to merge 1 commit into
Conversation
print some common cluster information from the cmap totem section. For now print cluster name, config version, transport method and secauth. This is information which is often relevant when wanting to checkout a summary of the cluster state. The fallback to default is hardcoded, which is something to be improved, else the implementation is quite simple. An alternative could be to re-use parts of the print_key method from corosync-cmapctl, which would save us some hassle here and would make this more general. Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
|
Can one of the admins verify this patch? |
|
@ThomasLamprecht I like the patch (- some small nitpicks, like config_version is not strictly required so it shouldn't be reason for failure) and general idea, but I'm not so convinced it should be in the corosync-quorumtool. I mean, why corosync-quorumtool? Also the information is available via corosync-cmapctl, so does it really make sense to have duplicity? Another problem is, that it is really hard (at least for me) to tell, which information should be displayed? What is the most useful for user without being to overwhelming? Actually, I was thinking about some tool like crm_report for quite a some time. Maybe such tool may display "important" information in default mode and do more elaborated dump in some kind of "bug report mode". |
|
Thanks for taking a look. Now, why corosync-quorumtool: So first, we have a small cluster status CLI command in Proxmox VE which does a few basic checks for hints to the user and then just execs "corosync-quorumtool". I wanted to add this info to our tool, already applied a patch0 but then thought, hey often our user mix invocating "pvecm status" (our "tool") and "corosync-quorumtool" in our Forum, and this info is nice to have in general, so maybe just add it upstream. This naturally would has the side benefit that I do not have to do config/cmap parsing (not hard but if it can be avoided) and still get the most current info from the corosync POV. The rationale for the information I added is:
But yes, displaying more is hard to decide. So IMO it's good to start rather small and add was user think is useful. Almost all of above was requested by some users over different channels the last years, so that information seems of real use. A crm_report could be nice too, IMO. |
Indeed
And that is the thing. What about having something like corosync-status (maybe just shell script) which would call quorumtool, cmapctl, ... and gather required information? Together with parameter like --report it may behave more like crm_report?
Yep. Just to make sure we are on same page. I like the idea. I'm just not too keen to add information about cluster to quorumtool which is designed to display quorum/votequorum information.
Agree. It's also identifier and I believe it is used by admins to distinguish between multiple clusters.
Yep. It just don't need to be there so it shouldn't be fatal error if it is not found.
Yep
I would rather see crypto_hash/cypher, because secauth is really compatibility "hack", but I agree in general.
Good to know.
|
Yes, sounds good to me. I think that would be helpful for all corosync users. Shell script could be fine, but as any other "higher" language - which would allow nice parsing/string handling - would add a total new language dependency on corosync, I guess that either C or shell (not bash :( ) is fine for such a thing.
Yeah, I mean, I agree - just added it to the place where it seemed the least misplaced ^^
OK, we always enforce it with our tooling, but it's naturally fine to not have it.
Makes sense, has more info without drawbacks. |
|
I agree with honza that this sort of info, while useful, doesn't belong in a quorumtool. There are a couple of options I can see here. My suggestion would be to write another tool, (corosync-status?), that displays all sorts of other information but also has options for displaying quorum information. corosync-status could be a shell script that calls cmapctl to get general information and quorumtool to get quorum information. That way you only need to learn one tool for all uses |
So we're on the exact same page as the discussion result above from honza and me, great. |
|
@ThomasLamprecht No worries and no need to rush. Also I was thinking what should be included in the output and (IMHO) it may make sense to print also used token timeout and maybe some of the knet stats? |
Yes, makes IMO also sense, as those parameters can dramatically influence behaviour and stability. |
print some common cluster information from the cmap totem section.
For now print cluster name, config version, transport method and
secauth. This is information which is often relevant when wanting to
checkout a summary of the cluster state.
The fallback to default is hardcoded, which is something to be
improved, else the implementation is quite simple. An alternative
could be to re-use parts of the print_key method from
corosync-cmapctl, which would save us some hassle here and would make
this more general.
Signed-off-by: Thomas Lamprecht t.lamprecht@proxmox.com
Rather hacked together quickly, so please see this more like an RFC.