commit f6997b2f50b61b9eb7e298e18b72b458fda3c3c8
Author: Gary Lee <[email protected]>
Date: Fri Nov 16 01:40:38 2018 +0000
osaf: update etcd2 and sample plugins [#2954]
add timeout parameter to set and set_if_prev
commit 705aa3eb629973031e9380d1ca5a53df0c82deed
Author: Gary Lee <[email protected]>
Date: Fri Nov 16 01:40:38 2018 +0000
osaf: ensure takeover_requests have a lease [#2954]
In CreateTakeoverRequest(), if the initial attempt fails,
then the takeover_request is created without a lease.
Furthermore, when the takeover_request result is set,
it is being set without a lease, and the takeover_request
is not automatically removed.
Add <timeout> parameter to KeyValue::Set, and remove
default value for the <timeout> parameter to KeyValue::Create to
ensure a timeout is always set.
---
** [tickets:#2954] osaf: takeover request without lease**
**Status:** review
**Milestone:** 5.18.12
**Created:** Mon Nov 05, 2018 02:37 AM UTC by Gary Lee
**Last Updated:** Tue Nov 13, 2018 07:41 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 [email protected] 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
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensaf-tickets