Updated Branches:
  refs/heads/master 6906a9016 -> 19c7cecde

CLOUDSTACK-4065: db upgrade - when insert placeHolder nic for Shared networks, 
always mark this nic as non-default explicitly

Conflicts:
        engine/schema/src/com/cloud/upgrade/dao/Upgrade410to420.java


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

Branch: refs/heads/master
Commit: 19c7cecde4d3d39dd1d06bb9451406f926126008
Parents: 6906a90
Author: Alena Prokharchyk <[email protected]>
Authored: Mon Aug 5 09:00:54 2013 -0700
Committer: Alena Prokharchyk <[email protected]>
Committed: Mon Aug 5 09:21:08 2013 -0700

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


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/19c7cecd/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 20a8777..01cc6f4 100644
--- a/engine/schema/src/com/cloud/upgrade/dao/Upgrade410to420.java
+++ b/engine/schema/src/com/cloud/upgrade/dao/Upgrade410to420.java
@@ -31,11 +31,8 @@ import java.util.List;
 import java.util.Map;
 import java.util.Set;
 import java.util.UUID;
-
 import org.apache.log4j.Logger;
-
 import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreProvider;
-
 import com.cloud.deploy.DeploymentPlanner;
 import com.cloud.hypervisor.Hypervisor.HypervisorType;
 import com.cloud.network.vpc.NetworkACL;
@@ -680,13 +677,13 @@ public class Upgrade410to420 implements DbUpgrade {
                 String ip = rs.getString(3);
                 String uuid = UUID.randomUUID().toString();
                 //Insert placeholder nic for each Domain router nic in Shared 
network
-                pstmt = conn.prepareStatement("INSERT INTO `cloud`.`nics` 
(uuid, ip4_address, gateway, network_id, state, strategy, vm_type) VALUES (?, 
?, ?, ?, 'Reserved', 'PlaceHolder', 'DomainRouter')");
+                pstmt = conn.prepareStatement("INSERT INTO `cloud`.`nics` 
(uuid, ip4_address, gateway, network_id, state, strategy, vm_type, default_nic, 
created) VALUES (?, ?, ?, ?, 'Reserved', 'PlaceHolder', 'DomainRouter', 0, 
now())");
                 pstmt.setString(1, uuid);
                 pstmt.setString(2, ip);
                 pstmt.setString(3, gateway);
                 pstmt.setLong(4, networkId);
                 pstmt.executeUpdate();
-                s_logger.debug("Created placeholder nic for the ipAddress " + 
ip);
+                s_logger.debug("Created placeholder nic for the ipAddress " + 
ip + " and network " + networkId);
 
             }
         } catch (SQLException e) {

Reply via email to