You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there a situation where a pod can have multiple IPs as shown below?
// Check if start IP and end IP of all the ranges lie in the CIDR subnet.
final String[] existingPodIpRanges = pod.getDescription().split(",");
for(String podIpRange: existingPodIpRanges) {
final String[] existingPodIpRange = podIpRange.split("-");
if (existingPodIpRange.length > 1) {
if (!NetUtils.isValidIp4(existingPodIpRange[0]) || !NetUtils.isValidIp4(existingPodIpRange[1])) {
continue;
}
if (!NetUtils.getCidrSubNet(existingPodIpRange[0], cidrSize).equalsIgnoreCase(NetUtils.getCidrSubNet(cidrAddress, cidrSize))) {
throw new InvalidParameterValueException("The start address of the some IP range is not in the CIDR subnet.");
}
if (!NetUtils.getCidrSubNet(existingPodIpRange[1], cidrSize).equalsIgnoreCase(NetUtils.getCidrSubNet(cidrAddress, cidrSize))) {
throw new InvalidParameterValueException("The end address of the some IP range is not in the CIDR subnet.");
}
if (NetUtils.ipRangesOverlap(existingPodIpRange[0], existingPodIpRange[1], gateway, gateway)) {
throw new InvalidParameterValueException("The gateway shouldn't overlap some start/end ip addresses");
}
}
}
Also, I'm curious as to why the pod start and end IP details are stored as a string in the description field? cc @DaanHoogland @rhtyd
Activity
kioie commentedon Apr 23, 2019
Is there a situation where a pod can have multiple IPs as shown below?
Also, I'm curious as to why the pod start and end IP details are stored as a string in the description field? cc @DaanHoogland @rhtyd
apache#2797
apache#2797
andrijapanicsb commentedon Jan 3, 2020
Fixes for this issue are being done in PR #3292 - I'll close the issue here and let's continue the discussion in the PR.