mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-02 20:02:29 +01:00
bug 7123: populate private/linkLocal ip addresses when addPod - added stmt.executeBatch() call to addIpRange methods.
status 7123: resolved fixed
This commit is contained in:
parent
3c1fd1a599
commit
6946f5ace1
@ -55,6 +55,7 @@ public class DataCenterIpAddressDaoImpl extends GenericDaoBase<DataCenterIpAddre
|
||||
txn.start();
|
||||
DataCenterIpAddressVO vo = lockOneRandomRow(sc, true);
|
||||
if (vo == null) {
|
||||
txn.rollback();
|
||||
return null;
|
||||
}
|
||||
vo.setTakenAt(new Date());
|
||||
@ -102,10 +103,11 @@ public class DataCenterIpAddressDaoImpl extends GenericDaoBase<DataCenterIpAddre
|
||||
stmt.setLong(3, podId);
|
||||
stmt.addBatch();
|
||||
}
|
||||
stmt.executeBatch();
|
||||
txn.commit();
|
||||
} catch (SQLException ex) {
|
||||
throw new CloudRuntimeException("Unable to persist ip address range ", ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void releaseIpAddress(String ipAddress, long dcId, Long instanceId) {
|
||||
|
||||
@ -94,6 +94,7 @@ public class DataCenterLinkLocalIpAddressDaoImpl extends GenericDaoBase<DataCent
|
||||
stmt.setLong(3, podId);
|
||||
stmt.addBatch();
|
||||
}
|
||||
stmt.executeBatch();
|
||||
txn.commit();
|
||||
} catch (SQLException e) {
|
||||
throw new CloudRuntimeException("Unable to insert", e);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user