Update from Thuan:
I think it should not printout the objects(<== Here) without satisfy the
condition.
amf_state()
{
echo
echo "Service Instances UNLOCKED and UNASSIGNED:" <== Here
si_dns=`immfind -c SaAmfSI`
for si_dn in $si_dns; do
adm_state_val=`immlist -a "saAmfSIAdminState" $si_dn | cut -d =
-f2`
ass_state_val=`immlist -a "saAmfSIAssignmentState" $si_dn | cut
-d = -f2`
if [ $adm_state_val -eq 1 ] && [ $ass_state_val -eq 1 ]; then
<== Here
echo " $si_dn"
fi
done
echo
echo "Service Units UNLOCKED and DISABLED:" <== Here
su_dns=`immfind -c SaAmfSU`
for su_dn in $su_dns; do
adm_state_val=`immlist -a "saAmfSUAdminState" $su_dn | cut -d =
-f2`
oper_state_val=`immlist -a "saAmfSUOperState" $su_dn | cut -d =
-f2`
if [ $adm_state_val -eq 1 ] && [ $oper_state_val -eq 2 ]; then
<== Here
echo " $su_dn"
fi
done
echo
echo "Nodes UNLOCKED and DISABLED:" <== Here
node_dns=`immfind -c SaAmfNode`
for node_dn in $node_dns; do
adm_state_val=`immlist -a "saAmfNodeAdminState" $node_dn | cut
-d = -f2`
oper_state_val=`immlist -a "saAmfNodeOperState" $node_dn | cut
-d = -f2`
if [ $adm_state_val -eq 1 ] && [ $oper_state_val -eq 2 ]; then
<== Here
echo " $node_dn"
fi
done
echo
}
Best regards,
Thuan
---
** [tickets:#1384] amf-state print out error if it is called during failover**
**Status:** unassigned
**Milestone:** 4.5.2
**Created:** Tue Jun 09, 2015 07:28 AM UTC by Thuan
**Last Updated:** Wed Jun 10, 2015 11:47 AM UTC
**Owner:** nobody
When failover was trigger, there are some problems (maybe implementer
disconnect) with immlist tool in short time. So, immlist tool can’t get value
of variables or an empty value (ex: saAmfCSICompHAState=<Empty>). Then,
amf-state did not handle well with these empty values.
/usr/bin/amf-state: line 62: [: <Empty>: integer expression expected
Reproduction
====================
- Create a while loop for amf-state on Standby SC.
- Reboot the Active SC.
- Failover event occurs and problem occurs also.
---
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