Bug 232683 - [gmirror] gmirror could provide much better administrative introspection into decision-making processes
Summary: [gmirror] gmirror could provide much better administrative introspection into...
Status: Open
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Some People
Assignee: Conrad Meyer
Depends on: 232671 232835
  Show dependency treegraph
Reported: 2018-10-25 16:23 UTC by Conrad Meyer
Modified: 2018-12-07 00:12 UTC (History)
1 user (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Conrad Meyer freebsd_committer 2018-10-25 16:23:50 UTC
+++ This bug was initially created as a clone of Bug #232671 +++

I'd like the gmirror softc and individual gmirror disk elements to record two formatted messages:

1. Why did we switch to the current state from the previous one?
2. Why *haven't* we switched to some next state, where there is an obvious linear sequence of transitions.

Additionally, I'd like that information available in DDB and perhaps the runtime geom commands.  It may also be useful for printing at mountroot panics.

For the scenario described in the bug this was cloned from, that might be:

root0.why_status = "Found enough (2/2) disks in ANY state and found 0 dirty disks (unforced)"
root0.why_not_next = "n/a"
root0.why_destroy = "0/2 mirror disks in ACTIVE or NEW state (need at least 1)"

da2p5.why_status = "broken (stale): old generation id N; current mirrorset generation is M"
da2p5.why_not_next = "n/a"

da16p3.why_status = "Synchronizing: Part of active mirrorset generation (NN), but initiated synchronization operation has not completed"
da16p3.why_not_next = "Synchronizing: progress: N/M bytes; last forward progress at time TTTT"

In that scenario, da15p3 never made it in time for the mirror to still exist, but if it had:

da15p3.why_status = "Clean mirror with active mirrorset generation (NN)"
da15p3.why_not_next = "n/a"
Comment 1 Conrad Meyer freebsd_committer 2018-11-09 06:16:42 UTC
Some work in progress.
Comment 2 Conrad Meyer freebsd_committer 2018-12-07 00:12:41 UTC
I'm less sure we need this particular proposal.  The current messages are sort of good enough, just not particularly clear if you're not familiar with gmirror already.  I think we could do some minor tweaking of the existing text to improve that.