Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -661,7 +661,7 @@ private List<LbTO> makeLbTOs(final LoadBalancerStruct struct, VirtualRouterVmInv
VipInventory vipInUsed = vip == null ? vip6 : vip;
VmNicInventory publicNic = null;

if (vr != null) {
if (vr != null && vipInUsed != null) {
List<VmNicInventory> nics = vr.getVmNics().stream()
.filter(n -> StringUtils.equals(n.getL3NetworkUuid(), vipInUsed.getL3NetworkUuid()))
.collect(Collectors.toList());
Expand Down Expand Up @@ -2763,6 +2763,10 @@ public void callBack(String vrUuid, VirtualRouterHaTask task, Completion complet
}

LoadBalancerStruct s = JSONObjectUtil.toObject(task.getJsonData(), LoadBalancerStruct.class);
logger.debug(String.format("Refreshing LB[uuid:%s] on backup VR[uuid:%s], clearing VIP to avoid dual-master",
s.getLb().getUuid(), vrUuid));
s.setVip(null);
s.setIpv6Vip(null);
refreshLbToVirtualRouter(VirtualRouterVmInventory.valueOf(vrVO), s, completion);
}
};
Expand Down