*/
@Singleton
public class ElanInterfaceCache extends DataObjectCache<ElanInterface> {
- private static final Logger LOG = LoggerFactory.getLogger(ElanInterface.class);
+
+ private static final Logger LOG = LoggerFactory.getLogger(ElanInterfaceCache.class);
private final Map<String, Set<String>> elanInstanceToInterfacesCache = new ConcurrentHashMap<>();
macTimeOut = 30;
}
- LOG.debug("Executing create ElanInstance command" + "\t" + elanName + "\t" + macTimeOut + "\t" + elanDescr
- + "\t");
+ LOG.debug("Executing create ElanInstance command for elanName : {}, macTimeOut : {}, elanDescr : {}",
+ elanName, macTimeOut, elanDescr);
if (elanName.length() <= MAX_LENGTH) {
boolean isSuccess = elanProvider.createElanInstance(elanName, macTimeOut, elanDescr);
if (isSuccess) {
@Override
protected Object doExecute() {
- LOG.debug("Executing the Deletion of ElanInstance command" + "\t" + elanName + "\t");
+ LOG.debug("Executing the Deletion of ElanInstance command for elanName: {}", elanName);
boolean isSuccess = elanProvider.deleteElanInstance(elanName);
if (isSuccess) {
session.getConsole().println("Elan Instance deleted successfully");
@Override
protected Object doExecute() {
- LOG.debug("Executing Get ElanInstance command" + "\t" + elanName + "\t");
+ LOG.debug("Executing Get ElanInstance command for elanName: {}", elanName);
if (elanName != null) {
ElanInstance elanInstance = elanProvider.getElanInstance(elanName);
if (elanInstance == null) {
@Override
protected Object doExecute() {
- LOG.debug("Executing create ElanInterface command" + "\t" + elanName + "\t" + interfaceName + "\t"
- + staticMacAddresses + "\t" + elanInterfaceDescr + "\t");
+ LOG.debug("Executing create ElanInterface command for elanName:{}, interfaceName:{}, staticMacAddresses:{},"
+ + "elanInterfaceDescr:{}",elanName, interfaceName, staticMacAddresses, elanInterfaceDescr);
elanProvider.addElanInterface(elanName, interfaceName, staticMacAddresses, elanInterfaceDescr);
return null;
}
@Override
protected Object doExecute() {
- LOG.debug("Deleting ElanInterface command" + "\t" + elanName + "\t" + interfaceName + "\t");
+ LOG.debug("Deleting ElanInterface command for elanName:{}, interfaceName:{}", elanName, interfaceName);
elanProvider.deleteElanInterface(interfaceName);
return null;
}
@Override
protected Object doExecute() {
- LOG.debug("Executing Get ElanInterface command for the corresponding Elan Instance"
- + "\t" + elanName + "\t");
+ LOG.debug("Executing Get ElanInterface command for the corresponding Elan Instance for {}", elanName);
if (elanName != null) {
ElanInstance elanInstance = elanProvider.getElanInstance(elanName);
List<String> elanInterfaces = elanProvider.getElanInterfaces(elanName);
@Override
protected Object doExecute() {
- LOG.debug("Executing updating ElanInterface command" + "\t" + elanName + "\t" + interfaceName + "\t"
- + staticMacAddresses + "\t" + elanInterfaceDescr + "\t");
+ LOG.debug("Executing elanInterface update command for elanName:{}, interfaceName:{}, staticMacAddresses:{},"
+ + "elanInterfaceDescr:{}", elanName, interfaceName, staticMacAddresses, elanInterfaceDescr);
elanProvider.updateElanInterface(elanName, interfaceName, staticMacAddresses, elanInterfaceDescr);
return null;
}
@Override
protected Object doExecute() {
- LOG.debug("Executing create ElanInstance command" + "\t" + elanName + "\t");
+ LOG.debug("Executing mac table flush command for {}", elanName);
elanProvider.flushMACTable(elanName);
return null;
}
@Override
protected Object doExecute() {
- LOG.debug("Executing updating ElanInterface command" + "\t");
+ LOG.debug("Executing elan mac table get command for {}", elanName);
Collection<MacEntry> macTables = elanProvider.getElanMacTable(elanName);
if (!macTables.isEmpty()) {
SimpleDateFormat formatter = new SimpleDateFormat("dd-MM-yy:HH:mm:ss");
@Override
protected Object doExecute() {
- LOG.debug("Updating the ElanInstance command" + "\t" + elanName + "\t" + macTimeOut + "\t" + elanDescr + "\t");
+ LOG.debug("Updating elanInstance update command for elanName:{}, macTimeOut:{}, elanDescr:{}",
+ elanName, macTimeOut, elanDescr);
elanProvider.updateElanInstance(elanName, macTimeOut, elanDescr);
return null;
}
@Override
protected Object doExecute() {
- LOG.debug("Executing create ElanInterface command" + "\t" + elanName + "\t" + interfaceName + "\t"
- + staticMacAddress + "\t");
+ LOG.debug("Executing static mac add command for elanName:{}, interfaceName:{}, staticMacAddress:{}",
+ elanName, interfaceName, staticMacAddress);
elanProvider.addStaticMacAddress(interfaceName, staticMacAddress);
return null;
}
@Override
protected Object doExecute() {
- LOG.debug("Executing create ElanInterface command" + "\t" + elanName + "\t" + interfaceName + "\t"
- + staticMacAddress + "\t");
+ LOG.debug("Executing static mac delete command for elanName:{}, interfaceName:{}, staticMacAddress:{}",
+ elanName, interfaceName, staticMacAddress);
elanProvider.deleteStaticMacAddress(interfaceName, staticMacAddress);
return null;
}
macTimeOut = 30;
}
- LOG.debug("Executing create EtreeInstance command" + "\t" + etreeName + "\t" + macTimeOut + "\t"
- + etreeDescr + "\t");
+ LOG.debug("Executing create EtreeInstance command etreeName:{}, macTimeOut:{}, etreeDescr:{}",
+ etreeName, macTimeOut, etreeDescr);
if (etreeName.length() <= MAX_LENGTH) {
boolean isSuccess = elanProvider.createEtreeInstance(etreeName, macTimeOut, etreeDescr);
if (isSuccess) {
@Override
protected Object doExecute() {
- LOG.debug("Executing the Deletion of EtreeInstance command" + "\t" + etreeName + "\t");
+ LOG.debug("Executing the Deletion of EtreeInstance command {}", etreeName);
boolean isSuccess = elanProvider.deleteEtreeInstance(etreeName);
if (isSuccess) {
session.getConsole().println("Etree Instance deleted successfully");
@Override
protected Object doExecute() {
- LOG.debug("Executing Get EtreeInstance command" + "\t" + etreeName + "\t");
+ LOG.debug("Executing Get EtreeInstance command for {}", etreeName);
if (etreeName != null) {
ElanInstance elanInstance = elanProvider.getElanInstance(etreeName);
if (elanInstance == null || elanInstance.getAugmentation(EtreeInstance.class) == null) {
}
}
- LOG.debug("Executing create EtreeInterface command" + "\t" + elanName + "\t" + interfaceName + "\t"
- + interfaceType + "\t" + staticMacAddresses + "\t" + elanInterfaceDescr + "\t");
+ LOG.debug("Executing create EtreeInterface command elanName:{}, interfaceName:{}, interfaceType:{},"
+ + "staticMacAddresses:{}, elanInterfaceDescr:{}", elanName, interfaceName, interfaceType,
+ staticMacAddresses, elanInterfaceDescr);
elanProvider.addEtreeInterface(elanName, interfaceName, inputType, staticMacAddresses, elanInterfaceDescr);
session.getConsole().println("Created etree interface successfully");
@Override
protected Object doExecute() {
- LOG.debug("Deleting EtreeInterface command" + "\t" + etreeName + "\t" + interfaceName + "\t");
+ LOG.debug("Deleting EtreeInterface command etreeName:{}, interfaceName:{}", etreeName, interfaceName);
ElanInterface existingInterface =
elanProvider.getElanInterfaceByElanInterfaceName(interfaceName);
if (existingInterface == null || existingInterface.getAugmentation(EtreeInterface.class) == null) {
@Override
protected Object doExecute() {
- LOG.debug("Executing Get EtreeInterface command for the corresponding Etree Instance" + "\t" + etreeName
- + "\t");
+ LOG.debug("Executing Get EtreeInterface command for the corresponding Etree Instance {}", etreeName);
if (etreeName != null) {
ElanInstance elanInstance = elanProvider.getElanInstance(etreeName);
if (elanInstance == null || elanInstance.getAugmentation(EtreeInstance.class) == null) {
try {
rpcResult = result.get();
} catch (InterruptedException e) {
- LOG.error("getnextHopIpFromRpcOutput : InterruptedException for dpnid {}", e, dpnId);
+ LOG.error("getnextHopIpFromRpcOutput : InterruptedException for dpnid {}", dpnId, e);
return null;
} catch (ExecutionException e) {
- LOG.error("getnextHopIpFromRpcOutput : ExecutionException for dpnid {}", e, dpnId);
+ LOG.error("getnextHopIpFromRpcOutput : ExecutionException for dpnid {}", dpnId, e);
return null;
}
if (!rpcResult.isSuccessful()) {
String evpnName = evpnAugmentation.getEvpnName();
String rd = vpnManager.getVpnRd(broker, evpnName);
if (rd == null) {
- LOG.debug("withdrawEvpnRT2Routes : rd is null ", elanName);
+ LOG.debug("withdrawEvpnRT2Routes : rd is null for {}", elanName);
return;
}
List<MacEntry> macEntries = elanUtils.getElanMacEntries(elanName);
try {
createIntegrationBridgeConfig(node, generateIntBridgeMac);
} catch (RuntimeException e) {
- LOG.error("Error creating bridge on " + node, e);
+ LOG.error("Error creating bridge on {}", node, e);
}
}
return;
void handleUpdate(InstanceIdentifier<DpnInterfaces> id, DpnInterfaces dpnInterfaces) {
final String elanName = getElanName(id);
if (ElanL2GwCacheUtils.getInvolvedL2GwDevices(elanName).isEmpty()) {
- LOG.debug("dpnInterface updation, no external l2 devices to update for elan {} with Dp Id:", elanName,
+ LOG.debug("dpnInterface updation, no external l2 devices to update for elan {} with Dp Id {}", elanName,
dpnInterfaces.getDpId());
return;
}
try {
return elanInterfaceManager.handleunprocessedElanInterfaces(update);
} catch (ElanException e) {
- LOG.error("update() failed for ElanInstance: " + identifier.toString(), e);
+ LOG.error("update() failed for ElanInstance: {}", identifier.toString(), e);
return emptyList();
}
}, ElanConstants.JOB_MAX_RETRIES);
LOG.info("Installing remote dmac for mac address {} and interface {}", macAddress, interfaceName);
synchronized (ElanUtils.getElanMacDPNKey(elanInfo.getElanTag(), macAddress,
interfaceInfo.getDpId())) {
- LOG.info("Acquired lock for mac : " + macAddress + ". Proceeding with remote dmac"
- + " install operation.");
+ LOG.info("Acquired lock for mac : {}, proceeding with remote dmac install operation", macAddress);
elanUtils.setupDMacFlowOnRemoteDpn(elanInfo, interfaceInfo, dstDpId, macAddress,
writeFlowTx);
}
} else {
EtreeInstance etreeInstance = elanInfo.getAugmentation(EtreeInstance.class);
if (etreeInstance == null) {
- LOG.error("EtreeInterface " + elanInterface.getName() + " is associated with a non EtreeInstance: "
- + elanInfo.getElanInstanceName());
+ LOG.error("EtreeInterface {} is associated with a non EtreeInstance: {}",
+ elanInterface.getName(), elanInfo.getElanInstanceName());
} else {
bindElanService(etreeInstance.getEtreeLeafTagVal().getValue(), elanInfo.getElanInstanceName(),
elanInterface.getName(), lportTag, tx);
try {
handleExternalTunnelUpdate(interfaceName, intrf);
} catch (ElanException e) {
- LOG.error("Failed to add Interface: " + identifier.toString());
+ LOG.error("Failed to add Interface {}", identifier.toString());
}
});
}
.setKey(new ElanInstanceKey(elanInstanceName)).build();
MDSALUtil.syncWrite(broker, LogicalDatastoreType.CONFIGURATION,
ElanHelper.getElanInstanceConfigurationDataPath(elanInstanceName), updateElanInstance);
- LOG.debug("Updating the Elan Instance {} with MAC TIME-OUT %l and Description %s ",
+ LOG.debug("Updating the Elan Instance {} with MAC TIME-OUT {} and Description {}",
updateElanInstance, macTimeout, description);
}
} else {
.addAugmentation(EtreeInstance.class, etreeInstance).build();
MDSALUtil.syncWrite(broker, LogicalDatastoreType.CONFIGURATION,
ElanHelper.getElanInstanceConfigurationDataPath(elanInstanceName), updateElanInstance);
- LOG.debug("Updating the Etree Instance {} with MAC TIME-OUT %l and Description %s ",
+ LOG.debug("Updating the Etree Instance {} with MAC TIME-OUT {} and Description {} ",
updateElanInstance, macTimeout, description);
}
} else {
ElanInstance elanInstance = elanIface.isPresent()
? elanInstanceCache.get(elanIface.get().getElanInstanceName()).orNull() : null;
if (elanInstance == null) {
- LOG.debug("addArpResponderFlow: elanInstance is null, Failed to install arp responder flow for Interface {}"
- + " with MAC {} & IP {}", dpnId,
- ingressInterfaceName, macAddress, ipAddress);
+ LOG.debug("addArpResponderFlow: elanInstance is null, Failed to install arp responder flow for dpnId {}"
+ + "for Interface {} with MAC {} & IP {}", dpnId, ingressInterfaceName, macAddress, ipAddress);
return;
}
String flowId = ArpResponderUtil.getFlowId(lportTag, ipAddress);
String interfaceName = existingInterfaceInfo.get().getInterfaceName();
PhysAddress physAddress = new PhysAddress(srcMacAddress);
if (interfaceName == null) {
- LOG.error(String.format("LPort record not found for tag %d", portTag));
+ LOG.error("LPort record not found for tag {}", portTag);
return;
}
jobCoordinator.enqueueJob(ElanUtils.getElanInterfaceJobKey(interfaceName), () -> {
public final class HwvtepHAUtil {
- static Logger LOG = LoggerFactory.getLogger(HwvtepHAUtil.class);
+ private static final Logger LOG = LoggerFactory.getLogger(HwvtepHAUtil.class);
//TODO reuse HWvtepSouthboundConstants
public static final String HA_ENABLED = "ha_enabled";
public class NodeConnectedHandler {
- static Logger LOG = LoggerFactory.getLogger(NodeConnectedHandler.class);
+ private static final Logger LOG = LoggerFactory.getLogger(NodeConnectedHandler.class);
GlobalAugmentationMerger globalAugmentationMerger = GlobalAugmentationMerger.getInstance();
PSAugmentationMerger psAugmentationMerger = PSAugmentationMerger.getInstance();
@Singleton
public class NodeCopier implements INodeCopier {
- static Logger LOG = LoggerFactory.getLogger(NodeCopier.class);
+ private static final Logger LOG = LoggerFactory.getLogger(NodeCopier.class);
GlobalAugmentationMerger globalAugmentationMerger = GlobalAugmentationMerger.getInstance();
PSAugmentationMerger psAugmentationMerger = PSAugmentationMerger.getInstance();
this.db = db;
}
+ @Override
public void copyGlobalNode(Optional<Node> srcGlobalNodeOptional,
- InstanceIdentifier<Node> srcPath,
- InstanceIdentifier<Node> dstPath,
- LogicalDatastoreType logicalDatastoreType,
- ReadWriteTransaction tx) throws ReadFailedException {
+ InstanceIdentifier<Node> srcPath,
+ InstanceIdentifier<Node> dstPath,
+ LogicalDatastoreType logicalDatastoreType,
+ ReadWriteTransaction tx) throws ReadFailedException {
if (!srcGlobalNodeOptional.isPresent() && logicalDatastoreType == CONFIGURATION) {
Futures.addCallback(tx.read(logicalDatastoreType, srcPath), new FutureCallback<Optional<Node>>() {
@Override
}
}
+ @Override
public void copyPSNode(Optional<Node> srcPsNodeOptional,
InstanceIdentifier<Node> srcPsPath,
InstanceIdentifier<Node> dstPsPath,
import org.opendaylight.netvirt.elan.l2gw.ha.handlers.NodeCopier;
import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node;
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
@Singleton
public class HAConfigNodeListener extends HwvtepNodeBaseListener {
+
+ private static final Logger LOG = LoggerFactory.getLogger(HAConfigNodeListener.class);
+
private final IHAEventHandler haEventHandler;
private final NodeCopier nodeCopier;
public final class HAJobScheduler implements Thread.UncaughtExceptionHandler {
- private static final Logger LOG = LoggerFactory.getLogger(HAOpClusteredListener.class);
+ private static final Logger LOG = LoggerFactory.getLogger(HAJobScheduler.class);
ExecutorService executorService;
static HAJobScheduler instance = new HAJobScheduler();
if (!wasHAChild && isHAChild) {
- LOG.debug(getNodeId(childPath) + " " + "became ha_child");
+ LOG.debug("{} became ha_child", getNodeId(childPath));
} else if (wasHAChild && !isHAChild) {
- LOG.debug(getNodeId(childPath) + " " + "unbecome ha_child");
+ LOG.debug("{} unbecome ha_child", getNodeId(childPath));
}
}
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.HwvtepGlobalAugmentation;
import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node;
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
@Singleton
public class HAOpNodeListener extends HwvtepNodeBaseListener {
+ private static final Logger LOG = LoggerFactory.getLogger(HAOpNodeListener.class);
+
static BiPredicate<String, InstanceIdentifier<Node>> IS_PS_CHILD_TO_GLOBAL_NODE = (globalNodeId, iid) -> {
String psNodeId = iid.firstKeyOf(Node.class).getNodeId().getValue();
return psNodeId.startsWith(globalNodeId) && psNodeId.contains("physicalswitch");
public abstract class HwvtepNodeBaseListener implements DataTreeChangeListener<Node>, AutoCloseable {
- public static final Logger LOG = LoggerFactory.getLogger(HwvtepNodeBaseListener.class);
+ private static final Logger LOG = LoggerFactory.getLogger(HwvtepNodeBaseListener.class);
private static final int STARTUP_LOOP_TICK = 500;
private static final int STARTUP_LOOP_MAX_RETRIES = 8;
processUpdatedNodes(changes, tx);
processDisconnectedNodes(changes, tx);
tx.submit().get();
- } catch (InterruptedException e1) {
- LOG.error("InterruptedException " + e1.getMessage());
- } catch (ExecutionException e2) {
- LOG.error("ExecutionException" + e2.getMessage());
- } catch (ReadFailedException e3) {
- LOG.error("ReadFailedException" + e3.getMessage());
+ } catch (InterruptedException | ExecutionException | ReadFailedException e) {
+ LOG.error("Error processing data-tree changes", e);
}
});
}
@Singleton
public final class ManagerListener extends AsyncClusteredDataTreeChangeListenerBase<Managers, ManagerListener> {
- private static final Logger LOG = LoggerFactory.getLogger(HAOpClusteredListener.class);
+ private static final Logger LOG = LoggerFactory.getLogger(ManagerListener.class);
private final DataBroker dataBroker;
public abstract class MergeCommandsAggregator<BuilderTypeT extends Builder, AugTypeT extends DataObject> {
- public static final Logger LOG = LoggerFactory.getLogger(MergeCommandsAggregator.class);
+ private static final Logger LOG = LoggerFactory.getLogger(MergeCommandsAggregator.class);
protected Map<Class<?>, MergeCommand> commands = new HashMap<>();
public abstract class ChildListener<P extends DataObject, C extends DataObject, G>
implements DataTreeChangeListener<P>, AutoCloseable {
- public static final Logger LOG = LoggerFactory.getLogger(ChildListener.class);
+ private static final Logger LOG = LoggerFactory.getLogger(ChildListener.class);
private static final long STARTUP_LOOP_TICK = 500;
private static final int STARTUP_LOOP_MAX_RETRIES = 8;
LOG.trace("Updating cache for node {}", globalNodeIid);
L2GatewayDevice l2GwDevice = l2GatewayCache.get(psName);
if (childConnectedAfterParent.test(l2GwDevice, globalNodeIid)) {
- LOG.trace("Device {} {} is already Connected by ",
+ LOG.trace("Device {} {} is already Connected by {}",
psName, globalNodeId, l2GwDevice.getHwvtepNodeId());
return;
}
l2GwDevice.getL2GatewayIds(), psName, tunnelIpAddr);
l2gwServiceProvider.provisionItmAndL2gwConnection(l2GwDevice, psName, hwvtepNodeId, tunnelIpAddr);
} else {
- LOG.info("l2gw.provision.skip {}", hwvtepNodeId, psName);
+ LOG.info("l2gw.provision.skip {}:{}", hwvtepNodeId, psName);
}
}
elanClusterUtils.runOnlyInOwnerNode("Stale entry cleanup", () -> {
import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node;
import org.opendaylight.yangtools.yang.binding.DataObject;
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
@Singleton
public class LocalUcastMacListener extends ChildListener<Node, LocalUcastMacs, String>
implements ClusteredDataTreeChangeListener<Node> {
+ private static final Logger LOG = LoggerFactory.getLogger(LocalUcastMacListener.class);
public static final String NODE_CHECK = "physical";
private static final Predicate<InstanceIdentifier<Node>> IS_PS_NODE_IID =
@Override
public void onFailure(Throwable throwable) {
- LOG.error("Failed to read config topology node ", nodeIid);
+ LOG.error("Failed to read config topology node {}", nodeIid);
}
}, MoreExecutors.directExecutor());
}
@Override
public void onFailure(Throwable error) {
- LOG.warn(String.format("Failed during batch delete of elan [%s] macs from l2gw device [%s]. "
- + "Retrying with sequential deletes.", elanName, hwvtepNodeId), error);
+ LOG.warn("Failed during batch delete of elan {} macs from l2gw device {}. "
+ + "Retrying with sequential deletes.", elanName, hwvtepNodeId, error);
if (lstElanMacs != null && !lstElanMacs.isEmpty()) {
for (MacAddress mac : lstElanMacs) {
HwvtepUtils.deleteRemoteUcastMac(broker, new NodeId(hwvtepNodeId), logicalSwitch, mac);
dpId = rpcResult.getResult().getDpid();
}
} catch (InterruptedException | ExecutionException e) {
- LOG.error("Failed to get the DPN ID for interface {}: {} ", interfaceName, e);
+ LOG.error("Failed to get the DPN ID for interface {}", interfaceName, e);
}
return dpId;
}
if (rpcResult.isSuccessful()) {
LOG.info("Created ITM tunnels for {}", hwvtepId);
} else {
- LOG.error("Failed to create ITM Tunnels: ", rpcResult.getErrors());
+ LOG.error("Failed to create ITM Tunnels: {}", rpcResult.getErrors());
}
} catch (InterruptedException | ExecutionException e) {
LOG.error("RPC to create ITM tunnels failed", e);
elanItmUtils.getExternalTunnelItmEgressAction(dpId, new NodeId(extDeviceNodeId), vni);
mkInstructions.add(MDSALUtil.buildApplyActionsInstruction(actions));
} catch (Exception e) {
- LOG.error("Could not get Egress Actions for DpId=" + dpId + ", externalNode=" + extDeviceNodeId, e);
+ LOG.error("Could not get Egress Actions for DpId {} externalNode {}", dpId, extDeviceNodeId, e);
}
return MDSALUtil.buildFlowNew(NwConstants.ELAN_DMAC_TABLE,
public void updateElanInterfaceForwardingTablesList(String elanInstanceName, String interfaceName,
String existingInterfaceName, MacEntry mac, WriteTransaction tx) {
if (existingInterfaceName.equals(interfaceName)) {
- LOG.error(String.format(
- "Static MAC address %s has already been added for the same ElanInstance "
- + "%s on the same Logical Interface Port %s."
+ LOG.error("Static MAC address {} has already been added for the same ElanInstance "
+ + "{} on the same Logical Interface Port {}."
+ " No operation will be done.",
- mac.getMacAddress().toString(), elanInstanceName, interfaceName));
+ mac.getMacAddress().toString(), elanInstanceName, interfaceName);
} else {
- LOG.warn(String.format(
- "Static MAC address %s had already been added for ElanInstance %s on Logical Interface Port %s. "
+ LOG.warn("Static MAC address {} had already been added for ElanInstance {} on Logical Interface Port {}. "
+ "This would be considered as MAC movement scenario and old static mac will be removed "
+ "and new static MAC will be added"
- + "for ElanInstance %s on Logical Interface Port %s",
- mac.getMacAddress().toString(), elanInstanceName, interfaceName, elanInstanceName, interfaceName));
+ + "for ElanInstance {} on Logical Interface Port {}",
+ mac.getMacAddress().toString(), elanInstanceName, interfaceName, elanInstanceName, interfaceName);
//Update the ElanInterface Forwarding Container & ElanForwarding Container
deleteElanInterfaceForwardingTablesList(existingInterfaceName, mac, tx);
createElanInterfaceForwardingTablesList(interfaceName, mac, tx);
LOG.warn("RPC call to ITM.GetExternalTunnelInterfaceName failed with error: {}", rpcResult.getErrors());
}
} catch (NullPointerException | InterruptedException | ExecutionException e) {
- LOG.error("Failed to get external tunnel interface name for sourceNode: {} and dstNode: {}: {} ",
+ LOG.error("Failed to get external tunnel interface name for sourceNode: {} and dstNode: {}",
sourceNode, dstNode, e);
}
return tunnelInterfaceName;
if (etreeInterface != null && etreeInterface.getEtreeInterfaceType() == EtreeInterfaceType.Root) {
EtreeLeafTagName etreeTagName = elanEtreeUtils.getEtreeLeafTagByElanTag(elanTag);
if (etreeTagName == null) {
- LOG.warn("Interface " + interfaceName
- + " seems like it belongs to Etree but etreeTagName from elanTag " + elanTag + " is null.");
+ LOG.warn("Interface {} seems like it belongs to Etree but etreeTagName from elanTag {} is null.",
+ interfaceName, elanTag);
} else {
flowEntity = buildRemoteDmacFlowEntry(srcDpId, destDpId, lportTagOrVni,
etreeTagName.getEtreeLeafTag().getValue(), macAddress, displayName, elanInstance);
}
mkInstructions.add(MDSALUtil.buildApplyActionsInstruction(actions));
} catch (Exception e) {
- LOG.error("Could not get egress actions to add to flow for srcDpId=" + srcDpId + ", destDpId=" + destDpId
- + ", lportTag/VNI=" + lportTagOrVni, e);
+ LOG.error("Could not get egress actions to add to flow for srcDpId {}, destDpId {}, lportTag/VNI {}",
+ srcDpId, destDpId, lportTagOrVni, e);
}
Flow flow = MDSALUtil.buildFlowNew(NwConstants.ELAN_DMAC_TABLE,
}
} catch (InterruptedException | ExecutionException e) {
LOG.error("Error in RPC call removeTerminatingServiceActions for ELAN with serviceId {} on "
- + "dpn {}: {}", serviceId, destDpId, e);
+ + "dpn {}", serviceId, destDpId, e);
}
}
elanInstanceCache.get(elanInt.getElanInstanceName()).orNull())) {
return true;
} else {
- LOG.debug("Non-VXLAN elanInstance: " + elanInt.getElanInstanceName());
+ LOG.debug("Non-VXLAN elanInstance: {}", elanInt.getElanInstanceName());
}
}
String localIp = southBoundUtils.getOpenvswitchOtherConfig(node.get(), LOCAL_IP);
if (localIp == null) {
LOG.error("missing local_ip key in ovsdb:openvswitch-other-configs in operational"
- + " network-topology for node: " + node.get().getNodeId().getValue());
+ + " network-topology for node: {}", node.get().getNodeId().getValue());
} else {
return localIp;
}
Optional<BridgeRefEntry> optionalBridgeRefEntry =
tx.read(LogicalDatastoreType.OPERATIONAL, bridgeRefInfoPath).checkedGet();
if (!optionalBridgeRefEntry.isPresent()) {
- LOG.error("no bridge ref entry found for dpnId: " + dpnId);
+ LOG.error("no bridge ref entry found for dpnId {}", dpnId);
return Optional.absent();
}
// FIXME: Read this through a cache
Optional<Node> optionalNode = tx.read(LogicalDatastoreType.OPERATIONAL, nodeId).checkedGet();
if (!optionalNode.isPresent()) {
- LOG.error("missing node for dpnId: " + dpnId);
+ LOG.error("missing node for dpnId {}", dpnId);
}
return optionalNode;
}