From 8d44058010a4270c326b39fbc515f8cd7c1b776b Mon Sep 17 00:00:00 2001 From: alena Date: Thu, 17 Mar 2011 17:49:59 -0700 Subject: [PATCH] Fix for PF/LB 2.1.7 to 2.2.2 upgrade --- server/src/com/cloud/upgrade/dao/Upgrade217to22.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/src/com/cloud/upgrade/dao/Upgrade217to22.java b/server/src/com/cloud/upgrade/dao/Upgrade217to22.java index e24ad937624..0214ef2175d 100644 --- a/server/src/com/cloud/upgrade/dao/Upgrade217to22.java +++ b/server/src/com/cloud/upgrade/dao/Upgrade217to22.java @@ -898,7 +898,7 @@ public class Upgrade217to22 implements DbUpgrade { //update firewall_rules table s_logger.trace("Updating firewall_rules table as a part of PF rules upgrade..."); - pstmt = conn.prepareStatement("INSERT INTO firewall_rules VALUES (?, ?, ?, ?, 'Active', ?, 'PortForwarding', ?, ?, ?, ?, now())"); + pstmt = conn.prepareStatement("INSERT INTO firewall_rules (id, ip_address_id, start_port, end_port, state, protocol, purpose, account_id, domain_id, network_id, xid, is_static_nat, created) VALUES (?, ?, ?, ?, 'Active', ?, 'PortForwarding', ?, ?, ?, ?, 0, now())"); pstmt.setLong(1, id); pstmt.setInt(2, ipAddressId); pstmt.setInt(3, Integer.valueOf(sourcePort)); @@ -1005,7 +1005,7 @@ public class Upgrade217to22 implements DbUpgrade { //update firewall_rules table s_logger.trace("Updating firewall_rules table as a part of LB rules upgrade..."); - pstmt = conn.prepareStatement("INSERT INTO firewall_rules VALUES (?, ?, ?, ?, 'Active', ?, 'LoadBalancing', ?, ?, ?, ?, now())"); + pstmt = conn.prepareStatement("INSERT INTO firewall_rules (id, ip_address_id, start_port, end_port, state, protocol, purpose, account_id, domain_id, network_id, xid, is_static_nat, created) VALUES (?, ?, ?, ?, 'Active', ?, 'LoadBalancing', ?, ?, ?, ?, 0, now())"); pstmt.setLong(1, newLbId); pstmt.setInt(2, ipAddressId); pstmt.setInt(3, Integer.valueOf(sourcePort));