You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ra...@apache.org on 2015/03/04 08:12:49 UTC

git commit: updated refs/heads/master to 7c1590f

Repository: cloudstack
Updated Branches:
  refs/heads/master 619f01425 -> 7c1590ffd


kvm: Check the return value of the cloudstack-setup-agent command

Bug-Url: https://issues.apache.org/jira/browse/CLOUDSTACK-8016
Signed-off-by: Laszlo Hornyak <la...@gmail.com>
Signed-off-by: Rajani Karuturi <ra...@gmail.com>

This closes #93


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

Branch: refs/heads/master
Commit: 7c1590ffd67b74f52fe374b0fb91f8c1ef731c39
Parents: 619f014
Author: Laszlo Hornyak <la...@gmail.com>
Authored: Sat Jan 17 22:09:16 2015 +0100
Committer: Rajani Karuturi <ra...@gmail.com>
Committed: Wed Mar 4 12:42:14 2015 +0530

----------------------------------------------------------------------
 .../hypervisor/kvm/discoverer/LibvirtServerDiscoverer.java    | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7c1590ff/server/src/com/cloud/hypervisor/kvm/discoverer/LibvirtServerDiscoverer.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/hypervisor/kvm/discoverer/LibvirtServerDiscoverer.java b/server/src/com/cloud/hypervisor/kvm/discoverer/LibvirtServerDiscoverer.java
index d475f4d..350b9a7 100644
--- a/server/src/com/cloud/hypervisor/kvm/discoverer/LibvirtServerDiscoverer.java
+++ b/server/src/com/cloud/hypervisor/kvm/discoverer/LibvirtServerDiscoverer.java
@@ -205,7 +205,12 @@ public abstract class LibvirtServerDiscoverer extends DiscovererBase implements
             parameters += " --guestNic=" + kvmGuestNic;
             parameters += " --hypervisor=" + cluster.getHypervisorType().toString().toLowerCase();
 
-            SSHCmdHelper.sshExecuteCmd(sshConnection, "cloudstack-setup-agent " + parameters, 3);
+            if (!SSHCmdHelper.sshExecuteCmd(sshConnection,
+                    "cloudstack-setup-agent " + parameters, 3)) {
+                s_logger.info("cloudstack agent setup command failed: "
+                        + "cloudstack-setup-agent " + parameters);
+                return null;
+            }
 
             KvmDummyResourceBase kvmResource = new KvmDummyResourceBase();
             Map<String, Object> params = new HashMap<String, Object>();