Updated Branches:
  refs/heads/4.2 c94310ca3 -> b1a34ef33

41-42 DB upgrade: fixed physicalNetworkUpdate method - one of the 
preparedStatement elements wasn't set


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/b1a34ef3
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/b1a34ef3
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/b1a34ef3

Branch: refs/heads/4.2
Commit: b1a34ef3359d7bad47c41f234b925258511a07ac
Parents: c94310c
Author: Alena Prokharchyk <[email protected]>
Authored: Mon Jul 1 11:54:30 2013 -0700
Committer: Alena Prokharchyk <[email protected]>
Committed: Mon Jul 1 11:54:30 2013 -0700

----------------------------------------------------------------------
 engine/schema/src/com/cloud/upgrade/dao/Upgrade410to420.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b1a34ef3/engine/schema/src/com/cloud/upgrade/dao/Upgrade410to420.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/upgrade/dao/Upgrade410to420.java 
b/engine/schema/src/com/cloud/upgrade/dao/Upgrade410to420.java
index a70f4b9..da68348 100644
--- a/engine/schema/src/com/cloud/upgrade/dao/Upgrade410to420.java
+++ b/engine/schema/src/com/cloud/upgrade/dao/Upgrade410to420.java
@@ -1112,6 +1112,7 @@ public class Upgrade410to420 implements DbUpgrade {
                 //Add internal lb vm to the list of physical network elements
                 PreparedStatement pstmt1 = conn.prepareStatement("SELECT id 
FROM `cloud`.`physical_network_service_providers`" +
                                " WHERE physical_network_id=? AND 
provider_name='InternalLbVm'");
+                pstmt1.setLong(1, pNtwkId);
                 ResultSet rs1 = pstmt1.executeQuery();
                 while (rs1.next()) {
                     long providerId = rs1.getLong(1);
@@ -1124,7 +1125,7 @@ public class Upgrade410to420 implements DbUpgrade {
             }
 
         } catch (SQLException e) {
-            throw new CloudRuntimeException("Unable existing physical networks 
with internal lb provider", e);
+            throw new CloudRuntimeException("Unable to update existing 
physical networks with internal lb provider", e);
         } finally {
             try {
                 if (rs != null) {

Reply via email to