ACK, tested.

On 11/24/2017 06:53 AM, Vijay Roy wrote:

Hi Rafael,

Are you confirming that issue reported got tested over path 2765?

If so, Please provide acknowledgement for the fix/patch.

Thanks

Vijay

*From:*Rafael Odzakow [mailto:[email protected]]
*Sent:* Thursday, November 23, 2017 5:12 PM
*To:* Syam Prasad Talluri <[email protected]>; Vijay Roy <[email protected]> *Cc:* Ravi Sekhar Reddy Konda <[email protected]>; Srinivas Mangipudy <[email protected]>; Lennart Lund <[email protected]> *Subject:* Re: [PATCH 1/1] smf: SMF cannot distinguish swAdd and swRemove in same procedure [#2675]


Ran the campaigns on a branch that contained 2675 patch. It is tested here now at least :)

On 11/23/2017 09:04 AM, Syam Prasad Talluri wrote:

    Rafael,

    We are able to reproduced the issue with your campaigns.

    1.When I execute using install campaign, we are able to see the
    below logs in both SC-1 and SC-2

    *logger: BundleB_online_install*

    *logger: BundleB_offline_install *

    **

    2.When we try using the upgrade campaigns, we are not able to see
    any logs either in SC’s and PL’s.

    If SwAdd and SwRemove are added in same procedure with same Bundle
    name then those are removed from both the lists,  So either
    installation nor remove will not happen.

    Traces captured as part of reproducing bug is added below.

    Nov 23 11:55:49.447514 osafsmfd
    [3902:4132:src/smf/smfd/SmfUpgradeMethod.cc:0183] TR
    SmfUpgradeScope::removeSwAddRemoveDuplicates():
    *Bundle=safSmfBundle=BundleB found in <swAdd> and <swRemove>
    within a procedure, remove from both lists*

    Nov 23 11:55:49.447524 osafsmfd
    [3902:4132:src/smf/smfd/SmfUpgradeMethod.cc:0205] >>
    removeSwAddRemoveDuplicate

    Nov 23 11:55:49.447530 osafsmfd
    [3902:4132:src/smf/smfd/SmfUpgradeMethod.cc:0211] TR
    SmfUpgradeScope::removeSwAddRemoveDuplicate*(): erase element
    "safSmfBundle=BundleB"*

    Nov 23 11:55:49.447537 osafsmfd
    [3902:*4132*:src/smf/smfd/SmfUpgradeMethod.cc:0218] <<
    removeSwAddRemoveDuplicate

    Nov 23 11:55:49.447542 osafsmfd
    [3902:4132:src/smf/smfd/SmfUpgradeMethod.cc:0205] >>
    removeSwAddRemoveDuplicate

    Nov 23 11:55:49.447548 osafsmfd
    [3902:4132:src/smf/smfd/SmfUpgradeMethod.cc:0211] TR
    SmfUpgradeScope::removeSwAddRemoveDuplicate*(): erase element
    "safSmfBundle=BundleB"*

    Thanks,

    Syam.

    *From:*Rafael Odzakow [mailto:[email protected]]
    *Sent:* Monday, November 20, 2017 8:45 PM
    *To:* Vijay Roy <[email protected]> <mailto:[email protected]>
    *Cc:* Ravi Sekhar Reddy Konda <[email protected]>
    <mailto:[email protected]>; Syam Prasad Talluri
    <[email protected]> <mailto:[email protected]>;
    Srinivas Mangipudy <[email protected]>
    <mailto:[email protected]>; Lennart Lund
    <[email protected]> <mailto:[email protected]>
    *Subject:* Re: [PATCH 1/1] smf: SMF cannot distinguish swAdd and
    swRemove in same procedure [#2675]

    I could not reproduce this issue, I do not have the bundle that
    should be connected to these campaigns so I stripped the campaign
    down and added my own.

    As far as I could see the campaigns did the correct thing and the
    bundle was removed from SC-1,SC-2 and added to PL-3,PL-4. I have
    attached the modified campaigns.

    On 11/17/2017 07:07 AM, Vijay Roy wrote:

        Hi Rafael,

        Attached the campaign xml’s for reference.

        *_Core issue:_*

        **

        1.By using attached install_campaign.xml we have installed
        software on 2 SC’s

        2.Later by using attached upgrade_campaign.xml we tried to
        remove the same software on 2 SC’s and Install the same on 2
        PL’s.

        For this we have added one swAdd with PL’s and swRemove with SC’s.

        *Issue*: In current code under one procedure If we add and
        remove same software we will only remove the software (but not
        add).  Instead of comparing the AMF nodes in both the tags the
        current code is validating only BundleDN.

        *Code Fix*: We are comparing the AmfNodes inside the swAdd and
        swRemove tags and make decision to remove or add software wisely.

        Thanks

        Vijay

        -----Original Message-----
        From: Rafael Odzakow [mailto:[email protected]]
        Sent: Thursday, November 16, 2017 8:05 PM
        To: Vijay Roy <[email protected]> <mailto:[email protected]>
        Cc: [email protected]
        <mailto:[email protected]>
        Subject: Re: [PATCH 1/1] smf: SMF cannot distinguish swAdd and
        swRemove in same procedure [#2675]

        I do not understand the issue, please provide a campaign that
        would case the ambiguity between nodes.

        On 11/16/2017 10:18 AM, Vijay Roy wrote:

        > Conditional check on AMF nodes in swadd and swRemove exactly
        for same and match to avoid ambiguity between nodes.

        > ---

        > src/smf/smfd/SmfUpgradeMethod.cc | 21 ++++++++++++++++++++-

        >   1 file changed, 20 insertions(+), 1 deletion(-)

        >

        > diff --git a/src/smf/smfd/SmfUpgradeMethod.cc
        b/src/smf/smfd/SmfUpgradeMethod.cc

        > index 0149c93..3671d80 100644

        > --- a/src/smf/smfd/SmfUpgradeMethod.cc

        > +++ b/src/smf/smfd/SmfUpgradeMethod.cc

        > @@ -173,11 +173,30 @@ void
        SmfUpgradeScope::removeSwAddRemoveDuplicates(

        >     std::set<std::string> toBeRemoved;

        >

        >     // Find out which bundles are specified in both swAdd
        and SwRemove.

        > -  // Create a set of DN, since the comparison is based on that.

        > +  // Create a set of DN's if their Amf Nodes in swAdd and
        swRemove exactly same and match.

        >     for (auto &elemAdd : io_addList) {

        > +    bool sameNodesInAddRemoveSw = false;

        >       for (auto &elemRemove : io_removeList) {

        >         const std::string &swAddBundleDn =
        elemAdd.getBundleDn();

        >         if (swAddBundleDn == elemRemove.getBundleDn()) {

        > +         for (auto &itAdd : elemAdd.getPlmExecEnvList()) {

        > +           const std::string& i_addNodeDn = itAdd.getAmfNode();

        > +             for (auto itRemove :
        elemRemove.getPlmExecEnvList()) {

        > +               const std::string& i_removeNodeDn =
        itRemove.getAmfNode();

        > +               if (i_addNodeDn == i_removeNodeDn) {

        > + sameNodesInAddRemoveSw = true;

        > + TRACE("SmfUpgradeScope::removeSwAddRemoveDuplicates():
        node DN's %s are same ", i_addNodeDn.c_str());

        > +                 break;

        > +               }

        > +             }

        > +             if (sameNodesInAddRemoveSw == false) {

        > +               break;

        > +             }

        > +         }

        > +         if (sameNodesInAddRemoveSw == false) {

        > +           continue;

        > +         }

        > +

        >           TRACE(

        > "SmfUpgradeScope::removeSwAddRemoveDuplicates(): Bundle=%s
        found in <swAdd> and <swRemove> within a procedure, remove
        from both lists\n",

        > swAddBundleDn.c_str());


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Opensaf-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensaf-devel

Reply via email to