This reverts commit
819c158866f466075a1c719f0dc496deb2fb3814.
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 monitor
819c158866f466075a1c719f0dc496deb2fb3814
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>
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) {