Revert "mdmon(): Error out if failing to connect to victim monitor"
This reverts commit819c158866
. Adam Kwolek reports that with this patch, mdmon sometimes doesn't start: When array is not clean dismounted directory /dev/.mdadm is not cleaned up. On array re-assembly read pid is not valid and it is not possible to connect to monitor. This causes mdmon to exit and array remains not monitored. Problem is introduced by fix: mdmon(): Error out if failing to connect to victim monitor819c158866
This is critical for container reshape when mdmon is should finish reshape. when reshape is not finished, array is reshaped again by mdadm. As victim_sock is subsequently tested, we don't really need to test-and-fail here. Reported-by: Adam Kwolek <adam.kwolek@intel.com> Signed-off-by: NeilBrown <neilb@suse.de>
This commit is contained in:
parent
62f5838f5b
commit
84a230d993
8
mdmon.c
8
mdmon.c
|
@ -457,14 +457,8 @@ static int mdmon(char *devname, int devnum, int must_fork, int takeover)
|
|||
sigaction(SIGPIPE, &act, NULL);
|
||||
|
||||
victim = mdmon_pid(container->devnum);
|
||||
if (victim >= 0) {
|
||||
if (victim >= 0)
|
||||
victim_sock = connect_monitor(container->devname);
|
||||
if (victim_sock < 0) {
|
||||
fprintf(stderr, "mdmon: %s unable to connect monitor\n",
|
||||
container->devname);
|
||||
exit(3);
|
||||
}
|
||||
}
|
||||
|
||||
ignore = chdir("/");
|
||||
if (!takeover && victim > 0 && victim_sock >= 0) {
|
||||
|
|
Loading…
Reference in New Issue