Open niulin opened 7 years ago
Thanks for the issue, sounds like a good idea to me.
I have just linked a now resolved issue that partly addresses this issue by surfacing mount options:
That issue doesn't address the warnings component of this issue but does surface 'degraded' via mount options and adds the ability, via pool and share model extensions (is_mounted and mount_status), to be aware of such things. It does however add 'unmounted' warnings (red text) on all pool and share listings if they are not mounted. It could be that an interpretation of "... raid is unsync ..." in btrfs terms is essentially an unmount status. However I think highlighting the ro (read only) and degraded mount options, when seen would cover this given ro is the fail over response to pool / share problems in btrfs. Given a pool (volume) / sub volume could be intentionally mounted ro we could highlight (surface as warning) only if ro is not also a requested mount option. But is all cases I think degraded should be highlighted; irrespective of if it is config request status: via UI custom mount options.
A missing disk pool warning, in flashing red, is now surfaced (in Web-UI header so on all pages) as from pr: "surface pool missing disk info in UI. Fixes #1897" #1902 Linking for context.
The remaining element of this issue pertains to: "If disk is mounted in degraded mode ... give a warn on dashboard." Although we already indicate mount status via the the already linked and merged: "improve mount status reporting capability. Fixes #1763" #1771 It is not in the form of a warning, but the degraded status is at least indicted.
Currently we have addressed the "... raid is unsync ..." element if that is to be interpreted as dev stats warnings which the following merged pr addresses: "Show warn on dashboard if errors occurs on IO or fs. Fixes #1532" #1958 (another @niulin issue) or indeed a missing disk which we now also address in the similarly linked (my last commnet): "surface pool missing disk info in UI. Fixes #1897" #1902
So I propose all that remains here is to 'colour' / highlight the "degraded" word when found in a mount status column entry. And as degraded is not actually an error condition but potentially by choice, the colouring could be mid level, ie more orange than red, so as to bring attention to it but not necessarily have it at the same full red used by the Web-UI header errors for example.
If disk is mounted in degraded mode or the raid is unsync, should give a warn on dashboard.