Summary: amfd: not possible to add/remove configuration for one node in one single CCB V3 [#1458] Review request for Trac Ticket(s): 1458 Peer Reviewer(s): AMF devs Pull request to: Affected branch(es): opensaf-4.6.x, default Development branch: default
-------------------------------- Impacted area Impact y/n -------------------------------- Docs n Build system n RPM/packaging n Configuration files n Startup scripts n SAF services n OpenSAF services n Core libraries n Samples n Tests n Other n Comments (indicate scope for each "y" above): --------------------------------------------- This patch series is identical to V2, except the series has been rebased to latest changeset. changeset 4bcba36c61511a2830d5d41f56e11cbf13f7e1b3 Author: Gary Lee <[email protected]> Date: Mon, 14 Sep 2015 11:57:20 +1000 amfd: allow node to be removed [#1458] allow node to be removed if it is also removed from all nodegroups changeset 42c368ce31191161eeb8a194aedb7c95a3113b59 Author: Gary Lee <[email protected]> Date: Mon, 14 Sep 2015 11:57:20 +1000 amfd: allow nodegroup to be modified [#1458] allow node to be deleted from a nodegroup, even if there are SUs hosted on that nodegroup as long as these SUs are also removed in the same CCB changeset 1ca01b992f40af8a674547fc79bbd952a6a440e2 Author: Gary Lee <[email protected]> Date: Mon, 14 Sep 2015 11:57:20 +1000 amfd: allow nodeswbundle to be deleted [#1458] allow all nodeswbundles to be deleted if the node is absent changeset b5b92216ccdc7c38a907f76d777f9453e5f10461 Author: Gary Lee <[email protected]> Date: Mon, 14 Sep 2015 11:57:20 +1000 amfd: allow SU to be created [#1458] allow SU to be created on a non-existent node, as long as that node is also created in the same CCB changeset 61946b7e3a92d6a3a8118ad1675aa5b487675a1a Author: Gary Lee <[email protected]> Date: Mon, 14 Sep 2015 11:57:20 +1000 amfd: don't crash if nodegroup is added with node in the same CCB [#1458] Currently, if a nodegroup and a member node is created in the same CCB, and the nodegroup is modified to include this new node, amfd will crash. This change will reject the change instead of trying to deference a null 'ng'. Perhaps support for this use case can be added later. Complete diffstat: ------------------ osaf/services/saf/amf/amfd/node.cc | 55 ++++++++++++++++++++++++++++++++++++++++++++++++++----- osaf/services/saf/amf/amfd/nodegroup.cc | 24 +++++++++++++++++------- osaf/services/saf/amf/amfd/nodeswbundle.cc | 3 +-- osaf/services/saf/amf/amfd/su.cc | 45 +++++++++++++++++++++++++++++++++------------ 4 files changed, 101 insertions(+), 26 deletions(-) Testing Commands: ----------------- Test 1: In one CCB, create a new nodegroup and a new node. In the same CCB, modify the nodegroup to include this new node. immcfg immcfg -c SaAmfNodeGroup safAmfNodeGroup=Test,safAmfCluster=myAmfCluster -a saAmfNGNodeList=safAmfNode=PL-6,safAmfCluster=myAmfCluster immcfg -c SaAmfNode safAmfNode=PL-6,safAmfCluster=myAmfCluster -a saAmfNodeSuFailoverMax=2 -a saAmfNodeSuFailOverProb=1200000000000 -a saAmfNodeFailfastOnTerminationFailure=1 -a saAmfNodeFailfastOnInstantiationFailure=0 -a saAmfNodeClmNode=safNode=PL-6,safCluster=myClmCluster -a saAmfNodeAutoRepair=1 -a saAmfNodeAdminState=1 immcfg -c SaAmfNode safAmfNode=PL-7,safAmfCluster=myAmfCluster -a saAmfNodeSuFailoverMax=2 -a saAmfNodeSuFailOverProb=1200000000000 -a saAmfNodeFailfastOnTerminationFailure=1 -a saAmfNodeFailfastOnInstantiationFailure=0 -a saAmfNodeClmNode=safNode=PL-7,safCluster=myClmCluster -a saAmfNodeAutoRepair=1 -a saAmfNodeAdminState=1 immcfg -m -a saAmfNGNodeList+=safAmfNode=PL-7,safAmfCluster=myAmfCluster safAmfNodeGroup=Test,safAmfCluster=myAmfCluster immcfg --ccb-apply Expected: the CCB should be rejected and amfd should not crash. saImmOmCcbApply FAILED: SA_AIS_ERR_FAILED_OPERATION (21) OI reports: ng modify: nodegroup cannot be found ==== Test 2: Check a lock-in'ed SU can be created on a newly defined node in a single CCB immcfg -c SaAmfNodeGroup safAmfNodeGroup=Test,safAmfCluster=myAmfCluster -a saAmfNGNodeList=safAmfNode=PL-3,safAmfCluster=myAmfCluster immcfg immcfg -c SaAmfNode safAmfNode=PL-6,safAmfCluster=myAmfCluster -a saAmfNodeSuFailoverMax=2 -a saAmfNodeSuFailOverProb=1200000000000 -a saAmfNodeFailfastOnTerminationFailure=1 -a saAmfNodeFailfastOnInstantiationFailure=0 -a saAmfNodeClmNode=safNode=PL-6,safCluster=myClmCluster -a saAmfNodeAutoRepair=1 -a saAmfNodeAdminState=1 immcfg -m -a saAmfNGNodeList+=safAmfNode=PL-6,safAmfCluster=myAmfCluster safAmfNodeGroup=Test,safAmfCluster=myAmfCluster immcfg -c SaAmfApplication safApp=TestOpenSAF -a saAmfAppType=safVersion=4.0.0,safAppType=OpenSafApplicationType immcfg -c SaAmfSG safSg=NoRed,safApp=TestOpenSAF -a saAmfSGType=safVersion=4.0.0,safSgType=OpenSafSgTypeNoRed immcfg -c SaAmfSU safSu=PL-6,safSg=NoRed,safApp=TestOpenSAF -a saAmfSUType=safVersion=4.0.0,safSuType=OpenSafSuTypeND -a saAmfSUHostNodeOrNodeGroup=safAmfNode=PL-6,safAmfCluster=myAmfCluster -a saAmfSUAdminState=3 immcfg --ccb-apply Expected: the CCB should succeed. ==== Test 3: Don't allow SU creation on a node except in node admin state locked_instantiation immcfg -c SaAmfNodeGroup safAmfNodeGroup=Test,safAmfCluster=myAmfCluster -a saAmfNGNodeList=safAmfNode=PL-3,safAmfCluster=myAmfCluster immcfg immcfg -c SaAmfNode safAmfNode=PL-6,safAmfCluster=myAmfCluster -a saAmfNodeSuFailoverMax=2 -a saAmfNodeSuFailOverProb=1200000000000 -a saAmfNodeFailfastOnTerminationFailure=1 -a saAmfNodeFailfastOnInstantiationFailure=0 -a saAmfNodeClmNode=safNode=PL-6,safCluster=myClmCluster -a saAmfNodeAutoRepair=1 -a saAmfNodeAdminState=1 immcfg -c SaAmfNode safAmfNode=PL-7,safAmfCluster=myAmfCluster -a saAmfNodeSuFailoverMax=2 -a saAmfNodeSuFailOverProb=1200000000000 -a saAmfNodeFailfastOnTerminationFailure=1 -a saAmfNodeFailfastOnInstantiationFailure=0 -a saAmfNodeClmNode=safNode=PL-7,safCluster=myClmCluster -a saAmfNodeAutoRepair=1 -a saAmfNodeAdminState=1 immcfg -m -a saAmfNGNodeList+=safAmfNode=PL-6,safAmfCluster=myAmfCluster safAmfNodeGroup=Test,safAmfCluster=myAmfCluster immcfg -m -a saAmfNGNodeList+=safAmfNode=PL-7,safAmfCluster=myAmfCluster safAmfNodeGroup=Test,safAmfCluster=myAmfCluster immcfg -c SaAmfApplication safApp=TestOpenSAF -a saAmfAppType=safVersion=4.0.0,safAppType=OpenSafApplicationType immcfg -c SaAmfSG safSg=NoRed,safApp=TestOpenSAF -a saAmfSGType=safVersion=4.0.0,safSgType=OpenSafSgTypeNoRed immcfg -c SaAmfSU safSu=PL-6,safSg=NoRed,safApp=TestOpenSAF -a saAmfSUType=safVersion=4.0.0,safSuType=OpenSafSuTypeND -a saAmfSUHostNodeOrNodeGroup=safAmfNode=PL-6,safAmfCluster=myAmfCluster -a saAmfSUAdminState=1 immcfg -c SaAmfSU safSu=PL-7,safSg=NoRed,safApp=TestOpenSAF -a saAmfSUType=safVersion=4.0.0,safSuType=OpenSafSuTypeND -a saAmfSUHostNodeOrNodeGroup=safAmfNode=PL-7,safAmfCluster=myAmfCluster -a saAmfSUAdminState=1 immcfg --ccb-apply Expected: CCB to fail with "SG or node not configured properly to allow creation of UNLOCKED SU" ==== Test 4: Allow unlocked SU create on a new node in a single CCB immcfg -c SaAmfNodeGroup safAmfNodeGroup=Test,safAmfCluster=myAmfCluster -a saAmfNGNodeList=safAmfNode=PL-3,safAmfCluster=myAmfCluster immcfg immcfg -c SaAmfNode safAmfNode=PL-6,safAmfCluster=myAmfCluster -a saAmfNodeSuFailoverMax=2 -a saAmfNodeSuFailOverProb=1200000000000 -a saAmfNodeFailfastOnTerminationFailure=1 -a saAmfNodeFailfastOnInstantiationFailure=0 -a saAmfNodeClmNode=safNode=PL-6,safCluster=myClmCluster -a saAmfNodeAutoRepair=1 -a saAmfNodeAdminState=3 immcfg -c SaAmfNode safAmfNode=PL-7,safAmfCluster=myAmfCluster -a saAmfNodeSuFailoverMax=2 -a saAmfNodeSuFailOverProb=1200000000000 -a saAmfNodeFailfastOnTerminationFailure=1 -a saAmfNodeFailfastOnInstantiationFailure=0 -a saAmfNodeClmNode=safNode=PL-7,safCluster=myClmCluster -a saAmfNodeAutoRepair=1 -a saAmfNodeAdminState=3 immcfg -m -a saAmfNGNodeList+=safAmfNode=PL-6,safAmfCluster=myAmfCluster safAmfNodeGroup=Test,safAmfCluster=myAmfCluster immcfg -m -a saAmfNGNodeList+=safAmfNode=PL-7,safAmfCluster=myAmfCluster safAmfNodeGroup=Test,safAmfCluster=myAmfCluster immcfg -c SaAmfApplication safApp=TestOpenSAF -a saAmfAppType=safVersion=4.0.0,safAppType=OpenSafApplicationType immcfg -c SaAmfSG safSg=NoRed,safApp=TestOpenSAF -a saAmfSGType=safVersion=4.0.0,safSgType=OpenSafSgTypeNoRed immcfg -c SaAmfSU safSu=PL-6,safSg=NoRed,safApp=TestOpenSAF -a saAmfSUType=safVersion=4.0.0,safSuType=OpenSafSuTypeND -a saAmfSUHostNodeOrNodeGroup=safAmfNode=PL-6,safAmfCluster=myAmfCluster -a saAmfSUAdminState=1 immcfg -c SaAmfSU safSu=PL-7,safSg=NoRed,safApp=TestOpenSAF -a saAmfSUType=safVersion=4.0.0,safSuType=OpenSafSuTypeND -a saAmfSUHostNodeOrNodeGroup=safAmfNode=PL-7,safAmfCluster=myAmfCluster -a saAmfSUAdminState=1 immcfg --ccb-apply Expected: CCB to succeed ==== Test 5: Ensure node can be deleted even if mapped to a SU through a nodegroup, as long as the SU is also deleted in the same CCB immcfg -c SaAmfNode safAmfNode=PL-6,safAmfCluster=myAmfCluster -a saAmfNodeSuFailoverMax=2 -a saAmfNodeSuFailOverProb=1200000000000 -a saAmfNodeFailfastOnTerminationFailure=1 -a saAmfNodeFailfastOnInstantiationFailure=0 -a saAmfNodeClmNode=safNode=PL-6,safCluster=myClmCluster -a saAmfNodeAutoRepair=1 -a saAmfNodeAdminState=3 immcfg -c SaAmfNode safAmfNode=PL-7,safAmfCluster=myAmfCluster -a saAmfNodeSuFailoverMax=2 -a saAmfNodeSuFailOverProb=1200000000000 -a saAmfNodeFailfastOnTerminationFailure=1 -a saAmfNodeFailfastOnInstantiationFailure=0 -a saAmfNodeClmNode=safNode=PL-6,safCluster=myClmCluster -a saAmfNodeAutoRepair=1 -a saAmfNodeAdminState=3 immcfg -c SaAmfNodeGroup safAmfNodeGroup=Test,safAmfCluster=myAmfCluster -a saAmfNGNodeList=safAmfNode=PL-6,safAmfCluster=myAmfCluster immcfg -m -a saAmfNGNodeList+=safAmfNode=PL-7,safAmfCluster=myAmfCluster safAmfNodeGroup=Test,safAmfCluster=myAmfCluster immcfg -c SaAmfApplication safApp=TestOpenSAF -a saAmfAppType=safVersion=4.0.0,safAppType=OpenSafApplicationType immcfg -c SaAmfSG safSg=NoRed,safApp=TestOpenSAF -a saAmfSGType=safVersion=4.0.0,safSgType=OpenSafSgTypeNoRed -a saAmfSGAdminState=3 immcfg -c SaAmfSU safSu=PL-6,safSg=NoRed,safApp=TestOpenSAF -a saAmfSUType=safVersion=4.0.0,safSuType=OpenSafSuTypeND -a saAmfSUHostNodeOrNodeGroup=safAmfNodeGroup=Test,safAmfCluster=myAmfCluster -a saAmfSUAdminState=1 immcfg -c SaAmfSU safSu=PL-7,safSg=NoRed,safApp=TestOpenSAF -a saAmfSUType=safVersion=4.0.0,safSuType=OpenSafSuTypeND -a saAmfSUHostNodeOrNodeGroup=safAmfNodeGroup=Test,safAmfCluster=myAmfCluster -a saAmfSUAdminState=1 Try to remove PL-6 from nodegroup: immcfg -a saAmfNGNodeList-=safAmfNode=PL-6,safAmfCluster=myAmfCluster safAmfNodeGroup=Test,safAmfCluster=myAmfCluster Expected: Cannot delete 'safAmfNode=PL-6,safAmfCluster=myAmfCluster' from 'safAmfNodeGroup=Test,safAmfCluster=myAmfCluster'. An SU is mapped using node group Try again, but also remove the SU. immcfg immcfg -a saAmfNGNodeList-=safAmfNode=PL-6,safAmfCluster=myAmfCluster safAmfNodeGroup=Test,safAmfCluster=myAmfCluster immcfg -d safSu=PL-6,safSg=NoRed,safApp=TestOpenSAF immcfg -d safSu=PL-7,safSg=NoRed,safApp=TestOpenSAF immcfg --ccb-apply Expected: CCB to succeed Testing, Expected Results: -------------------------- <<PASTE COMMAND OUTPUTS / TEST RESULTS>> Conditions of Submission: ------------------------- <<HOW MANY DAYS BEFORE PUSHING, CONSENSUS ETC>> Arch Built Started Linux distro ------------------------------------------- mips n n mips64 n n x86 n n x86_64 y y powerpc n n powerpc64 n n Reviewer Checklist: ------------------- [Submitters: make sure that your review doesn't trigger any checkmarks!] Your checkin has not passed review because (see checked entries): ___ Your RR template is generally incomplete; it has too many blank entries that need proper data filled in. ___ You have failed to nominate the proper persons for review and push. ___ Your patches do not have proper short+long header ___ You have grammar/spelling in your header that is unacceptable. ___ You have exceeded a sensible line length in your headers/comments/text. ___ You have failed to put in a proper Trac Ticket # into your commits. ___ You have incorrectly put/left internal data in your comments/files (i.e. internal bug tracking tool IDs, product names etc) ___ You have not given any evidence of testing beyond basic build tests. Demonstrate some level of runtime or other sanity testing. ___ You have ^M present in some of your files. These have to be removed. ___ You have needlessly changed whitespace or added whitespace crimes like trailing spaces, or spaces before tabs. ___ You have mixed real technical changes with whitespace and other cosmetic code cleanup changes. These have to be separate commits. ___ You need to refactor your submission into logical chunks; there is too much content into a single commit. ___ You have extraneous garbage in your review (merge commits etc) ___ You have giant attachments which should never have been sent; Instead you should place your content in a public tree to be pulled. ___ You have too many commits attached to an e-mail; resend as threaded commits, or place in a public tree for a pull. ___ You have resent this content multiple times without a clear indication of what has changed between each re-send. ___ You have failed to adequately and individually address all of the comments and change requests that were proposed in the initial review. ___ You have a misconfigured ~/.hgrc file (i.e. username, email etc) ___ Your computer have a badly configured date and time; confusing the the threaded patch review. ___ Your changes affect IPC mechanism, and you don't present any results for in-service upgradability test. ___ Your changes affect user manual and documentation, your patch series do not contain the patch that updates the Doxygen manual. ------------------------------------------------------------------------------ _______________________________________________ Opensaf-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/opensaf-devel
