Skip to content

Commit 3b48299

Browse files
author
Kishan Kavala
committed
CLOUDSTACK-2664: Fixed delete query. Added log message when CloudRuntimeException is thrown during upgrade
1 parent 3e02a76 commit 3b48299

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

engine/schema/src/com/cloud/upgrade/DatabaseUpgradeChecker.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,10 @@ protected void upgrade(String dbVersion, String currentVersion) {
261261
}
262262

263263
txn.commit();
264-
} finally {
264+
} catch (CloudRuntimeException e){
265+
s_logger.error("Unable to upgrade the database", e);
266+
throw new CloudRuntimeException("Unable to upgrade the database", e);
267+
}finally {
265268
txn.close();
266269
}
267270
}

engine/schema/src/com/cloud/upgrade/dao/Upgrade410to420.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -759,7 +759,7 @@ private void removeFirewallServiceFromSharedNetworkOfferingWithSGService(Connect
759759
while (rs.next()) {
760760
long id = rs.getLong(1);
761761
// remove Firewall service for SG shared network offering
762-
pstmt = conn.prepareStatement("DELETE `cloud`.`ntwk_offering_service_map` where network_offering_id=? and service='Firewall'");
762+
pstmt = conn.prepareStatement("DELETE from `cloud`.`ntwk_offering_service_map` where network_offering_id=? and service='Firewall'");
763763
pstmt.setLong(1, id);
764764
pstmt.executeUpdate();
765765
}

0 commit comments

Comments
 (0)