bugfix #4 vpc vr: Do NOT send Nic plug in/out command to Stopped/Stopping VR

This commit is contained in:
Wei Zhou 2020-11-18 15:59:05 +00:00 committed by dahn
parent 655ed10655
commit 51f3756030
1 changed files with 6 additions and 2 deletions

View File

@ -214,7 +214,11 @@ public class AdvancedNetworkTopology extends BasicNetworkTopology {
final boolean result = applyRules(network, router, typeString, isPodLevelException, podId, failWhenDisconnect, new RuleApplierWrapper<RuleApplier>(ipAssociationRules));
if (result) {
_advancedVisitor.visit(nicPlugInOutRules);
if (router.getState() == State.Stopped || router.getState() == State.Stopping) {
s_logger.debug("Router " + router.getInstanceName() + " is in " + router.getState() + ", so not sending NicPlugInOutRules command to the backend");
} else {
_advancedVisitor.visit(nicPlugInOutRules);
}
}
return result;
@ -241,4 +245,4 @@ public class AdvancedNetworkTopology extends BasicNetworkTopology {
final boolean result = applyRules(network, router, typeString, isPodLevelException, podId, failWhenDisconnect, new RuleApplierWrapper<RuleApplier>(aclsRules));
return result;
}
}
}