mdmonitor closes mdstat fd if is empty
| Affects | Status | Importance | Assigned to | Milestone | |
|---|---|---|---|---|---|
| mdadm (Ubuntu) |
Expired
|
Undecided
|
Unassigned | ||
| Impish |
Expired
|
Undecided
|
Unassigned | ||
Bug Description
There was a change in mdadm to fix issue when md_mod is reloaded (not a case for ubuntu because md_mod is build-in). Commit:
https:/
The fix prevents mdmonitor from occupying mdstat file descriptor in there is no any mddevice available.
As a side effect mdmonitor cannot react on md events because it is waiting in undefined resource (probably 1 which in demonize mode case is /dev/null).
When mdmonitor is started form command line and there was one mdmonitor already active, error message also is omitted, because error is thrown after forking. As a result, unexpectedly we may got same same issue after array creation.
| tags: | added: vroc |

Hello,
The main issue is in development, we need to deal with module reload and descriptor handling.
The second one can be easily workaround by using systemctl service (systemctl mdmonitor restart) instead of command line. Here error handling is needed instead of quiet fail.
I will notify if any fix will become available.