osaf/services/saf/smfsv/smfd/SmfExecControl.cc | 21 +++++++++++----------
1 files changed, 11 insertions(+), 10 deletions(-)
Add the deactivation list to the balanced procedure, it was declared but not
used.
diff --git a/osaf/services/saf/smfsv/smfd/SmfExecControl.cc
b/osaf/services/saf/smfsv/smfd/SmfExecControl.cc
--- a/osaf/services/saf/smfsv/smfd/SmfExecControl.cc
+++ b/osaf/services/saf/smfsv/smfd/SmfExecControl.cc
@@ -35,8 +35,8 @@ static std::vector<SmfUpgradeStep*> getS
static SmfUpgradeStep* mergeStep(SmfUpgradeProcedure* procedure,
const std::vector<SmfUpgradeStep*>& steps);
-static bool removeDuplicateActivationUnits(SmfUpgradeProcedure * i_newproc,
- SmfUpgradeStep *newStep);
+static bool removeDuplicateActivationUnits(SmfUpgradeProcedure * i_newproc,
SmfUpgradeStep *newStep,
+ const std::list<unitNameAndState>&
deact);
static bool isNodeInGroup(const std::string& node,
@@ -104,14 +104,18 @@ bool createStepForBalancedProc(SmfUpgrad
SmfUpgradeCampaign* ucamp = camp->getUpgradeCampaign();
auto steps = getStepsMatchingBalancedGroup(procedure, ucamp);
+ std::list <unitNameAndState> deact;
for (auto step : steps) {
SmfUpgradeProcedure* oproc = step->getProcedure();
// copy callbacks to the new procedure
procedure->getCallbackList(oproc->getUpgradeMethod());
+ deact.insert(deact.end(),
+ step->getDeactivationUnitList().begin(),
+ step->getDeactivationUnitList().end());
}
if (!steps.empty()) {
SmfUpgradeStep* newstep = mergeStep(procedure, steps);
- removeDuplicateActivationUnits(procedure, newstep);
+ removeDuplicateActivationUnits(procedure, newstep, deact);
procedure->addProcStep(newstep);
}
const std::vector<SmfUpgradeProcedure*>& allprocs = ucamp->getProcedures();
@@ -201,15 +205,11 @@ SmfUpgradeStep* mergeStep(SmfUpgradeProc
newstep->setDn(newstep->getRdn() + "," + procedure->getDn());
newstep->setMaxRetry(0);
newstep->setRestartOption(0);
- std::list <unitNameAndState> deact;
for (auto step : steps) {
if (isNodeInGroup(step->getSwNode(), procedure->getBalancedGroup())) {
- TRACE("adding modifications, deact and bundle ref from node:%s",
+ TRACE("adding modifications and bundle ref from node:%s",
step->getSwNode().c_str());
newstep->addModifications(step->getModifications());
- deact.insert(deact.end(),
- step->getDeactivationUnitList().begin(),
- step->getDeactivationUnitList().end());
procedure->mergeBundleRefRollingToSingleStep(newstep, step);
}
}
@@ -217,13 +217,14 @@ SmfUpgradeStep* mergeStep(SmfUpgradeProc
return newstep;
}
-bool removeDuplicateActivationUnits(SmfUpgradeProcedure * i_newproc,
- SmfUpgradeStep *newStep) {
+bool removeDuplicateActivationUnits(SmfUpgradeProcedure * i_newproc,
SmfUpgradeStep *newStep,
+ const std::list<unitNameAndState>& deact) {
// Remove any (de)activation unit duplicates and add them to the step.
// Activation and deactivation units are the same because rolling and
// formodify is symetric.
TRACE_ENTER();
std::list < unitNameAndState > tmpDU;
+ tmpDU.insert(tmpDU.begin(), deact.begin(), deact.end());
std::multimap<std::string, objectInst> objInstances;
if (i_newproc->getImmComponentInfo(objInstances) == false) {
TRACE("Config info from IMM could not be read");
------------------------------------------------------------------------------
The Command Line: Reinvented for Modern Developers
Did the resurgence of CLI tooling catch you by surprise?
Reconnect with the command line and become more productive.
Learn the new .NET and ASP.NET CLI. Get your free copy!
http://sdm.link/telerik
_______________________________________________
Opensaf-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensaf-devel