cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chipchild...@apache.org
Subject [27/50] [abbrv] git commit: updated refs/heads/ldapplugin to 7bc705e
Date Wed, 17 Jul 2013 17:35:26 GMT
be able to upload template into swift


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

Branch: refs/heads/ldapplugin
Commit: bf32776f9f89b6b40c0a3093f8f3ddb5c1a1830e
Parents: 2849f81
Author: Edison Su <sudison@gmail.com>
Authored: Tue Jul 16 18:04:29 2013 -0700
Committer: Edison Su <sudison@gmail.com>
Committed: Tue Jul 16 18:07:06 2013 -0700

----------------------------------------------------------------------
 api/src/com/cloud/agent/api/to/NfsTO.java       |    2 +-
 .../cloudstack/storage/LocalHostEndpoint.java   |   18 +-
 .../kvm/resource/LibvirtComputingResource.java  |    4 +-
 scripts/storage/qcow2/managesnapshot.sh         |   13 +-
 scripts/storage/secondary/swift                 | 2010 +++++++++++-------
 .../test/com/cloud/async/CleanupDelegate.java   |   29 -
 server/test/com/cloud/async/TestAsync.java      |  281 ---
 .../com/cloud/async/TestAsyncJobManager.java    |  252 ---
 .../com/cloud/async/TestSyncQueueManager.java   |  208 --
 .../upgrade/AdvanceZone217To224UpgradeTest.java |  117 -
 .../upgrade/AdvanceZone223To224UpgradeTest.java |   57 -
 .../upgrade/BasicZone218To224UpgradeTest.java   |  211 --
 .../test/com/cloud/upgrade/DbUpgrade22Test.java |   29 -
 .../cloud/upgrade/HostCapacity218to22Test.java  |   66 -
 .../InstanceGroup218To224UpgradeTest.java       |  216 --
 .../PortForwarding218To224UpgradeTest.java      |  132 --
 .../upgrade/Sanity220To224UpgradeTest.java      |   95 -
 .../upgrade/Sanity222To224UpgradeTest.java      |   96 -
 .../upgrade/Sanity223To225UpgradeTest.java      |   94 -
 .../upgrade/Sanity224To225UpgradeTest.java      |   95 -
 .../upgrade/Template2214To30UpgradeTest.java    |  123 --
 .../cloud/upgrade/Test2214To30DBUpgrade.java    |  199 --
 .../cloud/upgrade/Usage217To224UpgradeTest.java |   94 -
 .../upgrade/UsageEvents218To224UpgradeTest.java |   91 -
 services/secondary-storage/pom.xml              |    8 +
 .../LocalNfsSecondaryStorageResource.java       |   11 +-
 .../resource/NfsSecondaryStorageResource.java   |   28 +-
 .../LocalNfsSecondaryStorageResourceTest.java   |   90 +
 tools/marvin/marvin/deployDataCenter.py         |    2 +-
 utils/src/com/cloud/utils/SwiftUtil.java        |    1 +
 30 files changed, 1367 insertions(+), 3305 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/bf32776f/api/src/com/cloud/agent/api/to/NfsTO.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/agent/api/to/NfsTO.java b/api/src/com/cloud/agent/api/to/NfsTO.java
index 5490fd1..415c95c 100644
--- a/api/src/com/cloud/agent/api/to/NfsTO.java
+++ b/api/src/com/cloud/agent/api/to/NfsTO.java
@@ -18,7 +18,7 @@ package com.cloud.agent.api.to;
 
 import com.cloud.storage.DataStoreRole;
 
-public final class NfsTO implements DataStoreTO {
+public class NfsTO implements DataStoreTO {
 
     private String _url;
     private DataStoreRole _role;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/bf32776f/engine/storage/src/org/apache/cloudstack/storage/LocalHostEndpoint.java
----------------------------------------------------------------------
diff --git a/engine/storage/src/org/apache/cloudstack/storage/LocalHostEndpoint.java b/engine/storage/src/org/apache/cloudstack/storage/LocalHostEndpoint.java
index 18fcd71..932a07f 100644
--- a/engine/storage/src/org/apache/cloudstack/storage/LocalHostEndpoint.java
+++ b/engine/storage/src/org/apache/cloudstack/storage/LocalHostEndpoint.java
@@ -16,10 +16,14 @@
 // under the License.
 package org.apache.cloudstack.storage;
 
+import java.io.File;
 import java.util.concurrent.Executors;
 import java.util.concurrent.ScheduledExecutorService;
 import java.util.concurrent.TimeUnit;
 
+import com.cloud.configuration.Config;
+import com.cloud.configuration.dao.ConfigurationDao;
+import com.cloud.configuration.dao.ConfigurationDaoImpl;
 import org.apache.cloudstack.engine.subsystem.api.storage.EndPoint;
 import org.apache.cloudstack.framework.async.AsyncCompletionCallback;
 import org.apache.cloudstack.storage.command.CopyCommand;
@@ -31,12 +35,24 @@ import com.cloud.agent.api.Command;
 import com.cloud.resource.ServerResource;
 import com.cloud.utils.net.NetUtils;
 
+import javax.inject.Inject;
+
 public class LocalHostEndpoint implements EndPoint {
     private ScheduledExecutorService executor;
     protected ServerResource resource;
+    @Inject
+    ConfigurationDao configDao;
 
     public LocalHostEndpoint() {
-        resource = new LocalNfsSecondaryStorageResource();
+        // get mount parent folder configured in global setting, if set, this will overwrite
_parent in NfsSecondaryStorageResource to work
+        // around permission issue for default /mnt folder
+        String mountParent = configDao.getValue(Config.MountParent.key());
+
+        String path =  mountParent + File.separator + "secStorage";
+
+        LocalNfsSecondaryStorageResource localResource = new LocalNfsSecondaryStorageResource();
+        localResource.setParentPath(path);
+        resource = localResource;
         executor = Executors.newScheduledThreadPool(10);
     }
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/bf32776f/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
index e51fbda..da86612 100755
--- a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
+++ b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
@@ -1072,13 +1072,13 @@ ServerResource {
 
     private void passCmdLine(String vmName, String cmdLine)
             throws InternalErrorException {
-        final Script command = new Script(_patchViaSocketPath, _timeout, s_logger);
+        final Script command = new Script(_patchViaSocketPath, 5*1000, s_logger);
         String result;
         command.add("-n",vmName);
         command.add("-p", cmdLine.replaceAll(" ", "%"));
         result = command.execute();
         if (result != null) {
-            throw new InternalErrorException(result);
+            s_logger.debug("passcmd failed:" + result);
         }
     }
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/bf32776f/scripts/storage/qcow2/managesnapshot.sh
----------------------------------------------------------------------
diff --git a/scripts/storage/qcow2/managesnapshot.sh b/scripts/storage/qcow2/managesnapshot.sh
index 30148de..368ff54 100755
--- a/scripts/storage/qcow2/managesnapshot.sh
+++ b/scripts/storage/qcow2/managesnapshot.sh
@@ -67,8 +67,10 @@ create_snapshot() {
   local disk=$1
   local snapshotname="$2"
   local failed=0
+  is_lv ${disk}
+  islv_ret=$?
 
-  if [ ${dmsnapshot} = "yes" ] && is_lv ${disk}; then
+  if [ ${dmsnapshot} = "yes" ] && [ "$islv_ret" == "1" ]; then
     local lv=`get_lv ${disk}`
     local vg=`get_vg ${disk}`
     local lv_dm=`double_hyphens ${lv}`
@@ -120,8 +122,10 @@ destroy_snapshot() {
   local disk=$1
   local snapshotname="$2"
   local failed=0
+  is_lv ${disk}
+  islv_ret=$?
 
-  if is_lv ${disk}; then
+  if [ "$islv_ret" == "1" ]; then
     local lv=`get_lv ${disk}`
     local vg=`get_vg ${disk}`
     local lv_dm=`double_hyphens ${lv}`
@@ -187,7 +191,10 @@ backup_snapshot() {
      fi
   fi
 
-  if [ ${dmsnapshot} = "yes" ] && is_lv ${disk}; then
+  is_lv ${disk}
+  islv_ret=$?
+
+  if [ ${dmsnapshot} = "yes" ] && [ "$islv_ret" == "1" ] ; then
     local vg=`get_vg ${disk}`
     local vg_dm=`double_hyphens ${vg}`
     local scriptdir=`dirname ${0}`


Mime
View raw message