[one-users] Timeouts in OCCI image upload

Claude Noshpitz cnoshpitz at attinteractive.com
Wed Feb 24 17:41:49 PST 2010


Hello,

Large images can take a long time to upload via 'occi-storage create', long
enough that the operation fails with a Net::HTTP timeout.

Perhaps this has been handled already -- if not, a simple patch would look
like this:

--- a/src/cloud/common/CloudClient.rb
+++ b/src/cloud/common/CloudClient.rb
@@ -69,6 +69,10 @@ module CloudClient
     ######################################################################
     def self.http_start(url, &block)
         http = Net::HTTP.new(url.host, url.port)
+      
+        # could take a long time to transfer large images
+        http.read_timeout = 600
+
         if url.scheme=='https'
             http.use_ssl = true

A more diligent approach might also provide a command-line option to
explicitly set a timeout value.

Thoughts?

Thanks!

--Claude





More information about the Users mailing list