From 2b04360566d39e9b7fc0d0ecb966cf68bc088b83 Mon Sep 17 00:00:00 2001 From: kishan Date: Wed, 18 May 2011 00:44:36 +0530 Subject: [PATCH] bug 9891: update network_id for ExternalFirewall and ExternalLoadBalancer device_types status 9891: resolved fixed --- server/src/com/cloud/upgrade/dao/Upgrade222to224.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/server/src/com/cloud/upgrade/dao/Upgrade222to224.java b/server/src/com/cloud/upgrade/dao/Upgrade222to224.java index 3347ed7c4ed..e7daf07c2f4 100644 --- a/server/src/com/cloud/upgrade/dao/Upgrade222to224.java +++ b/server/src/com/cloud/upgrade/dao/Upgrade222to224.java @@ -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); } }