Repository: cloudstack
Updated Branches:
  refs/heads/4.3 314e2dace -> 1e09494a4


CLOUDSTACK-2823: pass cmdline info to system vms for 30 times

(cherry picked from commit 4eedfe53fcbab1d47b09eacaca1d803b67b6c4d2)
Signed-off-by: Rohit Yadav <[email protected]>

Conflicts:
        
plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
        systemvm/patches/debian/config/etc/init.d/cloud-early-config


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

Branch: refs/heads/4.3
Commit: 1e09494a4e6cc0aed0ecd1536d7806dbb88fb69d
Parents: 314e2da
Author: Wei Zhou <[email protected]>
Authored: Mon Dec 8 15:45:29 2014 +0100
Committer: Rohit Yadav <[email protected]>
Committed: Mon Dec 8 22:06:16 2014 +0530

----------------------------------------------------------------------
 .../kvm/resource/LibvirtComputingResource.java  | 29 +++++++++-----------
 .../debian/config/etc/init.d/cloud-early-config |  2 +-
 2 files changed, 14 insertions(+), 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1e09494a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
----------------------------------------------------------------------
diff --git 
a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
 
b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
index c65fed8..bdda2dc 100755
--- 
a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
+++ 
b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
@@ -3692,24 +3692,21 @@ ServerResource {
 
             // pass cmdline info to system vms
             if (vmSpec.getType() != VirtualMachine.Type.User) {
-                if ((conn.getVersion() < 1001000)) { // CLOUDSTACK-2823: try 
passCmdLine some times if kernel < 2.6.34 and qemu < 1.1.0 on hypervisor (for 
instance, CentOS 6.4)
-                    //wait for 5 minutes at most
-                    String controlIp = null;
-                    for (NicTO nic : nics) {
-                        if (nic.getType() == TrafficType.Control) {
-                            controlIp = nic.getIp();
-                        }
+                //wait and try passCmdLine for 5 minutes at most for 
CLOUDSTACK-2823
+                String controlIp = null;
+                for (NicTO nic : nics) {
+                    if (nic.getType() == TrafficType.Control) {
+                        controlIp = nic.getIp();
+                        break;
                     }
-                    for (int count = 0; count < 30; count ++) {
-                        passCmdLine(vmName, vmSpec.getBootArgs());
-                        //check router is up?
-                        boolean result = 
_virtRouterResource.connect(controlIp, 1, 5000);
-                        if (result) {
-                            break;
-                        }
+                }
+                for (int count = 0; count < 30; count++) {
+                    passCmdLine(vmName, vmSpec.getBootArgs());
+                    //check router is up?
+                    boolean result = _virtRouterResource.connect(controlIp, 1, 
5000);
+                    if (result) {
+                        break;
                     }
-                } else {
-                    passCmdLine(vmName, vmSpec.getBootArgs() );
                 }
             }
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1e09494a/systemvm/patches/debian/config/etc/init.d/cloud-early-config
----------------------------------------------------------------------
diff --git a/systemvm/patches/debian/config/etc/init.d/cloud-early-config 
b/systemvm/patches/debian/config/etc/init.d/cloud-early-config
index e46db2b..1ccc7a3 100755
--- a/systemvm/patches/debian/config/etc/init.d/cloud-early-config
+++ b/systemvm/patches/debian/config/etc/init.d/cloud-early-config
@@ -118,7 +118,7 @@ get_boot_params() {
             log_it "/dev/vport0p1 not loaded, perhaps guest kernel is too 
old." && exit 2
           fi
 
-          while [$cmd -eq ""]; do
+          while [ -z "$cmd" ]; do
               while read line; do
                 if [[ $line == cmdline:* ]]; then
                   cmd=${line//cmdline:/}

Reply via email to