Hi Lennart,

OPENSAF_IMM_FLAG_PRT51906_ALLOW contains the value in hexadecimal format 
which presents the bitmask index for the new protocol.

The index should be 11st, and therefore the value must be 0x00000400.

I will add information to the commit msg body. Thanks. 

Regards, Vu

> -----Original Message-----
> From: Lennart Lund <lennart.l...@ericsson.com>
> Sent: Thursday, April 18, 2019 3:53 PM
> To: Vu Minh Nguyen <vu.m.ngu...@dektech.com.au>; Hans Nordebäck
> <hans.nordeb...@ericsson.com>; Gary Lee <gary....@dektech.com.au>
> Cc: opensaf-devel@lists.sourceforge.net
> Subject: Sv: [PATCH 1/1] imm: fix coredump on immnd during upgrade
> [#3030]
> 
> Hi Vu,
> 
> Ack.
> 
> I don't know exactly what this code is doing but I can see that the
> "fs_attr_iter != immObject->mAttrValueMap.end()" is  done only when the
> operationId is 400 or 401 instead of always. The fs_attr_iter variable is
only
> used with operationId 400 and 401 so this seems correct.
> I cannot see why the OPENSAF_IMM_FLAG_PRT51906_ALLOW is changed. Is
> this related to this problem?
> Please give information about this change in the commit message (and
> maybe as a comment in the ticket).
> Not tested.
> 
> Thanks
> Lennart
> 
> ________________________________
> Från: Vu Minh Nguyen <vu.m.ngu...@dektech.com.au>
> Skickat: den 17 april 2019 11:29
> Till: Hans Nordebäck; Lennart Lund; Gary Lee
> Kopia: opensaf-devel@lists.sourceforge.net; Vu Minh Nguyen
> Ämne: [PATCH 1/1] imm: fix coredump on immnd during upgrade [#3030]
> 
> The assertion about the existence of the new added attribute
> `saImmFileSystemStatus` should be done if the admOp ID is
> either 400 or 401.
> ---
>  src/imm/common/immsv_api.h       | 2 +-
>  src/imm/config/immsv_classes.xml | 1 -
>  src/imm/immnd/ImmModel.cc        | 7 ++++---
>  3 files changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/src/imm/common/immsv_api.h b/src/imm/common/immsv_api.h
> index 3ab3892d1..c37a624ed 100644
> --- a/src/imm/common/immsv_api.h
> +++ b/src/imm/common/immsv_api.h
> @@ -151,7 +151,7 @@ typedef enum {
>  #define OPENSAF_IMM_FLAG_PRT50_ALLOW 0x00000080
>  #define OPENSAF_IMM_FLAG_PRT51_ALLOW 0x00000100
>  #define OPENSAF_IMM_FLAG_PRT51710_ALLOW 0x00000200
> -#define OPENSAF_IMM_FLAG_PRT51906_ALLOW 0x00000800
> +#define OPENSAF_IMM_FLAG_PRT51906_ALLOW 0x00000400
> 
>  #define OPENSAF_IMM_SERVICE_NAME "safImmService"
> 
> diff --git a/src/imm/config/immsv_classes.xml
> b/src/imm/config/immsv_classes.xml
> index c6f448e82..193ccd2e2 100644
> --- a/src/imm/config/immsv_classes.xml
> +++ b/src/imm/config/immsv_classes.xml
> @@ -50,7 +50,6 @@
>                          <name>saImmFileSystemStatus</name>
>                          <type>SA_UINT32_T</type>
>                          <category>SA_RUNTIME</category>
> -                       <category>SA_RUNTIME</category>
>                          <flag>SA_CACHED</flag>
>                  </attr>
>          </class>
> diff --git a/src/imm/immnd/ImmModel.cc b/src/imm/immnd/ImmModel.cc
> index 2cf2649cf..1435690c0 100644
> --- a/src/imm/immnd/ImmModel.cc
> +++ b/src/imm/immnd/ImmModel.cc
> @@ -13873,9 +13873,6 @@ SaAisErrorT
> ImmModel::admoImmMngtObject(const ImmsvOmAdminOperationInvoke*
> req,
>    valuep = (ImmAttrValue*)avi->second;
> 
>    auto fs_attr_iter = immObject-
> >mAttrValueMap.find(saImmFileSystemStatus);
> -  osafassert(fs_attr_iter != immObject->mAttrValueMap.end());
> -  auto fs_attr_value = fs_attr_iter->second;
> -
> 
>    if (req->operationId == SA_IMM_ADMIN_EXPORT) { /* Standard */
>      err = SA_AIS_ERR_NOT_SUPPORTED;
> @@ -13900,11 +13897,15 @@ SaAisErrorT
> ImmModel::admoImmMngtObject(const ImmsvOmAdminOperationInvoke*
> req,
>    } else if (req->operationId == SA_IMM_ADMIN_FS_AVAILABLE) {
>      LOG_NO("Received: immadm -o %u
> safRdn=immManagement,safApp=safImmService",
>             SA_IMM_ADMIN_FS_AVAILABLE);
> +    osafassert(fs_attr_iter != immObject->mAttrValueMap.end());
> +    auto fs_attr_value = fs_attr_iter->second;
>      sFileSystemAvailable = true;
>      fs_attr_value->setValue_int(1);
>    } else if (req->operationId == SA_IMM_ADMIN_FS_UNAVAILABLE) {
>      LOG_NO("Received: immadm -o %u
> safRdn=immManagement,safApp=safImmService",
>             SA_IMM_ADMIN_FS_UNAVAILABLE);
> +    osafassert(fs_attr_iter != immObject->mAttrValueMap.end());
> +    auto fs_attr_value = fs_attr_iter->second;
>      sFileSystemAvailable = false;
>      fs_attr_value->setValue_int(0);
>    } else {
> --
> 2.19.2




_______________________________________________
Opensaf-devel mailing list
Opensaf-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensaf-devel

Reply via email to