Commit ae455ee
VPC restart cleanup for Public networks with multi-CIDR data (#12622)
* Fix VPC restart with multi-CIDR networks: handle comma-separated CIDR 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.
* Fix root cause: skip CIDR/gateway updates for Public traffic type networks
addCidrAndGatewayForIpv4/Ipv6 (introduced by PR #11249) was called for all
network types without checking if the network is Public. This caused
comma-separated CIDRs to be stored on Public networks, which then triggered
'cidr is not formatted correctly' errors during VPC restart.
Add TrafficType.Public guard in both the VLAN creation (addCidr) and
VLAN deletion (removeCidr) paths in ConfigurationManagerImpl.
* Sanitize legacy network-level addressing fields for Public networks
---------
Co-authored-by: dahn <daan@onecht.net>1 parent 47c5bb8 commit ae455ee
File tree
2 files changed
+17
-5
lines changed- engine/schema/src/main/resources/META-INF/db
- server/src/main/java/com/cloud/configuration
2 files changed
+17
-5
lines changedLines changed: 9 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
37 | 46 | | |
38 | 47 | | |
39 | 48 | | |
| |||
Lines changed: 8 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5428 | 5428 | | |
5429 | 5429 | | |
5430 | 5430 | | |
5431 | | - | |
| 5431 | + | |
5432 | 5432 | | |
5433 | 5433 | | |
5434 | 5434 | | |
| |||
6507 | 6507 | | |
6508 | 6508 | | |
6509 | 6509 | | |
| 6510 | + | |
6510 | 6511 | | |
6511 | | - | |
6512 | | - | |
6513 | | - | |
6514 | | - | |
| 6512 | + | |
| 6513 | + | |
| 6514 | + | |
| 6515 | + | |
| 6516 | + | |
| 6517 | + | |
6515 | 6518 | | |
6516 | 6519 | | |
6517 | 6520 | | |
| |||
0 commit comments