From 1b799a2792fee52f8016a5b31fb69b0f2168c063 Mon Sep 17 00:00:00 2001 From: alena Date: Fri, 12 Aug 2011 19:29:14 -0700 Subject: [PATCH] Fixed db upgrade issue for 229-2210 firewall rules --- server/src/com/cloud/upgrade/dao/Upgrade229to2210.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/server/src/com/cloud/upgrade/dao/Upgrade229to2210.java b/server/src/com/cloud/upgrade/dao/Upgrade229to2210.java index 0e8b74187cd..40e1fca18d7 100644 --- a/server/src/com/cloud/upgrade/dao/Upgrade229to2210.java +++ b/server/src/com/cloud/upgrade/dao/Upgrade229to2210.java @@ -104,10 +104,12 @@ public class Upgrade229to2210 implements DbUpgrade { pstmt.executeUpdate(); //get new FirewallRule update - pstmt = conn.prepareStatement("SELECT id from firewall_rules where purpose='Firewall' and start_port=? and end_port=? and protocol=?"); + pstmt = conn.prepareStatement("SELECT id from firewall_rules where purpose='Firewall' and start_port=? and end_port=? and protocol=? and ip_address_id=? and network_id=?"); pstmt.setInt(1, startPort); pstmt.setInt(2, endPort); pstmt.setString(3, protocol); + pstmt.setLong(4, ipId); + pstmt.setLong(5, networkId); ResultSet rs1 = pstmt.executeQuery();