osaf/services/saf/amf/amfd/node.cc | 6 ++++--
osaf/services/saf/amf/amfd/nodegroup.cc | 4 ++++
2 files changed, 8 insertions(+), 2 deletions(-)
Amf is not checking admin state for all the node groups to
which a node belongs to during nodegroup unlock-in.
Ideally, if one of the nodegroup of a node is in locked-in, Amf
shouldn't instantiate the SUs on that node if another nodegroup
of that node is being unlocked-in.
diff --git a/osaf/services/saf/amf/amfd/node.cc
b/osaf/services/saf/amf/amfd/node.cc
--- a/osaf/services/saf/amf/amfd/node.cc
+++ b/osaf/services/saf/amf/amfd/node.cc
@@ -1479,8 +1479,10 @@ bool any_ng_in_locked_in_state(const AVD
it != nodegroup_db->end(); it++) {
AVD_AMF_NG *ng = it->second;
if ((node_in_nodegroup(Amf::to_string(&node->name), ng) ==
true) &&
- (ng->saAmfNGAdminState ==
SA_AMF_ADMIN_LOCKED_INSTANTIATION))
- return true;
+ (ng->saAmfNGAdminState ==
SA_AMF_ADMIN_LOCKED_INSTANTIATION)) {
+ TRACE("Nodegroup '%s' is in locked-in", ng->name.value);
+ return true;
+ }
}
return false;
}
diff --git a/osaf/services/saf/amf/amfd/nodegroup.cc
b/osaf/services/saf/amf/amfd/nodegroup.cc
--- a/osaf/services/saf/amf/amfd/nodegroup.cc
+++ b/osaf/services/saf/amf/amfd/nodegroup.cc
@@ -892,6 +892,10 @@ static void ng_admin_unlock_inst(AVD_AMF
LOG_NO("'%s' UNLOCK_INSTANTIATION: AMF node oper state
disabled", node->name.value);
continue;
}
+ if (any_ng_in_locked_in_state(node) == true) {
+ LOG_NO("One of the node group of '%s' is in locked-in",
node->name.value);
+ continue;
+ }
for (const auto& node_su : node->list_of_su) {
/*Instantiate only those SUs in this SG which are
hosted on the Nodes of NG.
Also honor saAmfSURank while instantating.
------------------------------------------------------------------------------
_______________________________________________
Opensaf-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensaf-devel