)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":21273,"name":"Ilya Chukhnakov","email":"Ilya.chukhnakov@gmail.com","username":"ichukhnakov"},"change_message_id":"6f53a84bf192e134744d8ec920611ff6eabeaf4d","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     John Schwarz \u003cjschwarz@redhat.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2016-05-31 14:11:23 +0300"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Use CaS for setting router\u0027s status as ALLOCATING"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This patch proposes to streamline how we change a router\u0027s status to"},{"line_number":10,"context_line":"ALLOCATING. Using \"UPDATE ... WHERE\", we can use this as a"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"7aa08908_0e8e672d","line":7,"range":{"start_line":7,"start_character":0,"end_line":7,"end_character":49},"updated":"2016-06-08 20:19:41.000000000","message":"That sound misleading to me. Reading this makes me expect the existing code that sets router\u0027s status to use CaS after this patch.","commit_id":"bfeb6fec97bbdcd90da7b35ab3e263d1ea96ccd0"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"2fe3d2bc11cc7e28b33c16d2dc85f102dd1c03b6","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     John Schwarz \u003cjschwarz@redhat.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2016-05-31 14:11:23 +0300"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Use CaS for setting router\u0027s status as ALLOCATING"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This patch proposes to streamline how we change a router\u0027s status to"},{"line_number":10,"context_line":"ALLOCATING. Using \"UPDATE ... WHERE\", we can use this as a"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"7aa08908_a24ab452","line":7,"range":{"start_line":7,"start_character":0,"end_line":7,"end_character":49},"in_reply_to":"7aa08908_0e8e672d","updated":"2016-06-09 05:50:11.000000000","message":"And as far as I can tell, it does. Can you find a place which changes the router\u0027s status to ALLOCATING which I didn\u0027t modify to use the new code?","commit_id":"bfeb6fec97bbdcd90da7b35ab3e263d1ea96ccd0"},{"author":{"_account_id":21273,"name":"Ilya Chukhnakov","email":"Ilya.chukhnakov@gmail.com","username":"ichukhnakov"},"change_message_id":"4476da31221cdcc55931b3b42104cb5375fefc83","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     John Schwarz \u003cjschwarz@redhat.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2016-05-31 14:11:23 +0300"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Use CaS for setting router\u0027s status as ALLOCATING"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This patch proposes to streamline how we change a router\u0027s status to"},{"line_number":10,"context_line":"ALLOCATING. Using \"UPDATE ... WHERE\", we can use this as a"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"7aa08908_72b89b11","line":7,"range":{"start_line":7,"start_character":0,"end_line":7,"end_character":49},"in_reply_to":"7aa08908_a24ab452","updated":"2016-06-09 07:33:51.000000000","message":"Indeed... My bad, didn\u0027t realise that ALLOCATING is only being used in [1] now. For some reason I assumed that it is part of the router creation process, but it is not until your refactoring patch.\n\n[1] https://review.openstack.org/#/c/323232/2/neutron/db/l3_hamode_db.py@529","commit_id":"bfeb6fec97bbdcd90da7b35ab3e263d1ea96ccd0"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"4112b21660740cb3b23d30d58cc5550b26574007","unresolved":false,"context_lines":[{"line_number":12,"context_line":"tried to do the same at the same time. This streamlined approach can"},{"line_number":13,"context_line":"then be used to ensure that operations done on a router (specifically"},{"line_number":14,"context_line":"resource-allocation) can be done in a safe manner."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Change-Id: I09c41ffd7922005394bcb27ac0724b7ed93c4f09"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"3aaa91ec_f04cff71","line":15,"updated":"2016-06-23 13:51:42.000000000","message":"Is there any bug or issue this approach solves? Are we aware of any races at these parts of code?","commit_id":"2197eeedea4ff67d7f611687149e41fad7d46d8d"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"eb230160ccdeec0a86e488d5baa78da748e189e2","unresolved":false,"context_lines":[{"line_number":12,"context_line":"tried to do the same at the same time. This streamlined approach can"},{"line_number":13,"context_line":"then be used to ensure that operations done on a router (specifically"},{"line_number":14,"context_line":"resource-allocation) can be done in a safe manner."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Change-Id: I09c41ffd7922005394bcb27ac0724b7ed93c4f09"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"1aa78d24_0c5da1e9","line":15,"in_reply_to":"3aaa91ec_1009cbdd","updated":"2016-07-03 13:34:32.000000000","message":"Done","commit_id":"2197eeedea4ff67d7f611687149e41fad7d46d8d"},{"author":{"_account_id":7249,"name":"Ann Taraday","email":"akamyshnikova@mirantis.com","username":"AKamyshnikova"},"change_message_id":"b96677f527bc528793011190ab2bbb240a72fc96","unresolved":false,"context_lines":[{"line_number":12,"context_line":"tried to do the same at the same time. This streamlined approach can"},{"line_number":13,"context_line":"then be used to ensure that operations done on a router (specifically"},{"line_number":14,"context_line":"resource-allocation) can be done in a safe manner."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Change-Id: I09c41ffd7922005394bcb27ac0724b7ed93c4f09"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"3aaa91ec_1009cbdd","line":15,"in_reply_to":"3aaa91ec_f04cff71","updated":"2016-06-23 13:54:57.000000000","message":"This change was part of https://review.openstack.org/#/c/317949/ previously, so I think we can add Related-bug: 1499647","commit_id":"2197eeedea4ff67d7f611687149e41fad7d46d8d"}],"neutron/db/l3_db.py":[{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"03ca4684d9091e3d4dfa0bc38a7bde7e87aca6cd","unresolved":false,"context_lines":[{"line_number":223,"context_line":"                    Router.id \u003d\u003d router_id)"},{"line_number":224,"context_line":"                result \u003d query.update("},{"line_number":225,"context_line":"                    {\u0027status\u0027: n_const.ROUTER_STATUS_ALLOCATING})"},{"line_number":226,"context_line":"            return result \u003e 0"},{"line_number":227,"context_line":"        except s_exc.IntegrityError:"},{"line_number":228,"context_line":"            return False"},{"line_number":229,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"7aa08908_bd72cbae","line":226,"range":{"start_line":226,"start_character":12,"end_line":226,"end_character":29},"updated":"2016-06-09 11:16:02.000000000","message":"Hmm, it seems weird to me that \"set_\" method returns some kind of boolean. Let\u0027s raise some meaningful exception instead, exceptions carry more information than bools.","commit_id":"bfeb6fec97bbdcd90da7b35ab3e263d1ea96ccd0"},{"author":{"_account_id":7249,"name":"Ann Taraday","email":"akamyshnikova@mirantis.com","username":"AKamyshnikova"},"change_message_id":"efe0ff84901222a8508f953f3f29ec29a4c0dc41","unresolved":false,"context_lines":[{"line_number":223,"context_line":"                    Router.id \u003d\u003d router_id)"},{"line_number":224,"context_line":"                result \u003d query.update("},{"line_number":225,"context_line":"                    {\u0027status\u0027: n_const.ROUTER_STATUS_ALLOCATING})"},{"line_number":226,"context_line":"            return result \u003e 0"},{"line_number":227,"context_line":"        except s_exc.IntegrityError:"},{"line_number":228,"context_line":"            return False"},{"line_number":229,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"3aaa91ec_17cb851f","line":226,"range":{"start_line":226,"start_character":12,"end_line":226,"end_character":29},"in_reply_to":"7aa08908_bd72cbae","updated":"2016-06-23 13:38:14.000000000","message":"Done","commit_id":"bfeb6fec97bbdcd90da7b35ab3e263d1ea96ccd0"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"d85b3973ab3351600dfd91cff45bfcbf1400028b","unresolved":false,"context_lines":[{"line_number":223,"context_line":"        combination of both should be enough to enforce consistency."},{"line_number":224,"context_line":""},{"line_number":225,"context_line":"        Once a process changed a router\u0027s status to ALLOCATING, it can be"},{"line_number":226,"context_line":"        treated as if it has obtained a lock."},{"line_number":227,"context_line":"        \"\"\""},{"line_number":228,"context_line":"        try:"},{"line_number":229,"context_line":"            with context.session.begin(subtransactions\u003dTrue):"}],"source_content_type":"text/x-python","patch_set":6,"id":"1aa78d24_b381a0fd","line":226,"updated":"2016-07-06 22:03:26.000000000","message":"This doesn\u0027t sound good. Does that mean that a router is permanently broken if the server dies while the router status is set to ALLOCATING? I don\u0027t see anything that brings it out of the ALLOCATING state.","commit_id":"20581b2beb5989835025693335dbcee248ad6ca1"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"8d4c27ec7a1d6224b7e2f2b00586c19705759915","unresolved":false,"context_lines":[{"line_number":223,"context_line":"        combination of both should be enough to enforce consistency."},{"line_number":224,"context_line":""},{"line_number":225,"context_line":"        Once a process changed a router\u0027s status to ALLOCATING, it can be"},{"line_number":226,"context_line":"        treated as if it has obtained a lock."},{"line_number":227,"context_line":"        \"\"\""},{"line_number":228,"context_line":"        try:"},{"line_number":229,"context_line":"            with context.session.begin(subtransactions\u003dTrue):"}],"source_content_type":"text/x-python","patch_set":6,"id":"1aa78d24_0049ea8e","line":226,"in_reply_to":"1aa78d24_b381a0fd","updated":"2016-07-08 07:28:21.000000000","message":"That is on point, Kevin.\n\nUntil I find a way to deal with this, I\u0027m setting this as a WIP. If I don\u0027t, I\u0027ll abandon this. Obviously a solution that is based on some kind of timeout that is added to the DB is an overkill and a no-go.","commit_id":"20581b2beb5989835025693335dbcee248ad6ca1"}],"neutron/db/l3_hamode_db.py":[{"author":{"_account_id":7249,"name":"Ann Taraday","email":"akamyshnikova@mirantis.com","username":"AKamyshnikova"},"change_message_id":"8b5375599af5f7cbe49c50a6f3bfe6d8c04d7ccf","unresolved":false,"context_lines":[{"line_number":527,"context_line":"            # status cannot be used because agents treat hidden routers as"},{"line_number":528,"context_line":"            # deleted routers."},{"line_number":529,"context_line":"            if not self.set_router_allocating(context, router_id):"},{"line_number":530,"context_line":"                raise exc.RouterAlreadyAllocating(router_id\u003drouter_id)"},{"line_number":531,"context_line":""},{"line_number":532,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":533,"context_line":"            router_db \u003d super(L3_HA_NAT_db_mixin, self)._update_router_db("}],"source_content_type":"text/x-python","patch_set":2,"id":"9abb7d3a_b4b37ce8","line":530,"range":{"start_line":530,"start_character":16,"end_line":530,"end_character":70},"updated":"2016-05-31 13:32:35.000000000","message":"I\u0027m not sure here why we raise an exception here, why not just return with a warning?","commit_id":"bfeb6fec97bbdcd90da7b35ab3e263d1ea96ccd0"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"e3983b4e90c18dd68325ef8710429681d92f40d3","unresolved":false,"context_lines":[{"line_number":527,"context_line":"            # status cannot be used because agents treat hidden routers as"},{"line_number":528,"context_line":"            # deleted routers."},{"line_number":529,"context_line":"            if not self.set_router_allocating(context, router_id):"},{"line_number":530,"context_line":"                raise exc.RouterAlreadyAllocating(router_id\u003drouter_id)"},{"line_number":531,"context_line":""},{"line_number":532,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":533,"context_line":"            router_db \u003d super(L3_HA_NAT_db_mixin, self)._update_router_db("}],"source_content_type":"text/x-python","patch_set":2,"id":"9abb7d3a_26163ef1","line":530,"range":{"start_line":530,"start_character":16,"end_line":530,"end_character":70},"in_reply_to":"9abb7d3a_b4b37ce8","updated":"2016-05-31 14:40:42.000000000","message":"In case we tried to update a router which is currently allocating, we probably want to stop and wait until such allocations are done. We don\u0027t want to open the door for discrepancies in the db, etc.","commit_id":"bfeb6fec97bbdcd90da7b35ab3e263d1ea96ccd0"}]}
