<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=GBK">
</head>
<body>
<p><br>
</p>
We have a test on 3 nodes cluster in which the primary is uptodate
and the other two secondary<br>
is diskless by doing drbdadm detach. Then after doing drbdadm attach
on the two secondary at<br>
the same time, one status hangs at NEGOTIATING while another hangs
at ATTACHING.<br>
<br>
That is because if a negotiating peer receives another's
wide-cluster-change from DISKLESS to<br>
NEGOTIATING, it will reject it due to more than one negotiation
throughout the cluster, but the<br>
new disk state of that node remains NEGOTIATING after a failed state
change. Then neither of<br>
two peers can get a negotiating result what they want.<br>
<br>
Signed-off-by: ZhangDuan <duan.zhang@easystack.cn><br>
---<br>
drbd/drbd_state.c | 4 +++-<br>
1 file changed, 3 insertions(+), 1 deletion(-)<br>
<br>
diff --git a/drbd/drbd_state.c b/drbd/drbd_state.c<br>
index c919d759..85910f1e 100644<br>
--- a/drbd/drbd_state.c<br>
+++ b/drbd/drbd_state.c<br>
@@ -1835,8 +1835,10 @@ static void sanitize_state(struct
drbd_resource *resource)<br>
for_each_peer_device_rcu(peer_device, device) {<br>
enum drbd_repl_state nr = peer_device->negotiation_result;<br>
enum drbd_disk_state pdsk = peer_device->disk_state[NEW];<br>
+ enum drbd_disk_state pdsk_old = peer_device->disk_state[OLD];<br>
<br>
- if (pdsk == D_UNKNOWN || pdsk < D_NEGOTIATING)<br>
+ if ((pdsk == D_UNKNOWN || pdsk < D_NEGOTIATING) ||<br>
+ (pdsk_old < D_NEGOTIATING && pdsk == D_NEGOTIATING))<br>
continue;<br>
<br>
if (pdsk == D_UP_TO_DATE)<br>
-- <br>
2.24.0.windows.2<br>
<br>
</duan.zhang@easystack.cn>
<pre class="moz-signature" cols="72">--
Sincerely Yours,
Zhang Duan</pre>
</body>
</html>