From ccf629360a21a0fc2979d4d6db7c856778df4554 Mon Sep 17 00:00:00 2001 From: edison Date: Fri, 17 Sep 2010 23:55:42 -0700 Subject: [PATCH] Sometimes, the permission of secondary-stoarage/templates is 755, no-writable. Fix it by "chmod 777 -R" for secondary storage --- .../com/cloud/storage/resource/NfsSecondaryStorageResource.java | 1 + setup/db/templates.sql | 2 ++ 2 files changed, 3 insertions(+) diff --git a/core/src/com/cloud/storage/resource/NfsSecondaryStorageResource.java b/core/src/com/cloud/storage/resource/NfsSecondaryStorageResource.java index 2051cd07323..a1f4f03bdb0 100755 --- a/core/src/com/cloud/storage/resource/NfsSecondaryStorageResource.java +++ b/core/src/com/cloud/storage/resource/NfsSecondaryStorageResource.java @@ -556,6 +556,7 @@ public class NfsSecondaryStorageResource extends ServerResourceBase implements S // Change permissions for the mountpoint script = new Script(!_inSystemVM, "chmod", _timeout, s_logger); script.add("777", mountPoint); + script.add("-R"); result = script.execute(); if (result != null) { s_logger.warn("Unable to set permissions for " + mountPoint + " due to " + result); diff --git a/setup/db/templates.sql b/setup/db/templates.sql index 46845276a04..04382b192ed 100644 --- a/setup/db/templates.sql +++ b/setup/db/templates.sql @@ -424,3 +424,5 @@ INSERT INTO `cloud`.`guest_os_hypervisor` (hypervisor_type, guest_os_name, guest INSERT INTO `cloud`.`guest_os_hypervisor` (hypervisor_type, guest_os_name, guest_os_id) VALUES ('KVM', 'Other', 60); INSERT INTO `cloud`.`guest_os_hypervisor` (hypervisor_type, guest_os_name, guest_os_id) VALUES ('KVM', 'Other', 103); +-- temporarily added for vmware, will be moved when vmware support is fully in-place +INSERT INTO `cloud`.`host_master`(`type`, `service_address`, `admin`, `password`) VALUES('VSphere', 'vsphere-1.lab.vmops.com', 'Administrator', 'Suite219');