LINBIT / drbdtop

CLI management tool for DRBD. Like top, but for DRBD resources.
GNU General Public License v2.0
48 stars 14 forks source link

drbdtop doesn't show resources #16

Closed Osa1989 closed 5 years ago

Osa1989 commented 5 years ago

Describe the bug when I start drbdtop it doesn't show me any resources

To Reproduce Start dtrbdtop as root

Expected behavior It should show me the resources

Capture Raw Resource Data drbdsetup events2 --timestamps --statistics --now received netlink error reply: Operation not supported

Distro

rck commented 5 years ago

drbdtop uses drbdsetup to gather information. Most likely the DRBD kernel module you use is too old and does not even support "events2" and you get an EOPNOTSUPP.

You probably want to use a newer kernel module anyways, for DRBD8.4 this would then be version 8.4.11. Or you use DRBD9. Or you use an outdated intree module and stop using drbdtop, and use plain drbdsetup status instead.

Closing this, I'm pretty sure you just use outdated DRBD. But thanks, drbdtop could be a bit more helpful when it detects such a situation.

Osa1989 commented 5 years ago

Can you add this to the README please I wasted some time troubleshooting this.

deleteriousEffect commented 5 years ago

There is error reporting that the TUI view doesn't display, but could.

Even so, we probably need to die if the utils are not an appropriate version. @rck can you think of a way the version checking here could fail, but the utils still be able to provide the correct info?

rck commented 5 years ago

I'm against adding it to the README, that does not solve it.

@haySwim I had the same idea, dying if the versions don't match is the way to go. One thing I can think of is that I introduced DRBD_KERNEL_VERSION only for drbd9-utils and that somewhere in March 2017. But the fallback code should cover that. Anyways, what I would like to do:

Feel free to work on it, otherwise it is on my table.

I reopen this for tracking.

deleteriousEffect commented 5 years ago

Yeah, like the idea of keeping the "does everything function" but having it just called the dedicated ones.

One of my original ideas was for collectors to send an EOF event when they were done, and to have some upper layer decide what to do with this info. The TUI has a nop branch for that right now https://github.com/LINBIT/drbdtop/blob/master/pkg/display/fancy_tui.go#L122

Maybe that should be changed from a EOF to something like FATAL and it passes up some info about why the collector had to terminate. Does that sound reasonable @rck

rck commented 5 years ago

@haySwim Sounds like a good idea. I'd say there is room for both. A static check at at startup and collectors reporting when something is wrong. Like an unrecoverable state.

I pushed my ideas for the static check (and version gathering refactoring) to the develop branch. Review/ACKs welcome.