Repository: cloudstack Updated Branches: refs/heads/4.4 fdf47a221 -> 3b5e5a343
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 <[email protected]> Signed-off-by: Rajani Karuturi <[email protected]> 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/312d531a Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/312d531a Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/312d531a Branch: refs/heads/4.4 Commit: 312d531a7cfa09d83972748d7cd8df2e71feb2bf Parents: fdf47a2 Author: Laszlo Hornyak <[email protected]> Authored: Sat Jan 17 22:09:16 2015 +0100 Committer: Daan Hoogland <[email protected]> Committed: Tue May 26 17:42:20 2015 +0200 ---------------------------------------------------------------------- .../hypervisor/kvm/discoverer/LibvirtServerDiscoverer.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/312d531a/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>();
