cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From raj...@apache.org
Subject [18/50] git commit: updated refs/heads/master to 0b83559
Date Wed, 29 Apr 2015 05:44:02 GMT
handling tcp close event in netty server

while the file is in uploading state and connection is reset by peer,
volume upload request posted again shows the upload is IN_Progress
state. marking them as errored


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

Branch: refs/heads/master
Commit: 6b8b4b92e6d5ec36d4b976e81083f72ae17245a3
Parents: 7d1ca8a
Author: Rajani Karuturi <rajanikaruturi@gmail.com>
Authored: Tue Mar 17 15:17:33 2015 +0530
Committer: Rajani Karuturi <rajanikaruturi@gmail.com>
Committed: Tue Mar 17 15:21:25 2015 +0530

----------------------------------------------------------------------
 .../cloudstack/storage/resource/HttpUploadServerHandler.java  | 7 +++++++
 .../storage/resource/NfsSecondaryStorageResource.java         | 2 +-
 2 files changed, 8 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6b8b4b92/services/secondary-storage/server/src/org/apache/cloudstack/storage/resource/HttpUploadServerHandler.java
----------------------------------------------------------------------
diff --git a/services/secondary-storage/server/src/org/apache/cloudstack/storage/resource/HttpUploadServerHandler.java
b/services/secondary-storage/server/src/org/apache/cloudstack/storage/resource/HttpUploadServerHandler.java
index 7a17ef1..0caee32 100644
--- a/services/secondary-storage/server/src/org/apache/cloudstack/storage/resource/HttpUploadServerHandler.java
+++ b/services/secondary-storage/server/src/org/apache/cloudstack/storage/resource/HttpUploadServerHandler.java
@@ -95,6 +95,13 @@ public class HttpUploadServerHandler extends SimpleChannelInboundHandler<HttpObj
     }
 
     @Override
+    public void channelInactive(ChannelHandlerContext ctx) throws Exception {
+        String message = "file receive failed or connection closed prematurely.";
+        logger.error(message);
+        storageResource.updateStateMapWithError(uuid, message);
+    }
+
+    @Override
     public void channelRead0(ChannelHandlerContext ctx, HttpObject msg) throws Exception
{
         if (msg instanceof HttpRequest) {
             HttpRequest request = this.request = (HttpRequest) msg;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6b8b4b92/services/secondary-storage/server/src/org/apache/cloudstack/storage/resource/NfsSecondaryStorageResource.java
----------------------------------------------------------------------
diff --git a/services/secondary-storage/server/src/org/apache/cloudstack/storage/resource/NfsSecondaryStorageResource.java
b/services/secondary-storage/server/src/org/apache/cloudstack/storage/resource/NfsSecondaryStorageResource.java
index d10242c..1bce4a0 100755
--- a/services/secondary-storage/server/src/org/apache/cloudstack/storage/resource/NfsSecondaryStorageResource.java
+++ b/services/secondary-storage/server/src/org/apache/cloudstack/storage/resource/NfsSecondaryStorageResource.java
@@ -2774,7 +2774,7 @@ public class NfsSecondaryStorageResource extends ServerResourceBase
implements S
         return _ssvmPSK;
     }
 
-    private void updateStateMapWithError(String uuid,String errorMessage) {
+    public void updateStateMapWithError(String uuid,String errorMessage) {
         UploadEntity uploadEntity=null;
         if (uploadEntityStateMap.get(uuid)!=null) {
             uploadEntity=uploadEntityStateMap.get(uuid);


Mime
View raw message