Created
July 16, 2013 14:52
-
-
Save krames/6009448 to your computer and use it in GitHub Desktop.
This gist is a sample of uploading a large segmented file with etags. The first segment is successfully uploaded with a valid segment. The second segment contains a bad etag. My ruby code receives a 422 and then tries to reload the same segment with a valid tag. Cloud Files continues to send back a 422. I have attempted to hunt down the phrase "…
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| excon.request {:chunk_size=>1048576, :connect_timeout=>60, :debug_request=>false, :debug_response=>true, :headers=>{"User-Agent"=>"fog/1.12.1", "Content-Type"=>nil, "Accept"=>"application/json", "X-Auth-Token"=>"6fba6c5b4817446cbec0286f5e1fb5f4", "Content-Length"=>0, "ETag"=>"6bca3dcbd6eb0a7044e90e0297447faa", "Host"=>"storage101.dfw1.clouddrive.com:443"}, :idempotent=>true, :instrumentor_name=>"excon", :middlewares=>[Excon::Middleware::Expects, Excon::Middleware::Idempotent, Excon::Middleware::Instrumentor, Excon::Middleware::Mock], :mock=>false, :nonblock=>true, :omit_default_port=>false, :read_timeout=>60, :retry_limit=>0, :ssl_ca_file=>"/Users/kyle.rames/.rvm/gems/ruby-1.9.3-p286@fog/gems/excon-0.23.0/data/cacert.pem", :ssl_verify_peer=>true, :tcp_nodelay=>false, :uri_parser=>URI, :write_timeout=>60, :host=>"storage101.dfw1.clouddrive.com", :path=>"/v1/MossoCloudFS_5d0bc756-9753-4681-bdc3-570aa8ba86c3/bucket/frank.jpg%2F0000000001", :port=>"443", :query=>nil, :scheme=>"https", :user=>nil, :password=>"REDACTED", :instrumentor=>Excon::StandardInstrumentor, :request_block=>#<Proc:0x007f9240d6edc0@large-etag.rb:41>, :expects=>201, :method=>"PUT", :retries_remaining=>0, :connection=>#<Excon::Connection:7f9241cad228 @data={:chunk_size=>1048576, :connect_timeout=>60, :debug_request=>false, :debug_response=>true, :headers=>{"User-Agent"=>"fog/1.12.1"}, :idempotent=>false, :instrumentor_name=>"excon", :middlewares=>[Excon::Middleware::Expects, Excon::Middleware::Idempotent, Excon::Middleware::Instrumentor, Excon::Middleware::Mock], :mock=>false, :nonblock=>true, :omit_default_port=>false, :read_timeout=>60, :retry_limit=>0, :ssl_ca_file=>"/Users/kyle.rames/.rvm/gems/ruby-1.9.3-p286@fog/gems/excon-0.23.0/data/cacert.pem", :ssl_verify_peer=>true, :tcp_nodelay=>false, :uri_parser=>URI, :write_timeout=>60, :host=>"storage101.dfw1.clouddrive.com", :path=>"/v1/MossoCloudFS_5d0bc756-9753-4681-bdc3-570aa8ba86c3", :port=>"443", :query=>nil, :scheme=>"https", :user=>nil, :password=>nil, :instrumentor=>Excon::StandardInstrumentor} @socket_key="https://storage101.dfw1.clouddrive.com:443">, :stack=>#<Excon::Middleware::Expects:0x007f92419486f0 @stack=#<Excon::Middleware::Idempotent:0x007f9241948150 @stack=#<Excon::Middleware::Instrumentor:0x007f9241947ca0 @stack=#<Excon::Middleware::Mock:0x007f9241a6dfa8 @stack=#<Excon::Connection:7f9241cad228 @data={:chunk_size=>1048576, :connect_timeout=>60, :debug_request=>false, :debug_response=>true, :headers=>{"User-Agent"=>"fog/1.12.1"}, :idempotent=>false, :instrumentor_name=>"excon", :middlewares=>[Excon::Middleware::Expects, Excon::Middleware::Idempotent, Excon::Middleware::Instrumentor, Excon::Middleware::Mock], :mock=>false, :nonblock=>true, :omit_default_port=>false, :read_timeout=>60, :retry_limit=>0, :ssl_ca_file=>"/Users/kyle.rames/.rvm/gems/ruby-1.9.3-p286@fog/gems/excon-0.23.0/data/cacert.pem", :ssl_verify_peer=>true, :tcp_nodelay=>false, :uri_parser=>URI, :write_timeout=>60, :host=>"storage101.dfw1.clouddrive.com", :path=>"/v1/MossoCloudFS_5d0bc756-9753-4681-bdc3-570aa8ba86c3", :port=>"443", :query=>nil, :scheme=>"https", :user=>nil, :password=>nil, :instrumentor=>Excon::StandardInstrumentor} @socket_key="https://storage101.dfw1.clouddrive.com:443">>>>>} | |
| ...........excon.response {:body=>"", :headers=>{"Last-Modified"=>"Tue, 16 Jul 2013 14:11:19 GMT", "Content-Length"=>"0", "Etag"=>"6bca3dcbd6eb0a7044e90e0297447faa", "Content-Type"=>"text/html; charset=UTF-8", "X-Trans-Id"=>"tx13ab9976acac4d3095c5e74632e863e9", "Date"=>"Tue, 16 Jul 2013 14:12:24 GMT"}, :status=>201, :remote_ip=>"174.143.184.158"} | |
| etag>> {"ETag"=>"bad"} | |
| excon.request {:chunk_size=>1048576, :connect_timeout=>60, :debug_request=>false, :debug_response=>true, :headers=>{"User-Agent"=>"fog/1.12.1", "Content-Type"=>nil, "Accept"=>"application/json", "X-Auth-Token"=>"6fba6c5b4817446cbec0286f5e1fb5f4", "Content-Length"=>0, "ETag"=>"bad", "Host"=>"storage101.dfw1.clouddrive.com:443"}, :idempotent=>true, :instrumentor_name=>"excon", :middlewares=>[Excon::Middleware::Expects, Excon::Middleware::Idempotent, Excon::Middleware::Instrumentor, Excon::Middleware::Mock], :mock=>false, :nonblock=>true, :omit_default_port=>false, :read_timeout=>60, :retry_limit=>0, :ssl_ca_file=>"/Users/kyle.rames/.rvm/gems/ruby-1.9.3-p286@fog/gems/excon-0.23.0/data/cacert.pem", :ssl_verify_peer=>true, :tcp_nodelay=>false, :uri_parser=>URI, :write_timeout=>60, :host=>"storage101.dfw1.clouddrive.com", :path=>"/v1/MossoCloudFS_5d0bc756-9753-4681-bdc3-570aa8ba86c3/bucket/frank.jpg%2F0000000002", :port=>"443", :query=>nil, :scheme=>"https", :user=>nil, :password=>"REDACTED", :instrumentor=>Excon::StandardInstrumentor, :family=>0, :request_block=>#<Proc:0x007f9240829310@large-etag.rb:41>, :expects=>201, :method=>"PUT", :retries_remaining=>0, :connection=>#<Excon::Connection:7f9241cad228 @data={:chunk_size=>1048576, :connect_timeout=>60, :debug_request=>false, :debug_response=>true, :headers=>{"User-Agent"=>"fog/1.12.1"}, :idempotent=>false, :instrumentor_name=>"excon", :middlewares=>[Excon::Middleware::Expects, Excon::Middleware::Idempotent, Excon::Middleware::Instrumentor, Excon::Middleware::Mock], :mock=>false, :nonblock=>true, :omit_default_port=>false, :read_timeout=>60, :retry_limit=>0, :ssl_ca_file=>"/Users/kyle.rames/.rvm/gems/ruby-1.9.3-p286@fog/gems/excon-0.23.0/data/cacert.pem", :ssl_verify_peer=>true, :tcp_nodelay=>false, :uri_parser=>URI, :write_timeout=>60, :host=>"storage101.dfw1.clouddrive.com", :path=>"/v1/MossoCloudFS_5d0bc756-9753-4681-bdc3-570aa8ba86c3", :port=>"443", :query=>nil, :scheme=>"https", :user=>nil, :password=>nil, :instrumentor=>Excon::StandardInstrumentor, :family=>0} @socket_key="https://storage101.dfw1.clouddrive.com:443">, :stack=>#<Excon::Middleware::Expects:0x007f9240836fb0 @stack=#<Excon::Middleware::Idempotent:0x007f92408372d0 @stack=#<Excon::Middleware::Instrumentor:0x007f9240837528 @stack=#<Excon::Middleware::Mock:0x007f92408377d0 @stack=#<Excon::Connection:7f9241cad228 @data={:chunk_size=>1048576, :connect_timeout=>60, :debug_request=>false, :debug_response=>true, :headers=>{"User-Agent"=>"fog/1.12.1"}, :idempotent=>false, :instrumentor_name=>"excon", :middlewares=>[Excon::Middleware::Expects, Excon::Middleware::Idempotent, Excon::Middleware::Instrumentor, Excon::Middleware::Mock], :mock=>false, :nonblock=>true, :omit_default_port=>false, :read_timeout=>60, :retry_limit=>0, :ssl_ca_file=>"/Users/kyle.rames/.rvm/gems/ruby-1.9.3-p286@fog/gems/excon-0.23.0/data/cacert.pem", :ssl_verify_peer=>true, :tcp_nodelay=>false, :uri_parser=>URI, :write_timeout=>60, :host=>"storage101.dfw1.clouddrive.com", :path=>"/v1/MossoCloudFS_5d0bc756-9753-4681-bdc3-570aa8ba86c3", :port=>"443", :query=>nil, :scheme=>"https", :user=>nil, :password=>nil, :instrumentor=>Excon::StandardInstrumentor, :family=>0} @socket_key="https://storage101.dfw1.clouddrive.com:443">>>>>} | |
| ...........excon.error {:error=>#<Excon::Errors::UnprocessableEntity: Expected(201) <=> Actual(422 Unprocessable Entity) | |
| response => #<Excon::Response:0x007f9241e5bed0 @data={:body=>"<html><h1>Unprocessable Entity</h1><p>Unable to process the contained instructions</p></html>", :headers=>{"Last-Modified"=>"Tue, 16 Jul 2013 14:12:25 GMT", "Content-Length"=>"93", "Content-Type"=>"text/html; charset=UTF-8", "X-Trans-Id"=>"tx0004d039b1a240e3a4bb94886e1a7ba2", "Date"=>"Tue, 16 Jul 2013 14:13:32 GMT"}, :status=>422, :remote_ip=>"174.143.184.158"}, @body="<html><h1>Unprocessable Entity</h1><p>Unable to process the contained instructions</p></html>", @headers={"Last-Modified"=>"Tue, 16 Jul 2013 14:12:25 GMT", "Content-Length"=>"93", "Content-Type"=>"text/html; charset=UTF-8", "X-Trans-Id"=>"tx0004d039b1a240e3a4bb94886e1a7ba2", "Date"=>"Tue, 16 Jul 2013 14:13:32 GMT"}, @status=422, @remote_ip="174.143.184.158">>} | |
| [WARNING] Received exception '781: unexpected token at '<html><h1>Unprocessable Entity</h1><p>Unable to process the contained instructions</p></html>'' while decoding>> <html><h1>Unprocessable Entity</h1><p>Unable to process the contained instructions</p></html> | |
| #<Fog::Storage::Rackspace::ServiceError: [HTTP 422] <html><h1>Unprocessable Entity</h1><p>Unable to process the contained instructions</p></html>> | |
| etag>> {"ETag"=>"f3a7cd6fd6588e52e68fb6b1c1087194"} | |
| excon.request {:chunk_size=>1048576, :connect_timeout=>60, :debug_request=>false, :debug_response=>true, :headers=>{"User-Agent"=>"fog/1.12.1", "Content-Type"=>nil, "Accept"=>"application/json", "X-Auth-Token"=>"6fba6c5b4817446cbec0286f5e1fb5f4", "Content-Length"=>0, "ETag"=>"f3a7cd6fd6588e52e68fb6b1c1087194", "Host"=>"storage101.dfw1.clouddrive.com:443"}, :idempotent=>true, :instrumentor_name=>"excon", :middlewares=>[Excon::Middleware::Expects, Excon::Middleware::Idempotent, Excon::Middleware::Instrumentor, Excon::Middleware::Mock], :mock=>false, :nonblock=>true, :omit_default_port=>false, :read_timeout=>60, :retry_limit=>0, :ssl_ca_file=>"/Users/kyle.rames/.rvm/gems/ruby-1.9.3-p286@fog/gems/excon-0.23.0/data/cacert.pem", :ssl_verify_peer=>true, :tcp_nodelay=>false, :uri_parser=>URI, :write_timeout=>60, :host=>"storage101.dfw1.clouddrive.com", :path=>"/v1/MossoCloudFS_5d0bc756-9753-4681-bdc3-570aa8ba86c3/bucket/frank.jpg%2F0000000002", :port=>"443", :query=>nil, :scheme=>"https", :user=>nil, :password=>"REDACTED", :instrumentor=>Excon::StandardInstrumentor, :family=>0, :request_block=>#<Proc:0x007f9241e66a60@large-etag.rb:41>, :expects=>201, :method=>"PUT", :retries_remaining=>0, :connection=>#<Excon::Connection:7f9241cad228 @data={:chunk_size=>1048576, :connect_timeout=>60, :debug_request=>false, :debug_response=>true, :headers=>{"User-Agent"=>"fog/1.12.1"}, :idempotent=>false, :instrumentor_name=>"excon", :middlewares=>[Excon::Middleware::Expects, Excon::Middleware::Idempotent, Excon::Middleware::Instrumentor, Excon::Middleware::Mock], :mock=>false, :nonblock=>true, :omit_default_port=>false, :read_timeout=>60, :retry_limit=>0, :ssl_ca_file=>"/Users/kyle.rames/.rvm/gems/ruby-1.9.3-p286@fog/gems/excon-0.23.0/data/cacert.pem", :ssl_verify_peer=>true, :tcp_nodelay=>false, :uri_parser=>URI, :write_timeout=>60, :host=>"storage101.dfw1.clouddrive.com", :path=>"/v1/MossoCloudFS_5d0bc756-9753-4681-bdc3-570aa8ba86c3", :port=>"443", :query=>nil, :scheme=>"https", :user=>nil, :password=>nil, :instrumentor=>Excon::StandardInstrumentor, :family=>0} @socket_key="https://storage101.dfw1.clouddrive.com:443">, :stack=>#<Excon::Middleware::Expects:0x007f9241e64e18 @stack=#<Excon::Middleware::Idempotent:0x007f9241e64e90 @stack=#<Excon::Middleware::Instrumentor:0x007f9241e64eb8 @stack=#<Excon::Middleware::Mock:0x007f9241e64f08 @stack=#<Excon::Connection:7f9241cad228 @data={:chunk_size=>1048576, :connect_timeout=>60, :debug_request=>false, :debug_response=>true, :headers=>{"User-Agent"=>"fog/1.12.1"}, :idempotent=>false, :instrumentor_name=>"excon", :middlewares=>[Excon::Middleware::Expects, Excon::Middleware::Idempotent, Excon::Middleware::Instrumentor, Excon::Middleware::Mock], :mock=>false, :nonblock=>true, :omit_default_port=>false, :read_timeout=>60, :retry_limit=>0, :ssl_ca_file=>"/Users/kyle.rames/.rvm/gems/ruby-1.9.3-p286@fog/gems/excon-0.23.0/data/cacert.pem", :ssl_verify_peer=>true, :tcp_nodelay=>false, :uri_parser=>URI, :write_timeout=>60, :host=>"storage101.dfw1.clouddrive.com", :path=>"/v1/MossoCloudFS_5d0bc756-9753-4681-bdc3-570aa8ba86c3", :port=>"443", :query=>nil, :scheme=>"https", :user=>nil, :password=>nil, :instrumentor=>Excon::StandardInstrumentor, :family=>0} @socket_key="https://storage101.dfw1.clouddrive.com:443">>>>>} | |
| .excon.error {:error=>#<Excon::Errors::UnprocessableEntity: Expected(201) <=> Actual(422 Unprocessable Entity) | |
| response => #<Excon::Response:0x007f9240acd7b0 @data={:body=>"<html><h1>Unprocessable Entity</h1><p>Unable to process the contained instructions</p></html>", :headers=>{"Last-Modified"=>"Tue, 16 Jul 2013 14:13:32 GMT", "Content-Length"=>"93", "Content-Type"=>"text/html; charset=UTF-8", "X-Trans-Id"=>"txf3e1ed79c5944ba093fb7b00c485b347", "Date"=>"Tue, 16 Jul 2013 14:13:32 GMT"}, :status=>422, :remote_ip=>"174.143.184.158"}, @body="<html><h1>Unprocessable Entity</h1><p>Unable to process the contained instructions</p></html>", @headers={"Last-Modified"=>"Tue, 16 Jul 2013 14:13:32 GMT", "Content-Length"=>"93", "Content-Type"=>"text/html; charset=UTF-8", "X-Trans-Id"=>"txf3e1ed79c5944ba093fb7b00c485b347", "Date"=>"Tue, 16 Jul 2013 14:13:32 GMT"}, @status=422, @remote_ip="174.143.184.158">>} | |
| [WARNING] Received exception '781: unexpected token at '<html><h1>Unprocessable Entity</h1><p>Unable to process the contained instructions</p></html>'' while decoding>> <html><h1>Unprocessable Entity</h1><p>Unable to process the contained instructions</p></html> | |
| #<Fog::Storage::Rackspace::ServiceError: [HTTP 422] <html><h1>Unprocessable Entity</h1><p>Unable to process the contained instructions</p></html>> | |
| etag>> {"ETag"=>"f3a7cd6fd6588e52e68fb6b1c1087194"} | |
| excon.request {:chunk_size=>1048576, :connect_timeout=>60, :debug_request=>false, :debug_response=>true, :headers=>{"User-Agent"=>"fog/1.12.1", "Content-Type"=>nil, "Accept"=>"application/json", "X-Auth-Token"=>"6fba6c5b4817446cbec0286f5e1fb5f4", "Content-Length"=>0, "ETag"=>"f3a7cd6fd6588e52e68fb6b1c1087194", "Host"=>"storage101.dfw1.clouddrive.com:443"}, :idempotent=>true, :instrumentor_name=>"excon", :middlewares=>[Excon::Middleware::Expects, Excon::Middleware::Idempotent, Excon::Middleware::Instrumentor, Excon::Middleware::Mock], :mock=>false, :nonblock=>true, :omit_default_port=>false, :read_timeout=>60, :retry_limit=>0, :ssl_ca_file=>"/Users/kyle.rames/.rvm/gems/ruby-1.9.3-p286@fog/gems/excon-0.23.0/data/cacert.pem", :ssl_verify_peer=>true, :tcp_nodelay=>false, :uri_parser=>URI, :write_timeout=>60, :host=>"storage101.dfw1.clouddrive.com", :path=>"/v1/MossoCloudFS_5d0bc756-9753-4681-bdc3-570aa8ba86c3/bucket/frank.jpg%2F0000000002", :port=>"443", :query=>nil, :scheme=>"https", :user=>nil, :password=>"REDACTED", :instrumentor=>Excon::StandardInstrumentor, :family=>0, :request_block=>#<Proc:0x007f9240acba78@large-etag.rb:41>, :expects=>201, :method=>"PUT", :retries_remaining=>0, :connection=>#<Excon::Connection:7f9241cad228 @data={:chunk_size=>1048576, :connect_timeout=>60, :debug_request=>false, :debug_response=>true, :headers=>{"User-Agent"=>"fog/1.12.1"}, :idempotent=>false, :instrumentor_name=>"excon", :middlewares=>[Excon::Middleware::Expects, Excon::Middleware::Idempotent, Excon::Middleware::Instrumentor, Excon::Middleware::Mock], :mock=>false, :nonblock=>true, :omit_default_port=>false, :read_timeout=>60, :retry_limit=>0, :ssl_ca_file=>"/Users/kyle.rames/.rvm/gems/ruby-1.9.3-p286@fog/gems/excon-0.23.0/data/cacert.pem", :ssl_verify_peer=>true, :tcp_nodelay=>false, :uri_parser=>URI, :write_timeout=>60, :host=>"storage101.dfw1.clouddrive.com", :path=>"/v1/MossoCloudFS_5d0bc756-9753-4681-bdc3-570aa8ba86c3", :port=>"443", :query=>nil, :scheme=>"https", :user=>nil, :password=>nil, :instrumentor=>Excon::StandardInstrumentor, :family=>0} @socket_key="https://storage101.dfw1.clouddrive.com:443">, :stack=>#<Excon::Middleware::Expects:0x007f9240ba2e88 @stack=#<Excon::Middleware::Idempotent:0x007f9240ba2eb0 @stack=#<Excon::Middleware::Instrumentor:0x007f9240ba2ed8 @stack=#<Excon::Middleware::Mock:0x007f9240ba2f00 @stack=#<Excon::Connection:7f9241cad228 @data={:chunk_size=>1048576, :connect_timeout=>60, :debug_request=>false, :debug_response=>true, :headers=>{"User-Agent"=>"fog/1.12.1"}, :idempotent=>false, :instrumentor_name=>"excon", :middlewares=>[Excon::Middleware::Expects, Excon::Middleware::Idempotent, Excon::Middleware::Instrumentor, Excon::Middleware::Mock], :mock=>false, :nonblock=>true, :omit_default_port=>false, :read_timeout=>60, :retry_limit=>0, :ssl_ca_file=>"/Users/kyle.rames/.rvm/gems/ruby-1.9.3-p286@fog/gems/excon-0.23.0/data/cacert.pem", :ssl_verify_peer=>true, :tcp_nodelay=>false, :uri_parser=>URI, :write_timeout=>60, :host=>"storage101.dfw1.clouddrive.com", :path=>"/v1/MossoCloudFS_5d0bc756-9753-4681-bdc3-570aa8ba86c3", :port=>"443", :query=>nil, :scheme=>"https", :user=>nil, :password=>nil, :instrumentor=>Excon::StandardInstrumentor, :family=>0} @socket_key="https://storage101.dfw1.clouddrive.com:443">>>>>} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment