cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From weiz...@apache.org
Subject git commit: updated refs/heads/4.2 to 22c6df0
Date Fri, 12 Jul 2013 07:48:02 GMT
Updated Branches:
  refs/heads/4.2 87a2a9544 -> 22c6df0ba


CLOUDSTACK-2823: try passCmdLine some times if kernel < 2.6.34 and qemu < 1.1.0 on hypervisor
(for instance, CentOS 6.4)


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

Branch: refs/heads/4.2
Commit: 22c6df0ba25f1f1fd3cf489a29ed1f4f4097c89c
Parents: 87a2a95
Author: Wei Zhou <w.zhou@leaseweb.com>
Authored: Fri Jul 12 09:47:12 2013 +0200
Committer: Wei Zhou <w.zhou@leaseweb.com>
Committed: Fri Jul 12 09:47:12 2013 +0200

----------------------------------------------------------------------
 .../kvm/resource/LibvirtComputingResource.java      | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/22c6df0b/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 914017c..24f9ee0 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
@@ -3318,7 +3318,21 @@ ServerResource {
 
             // pass cmdline info to system vms
             if (vmSpec.getType() != VirtualMachine.Type.User) {
-                passCmdLine(vmName, vmSpec.getBootArgs() );
+                String unameKernelVersion = Script.runSimpleBashScript("uname -r");
+                String[] kernelVersions = unameKernelVersion.split("[\\.\\-]");
+                long kernelVersion = Integer.parseInt(kernelVersions[0]) * 1000 * 1000 +
Integer.parseInt(kernelVersions[1]) * 1000 + Integer.parseInt(kernelVersions[2]);
+                if ((kernelVersion < 2006034) && (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)
+                    for (int count = 0; count < 10; count ++) {
+                        passCmdLine(vmName, vmSpec.getBootArgs());
+                        try {
+                            Thread.sleep(5000);
+                        } catch (InterruptedException e) {
+                            s_logger.trace("Ignoring InterruptedException.", e);
+                        }
+                    }
+                } else {
+                    passCmdLine(vmName, vmSpec.getBootArgs() );
+                }
             }
 
             state = State.Running;


Mime
View raw message