Summary: amfd: not possible to add/remove configuration for one node in single CCB V2 [#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 y OpenSAF services n Core libraries n Samples n Tests n Other n Comments (indicate scope for each "y" above): --------------------------------------------- changeset 5495f02588e72d3a23ab8130532cd2e54f188dd8 Author: Gary Lee <[email protected]> Date: Thu, 10 Sep 2015 21:22:23 +1000 amfd: allow node to be removed [#1458] allow node to be removed if it is also removed from all nodegroups changeset 38ee800f373195b134ef38292c4e33d403f07b57 Author: Gary Lee <[email protected]> Date: Thu, 10 Sep 2015 21:22:23 +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 2ef7aa982c434a106c0f636ebcd890d3a10b801d Author: Gary Lee <[email protected]> Date: Thu, 10 Sep 2015 21:22:23 +1000 amfd: allow nodeswbundle to be deleted [#1458] allow all nodeswbundles to be deleted if the node is absent changeset 4f0c678502f46057019471368e5c93eabef6438f Author: Gary Lee <[email protected]> Date: Thu, 10 Sep 2015 21:22:23 +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 e59ae75985df22131cd335b5b20265254b441b48 Author: Gary Lee <[email protected]> Date: Thu, 10 Sep 2015 21:22:23 +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 | 28 +++++++++++++++++++--------- osaf/services/saf/amf/amfd/nodeswbundle.cc | 3 +-- osaf/services/saf/amf/amfd/su.cc | 45 +++++++++++++++++++++++++++++++++------------ 4 files changed, 103 insertions(+), 28 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 --ccb-apply Expected: CCB to succeed Testing, Expected Results: -------------------------- see above section 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. ------------------------------------------------------------------------------ Monitor Your Dynamic Infrastructure at Any Scale With Datadog! Get real-time metrics from all of your servers, apps and tools in one place. SourceForge users - Click here to start your Free Trial of Datadog now! http://pubads.g.doubleclick.net/gampad/clk?id=241902991&iu=/4140 _______________________________________________ Opensaf-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/opensaf-devel
