Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public InputStream[] getPrepareScripts() {

@Override
public void performDataMigration(Connection conn) {
fixWrongPoolUuid(conn);
fixWrongDatastoreClusterPoolUuid(conn);
}

@Override
Expand Down Expand Up @@ -90,10 +90,11 @@ public void updateSystemVmTemplates(Connection conn) {
}
}

public void fixWrongPoolUuid(Connection conn) {
LOG.debug("Replacement of faulty pool uuids");
public void fixWrongDatastoreClusterPoolUuid(Connection conn) {
LOG.debug("Replacement of faulty pool uuids on datastorecluster");
try (PreparedStatement pstmt = conn.prepareStatement("SELECT id,uuid FROM storage_pool "
+ "WHERE uuid NOT LIKE \"%-%-%-%\" AND removed IS NULL;"); ResultSet rs = pstmt.executeQuery()) {
+ "WHERE uuid NOT LIKE \"%-%-%-%\" AND removed IS NULL "
+ "AND pool_type = 'DatastoreCluster';"); ResultSet rs = pstmt.executeQuery()) {
PreparedStatement updateStmt = conn.prepareStatement("update storage_pool set uuid = ? where id = ?");
while (rs.next()) {
UUID poolUuid = new UUID(
Expand Down