Return-Path: X-Original-To: apmail-incubator-cloudstack-commits-archive@minotaur.apache.org Delivered-To: apmail-incubator-cloudstack-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0CFF7DBE0 for ; Mon, 4 Mar 2013 14:44:43 +0000 (UTC) Received: (qmail 71395 invoked by uid 500); 4 Mar 2013 14:44:42 -0000 Delivered-To: apmail-incubator-cloudstack-commits-archive@incubator.apache.org Received: (qmail 71222 invoked by uid 500); 4 Mar 2013 14:44:42 -0000 Mailing-List: contact cloudstack-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: cloudstack-dev@incubator.apache.org Delivered-To: mailing list cloudstack-commits@incubator.apache.org Received: (qmail 71196 invoked by uid 99); 4 Mar 2013 14:44:41 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 04 Mar 2013 14:44:41 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 116103145B0; Mon, 4 Mar 2013 14:44:41 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: chipchilders@apache.org To: cloudstack-commits@incubator.apache.org X-Mailer: ASF-Git Admin Mailer Subject: git commit: refs/heads/4.1 - CLOUDSTACK-1262: update default built-in systemvm.iso search patch to be consistent with RPM location Message-Id: <20130304144441.116103145B0@tyr.zones.apache.org> Date: Mon, 4 Mar 2013 14:44:41 +0000 (UTC) Updated Branches: refs/heads/4.1 349799af4 -> 99284e7c9 CLOUDSTACK-1262: update default built-in systemvm.iso search patch to be consistent with RPM location Signed-off-by: Kelven Yang Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/99284e7c Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/99284e7c Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/99284e7c Branch: refs/heads/4.1 Commit: 99284e7c954b6771dd5101abe5352d4d43a4105c Parents: 349799a Author: Pradeep Authored: Mon Mar 4 13:29:32 2013 +0530 Committer: Chip Childers Committed: Mon Mar 4 09:44:24 2013 -0500 ---------------------------------------------------------------------- .../vmware/manager/VmwareManagerImpl.java | 33 ++++++++------ 1 files changed, 19 insertions(+), 14 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/99284e7c/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/manager/VmwareManagerImpl.java ---------------------------------------------------------------------- diff --git a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/manager/VmwareManagerImpl.java b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/manager/VmwareManagerImpl.java index 0b020bb..7fc32ad 100755 --- a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/manager/VmwareManagerImpl.java +++ b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/manager/VmwareManagerImpl.java @@ -604,14 +604,17 @@ public class VmwareManagerImpl extends ManagerBase implements VmwareManager, Vmw if (url != null) { isoFile = new File(url.getPath()); } - if (isoFile == null || !isoFile.exists()) { - isoFile = new File("/usr/lib64/cloud/common/" + "/vms/systemvm.iso"); - if (!isoFile.exists()) { - isoFile = new File("/usr/lib/cloud/common/" + "/vms/systemvm.iso"); - } + + if(isoFile == null || !isoFile.exists()) { + isoFile = new File("/usr/share/cloudstack-common/vms/systemvm.iso"); } - return isoFile; - } + + assert(isoFile != null); + if(!isoFile.exists()) { + s_logger.error("Unable to locate systemvm.iso in your setup at " + isoFile.toString()); + } + return isoFile; + } @Override public File getSystemVMKeyFile() { @@ -620,14 +623,16 @@ public class VmwareManagerImpl extends ManagerBase implements VmwareManager, Vmw if ( url != null ){ keyFile = new File(url.getPath()); } + if (keyFile == null || !keyFile.exists()) { - keyFile = new File("/usr/lib64/cloud/common" + "/scripts/vm/systemvm/id_rsa.cloud"); - if (!keyFile.exists()) { - keyFile = new File("/usr/lib/cloud/common" + "/scripts/vm/systemvm/id_rsa.cloud"); - } - } - return keyFile; - } + keyFile = new File("/usr/share/cloudstack-common/scripts/vm/systemvm/id_rsa.cloud"); + } + assert(keyFile != null); + if(!keyFile.exists()) { + s_logger.error("Unable to locate id_rsa.cloud in your setup at " + keyFile.toString()); + } + return keyFile; + } private Runnable getHostScanTask() { return new Runnable() {