You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by we...@apache.org on 2014/12/11 08:33:58 UTC
git commit: updated refs/heads/4.5 to 9bfb8e5
Repository: cloudstack
Updated Branches:
refs/heads/4.5 e59dac201 -> 9bfb8e571
CLOUDSTACK-2823: pass cmdline info to system vms for 30 times
(cherry picked from commit 4eedfe53fcbab1d47b09eacaca1d803b67b6c4d2)
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/9bfb8e57
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/9bfb8e57
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/9bfb8e57
Branch: refs/heads/4.5
Commit: 9bfb8e571934f70d00a69c3aa58cf848d016afb9
Parents: e59dac2
Author: Wei Zhou <w....@tech.leaseweb.com>
Authored: Mon Dec 8 15:45:29 2014 +0100
Committer: Wei Zhou <w....@tech.leaseweb.com>
Committed: Thu Dec 11 08:33:42 2014 +0100
----------------------------------------------------------------------
.../kvm/resource/LibvirtComputingResource.java | 29 +++++++++-----------
.../debian/config/etc/init.d/cloud-early-config | 4 +--
2 files changed, 15 insertions(+), 18 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/9bfb8e57/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 576abe6..68c776a 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
@@ -3831,24 +3831,21 @@ public class LibvirtComputingResource extends ServerResourceBase implements Serv
// 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();
- }
- }
- 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;
- }
+ //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;
}
- } else {
+ }
+ 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;
+ }
}
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/9bfb8e57/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 294ae5f..f7d752d 100755
--- a/systemvm/patches/debian/config/etc/init.d/cloud-early-config
+++ b/systemvm/patches/debian/config/etc/init.d/cloud-early-config
@@ -117,7 +117,7 @@ get_boot_params() {
if [ ! -e /dev/vport0p1 ]; then
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:/}
@@ -128,7 +128,7 @@ get_boot_params() {
echo $pubkey > /root/.ssh/authorized_keys
fi
done < /dev/vport0p1
- done
+ done
chmod go-rwx /root/.ssh/authorized_keys
;;
vmware)