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
mgr/dashboard: Add monitor list #19632
Conversation
Thanks -- to get this to a mergeable point, please do the following:
It's quite a lot of git to just update a PR, but most of the time we're just using these same few commands, so it quickly becomes familiar. If you already knew all these git commands then I apologise for being so verbose :-) There's a longer description of the submission guidelines here: https://github.com/ceph/ceph/blob/master/SubmittingPatches.rst (ignore the "Patch submission via ceph-devel@vger.kernel.org" part as we're using pull requests) |
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.
First of all, one thing that would make our life easier when adding new pages would be adding a screenshot with the page itself. Just a thought for the future (@jcsp if you think this is something useful and reasonable to ask for all of dashboard's PRs, maybe that could be added that to the contributing doc?).
Additionally, there are a few fields that could make sense to expose as well: current monmap epoch, and monmap features.
<table class="table"> | ||
<tr style="font-size:15px"> | ||
<td><p class="text-left"><span style="color:yellow; font-weight:bold">Cluster ID: </span> {mon_status.monmap.fsid}</p></td> | ||
<td><p class="text-left"><span style="color:yellow; font-weight:bold">Monmap Created: </span> {mon_status.monmap.created}</p></td> |
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.
nit: I really dislike Monmap
. IMO, it should always either be capitalized as MonMap
or, even better, all lower caps monmap
. Maybe @jcsp has a better sense of what would be user friendlier though.
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.
Also, I would personally not care much about the creation time of the monmap. I'd much rather only see when it was last modified, as it should also reflect the creation time for the initial monmap.
</table> | ||
</div> | ||
<div class="box"> | ||
<h3 style="color:#00bb00; font-weight:bold">INSIDE QUORUM</h3> |
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 would prefer "IN QUORUM" rather than "INSIDE QUORUM". Inside
doesn't make much sense in the context of a quorum - you're either in it or you are not.
<th>Name</th> | ||
<th>Rank</th> | ||
<th>IP Addr</th> | ||
<th>Public Addr</th> |
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.
addr
and public_addr
should be the same, and I'm pretty sure addr
is only there for legacy reasons. In MonMap::dump()
, both fields have the same value, and we should always honor public_addr
in this case. What is missing though (and would be really useful) is showing the monitor's public_bind_addr
, but I don't think we expose that on the monmap (it's a runtime thing). It should be exposed via the daemon's config get
, but I don't think that's reasonable to expect the dashboard to do, really.
In a nutshell, drop IP Addr
.
<th>Public Addr</th> | ||
<th>Open Sessions</th> | ||
<th>Trimmed Sessions</th> | ||
<th>Elections Participated In</th> |
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 don't think these fields are particularly helpful. The only thing that would be interesting to know is whether the monitor has ever been in-quorum (in case it is not currently in quorum).
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.
Sorry, should have been cleared: I meant the Trimmed Sessions
and Elections Participated In
.
</div> | ||
|
||
<div class="box"> | ||
<h3 style="color:#00bb00; font-weight:bold">OUTSIDE QUORUM</h3> |
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.
"OUTSIDE QUORUM" -> "NOT IN QUORUM"
<th>Public Addr</th> | ||
<th>Open Sessions</th> | ||
<th>Trimmed Sessions</th> | ||
<th>Elections Participated</th> |
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.
Same comments from above apply.
6ce48a6
to
c7b6104
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.
The PR looks good. Minor nit in the not in quorum
list.
The only thing missing is figuring out whether we have a decent way to show the actual feature names in the con
and required
features fields, and then to fix the commit title for e0d91cf .
<tr><td><p><span style="color:yellow; font-weight:bold">monmap modified: </span></td><td> {mon_status.monmap.modified}</p></td></tr> | ||
<tr><td><p><span style="color:yellow; font-weight:bold">monmap epoch: </span></td><td> {mon_status.monmap.epoch}</p></td></tr> | ||
<tr><td><p><span style="color:yellow; font-weight:bold">quorum con: </span></td><td> {mon_status.features.quorum_con}</p></td></tr> | ||
<tr><td><p><span style="color:yellow; font-weight:bold">required con: </span></td><td> {mon_status.features.required_con}</p></td></tr> |
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 think quorum_con
and required_con
features are nice values to know, I think the integer values have little value when exposed by themselves to the user on the dashboard. It would be nice to actually have the features being used instead.
It may just so be that you do not have a good way to obtain those; if that is the case, please file a ticket in the tracker mentioning just that, assign it to me, link this PR in the ticket, and I'll address that (and then we can amend this feature to include those features at a later date).
<th>Name</th> | ||
<th>Rank</th> | ||
<th>Public Addr</th> | ||
<th>Open Sessions</th> |
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.
There is a fair chance that this field is actually irrelevant if the monitor is not in quorum. I'd suggest dropping it.
Also, Thank you for the screenshot! That helped immensely! :) 👍 |
I wouldn't worry about the features for now.. we can either drop it or replace it with the release code name. We don't have a feature bit mask -> string function except for a function that tells you which release it looks like (e.g., "luminous", "firefly", etc.), and that's probably not very helpful at this level (the ceph version of the daemon is probably more interesting). Love the "open sessions" mini plot! |
Hmm it would be nice to show the out-of-quorum nodes' sync status (when they are doing a sync). It's a bit hard because we don't have a percentage value, though (we have the current key position but we don't know how far that is). Also sync is rare-ish.. but when it does happen you really want to know how close it is to finishing. Another thing that would be nice is a "how long in quorum" time value. I've been pining for a "pretty time" helper for a while that returns things like "32s", "12m", "3.4h", "7w", etc. Seeing a time in quorum for each mon would make flappy/unreliable mons visible. (These are all nice-to-haves that can come later of course!) |
@liewegas Now that you mention that, I do have a |
fa9780e
to
dda8401
Compare
Signed-off-by: Rubab Syed<rubab.syed21@gmail.com>
dda8401
to
01edf5e
Compare
</div> | ||
</div> | ||
</div> | ||
<div class="box"> |
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'd suggest move this div right after the the "IN QUORUM" div, i.e after https://github.com/ceph/ceph/pull/19632/files#diff-4e15ad4bfa3f75fa7ca9156de9eedd25R77. so it can be aligned with the "IN QUORUM" table. looks better this way. what do you think?
This PR adds a new page for monitor daemon. It shows following metrics: