cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mc...@apache.org
Subject [2/4] git commit: updated refs/heads/object_store to 2c22488
Date Fri, 10 May 2013 04:49:29 GMT
Download system template while adding S3 image store is working.


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

Branch: refs/heads/object_store
Commit: f965e2d89201d8fd5fc766f65bd5748d1ffaa49e
Parents: 0824be3
Author: Min Chen <min.chen@citrix.com>
Authored: Thu May 9 19:07:57 2013 -0700
Committer: Min Chen <min.chen@citrix.com>
Committed: Thu May 9 21:49:12 2013 -0700

----------------------------------------------------------------------
 .../resource/LocalNfsSecondaryStorageResource.java |    2 ++
 .../storage/template/S3TemplateDownloader.java     |    6 +++---
 .../storage/image/TemplateServiceImpl.java         |    4 +++-
 setup/db/db/schema-410to420.sql                    |    8 ++++++--
 tools/devcloud/devcloud_s3.cfg                     |    2 +-
 5 files changed, 15 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f965e2d8/core/src/com/cloud/storage/resource/LocalNfsSecondaryStorageResource.java
----------------------------------------------------------------------
diff --git a/core/src/com/cloud/storage/resource/LocalNfsSecondaryStorageResource.java b/core/src/com/cloud/storage/resource/LocalNfsSecondaryStorageResource.java
index 4c708af..b7278f7 100644
--- a/core/src/com/cloud/storage/resource/LocalNfsSecondaryStorageResource.java
+++ b/core/src/com/cloud/storage/resource/LocalNfsSecondaryStorageResource.java
@@ -10,6 +10,7 @@ import java.net.URI;
 import java.net.URISyntaxException;
 import java.net.URL;
 import java.util.List;
+import java.util.concurrent.Executors;
 
 import org.apache.cloudstack.storage.command.DownloadSystemTemplateCommand;
 import org.springframework.stereotype.Component;
@@ -34,6 +35,7 @@ public class LocalNfsSecondaryStorageResource extends
 
     public LocalNfsSecondaryStorageResource(){
         this._dlMgr = new DownloadManagerImpl();
+        ((DownloadManagerImpl)_dlMgr).setThreadPool(Executors.newFixedThreadPool(10));
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f965e2d8/core/src/com/cloud/storage/template/S3TemplateDownloader.java
----------------------------------------------------------------------
diff --git a/core/src/com/cloud/storage/template/S3TemplateDownloader.java b/core/src/com/cloud/storage/template/S3TemplateDownloader.java
index b555ec2..43b582c 100644
--- a/core/src/com/cloud/storage/template/S3TemplateDownloader.java
+++ b/core/src/com/cloud/storage/template/S3TemplateDownloader.java
@@ -279,9 +279,9 @@ public class S3TemplateDownloader implements TemplateDownloader {
                         @Override
                         public void progressChanged(
                                 ProgressEvent progressEvent) {
-                            s_logger.info(progressEvent.getBytesTransfered()
-                                    + " number of byte transferd "
-                                    + new Date());
+                           // s_logger.debug(progressEvent.getBytesTransfered()
+                           //         + " number of byte transferd "
+                           //         + new Date());
                             totalBytes += progressEvent.getBytesTransfered();
                             if (progressEvent.getEventCode() == ProgressEvent.COMPLETED_EVENT_CODE)
{
                                 s_logger.info("download completed");

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f965e2d8/engine/storage/image/src/org/apache/cloudstack/storage/image/TemplateServiceImpl.java
----------------------------------------------------------------------
diff --git a/engine/storage/image/src/org/apache/cloudstack/storage/image/TemplateServiceImpl.java
b/engine/storage/image/src/org/apache/cloudstack/storage/image/TemplateServiceImpl.java
index 988aaa7..e18bac9 100644
--- a/engine/storage/image/src/org/apache/cloudstack/storage/image/TemplateServiceImpl.java
+++ b/engine/storage/image/src/org/apache/cloudstack/storage/image/TemplateServiceImpl.java
@@ -477,7 +477,9 @@ public class TemplateServiceImpl implements TemplateService {
             return null;
         }
 
-        parentCallback.complete(result);
+        if (parentCallback != null){
+            parentCallback.complete(result);
+        }
         return null;
     }
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f965e2d8/setup/db/db/schema-410to420.sql
----------------------------------------------------------------------
diff --git a/setup/db/db/schema-410to420.sql b/setup/db/db/schema-410to420.sql
index 75d29f6..74f3388 100644
--- a/setup/db/db/schema-410to420.sql
+++ b/setup/db/db/schema-410to420.sql
@@ -105,6 +105,7 @@ CREATE VIEW `cloud`.`image_store_view` AS
         image_store.protocol,
         image_store.url,
         image_store.scope,
+        image_store.role,
         data_center.id data_center_id,
         data_center.uuid data_center_uuid,
         data_center.name data_center_name,
@@ -115,8 +116,8 @@ CREATE VIEW `cloud`.`image_store_view` AS
             left join
         `cloud`.`data_center` ON image_store.data_center_id = data_center.id
             left join
-        `cloud`.`image_store_details` ON image_store_details.store_id = image_store.id
-    where image_store.role = 'Image';
+        `cloud`.`image_store_details` ON image_store_details.store_id = image_store.id;
+
             
 -- here we have to allow null for store_id to accomodate baremetal case to search for ready
templates since template state is only stored in this table
 -- FK also commented out due to this            
@@ -732,3 +733,6 @@ CREATE VIEW `cloud`.`volume_view` AS
         `cloud`.`async_job` ON async_job.instance_id = volumes.id
             and async_job.instance_type = 'Volume'
             and async_job.job_status = 0;     
+            
+ update  `cloud`.`vm_template` set state='Allocated' where state is NULL;
+ update  `cloud`.`vm_template` set update_count=0 where update_count is NULL;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f965e2d8/tools/devcloud/devcloud_s3.cfg
----------------------------------------------------------------------
diff --git a/tools/devcloud/devcloud_s3.cfg b/tools/devcloud/devcloud_s3.cfg
index 885f54a..ea50564 100644
--- a/tools/devcloud/devcloud_s3.cfg
+++ b/tools/devcloud/devcloud_s3.cfg
@@ -91,7 +91,7 @@
                         },
                         {
                             "key" : "secretkey",
-                            "value" : "OYAZXCAFUC1DAFOXNJWI"
+                            "value" : "YHpRtzNDwl12DtrQmwRvdpnf2xK2AeVM30rXxQ=="
                         },
                         {
                             "key" : "endpoint",


Mime
View raw message