mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-03 04:12:31 +01:00
CLOUDSTACK-1509. During CreateVLANIPRange while trying to assign Public IPs to a new network if the network offering is persistent we get an NPE.
Since associateIpRangeToAccount starts and commits a seaparte transaction, commit the transaction started for createVlanAndPublicIpRange before calling associateIpAddressListToAccount.
This commit is contained in:
parent
37bab18c68
commit
ee9f97f92e
@ -2330,10 +2330,10 @@ public class ConfigurationManagerImpl extends ManagerBase implements Configurati
|
|||||||
Vlan vlan = createVlanAndPublicIpRange(zoneId, networkId, physicalNetworkId, forVirtualNetwork, podId, startIP,
|
Vlan vlan = createVlanAndPublicIpRange(zoneId, networkId, physicalNetworkId, forVirtualNetwork, podId, startIP,
|
||||||
endIP, vlanGateway, vlanNetmask, vlanId, vlanOwner, startIPv6, endIPv6, ip6Gateway, ip6Cidr);
|
endIP, vlanGateway, vlanNetmask, vlanId, vlanOwner, startIPv6, endIPv6, ip6Gateway, ip6Cidr);
|
||||||
|
|
||||||
|
txn.commit();
|
||||||
if (associateIpRangeToAccount) {
|
if (associateIpRangeToAccount) {
|
||||||
_networkMgr.associateIpAddressListToAccount(userId, vlanOwner.getId(), zoneId, vlan.getId(), null);
|
_networkMgr.associateIpAddressListToAccount(userId, vlanOwner.getId(), zoneId, vlan.getId(), null);
|
||||||
}
|
}
|
||||||
txn.commit();
|
|
||||||
|
|
||||||
// Associate ips to the network
|
// Associate ips to the network
|
||||||
if (associateIpRangeToAccount) {
|
if (associateIpRangeToAccount) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user