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

[7/7] git commit: updated refs/heads/master to 7949d29

vmware: plugin improvements

- use sticky chmod 1777 on the mountpoint
- remove dead code

(cherry picked from commit eea716b7916c916442b19d14e0f6e5c57bebb91e)
Signed-off-by: Rohit Yadav <ro...@shapeblue.com>


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

Branch: refs/heads/master
Commit: 7949d2922da725c1be112b2ec374f54ee4126c55
Parents: 04dccda
Author: Rohit Yadav <ro...@shapeblue.com>
Authored: Mon Apr 13 15:42:13 2015 +0530
Committer: Rohit Yadav <ro...@shapeblue.com>
Committed: Mon Apr 13 15:49:01 2015 +0530

----------------------------------------------------------------------
 .../com/cloud/hypervisor/vmware/manager/VmwareManagerImpl.java    | 2 +-
 .../src/com/cloud/hypervisor/vmware/resource/VmwareResource.java  | 3 +--
 2 files changed, 2 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7949d292/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 3416319..e852948 100644
--- a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/manager/VmwareManagerImpl.java
+++ b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/manager/VmwareManagerImpl.java
@@ -765,7 +765,7 @@ public class VmwareManagerImpl extends ManagerBase implements VmwareManager, Vmw
 
         // Change permissions for the mountpoint
         script = new Script(true, "chmod", _timeout, s_logger);
-        script.add("777", mountPoint);
+        script.add("1777", mountPoint);
         result = script.execute();
         if (result != null) {
             s_logger.warn("Unable to set permissions for " + mountPoint + " due to " + result);

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7949d292/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java
index 07815ee..796999b 100644
--- a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java
+++ b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java
@@ -1822,7 +1822,7 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa
 
     int getReservedCpuMHZ(VirtualMachineTO vmSpec) {
          if (vmSpec.getDetails().get(VMwareGuru.VmwareReserveCpu.key()).equalsIgnoreCase("true")) {
-             return vmSpec.getMinSpeed();
+             return vmSpec.getMinSpeed() * vmSpec.getCpus();
          }
          return 0;
     }
@@ -2472,7 +2472,6 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa
     private Pair<ManagedObjectReference, String> prepareNetworkFromNicInfo(HostMO hostMo, NicTO nicTo, boolean configureVServiceInNexus, VirtualMachine.Type vmType) throws Exception {
 
         Ternary<String, String, String> switchDetails = getTargetSwitch(nicTo);
-        nicTo.getType();
         VirtualSwitchType switchType = VirtualSwitchType.getType(switchDetails.second());
         String switchName = switchDetails.first();
         String vlanToken = switchDetails.third();