mdmonitor closes mdstat fd if is empty

Bug #1887143 reported by Mariusz Tkaczyk
12
This bug affects 1 person
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://git.kernel.org/pub/scm/utils/mdadm/mdadm.git/commit/?id=52209d6ee1183581e148791cf6ee4d60a0193b1d

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: vroc
Revision history for this message
Mariusz Tkaczyk (mtkaczyk) wrote :

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.

tags: added: vroc
Revision history for this message
Mariusz Tkaczyk (mtkaczyk) wrote :
Revision history for this message
Mariusz Tkaczyk (mtkaczyk) wrote :
Revision history for this message
Jeff Lane  (bladernr) wrote :

Just to check, is this resolved in 4.2-rc2?

Changed in mdadm (Ubuntu):
status: New → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for mdadm (Ubuntu Impish) because there has been no activity for 60 days.]

Changed in mdadm (Ubuntu Impish):
status: Incomplete → Expired
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for mdadm (Ubuntu) because there has been no activity for 60 days.]

Changed in mdadm (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.