jeanvetorello opened a new pull request, #12622:
URL: https://github.com/apache/cloudstack/pull/12622

    #12621
    … in NetworkVO.equals()
   
   When a network has multiple CIDRs (e.g. '192.168.2.0/24,160.0.0.0/24'), 
NetworkVO.equals() passes the raw comma-separated string to 
NetUtils.isNetworkAWithinNetworkB() which expects a single CIDR, causing 'cidr 
is not formatted correctly' error during VPC restart with cleanup=true.
   
   Extract only the first CIDR value before passing to NetUtils.
   
   ### Description
   
   This PR...
   <!--- Describe your changes in DETAIL - And how has behaviour functionally 
changed. -->
   
   <!-- For new features, provide link to FS, dev ML discussion etc. -->
   <!-- In case of bug fix, the expected and actual behaviours, steps to 
reproduce. -->
   
   <!-- When "Fixes: #<id>" is specified, the issue/PR will automatically be 
closed when this PR gets merged -->
   <!-- For addressing multiple issues/PRs, use multiple "Fixes: #<id>" -->
   <!-- Fixes: # -->
   
   <!--- 
******************************************************************************* 
-->
   <!--- NOTE: AUTOMATION USES THE DESCRIPTIONS TO SET LABELS AND PRODUCE 
DOCUMENTATION. -->
   <!--- PLEASE PUT AN 'X' in only **ONE** box -->
   <!--- 
******************************************************************************* 
-->
   
   ### Types of changes
   
    Bug fix (non-breaking change which fixes an issue)
   
   
   #### Bug Severity
   
   - [x] Major
   
   ### Screenshots (if appropriate):
   
   ### How Has This Been Tested?
   - Reproduced the issue on a CloudStack 4.21.0.0 environment with two public 
IP ranges
     on different VLANs assigned to the same VPC
   - Applied the fix and confirmed VPC restart with cleanup=true completes 
successfully
   - Verified unit tests pass for NetworkVO.equals() with both single and 
comma-separated CIDRs
   
   #### How did you try to break this feature and the system with this change?
   
   <!-- see how your change affects other areas of the code, etc. -->
   
   <!-- Please read the 
[CONTRIBUTING](https://github.com/apache/cloudstack/blob/main/CONTRIBUTING.md) 
document -->
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to