You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cloudstack.apache.org by Wei ZHOU <us...@gmail.com> on 2014/12/05 15:30:08 UTC

revert 83656a6ea81ce9b85c2f480e576fd02d8a58c357.

Hi David,

I just reverted commit 83656a6ea81ce9b85c2f480e576fd02d8a58c357.
because it bring another issue.

The systemvm/routers will reboot automatically in the startup if the
systemvm.iso changes.
In this case, they will stuck in its second start due to this commit,
because the virtio-port becomes empty in its first start.

We need to think about another way, maybe sleep before passCmdLine

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 2afc291..3772559 100644
---
a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
+++
b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
@@ -3834,6 +3834,11 @@ public class LibvirtComputingResource extends
ServerResourceBase implements Serv

             // pass cmdline info to system vms
             if (vmSpec.getType() != VirtualMachine.Type.User) {
+                try {
+                    Thread.sleep(1000);
+                } catch (InterruptedException e) {
+                    s_logger.debug("Interrupted while starting domain: " +
e.getMessage());
+                }
                 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;


-Wei