bug 9891: update network_id for ExternalFirewall and ExternalLoadBalancer device_types

status 9891: resolved fixed
This commit is contained in:
kishan 2011-05-18 00:44:36 +05:30 committed by alena
parent 09c5351bbf
commit 4c454d36d3

View File

@ -295,9 +295,11 @@ public class Upgrade222to224 implements DbUpgrade {
rs.close();
pstmt.close();
s_logger.debug("Upgraded user_statistics with networkId for DomainRouter device type");
// update network_id information for ExternalFirewall and ExternalLoadBalancer device types
PreparedStatement pstmt1 = conn.prepareStatement("update user_statistics us, user_ip_address uip set us.network_id = uip.network_id where us.public_ip_address = uip.public_ip_address " +
"and us.device_type = ('ExternalFirewall' or 'ExternalLoadBalancer')");
"and us.device_type in ('ExternalFirewall' , 'ExternalLoadBalancer')");
pstmt1.executeUpdate();
pstmt1.close();
@ -306,7 +308,7 @@ public class Upgrade222to224 implements DbUpgrade {
s_logger.debug("Successfully update user_statistics table with network_ids as a part of 222 to 224 upgrade");
} catch (SQLException e) {
throw new CloudRuntimeException("Unable to update the Mode field for nics as a part of 222 to 224 upgrade", e);
throw new CloudRuntimeException("Unable to update user_statistics table with network_ids as a part of 222 to 224 upgrade", e);
}
}