)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":12000,"name":"Ian Cordasco","email":"sigmavirus24@gmail.com","username":"sigmavirus24"},"change_message_id":"25ab0a33a12ec4666d8f0e61742e3e96bf2b56d1","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Sabari Kumar Murugesan \u003csmurugesan@vmware.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2015-01-27 23:26:33 -0800"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"VMware: Check session before image upload"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Uploading an image to vSphere backend without checking the session"},{"line_number":10,"context_line":"results broken pipe socket error. When this happens, glance-api"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"da86d52c_1dad3589","line":7,"updated":"2015-01-31 19:44:58.000000000","message":"Summary lines should be imperative, e.g.,\n\n    Check VMware session before uploading image","commit_id":"5409869acd5b36931df104dd0a7d11f7ddf4da3c"},{"author":{"_account_id":7575,"name":"Sabari","email":"smurugesan@vmware.com","username":"sabari"},"change_message_id":"4a7adf8a69cd97f5ec23d2dcbb24a3c592d9fc48","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Sabari Kumar Murugesan \u003csmurugesan@vmware.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2015-01-27 23:26:33 -0800"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"VMware: Check session before image upload"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Uploading an image to vSphere backend without checking the session"},{"line_number":10,"context_line":"results broken pipe socket error. When this happens, glance-api"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"da86d52c_1d77f503","line":7,"in_reply_to":"da86d52c_1dad3589","updated":"2015-01-31 20:23:40.000000000","message":"Done","commit_id":"5409869acd5b36931df104dd0a7d11f7ddf4da3c"},{"author":{"_account_id":12000,"name":"Ian Cordasco","email":"sigmavirus24@gmail.com","username":"sigmavirus24"},"change_message_id":"25ab0a33a12ec4666d8f0e61742e3e96bf2b56d1","unresolved":false,"context_lines":[{"line_number":7,"context_line":"VMware: Check session before image upload"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Uploading an image to vSphere backend without checking the session"},{"line_number":10,"context_line":"results broken pipe socket error. When this happens, glance-api"},{"line_number":11,"context_line":"sends a 400 response because the IOError is not handled by the"},{"line_number":12,"context_line":"store."},{"line_number":13,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"da86d52c_5db6cddd","line":10,"updated":"2015-01-31 19:44:58.000000000","message":"It may result, right? It doesn\u0027t always result in this.","commit_id":"5409869acd5b36931df104dd0a7d11f7ddf4da3c"},{"author":{"_account_id":7575,"name":"Sabari","email":"smurugesan@vmware.com","username":"sabari"},"change_message_id":"4a7adf8a69cd97f5ec23d2dcbb24a3c592d9fc48","unresolved":false,"context_lines":[{"line_number":7,"context_line":"VMware: Check session before image upload"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Uploading an image to vSphere backend without checking the session"},{"line_number":10,"context_line":"results broken pipe socket error. When this happens, glance-api"},{"line_number":11,"context_line":"sends a 400 response because the IOError is not handled by the"},{"line_number":12,"context_line":"store."},{"line_number":13,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"da86d52c_dd539d6a","line":10,"in_reply_to":"da86d52c_5db6cddd","updated":"2015-01-31 20:23:40.000000000","message":"Actually, it happens all the time. Right after the headers (with expired session cookie) are sent to the server, the server responds with 401 and closes the socket. But httplib is not finished and is attempting to write the image data on the closed socket. Seems like http://bugs.python.org/issue16062.","commit_id":"5409869acd5b36931df104dd0a7d11f7ddf4da3c"}],"glance_store/_drivers/vmware_datastore.py":[{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"ff4b1e09d8fe56b09db72ab96e5fa2a7ba4a5871","unresolved":false,"context_lines":[{"line_number":306,"context_line":"    def _build_vim_cookie_header(self):"},{"line_number":307,"context_line":"        \"\"\"Build ESX host session cookie header.\"\"\""},{"line_number":308,"context_line":"        if not self.session._is_current_session_active():"},{"line_number":309,"context_line":"            self.reset_session(force\u003dTrue)"},{"line_number":310,"context_line":"        vim_cookies \u003d self.session.vim.client.options.transport.cookiejar"},{"line_number":311,"context_line":"        if len(list(vim_cookies)) \u003e 0:"},{"line_number":312,"context_line":"            cookie \u003d list(vim_cookies)[0]"}],"source_content_type":"text/x-python","patch_set":7,"id":"1a930d6b_b316b7ef","line":309,"updated":"2015-01-23 09:49:27.000000000","message":"So if we do check and reset session logic here do we still need individual reset_session() call for UNAUTHORIZED case in store.add() and store.query()? I think they are useless now.","commit_id":"a8eceaaea82253f1de88b314e0bbd51115eb738d"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"3df656295efbff3280c4fc690c074f59f53fbd12","unresolved":false,"context_lines":[{"line_number":306,"context_line":"    def _build_vim_cookie_header(self):"},{"line_number":307,"context_line":"        \"\"\"Build ESX host session cookie header.\"\"\""},{"line_number":308,"context_line":"        if not self.session._is_current_session_active():"},{"line_number":309,"context_line":"            self.reset_session(force\u003dTrue)"},{"line_number":310,"context_line":"        vim_cookies \u003d self.session.vim.client.options.transport.cookiejar"},{"line_number":311,"context_line":"        if len(list(vim_cookies)) \u003e 0:"},{"line_number":312,"context_line":"            cookie \u003d list(vim_cookies)[0]"}],"source_content_type":"text/x-python","patch_set":7,"id":"da86d52c_85737e4c","line":309,"in_reply_to":"1a930d6b_81b2e149","updated":"2015-02-02 04:49:37.000000000","message":"I think you just removed unauthorized case for store.add() in change #149515 but store.query() one. IMO the logic at Line477 should be removed as well. Base on your commit message, I see  the patch only covered uploading, but I think you\u0027d better push up a dedicated patch for the case.","commit_id":"a8eceaaea82253f1de88b314e0bbd51115eb738d"},{"author":{"_account_id":7575,"name":"Sabari","email":"smurugesan@vmware.com","username":"sabari"},"change_message_id":"cb5ee52f0180b135896387233b8ad83a15cf090c","unresolved":false,"context_lines":[{"line_number":306,"context_line":"    def _build_vim_cookie_header(self):"},{"line_number":307,"context_line":"        \"\"\"Build ESX host session cookie header.\"\"\""},{"line_number":308,"context_line":"        if not self.session._is_current_session_active():"},{"line_number":309,"context_line":"            self.reset_session(force\u003dTrue)"},{"line_number":310,"context_line":"        vim_cookies \u003d self.session.vim.client.options.transport.cookiejar"},{"line_number":311,"context_line":"        if len(list(vim_cookies)) \u003e 0:"},{"line_number":312,"context_line":"            cookie \u003d list(vim_cookies)[0]"}],"source_content_type":"text/x-python","patch_set":7,"id":"1a930d6b_81b2e149","line":309,"in_reply_to":"1a930d6b_b316b7ef","updated":"2015-01-28 07:30:02.000000000","message":"No, we do not. I removed the unauthorized case in the dependent patch along with the need to retry.","commit_id":"a8eceaaea82253f1de88b314e0bbd51115eb738d"},{"author":{"_account_id":7575,"name":"Sabari","email":"smurugesan@vmware.com","username":"sabari"},"change_message_id":"17a5cf6fdcf9d99bda3b8353c0b56013e65b9342","unresolved":false,"context_lines":[{"line_number":306,"context_line":"    def _build_vim_cookie_header(self):"},{"line_number":307,"context_line":"        \"\"\"Build ESX host session cookie header.\"\"\""},{"line_number":308,"context_line":"        if not self.session._is_current_session_active():"},{"line_number":309,"context_line":"            self.reset_session(force\u003dTrue)"},{"line_number":310,"context_line":"        vim_cookies \u003d self.session.vim.client.options.transport.cookiejar"},{"line_number":311,"context_line":"        if len(list(vim_cookies)) \u003e 0:"},{"line_number":312,"context_line":"            cookie \u003d list(vim_cookies)[0]"}],"source_content_type":"text/x-python","patch_set":7,"id":"da86d52c_8831d3ee","line":309,"in_reply_to":"da86d52c_85737e4c","updated":"2015-02-02 05:47:50.000000000","message":"I was thinking, even in the remote case the session expires between is_current_session_active and the HTTP GET request, we can always safely retry in _query() but not in store.add().  So, IMO I feel the unauthorized case can remain in store.query(). \n\nThe other option is to not check the session expiration in _query() and retry in case of unauthorized (On the upside, this can save an api call to the backend server)\n\nWhat do you think ? Thanks for the reviews btw :)","commit_id":"a8eceaaea82253f1de88b314e0bbd51115eb738d"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"ff4b1e09d8fe56b09db72ab96e5fa2a7ba4a5871","unresolved":false,"context_lines":[{"line_number":359,"context_line":"                # error instead of returning the response."},{"line_number":360,"context_line":"                # See http://bugs.python.org/issue16062. Here, we log the error"},{"line_number":361,"context_line":"                # and continue to look into the response."},{"line_number":362,"context_line":"                msg \u003d (\"Communication error sending http %(method)s request\""},{"line_number":363,"context_line":"                       \"to the url %(url)s.\" % {\u0027method\u0027: \u0027PUT\u0027, \u0027url\u0027: url})"},{"line_number":364,"context_line":"                LOG.error(msg)"},{"line_number":365,"context_line":"            except Exception:"}],"source_content_type":"text/x-python","patch_set":7,"id":"1a930d6b_53e833e2","line":362,"updated":"2015-01-23 09:49:27.000000000","message":"_LE() ?","commit_id":"a8eceaaea82253f1de88b314e0bbd51115eb738d"},{"author":{"_account_id":7575,"name":"Sabari","email":"smurugesan@vmware.com","username":"sabari"},"change_message_id":"cb5ee52f0180b135896387233b8ad83a15cf090c","unresolved":false,"context_lines":[{"line_number":359,"context_line":"                # error instead of returning the response."},{"line_number":360,"context_line":"                # See http://bugs.python.org/issue16062. Here, we log the error"},{"line_number":361,"context_line":"                # and continue to look into the response."},{"line_number":362,"context_line":"                msg \u003d (\"Communication error sending http %(method)s request\""},{"line_number":363,"context_line":"                       \"to the url %(url)s.\" % {\u0027method\u0027: \u0027PUT\u0027, \u0027url\u0027: url})"},{"line_number":364,"context_line":"                LOG.error(msg)"},{"line_number":365,"context_line":"            except Exception:"}],"source_content_type":"text/x-python","patch_set":7,"id":"1a930d6b_0151910e","line":362,"in_reply_to":"1a930d6b_53e833e2","updated":"2015-01-28 07:30:02.000000000","message":"Done","commit_id":"a8eceaaea82253f1de88b314e0bbd51115eb738d"},{"author":{"_account_id":12000,"name":"Ian Cordasco","email":"sigmavirus24@gmail.com","username":"sigmavirus24"},"change_message_id":"25ab0a33a12ec4666d8f0e61742e3e96bf2b56d1","unresolved":false,"context_lines":[{"line_number":296,"context_line":""},{"line_number":297,"context_line":"    def _build_vim_cookie_header(self):"},{"line_number":298,"context_line":"        \"\"\"Build ESX host session cookie header.\"\"\""},{"line_number":299,"context_line":"        if not self.session._is_current_session_active():"},{"line_number":300,"context_line":"            self.reset_session(force\u003dTrue)"},{"line_number":301,"context_line":"        vim_cookies \u003d self.session.vim.client.options.transport.cookiejar"},{"line_number":302,"context_line":"        if len(list(vim_cookies)) \u003e 0:"}],"source_content_type":"text/x-python","patch_set":8,"id":"da86d52c_9d992571","line":299,"updated":"2015-01-31 19:44:58.000000000","message":"Using private (implementation) methods on a collaborator object seems like a recipe for disaster especially since this is coming from oslo.vmware. Please find a better way to detect this.","commit_id":"5409869acd5b36931df104dd0a7d11f7ddf4da3c"},{"author":{"_account_id":7575,"name":"Sabari","email":"smurugesan@vmware.com","username":"sabari"},"change_message_id":"4a7adf8a69cd97f5ec23d2dcbb24a3c592d9fc48","unresolved":false,"context_lines":[{"line_number":296,"context_line":""},{"line_number":297,"context_line":"    def _build_vim_cookie_header(self):"},{"line_number":298,"context_line":"        \"\"\"Build ESX host session cookie header.\"\"\""},{"line_number":299,"context_line":"        if not self.session._is_current_session_active():"},{"line_number":300,"context_line":"            self.reset_session(force\u003dTrue)"},{"line_number":301,"context_line":"        vim_cookies \u003d self.session.vim.client.options.transport.cookiejar"},{"line_number":302,"context_line":"        if len(list(vim_cookies)) \u003e 0:"}],"source_content_type":"text/x-python","patch_set":8,"id":"da86d52c_fd694126","line":299,"in_reply_to":"da86d52c_9d992571","updated":"2015-01-31 20:23:40.000000000","message":"I submitted a patch to oslo.vmware to make it a supported method (public). Its now in the latest version 0.9.0. I had forgotten to update here, thanks.","commit_id":"5409869acd5b36931df104dd0a7d11f7ddf4da3c"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"23336f5ef45853402ea2c718155e9756f1d17033","unresolved":false,"context_lines":[{"line_number":296,"context_line":""},{"line_number":297,"context_line":"    def _build_vim_cookie_header(self, verify_session\u003dFalse):"},{"line_number":298,"context_line":"        \"\"\"Build ESX host session cookie header.\"\"\""},{"line_number":299,"context_line":"        if verify_session and not self.session.is_current_session_active():"},{"line_number":300,"context_line":"            self.reset_session(force\u003dTrue)"},{"line_number":301,"context_line":"        vim_cookies \u003d self.session.vim.client.options.transport.cookiejar"},{"line_number":302,"context_line":"        if len(list(vim_cookies)) \u003e 0:"}],"source_content_type":"text/x-python","patch_set":12,"id":"da86d52c_b6f28304","line":299,"updated":"2015-02-08 04:12:09.000000000","message":"Thanks.\n\n(And I\u0027m sorry for my delay review/response on this.)","commit_id":"a21a4c6507a746bc573e26656fb7a586baefa3a7"},{"author":{"_account_id":6549,"name":"Zhi Yan Liu","email":"lzy.dev@gmail.com","username":"lzy-dev"},"change_message_id":"23336f5ef45853402ea2c718155e9756f1d17033","unresolved":false,"context_lines":[{"line_number":349,"context_line":"            # error instead of returning the response."},{"line_number":350,"context_line":"            # See http://bugs.python.org/issue16062. Here, we log the error"},{"line_number":351,"context_line":"            # and continue to look into the response."},{"line_number":352,"context_line":"            msg \u003d (\"Communication error sending http %(method)s request\""},{"line_number":353,"context_line":"                   \"to the url %(url)s.\" % {\u0027method\u0027: \u0027PUT\u0027, \u0027url\u0027: url})"},{"line_number":354,"context_line":"            LOG.error(msg)"},{"line_number":355,"context_line":"        except Exception:"}],"source_content_type":"text/x-python","patch_set":12,"id":"da86d52c_d6f7f7f3","line":352,"updated":"2015-02-08 04:12:09.000000000","message":"using _LE()","commit_id":"a21a4c6507a746bc573e26656fb7a586baefa3a7"}]}
