]> git.ipfire.org Git - thirdparty/mdadm.git/commit
mdmon: don't attempt to manage new arrays when terminating
authorArtur Paszkiewicz <artur.paszkiewicz@intel.com>
Fri, 22 Feb 2019 09:15:45 +0000 (10:15 +0100)
committerJes Sorensen <jsorensen@fb.com>
Thu, 28 Feb 2019 20:46:01 +0000 (15:46 -0500)
commit69d084784de196acec8ab703cd1b379af211d624
treeb0ded165db9cb429a8f067bd8df35bb68906a375
parent76b906d2406cdf136f64de77e881eb2d180108d9
mdmon: don't attempt to manage new arrays when terminating

When mdmon gets a SIGTERM, it stops managing arrays that are clean. If
there is more that one array in the container and one of them is dirty
and the clean one is still present in mdstat, mdmon will treat it as a
new array and start managing it again. This leads to a cycle of
remove_old() / manage_new() calls for the clean array, until the other
one also becomes clean.

Prevent this by not calling manage_new() if sigterm is set. Also, remove
a check for sigterm in manage_new() because the condition will never be
true.

Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
Signed-off-by: Jes Sorensen <jsorensen@fb.com>
managemon.c