mirror of https://github.com/apache/cloudstack.git
Fixed deployDb - in setRAWformatForRBDVolumes use executeUpdate instead of executeQuery when perform an update with the prepared statement
This commit is contained in:
parent
95d7c499ce
commit
e9239b83a0
|
|
@ -2619,9 +2619,9 @@ public class Upgrade412to420 implements DbUpgrade {
|
|||
try {
|
||||
s_logger.debug("Setting format to RAW for all volumes on RBD primary storage pools");
|
||||
pstmt = conn.prepareStatement("UPDATE volumes SET format = 'RAW' WHERE pool_id IN(SELECT id FROM storage_pool WHERE pool_type = 'RBD')");
|
||||
pstmt.executeQuery();
|
||||
pstmt.executeUpdate();
|
||||
} catch (SQLException e) {
|
||||
throw new CloudRuntimeException("Failed to update volume format to RAW for volumes on RBD pools");
|
||||
throw new CloudRuntimeException("Failed to update volume format to RAW for volumes on RBD pools due to exception ", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue