- **status**: unassigned --> accepted
- **assigned_to**: Gary Lee


---

** [tickets:#2954] osaf: takeover request without lease**

**Status:** accepted
**Milestone:** 5.18.12
**Created:** Mon Nov 05, 2018 02:37 AM UTC by Gary Lee
**Last Updated:** Mon Nov 05, 2018 05:46 AM UTC
**Owner:** Gary Lee


Sometimes a takeover request is created without a timeout (lease), if the 
initial attempt fails.

Possible fix:

diff --git a/src/osaf/consensus/consensus.cc b/src/osaf/consensus/consensus.cc
index 1136c37..1713d09 100644
--- a/src/osaf/consensus/consensus.cc
+++ b/src/osaf/consensus/consensus.cc
@@ -338,7 +338,7 @@ SaAisErrorT Consensus::CreateTakeoverRequest(const 
std::string& current_owner,
   while (rc == SA_AIS_ERR_FAILED_OPERATION && retries < kMaxRetry) {
     ++retries;
     std::this_thread::sleep_for(kSleepInterval);
-    rc = KeyValue::Create(kTakeoverRequestKeyname, takeover_request);
+    rc = KeyValue::Create(kTakeoverRequestKeyname, takeover_request, 
takeover_valid_time);
   }
 
   if (rc == SA_AIS_ERR_EXIST) {

Also, when it is set (eg. with the result on etcd3) the timeout no longer works.


---

Sent from sourceforge.net because opensaf-tickets@lists.sourceforge.net is 
subscribed to https://sourceforge.net/p/opensaf/tickets/

To unsubscribe from further messages, a project admin can change settings at 
https://sourceforge.net/p/opensaf/admin/tickets/options.  Or, if this is a 
mailing list, you can unsubscribe from the mailing list.
_______________________________________________
Opensaf-tickets mailing list
Opensaf-tickets@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensaf-tickets

Reply via email to