File enable-conn-in-not-allowed-dual-primaries.patch of Package drbd.9322

bsc#1097571, revert f500844f06 to keep the same
scenario of drbd8.
This is ok in two nodes schema, but better to remove
when supporting multiple nodes with diskless local.

diff -Naur drbd-9.0.8+git.c8bc3670.orig/drbd/drbd_state.c drbd-9.0.8+git.c8bc3670/drbd/drbd_state.c
--- drbd-9.0.8+git.c8bc3670.orig/drbd/drbd_state.c	2018-09-18 15:35:39.957103214 +0800
+++ drbd-9.0.8+git.c8bc3670/drbd/drbd_state.c	2018-09-18 15:37:35.301676027 +0800
@@ -1298,7 +1298,7 @@
 		two_primaries = nc ? nc->two_primaries : false;
 		if (peer_role[NEW] == R_PRIMARY && peer_role[OLD] != R_PRIMARY && !two_primaries) {
 			if (role[NOW] == R_PRIMARY)
-				return SS_TWO_PRIMARIES;
+				drbd_warn(connection, "Two primaries exist but not allowed in conf, rely on handler.\n");
 			idr_for_each_entry(&resource->devices, device, vnr) {
 				if (device->open_ro_cnt)
 					return SS_PRIMARY_READER;
openSUSE Build Service is sponsored by