Return-Path: X-Original-To: apmail-cloudstack-commits-archive@www.apache.org Delivered-To: apmail-cloudstack-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id D203F10BC5 for ; Sat, 22 Jun 2013 01:08:03 +0000 (UTC) Received: (qmail 38888 invoked by uid 500); 22 Jun 2013 01:08:03 -0000 Delivered-To: apmail-cloudstack-commits-archive@cloudstack.apache.org Received: (qmail 38788 invoked by uid 500); 22 Jun 2013 01:08:03 -0000 Mailing-List: contact commits-help@cloudstack.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cloudstack.apache.org Delivered-To: mailing list commits@cloudstack.apache.org Received: (qmail 38781 invoked by uid 99); 22 Jun 2013 01:08:03 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 22 Jun 2013 01:08:03 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 6A31F82D940; Sat, 22 Jun 2013 01:08:03 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: yasker@apache.org To: commits@cloudstack.apache.org Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: git commit: updated refs/heads/master to d223063 Date: Sat, 22 Jun 2013 01:08:03 +0000 (UTC) Updated Branches: refs/heads/master fe32dc766 -> d22306344 Baremetal: Fix permission deny to ipmi.py The file cloudstack-oss.asf/client/target/cloud-client-ui-4.2.0-SNAPSHOT/WEB-INF/classes/scripts/util/ipmi.py is not mark as executible, so we cannot execute it directly. Involve "/usr/bin/python" for it. The position of python file maybe different in the different machines. Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/d2230634 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/d2230634 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/d2230634 Branch: refs/heads/master Commit: d22306344b213c6764decd2d7aa12ab027e0f141 Parents: fe32dc7 Author: Sheng Yang Authored: Fri Jun 21 18:06:04 2013 -0700 Committer: Sheng Yang Committed: Fri Jun 21 18:06:04 2013 -0700 ---------------------------------------------------------------------- .../networkservice/BareMetalResourceBase.java | 28 +++++++++++++------- 1 file changed, 19 insertions(+), 9 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d2230634/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BareMetalResourceBase.java ---------------------------------------------------------------------- diff --git a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BareMetalResourceBase.java b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BareMetalResourceBase.java index 86e41fe..d46048e 100755 --- a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BareMetalResourceBase.java +++ b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BareMetalResourceBase.java @@ -183,60 +183,70 @@ public class BareMetalResourceBase extends ManagerBase implements ServerResource if (scriptPath == null) { throw new ConfigurationException("Cannot find ping script " + scriptPath); } - _pingCommand = new Script2(scriptPath, s_logger); + String pythonPath = "/usr/bin/python"; + _pingCommand = new Script2(pythonPath, s_logger); + _pingCommand.add(scriptPath); _pingCommand.add("ping"); _pingCommand.add("hostname=" + _ip); _pingCommand.add("usrname=" + _username); _pingCommand.add("password=" + _password, ParamType.PASSWORD); - _setPxeBootCommand = new Script2(scriptPath, s_logger); + _setPxeBootCommand = new Script2(pythonPath, s_logger); + _setPxeBootCommand.add(scriptPath); _setPxeBootCommand.add("boot_dev"); _setPxeBootCommand.add("hostname=" + _ip); _setPxeBootCommand.add("usrname=" + _username); _setPxeBootCommand.add("password=" + _password, ParamType.PASSWORD); _setPxeBootCommand.add("dev=pxe"); - _setDiskBootCommand = new Script2(scriptPath, s_logger); + _setDiskBootCommand = new Script2(pythonPath, s_logger); + _setDiskBootCommand.add(scriptPath); _setDiskBootCommand.add("boot_dev"); _setDiskBootCommand.add("hostname=" + _ip); _setDiskBootCommand.add("usrname=" + _username); _setDiskBootCommand.add("password=" + _password, ParamType.PASSWORD); _setDiskBootCommand.add("dev=disk"); - _rebootCommand = new Script2(scriptPath, s_logger); + _rebootCommand = new Script2(pythonPath, s_logger); + _rebootCommand.add(scriptPath); _rebootCommand.add("reboot"); _rebootCommand.add("hostname=" + _ip); _rebootCommand.add("usrname=" + _username); _rebootCommand.add("password=" + _password, ParamType.PASSWORD); - _getStatusCommand = new Script2(scriptPath, s_logger); + _getStatusCommand = new Script2(pythonPath, s_logger); + _getStatusCommand.add(scriptPath); _getStatusCommand.add("ping"); _getStatusCommand.add("hostname=" + _ip); _getStatusCommand.add("usrname=" + _username); _getStatusCommand.add("password=" + _password, ParamType.PASSWORD); - _powerOnCommand = new Script2(scriptPath, s_logger); + _powerOnCommand = new Script2(pythonPath, s_logger); + _powerOnCommand.add(scriptPath); _powerOnCommand.add("power"); _powerOnCommand.add("hostname=" + _ip); _powerOnCommand.add("usrname=" + _username); _powerOnCommand.add("password=" + _password, ParamType.PASSWORD); _powerOnCommand.add("action=on"); - _powerOffCommand = new Script2(scriptPath, s_logger); + _powerOffCommand = new Script2(pythonPath, s_logger); + _powerOffCommand.add(scriptPath); _powerOffCommand.add("power"); _powerOffCommand.add("hostname=" + _ip); _powerOffCommand.add("usrname=" + _username); _powerOffCommand.add("password=" + _password, ParamType.PASSWORD); _powerOffCommand.add("action=soft"); - _forcePowerOffCommand = new Script2(scriptPath, s_logger); + _forcePowerOffCommand = new Script2(pythonPath, s_logger); + _forcePowerOffCommand.add(scriptPath); _forcePowerOffCommand.add("power"); _forcePowerOffCommand.add("hostname=" + _ip); _forcePowerOffCommand.add("usrname=" + _username); _forcePowerOffCommand.add("password=" + _password, ParamType.PASSWORD); _forcePowerOffCommand.add("action=off"); - _bootOrRebootCommand = new Script2(scriptPath, s_logger); + _bootOrRebootCommand = new Script2(pythonPath, s_logger); + _bootOrRebootCommand.add(scriptPath); _bootOrRebootCommand.add("boot_or_reboot"); _bootOrRebootCommand.add("hostname=" + _ip); _bootOrRebootCommand.add("usrname=" + _username);