This is definitely the cause of the regression. Sateesh/Jaypal, please revert your change. It doesn¹t do the correct cidd validation.
+ if((startIpFirst >= startIpSecond) && (endIpFirst <= endIpSecond)) + return true; You can¹t just compare CIDRs ip ranges as they may never cross. For example, 10.0.1.0/24 (10.0.1.0-10.0.1.255) and 10.0.2.0/24 (10.0.2.0-10.0.2.0) mentoned in the CLOUDSTACK-5652, with your code will be considered as overlapped. -Alena. On 12/26/13, 1:33 PM, "Marcus Sorensen" <[email protected]> wrote: >Could this be causing CLOUDSTACK-5652? I just see that it touches the >isNetworkAWithinNetworkB, which now seems to return true for >everything I try when deploying two networks in a vpc. > >On Thu, Dec 26, 2013 at 4:51 AM, ASF Subversion and Git Services ><[email protected]> wrote: >> >> ----------------------------------------------------------- >> This is an automatically generated e-mail. To reply, visit: >> https://reviews.apache.org/r/14124/#review30866 >> ----------------------------------------------------------- >> >> >> Commit ab4f095c68d4a4b4fb354b3d95096b193706987d in branch >>refs/heads/master from Saksham Srivastava >> [ https://git-wip-us.apache.org/repos/asf?p=cloudstack.git;h=ab4f095 ] >> >> CLOUDSTACK-4622:If a VM from guest network is added to network tier of >>VPC then IP reservation allows the CIDR to be a superset of Network CIDR >>for that VPC tier >> >> Signed-off-by: Jayapal <[email protected]> >> >> >> - ASF Subversion and Git Services >> >> >> On Dec. 24, 2013, 9:20 a.m., Saksham Srivastava wrote: >>> >>> ----------------------------------------------------------- >>> This is an automatically generated e-mail. To reply, visit: >>> https://reviews.apache.org/r/14124/ >>> ----------------------------------------------------------- >>> >>> (Updated Dec. 24, 2013, 9:20 a.m.) >>> >>> >>> Review request for cloudstack, Jayapal Reddy and Sateesh Chodapuneedi. >>> >>> >>> Bugs: CLOUDSTACK-4622 >>> https://issues.apache.org/jira/browse/CLOUDSTACK-4622 >>> >>> >>> Repository: cloudstack-git >>> >>> >>> Description >>> ------- >>> >>> Add a new utility method for comparing 2 CIDRs. >>> The method takes in 2 cidrs, cidrA and cidrB and returns true if >>>cidrA's IP range is equal or a subset of cidrB's IP range. >>> >>> >>> Diffs >>> ----- >>> >>> utils/src/com/cloud/utils/net/NetUtils.java f6f6285 >>> utils/test/com/cloud/utils/net/NetUtilsTest.java c7407bf >>> >>> Diff: https://reviews.apache.org/r/14124/diff/ >>> >>> >>> Testing >>> ------- >>> >>> Added unit test for the utility. >>> Tested locally. >>> Build is successful. >>> Patch applies cleanly. >>> >>> >>> Thanks, >>> >>> Saksham Srivastava >>> >>> >>
