After reject a takeover_request, value is cleaned after a lease time
then it mistaken raise a change value become empty. It leads to osafrded
handle and reboot itself as lost connectivity to consensus.
---
src/osaf/consensus/plugins/etcd3.plugin | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/osaf/consensus/plugins/etcd3.plugin
b/src/osaf/consensus/plugins/etcd3.plugin
index 60559a0e9..e8fa6b6e7 100644
--- a/src/osaf/consensus/plugins/etcd3.plugin
+++ b/src/osaf/consensus/plugins/etcd3.plugin
@@ -362,6 +362,14 @@ watch() {
return 1
fi
elif [ "$orig_value" != "$current_value" ]; then
+ if [ "$watch_key" == "$takeover_request" ]; then
+ state=$(echo $orig_value | awk '{print $4}')
+ if [ "$state" == "REJECTED" -a -z "$current_value" ]; then
+ #value is cleaned after a lease time, keep watching
+ orig_value=""
+ continue
+ fi
+ fi
echo $current_value
return 0
fi
--
2.17.1
_______________________________________________
Opensaf-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensaf-devel