You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by fr...@apache.org on 2014/09/25 19:31:58 UTC
git commit: updated refs/heads/master to 44a4158
Repository: cloudstack
Updated Branches:
refs/heads/master 410092bbe -> 44a4158c4
CLOUDSTACK-6278
Baremetal Advanced Networking support
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/44a4158c
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/44a4158c
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/44a4158c
Branch: refs/heads/master
Commit: 44a4158c4854d85e4c234655e375fe0c631507d5
Parents: 410092b
Author: Frank Zhang <fr...@citrix.com>
Authored: Thu Sep 25 10:35:33 2014 -0700
Committer: Frank Zhang <fr...@citrix.com>
Committed: Thu Sep 25 10:35:49 2014 -0700
----------------------------------------------------------------------
.../networkservice/BaremetalKickStartServiceImpl.java | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/44a4158c/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalKickStartServiceImpl.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalKickStartServiceImpl.java b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalKickStartServiceImpl.java
index 3b88ca6..16fc460 100755
--- a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalKickStartServiceImpl.java
+++ b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalKickStartServiceImpl.java
@@ -160,15 +160,20 @@ public class BaremetalKickStartServiceImpl extends BareMetalPxeServiceBase imple
return Arrays.asList(ks, kernel, initrd);
}
- private File getSystemVMKeyFile() {
+ public File getSystemVMKeyFile() {
URL url = this.getClass().getClassLoader().getResource("scripts/vm/systemvm/id_rsa.cloud");
File keyFile = null;
if (url != null) {
keyFile = new File(url.getPath());
}
- if (keyFile == null || !keyFile.canRead()) {
- s_logger.error("Unable to locate id_rsa.cloud");
- return null;
+ if (keyFile == null || !keyFile.exists()) {
+ keyFile = new File("/usr/share/cloudstack-common/scripts/vm/systemvm/id_rsa.cloud");
+ }
+ if (!keyFile.exists()) {
+ throw new CloudRuntimeException(String.format("cannot find id_rsa.cloud"));
+ }
+ if (!keyFile.exists()) {
+ s_logger.error("Unable to locate id_rsa.cloud in your setup at " + keyFile.toString());
}
return keyFile;
}