)]}'
{"id":"openstack%2Fpython-glanceclient~12491","triplet_id":"openstack%2Fpython-glanceclient~master~If259fc5a338e3e90214a52b773132ed901691c0f","project":"openstack/python-glanceclient","branch":"master","topic":"openstack-qa-glanceclient-issue4570","hashtags":[],"change_id":"If259fc5a338e3e90214a52b773132ed901691c0f","subject":"Specified Content-Length in update request header","status":"MERGED","created":"2012-09-06 07:41:29.000000000","updated":"2012-09-10 23:38:06.000000000","submitted":"2012-09-10 23:38:06.000000000","submitter":{"_account_id":3,"name":"Jenkins","username":"jenkins"},"total_comment_count":0,"unresolved_comment_count":0,"has_review_started":true,"meta_rev_id":"6efe2cf3c71fa2261d1bc8bc2792710a6a7a687a","_number":12491,"virtual_id_number":12491,"owner":{"_account_id":1633,"name":"unmesh-gurjar","email":"unmesh.gurjar@hp.com","username":"unmesh-gurjar"},"actions":{},"labels":{"Verified":{"approved":{"_account_id":3,"name":"Jenkins","username":"jenkins"},"all":[{"value":0,"_account_id":1633,"name":"unmesh-gurjar","email":"unmesh.gurjar@hp.com","username":"unmesh-gurjar"},{"value":2,"date":"2012-09-10 23:38:06.000000000","_account_id":3,"name":"Jenkins","username":"jenkins"},{"value":0,"_account_id":616,"name":"Mark Washenberger","email":"mark.washenberger@markwash.net","username":"markwash"},{"value":0,"_account_id":1132,"name":"Brian Waldon","email":"brian@waldon.cc","username":"bcwaldon"},{"value":0,"_account_id":3085,"name":"Tushar Patil","inactive":true}],"values":{"-2":"Fails","-1":"Doesn\u0027t seem to work"," 0":"No score","+1":"Works for me","+2":"Verified"},"description":"","default_value":0,"optional":true},"Code-Review":{"approved":{"_account_id":616,"name":"Mark Washenberger","email":"mark.washenberger@markwash.net","username":"markwash"},"all":[{"value":0,"date":"2012-09-07 05:49:20.000000000","permitted_voting_range":{"min":0,"max":1},"_account_id":1633,"name":"unmesh-gurjar","email":"unmesh.gurjar@hp.com","username":"unmesh-gurjar"},{"value":0,"_account_id":3,"name":"Jenkins","username":"jenkins"},{"value":2,"date":"2012-09-10 23:08:44.000000000","_account_id":616,"name":"Mark Washenberger","email":"mark.washenberger@markwash.net","username":"markwash"},{"value":2,"date":"2012-09-10 15:46:24.000000000","_account_id":1132,"name":"Brian Waldon","email":"brian@waldon.cc","username":"bcwaldon"},{"value":1,"date":"2012-09-06 20:19:29.000000000","permitted_voting_range":{"min":1,"max":1},"_account_id":3085,"name":"Tushar Patil","inactive":true}],"values":{"-2":"Do not merge","-1":"This patch needs further work before it can be merged"," 0":"No score","+1":"Looks good to me, but someone else must approve","+2":"Looks good to me (core reviewer)"},"description":"","default_value":0,"optional":true},"Workflow":{"approved":{"_account_id":616,"name":"Mark Washenberger","email":"mark.washenberger@markwash.net","username":"markwash"},"all":[{"value":0,"_account_id":1633,"name":"unmesh-gurjar","email":"unmesh.gurjar@hp.com","username":"unmesh-gurjar"},{"value":0,"_account_id":3,"name":"Jenkins","username":"jenkins"},{"value":1,"date":"2012-09-10 23:08:44.000000000","_account_id":616,"name":"Mark Washenberger","email":"mark.washenberger@markwash.net","username":"markwash"},{"value":0,"date":"2012-09-06 18:12:50.000000000","_account_id":1132,"name":"Brian Waldon","email":"brian@waldon.cc","username":"bcwaldon"},{"value":0,"_account_id":3085,"name":"Tushar Patil","inactive":true}],"values":{"-1":"Work in progress"," 0":"Ready for reviews","+1":"Approved"},"description":"","default_value":0,"optional":true},"Review-Priority":{"all":[{"value":0,"_account_id":1633,"name":"unmesh-gurjar","email":"unmesh.gurjar@hp.com","username":"unmesh-gurjar"},{"value":0,"_account_id":3,"name":"Jenkins","username":"jenkins"},{"value":0,"_account_id":616,"name":"Mark Washenberger","email":"mark.washenberger@markwash.net","username":"markwash"},{"value":0,"_account_id":1132,"name":"Brian Waldon","email":"brian@waldon.cc","username":"bcwaldon"},{"value":0,"_account_id":3085,"name":"Tushar Patil","inactive":true}],"values":{"-1":"Branch Freeze"," 0":"No Priority","+1":"Important Change","+2":"Top Priority / Holds Gate"},"description":"","default_value":0,"optional":true}},"removable_reviewers":[],"reviewers":{"REVIEWER":[{"_account_id":3,"name":"Jenkins","username":"jenkins"},{"_account_id":616,"name":"Mark Washenberger","email":"mark.washenberger@markwash.net","username":"markwash"},{"_account_id":1132,"name":"Brian Waldon","email":"brian@waldon.cc","username":"bcwaldon"},{"_account_id":1633,"name":"unmesh-gurjar","email":"unmesh.gurjar@hp.com","username":"unmesh-gurjar"},{"_account_id":3085,"name":"Tushar Patil","inactive":true}]},"pending_reviewers":{},"reviewer_updates":[{"updated":"2012-09-06 18:12:50.000000000","updated_by":{"_account_id":1132,"name":"Brian Waldon","email":"brian@waldon.cc","username":"bcwaldon"},"reviewer":{"_account_id":1132,"name":"Brian Waldon","email":"brian@waldon.cc","username":"bcwaldon"},"state":"REVIEWER"},{"updated":"2012-09-06 20:19:29.000000000","updated_by":{"_account_id":3085,"name":"Tushar Patil","inactive":true},"reviewer":{"_account_id":3085,"name":"Tushar Patil","inactive":true},"state":"REVIEWER"},{"updated":"2012-09-10 23:08:44.000000000","updated_by":{"_account_id":616,"name":"Mark Washenberger","email":"mark.washenberger@markwash.net","username":"markwash"},"reviewer":{"_account_id":616,"name":"Mark Washenberger","email":"mark.washenberger@markwash.net","username":"markwash"},"state":"REVIEWER"},{"updated":"2012-09-10 23:38:06.000000000","updated_by":{"_account_id":3,"name":"Jenkins","username":"jenkins"},"reviewer":{"_account_id":3,"name":"Jenkins","username":"jenkins"},"state":"REVIEWER"}],"messages":[{"id":"f48f477d1417ec867ee9075d2d0ee2a0ae79c7ac","author":{"_account_id":3,"name":"Jenkins","username":"jenkins"},"date":"2012-09-06 07:58:29.000000000","message":"Patch Set 1: Works for me\n\nBuild successful\n\n- http://logs.openstack.org/12491/1/check/gate-python-glanceclient-merge/361 : SUCCESS\n- http://logs.openstack.org/12491/1/check/gate-python-glanceclient-docs/275 : SUCCESS\n- http://logs.openstack.org/12491/1/check/gate-python-glanceclient-pep8/339 : SUCCESS\n- http://logs.openstack.org/12491/1/check/gate-python-glanceclient-python26/338 : SUCCESS\n- http://logs.openstack.org/12491/1/check/gate-python-glanceclient-python27/338 : SUCCESS\n- http://logs.openstack.org/12491/1/check/gate-tempest-devstack-vm/10583 : SUCCESS\n- http://logs.openstack.org/12491/1/check/gate-tempest-devstack-vm-cinder/564 : SUCCESS\n","accounts_in_message":[],"_revision_number":1},{"id":"ed881f5c2589ad7e74ac0903955493b4319ac041","author":{"_account_id":1132,"name":"Brian Waldon","email":"brian@waldon.cc","username":"bcwaldon"},"date":"2012-09-06 18:12:50.000000000","message":"Patch Set 1: Do not merge\n\nI\u0027m not sure how setting Content-Length fixes the bug. The ImageDeserializer will look for Content-Length and then for \u0027size\u0027 in the image metadata.","accounts_in_message":[],"_revision_number":1},{"id":"48760a174ab870d56df2a295e1bdb76d5530cdf7","author":{"_account_id":3085,"name":"Tushar Patil","inactive":true},"date":"2012-09-06 20:19:29.000000000","message":"Patch Set 1: Looks good to me, but someone else must approve\n\n\"os-volume_upload_image\" volume action was failing with following error \"Error communication with v1/images : [Errno 32] Broken pipe\" before, Now after using this patch, I could able to copy volume to image successfully.\n\nP.S. Tested using ISCSI volume driver.","accounts_in_message":[],"_revision_number":1},{"id":"6b19f6a437cda4e0d9e7c3c5fe3bc5a5dd6d432e","author":{"_account_id":1132,"name":"Brian Waldon","email":"brian@waldon.cc","username":"bcwaldon"},"date":"2012-09-06 22:04:11.000000000","message":"Patch Set 1:\n\nis the lack of a Content-Length header causing something different to happen down in the http layer?","accounts_in_message":[],"_revision_number":1},{"id":"88cbba866abdca618b5be44fc8b5a38c50221ad9","author":{"_account_id":1633,"name":"unmesh-gurjar","email":"unmesh.gurjar@hp.com","username":"unmesh-gurjar"},"date":"2012-09-07 05:49:20.000000000","message":"Patch Set 1:\n\nBrian: Setting the Content-Length causes the \u0027has_body\u0027 check in Glance ImageDeserializer (https://github.com/openstack/glance/blob/master/glance/api/v1/images.py#L849 and https://github.com/openstack/glance/blob/master/glance/common/wsgi.py#L454) to return True. This prevents the image data from getting set to None (as was happening earlier, inspite of the data being available). Also, the patch description would give you more details.\nTherefore, providing the Content-Length solves the problem.","accounts_in_message":[],"_revision_number":1},{"id":"7df42b88798a234290f4ae15b949ff0dee38a7d6","author":{"_account_id":1633,"name":"unmesh-gurjar","email":"unmesh.gurjar@hp.com","username":"unmesh-gurjar"},"date":"2012-09-10 06:30:40.000000000","message":"Patch Set 1:\n\nBrian: The HTTPConnection request( ) method calls the _set_content_length( ) method to set the content-length header, before sending out a request. The _set_content_length( ) method (snippet from httplib.py: http://paste.openstack.org/show/20797/) sets the content-length header to incorrect value \u00270\u0027, since os.fstat( ) returns a \u0027st_size\u0027 0 for symbolic link file. The _set_content_length( ) method is not aware of the file type and hence calls os.fstat( ) instead of os.lstat( ) (in this particular case).\nTherefore, the image data gets ignored during an update image request for a volume and returns an error on the sender (glanceclient) end.","accounts_in_message":[],"_revision_number":1},{"id":"62e99f1f526499886421e24c493e102c9cdc8596","author":{"_account_id":1132,"name":"Brian Waldon","email":"brian@waldon.cc","username":"bcwaldon"},"date":"2012-09-10 15:46:24.000000000","message":"Patch Set 1: Looks good to me (core reviewer)\n\nOk, this is still a little bit over my head, but I\u0027ll trust that it fixes your problem.","accounts_in_message":[],"_revision_number":1},{"id":"208ce221f0fc9f0d8582ea98ddaba7f27123a015","author":{"_account_id":616,"name":"Mark Washenberger","email":"mark.washenberger@markwash.net","username":"markwash"},"date":"2012-09-10 23:08:44.000000000","message":"Patch Set 1: Looks good to me (core reviewer); Approved\n\n","accounts_in_message":[],"_revision_number":1},{"id":"ccf5ef873c0fe9e5e9168feedfda1ad068bfa28b","author":{"_account_id":3,"name":"Jenkins","username":"jenkins"},"date":"2012-09-10 23:09:03.000000000","message":"Patch Set 1: No score\n\nStarting gate jobs.","accounts_in_message":[],"_revision_number":1},{"id":"14f0cf495878e909809d7a82231fe887804b9e95","author":{"_account_id":3,"name":"Jenkins","username":"jenkins"},"date":"2012-09-10 23:38:06.000000000","message":"Patch Set 1: Verified\n\nBuild successful\n\n- http://logs.openstack.org/12491/1/gate/gate-python-glanceclient-merge/375 : SUCCESS\n- http://logs.openstack.org/12491/1/gate/gate-python-glanceclient-docs/289 : SUCCESS\n- http://logs.openstack.org/12491/1/gate/gate-python-glanceclient-pep8/353 : SUCCESS\n- http://logs.openstack.org/12491/1/gate/gate-python-glanceclient-python26/352 : SUCCESS\n- http://logs.openstack.org/12491/1/gate/gate-python-glanceclient-python27/352 : SUCCESS\n- http://logs.openstack.org/12491/1/gate/gate-tempest-devstack-vm/11089 : SUCCESS\n- http://logs.openstack.org/12491/1/gate/gate-tempest-devstack-vm-cinder/1070 : SUCCESS\n","accounts_in_message":[],"_revision_number":1},{"id":"1ae079a63add30ed8d84a851d706ba07aace0cf1","author":{"_account_id":3,"name":"Jenkins","username":"jenkins"},"date":"2012-09-10 23:38:06.000000000","message":"Change has been successfully merged into the git repository.","accounts_in_message":[],"_revision_number":1}],"current_revision_number":1,"current_revision":"30d8e1b97ce0621a0ce9aae97ad8ab35101860e6","revisions":{"30d8e1b97ce0621a0ce9aae97ad8ab35101860e6":{"kind":"REWORK","_number":1,"created":"2012-09-06 07:41:29.000000000","uploader":{"_account_id":1633,"name":"unmesh-gurjar","email":"unmesh.gurjar@hp.com","username":"unmesh-gurjar"},"ref":"refs/changes/91/12491/1","fetch":{"anonymous http":{"url":"https://review.opendev.org/openstack/python-glanceclient","ref":"refs/changes/91/12491/1","commands":{"Checkout":"git fetch https://review.opendev.org/openstack/python-glanceclient refs/changes/91/12491/1 \u0026\u0026 git checkout FETCH_HEAD","Cherry Pick":"git fetch https://review.opendev.org/openstack/python-glanceclient refs/changes/91/12491/1 \u0026\u0026 git cherry-pick FETCH_HEAD","Format Patch":"git fetch https://review.opendev.org/openstack/python-glanceclient refs/changes/91/12491/1 \u0026\u0026 git format-patch -1 --stdout FETCH_HEAD","Pull":"git pull https://review.opendev.org/openstack/python-glanceclient refs/changes/91/12491/1"}}},"commit":{"parents":[{"commit":"740259025528836c4bc7a1d3bc840cdebf70192a","subject":"Sync importutils changes from openstack-common","web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/python-glanceclient/commit/740259025528836c4bc7a1d3bc840cdebf70192a"}]}],"author":{"name":"Unmesh Gurjar","email":"unmesh.gurjar@vertex.co.in","date":"2012-09-06 07:36:38.000000000","tz":-420},"committer":{"name":"Unmesh Gurjar","email":"unmesh.gurjar@vertex.co.in","date":"2012-09-06 07:41:08.000000000","tz":-420},"subject":"Specified Content-Length in update request header","message":"Specified Content-Length in update request header\n\nWhile uploading a Volume to an image, the HTTPConnection\u0027s request method does\nnot set the Content-Length header (since the volume file is a sym link i.e. the\nos.fstat call returns a st_size of 0). This causes Volume uploads to Glance\nfail (since the image data is ignored as no content-length is specified).\nTherefore setting the Content-Length from update( ) method if the image data is\nprovided.\n\nFixes LP: #1045824\n\nChange-Id: If259fc5a338e3e90214a52b773132ed901691c0f\n","web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/python-glanceclient/commit/30d8e1b97ce0621a0ce9aae97ad8ab35101860e6"}],"resolve_conflicts_web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/python-glanceclient/commit/30d8e1b97ce0621a0ce9aae97ad8ab35101860e6"}]},"branch":"refs/heads/master"}},"requirements":[],"submit_records":[],"submit_requirements":[]}
