Hi Alex,
ACK Not tested.
-AVM
On 2/15/2017 2:12 AM, Alex Jones wrote:
> src/msg/msgd/mqd_api.c | 53
> ++++++++++++++++++++++++++-----------------------
> 1 files changed, 28 insertions(+), 25 deletions(-)
>
>
> If a node is hosting a msg queue, and the node is rebooted, it can take 20
> seconds for the msg queue to fail to another node.
>
> saClmFinalize is mistakenly being called in clm_init, so CLM tracking
> messages are never received for nodes that leave the cluster.
>
> Only call saClmFinalize if CLM init fails.
>
> diff --git a/src/msg/msgd/mqd_api.c b/src/msg/msgd/mqd_api.c
> --- a/src/msg/msgd/mqd_api.c
> +++ b/src/msg/msgd/mqd_api.c
> @@ -116,36 +116,39 @@ uint32_t mqd_lib_req(NCS_LIB_REQ_INFO *i
> static SaAisErrorT mqd_clm_init (MQD_CB *cb)
> {
> SaAisErrorT saErr = SA_AIS_OK;
> - SaVersionT clm_version;
> - SaClmCallbacksT mqd_clm_cbk;
>
> - m_MQSV_GET_AMF_VER(clm_version);
> - mqd_clm_cbk.saClmClusterNodeGetCallback = NULL;
> - mqd_clm_cbk.saClmClusterTrackCallback = mqd_clm_cluster_track_callback;
> + do {
> + SaVersionT clm_version;
> + SaClmCallbacksT mqd_clm_cbk;
>
> - saErr = saClmInitialize(&cb->clm_hdl, &mqd_clm_cbk, &clm_version);
> - if (saErr != SA_AIS_OK) {
> - LOG_ER("saClmInitialize failed with error %u", (unsigned)
> saErr);
> - return saErr;
> - }
> - TRACE_1("saClmInitialize success");
> + m_MQSV_GET_AMF_VER(clm_version);
> + mqd_clm_cbk.saClmClusterNodeGetCallback = NULL;
> + mqd_clm_cbk.saClmClusterTrackCallback =
> mqd_clm_cluster_track_callback;
>
> - saErr = saClmSelectionObjectGet(cb->clm_hdl, &cb->clm_sel_obj);
> - if (SA_AIS_OK != saErr) {
> - LOG_ER("saClmSelectionObjectGet failed with error %u",
> (unsigned) saErr);
> - goto done;
> - }
> - TRACE_1("saClmSelectionObjectGet success");
> + saErr = saClmInitialize(&cb->clm_hdl, &mqd_clm_cbk, &clm_version);
> + if (saErr != SA_AIS_OK) {
> + LOG_ER("saClmInitialize failed with error %u", (unsigned)
> saErr);
> + break;
> + }
> + TRACE_1("saClmInitialize success");
>
> - saErr = saClmClusterTrack(cb->clm_hdl, SA_TRACK_CHANGES_ONLY, NULL);
> - if (SA_AIS_OK != saErr) {
> - LOG_ER("saClmClusterTrack failed with error %u", (unsigned)
> saErr);
> - goto done;
> - }
> - TRACE_1("saClmClusterTrack success");
> + saErr = saClmSelectionObjectGet(cb->clm_hdl, &cb->clm_sel_obj);
> + if (SA_AIS_OK != saErr) {
> + LOG_ER("saClmSelectionObjectGet failed with error %u",
> (unsigned) saErr);
> + break;
> + }
> + TRACE_1("saClmSelectionObjectGet success");
>
> -done:
> - saClmFinalize(cb->clm_hdl);
> + saErr = saClmClusterTrack(cb->clm_hdl, SA_TRACK_CHANGES_ONLY, NULL);
> + if (SA_AIS_OK != saErr) {
> + LOG_ER("saClmClusterTrack failed with error %u", (unsigned)
> saErr);
> + break;
> + }
> + TRACE_1("saClmClusterTrack success");
> + } while (false);
> +
> + if (saErr != SA_AIS_OK && !cb->clm_hdl)
> + saClmFinalize(cb->clm_hdl);
>
> return saErr;
> }
>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Opensaf-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensaf-devel