jshotnik opened a new issue, #14430:
URL: https://github.com/apache/cloudstack/issues/14430
### problem
NetworkHelperImpl.java line 761 (4.23.0.0 and main) is:
`publicConfig.put(publicNetworks.get(0), List.of(defaultNic));`
List.of returns an immutable list.
VpcNetworkHelperImpl.reallocateRouterNetworks (line 165) then calls addAll on
it and throws UnsupportedOperationException (ImmutableCollections.addAll),
through NetworkHelperImpl.deployRouterWithTemplates (line 542) and
VpcManagerImpl.rollingRestartVpc (line 4046). 4.22.0.0 used new
ArrayList<NicProfile>(Arrays.asList(defaultNic)).
The API answers "Internal Server Error". The rolling restart has already
destroyed the backup router, and the new router stays Stopped.
Related: #12621 (fixed by #12622 in 4.22) has the same setup but a different
error ("cidr is not formatted correctly"). This one is a separate bug.
### versions
CloudStack 4.23.0.0 and main. 4.22.0.0 is not affected. KVM.
### The steps to reproduce the bug
1. A zone with public IP ranges on two VLANs.
2. A redundant VPC with its source NAT IP on the first VLAN.
3. Acquire a second public IP from the second VLAN and enable static NAT on
it to a VM in the VPC. (A bare IP with no NAT or rule does not reach this code
path; see VpcManagerImpl.isIpAllocatedToVpc.)
4. restartVPC cleanup=true.
### What to do about it?
Use a mutable list again, for example:
`publicConfig.put(publicNetworks.get(0), new
ArrayList<>(List.of(defaultNic)));`
We carry this one-line change. With it, the new routers get NICs on both
VLANs and the restart succeeds.
--
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]