)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"b9bd6980f7f0b91786f676df52d2694e9082c11d","unresolved":false,"context_lines":[{"line_number":18,"context_line":"If count of affected row is less than expected, then another"},{"line_number":19,"context_line":"thread already changed our row and RetryRequest is raised."},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"Existent retry wrappers for neutron.api.v2.base were updated to restart"},{"line_number":22,"context_line":"transaction if RetryRequest is raised."},{"line_number":23,"context_line":"Removed retry wrapper from ml2 create_port."},{"line_number":24,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":22,"id":"7a2fa921_3ab852e5","line":21,"updated":"2015-10-12 21:51:49.000000000","message":"This commit message is starting to sound like a laundry list.  Could this be an indication that there a few independent things being done here?","commit_id":"07858abd8e1cdcd793d1ec1bbd0e70168dc100a1"},{"author":{"_account_id":13768,"name":"Pavel Bondar","email":"pbondar@infoblox.com","username":"pavel_bondar"},"change_message_id":"0f7a4ad86cfd47fea64dadd51064f1da16975f72","unresolved":false,"context_lines":[{"line_number":18,"context_line":"If count of affected row is less than expected, then another"},{"line_number":19,"context_line":"thread already changed our row and RetryRequest is raised."},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"Existent retry wrappers for neutron.api.v2.base were updated to restart"},{"line_number":22,"context_line":"transaction if RetryRequest is raised."},{"line_number":23,"context_line":"Removed retry wrapper from ml2 create_port."},{"line_number":24,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":22,"id":"5a2ca52d_5895413e","line":21,"in_reply_to":"7a2fa921_3ab852e5","updated":"2015-10-13 09:57:26.000000000","message":"Tweeking retry wrapper to handle RetryRequest is a precondition to make compare-and-swap work. However updating retry wrapper which is used in several places affects widea area of code than where compare-and-swap currently implemented.\nSo probably this part could go as a separate review.","commit_id":"07858abd8e1cdcd793d1ec1bbd0e70168dc100a1"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"d82cf8e82917672849e62171af02a406880540e5","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Use compare-and-swap for IpamAvailabilityRange"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Existing locking mechanism \u0027select for update\u0027 causes deadlocks"},{"line_number":10,"context_line":"with galera multi-writers and requires restaring entire transaction to"},{"line_number":11,"context_line":"retry."},{"line_number":12,"context_line":"Replaced locking rows with compare-and-swap approach."},{"line_number":13,"context_line":"Compare-and-swap verifies that row was not changed by"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":29,"id":"ba8a016a_3599af7c","line":10,"range":{"start_line":10,"start_character":39,"end_line":10,"end_character":48},"updated":"2015-11-19 13:43:48.000000000","message":"restaring \u003d\u003e restarting","commit_id":"f5bc226e23925ddde6760691352b9250f4e44fa7"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"7ed6859c73ebc9e66399f6e7a2a2d20d3b49ebc3","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Use compare-and-swap for IpamAvailabilityRange"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Existing locking mechanism \u0027select for update\u0027 causes deadlocks"},{"line_number":10,"context_line":"with galera multi-writers and requires restarting entire transaction"},{"line_number":11,"context_line":"to retry."},{"line_number":12,"context_line":"Replaced locking rows with compare-and-swap approach."},{"line_number":13,"context_line":"Compare-and-swap verifies that row was not changed by"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":30,"id":"ba8a016a_6adad418","line":10,"updated":"2015-11-20 00:31:44.000000000","message":"Don\u0027t we still need to restart the entire transaction in the case of a RetryRequest?","commit_id":"bfa8db1e803ed81f573229b13356c5ab81fe10d8"},{"author":{"_account_id":13768,"name":"Pavel Bondar","email":"pbondar@infoblox.com","username":"pavel_bondar"},"change_message_id":"deb47f3fe718754e865e1d5350343b9eddd78a8d","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Use compare-and-swap for IpamAvailabilityRange"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Existing locking mechanism \u0027select for update\u0027 causes deadlocks"},{"line_number":10,"context_line":"with galera multi-writers and requires restarting entire transaction"},{"line_number":11,"context_line":"to retry."},{"line_number":12,"context_line":"Replaced locking rows with compare-and-swap approach."},{"line_number":13,"context_line":"Compare-and-swap verifies that row was not changed by"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":30,"id":"ba8a016a_f7f3f970","line":10,"in_reply_to":"ba8a016a_6adad418","updated":"2015-11-20 09:49:29.000000000","message":"yes, in case of RetryRequest we do actual restart transaction, so I\u0027ll remove this part of commit message.","commit_id":"bfa8db1e803ed81f573229b13356c5ab81fe10d8"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"7ed6859c73ebc9e66399f6e7a2a2d20d3b49ebc3","unresolved":false,"context_lines":[{"line_number":13,"context_line":"Compare-and-swap verifies that row was not changed by"},{"line_number":14,"context_line":"another thread before updating/deleting it, so it uses"},{"line_number":15,"context_line":"filter-and-update or filter-and-delete and return count of affected"},{"line_number":16,"context_line":"rows."},{"line_number":17,"context_line":"If count of affected row is less than expected, then another"},{"line_number":18,"context_line":"thread already changed our row and RetryRequest is raised."},{"line_number":19,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":30,"id":"ba8a016a_aacd1c67","line":16,"updated":"2015-11-20 00:31:44.000000000","message":"nit:  A few ines in commit message are too long.  Fix if you get a chance to upload a new patch set.","commit_id":"bfa8db1e803ed81f573229b13356c5ab81fe10d8"},{"author":{"_account_id":13768,"name":"Pavel Bondar","email":"pbondar@infoblox.com","username":"pavel_bondar"},"change_message_id":"deb47f3fe718754e865e1d5350343b9eddd78a8d","unresolved":false,"context_lines":[{"line_number":13,"context_line":"Compare-and-swap verifies that row was not changed by"},{"line_number":14,"context_line":"another thread before updating/deleting it, so it uses"},{"line_number":15,"context_line":"filter-and-update or filter-and-delete and return count of affected"},{"line_number":16,"context_line":"rows."},{"line_number":17,"context_line":"If count of affected row is less than expected, then another"},{"line_number":18,"context_line":"thread already changed our row and RetryRequest is raised."},{"line_number":19,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":30,"id":"ba8a016a_f79a1913","line":16,"in_reply_to":"ba8a016a_aacd1c67","updated":"2015-11-20 09:49:29.000000000","message":"will do","commit_id":"bfa8db1e803ed81f573229b13356c5ab81fe10d8"}],"neutron/db/api.py":[{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"b9bd6980f7f0b91786f676df52d2694e9082c11d","unresolved":false,"context_lines":[{"line_number":32,"context_line":"is_deadlock \u003d lambda e: isinstance(e, db_exc.DBDeadlock)"},{"line_number":33,"context_line":"retry_db_errors \u003d oslo_db_api.wrap_db_retry("},{"line_number":34,"context_line":"    max_retries\u003dMAX_RETRIES,"},{"line_number":35,"context_line":"    retry_on_request\u003dTrue,"},{"line_number":36,"context_line":"    exception_checker\u003dis_deadlock"},{"line_number":37,"context_line":")"},{"line_number":38,"context_line":""}],"source_content_type":"text/x-python","patch_set":22,"id":"7a2fa921_1ac9d6ac","line":35,"updated":"2015-10-12 21:51:49.000000000","message":"Does this reach beyond the scope of this patch?","commit_id":"07858abd8e1cdcd793d1ec1bbd0e70168dc100a1"},{"author":{"_account_id":13768,"name":"Pavel Bondar","email":"pbondar@infoblox.com","username":"pavel_bondar"},"change_message_id":"0f7a4ad86cfd47fea64dadd51064f1da16975f72","unresolved":false,"context_lines":[{"line_number":32,"context_line":"is_deadlock \u003d lambda e: isinstance(e, db_exc.DBDeadlock)"},{"line_number":33,"context_line":"retry_db_errors \u003d oslo_db_api.wrap_db_retry("},{"line_number":34,"context_line":"    max_retries\u003dMAX_RETRIES,"},{"line_number":35,"context_line":"    retry_on_request\u003dTrue,"},{"line_number":36,"context_line":"    exception_checker\u003dis_deadlock"},{"line_number":37,"context_line":")"},{"line_number":38,"context_line":""}],"source_content_type":"text/x-python","patch_set":22,"id":"5a2ca52d_d5e83c19","line":35,"in_reply_to":"7a2fa921_1ac9d6ac","updated":"2015-10-13 09:57:26.000000000","message":"Yes, retry_db_errors is widely used as a top level retry wrapper in:\n-  neutron/api/v2/base.py\n-  neutron/api/rpc/handlers/dhcp_rpc.py\n-  neutron/api/rpc/handlers/l3_rpc.py\n\nI believe using \u0027retry_on_request\u0027 in this wrapper will simplify future more wide inventing of compare-and-swap approach.\n\nProbably it can go as a separate patch, but not sure about it.","commit_id":"07858abd8e1cdcd793d1ec1bbd0e70168dc100a1"}],"neutron/ipam/drivers/neutrondb_ipam/db_api.py":[{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"b8783558343b9914454323612f4320046fb3b175","unresolved":false,"context_lines":[{"line_number":150,"context_line":"            db_models.IpamAllocationPool).filter_by("},{"line_number":151,"context_line":"            id\u003dallocation_pool_id)"},{"line_number":152,"context_line":"        if locking:"},{"line_number":153,"context_line":"            range_qry \u003d range_qry.with_lockmode(\u0027update\u0027)"},{"line_number":154,"context_line":"        return range_qry"},{"line_number":155,"context_line":""},{"line_number":156,"context_line":"    def create_range(self, session, allocation_pool_id,"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba15a1d1_1a5307e3","line":153,"updated":"2015-09-14 20:21:16.000000000","message":"This solution doesn\u0027t seem compliant  with galera multi-writers. Thoughts?","commit_id":"7ce5188fcfaf5aacd9e34429ff9afe960f998219"},{"author":{"_account_id":13768,"name":"Pavel Bondar","email":"pbondar@infoblox.com","username":"pavel_bondar"},"change_message_id":"be0ebaaab2e24cae1f73db81be57a160fed77aac","unresolved":false,"context_lines":[{"line_number":150,"context_line":"            db_models.IpamAllocationPool).filter_by("},{"line_number":151,"context_line":"            id\u003dallocation_pool_id)"},{"line_number":152,"context_line":"        if locking:"},{"line_number":153,"context_line":"            range_qry \u003d range_qry.with_lockmode(\u0027update\u0027)"},{"line_number":154,"context_line":"        return range_qry"},{"line_number":155,"context_line":""},{"line_number":156,"context_line":"    def create_range(self, session, allocation_pool_id,"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba15a1d1_18a533b4","line":153,"in_reply_to":"ba15a1d1_15097cdd","updated":"2015-09-15 12:43:17.000000000","message":"IpamAllocationPool is going to be changed in this \"select for update\".\nAgree about splitting fix into 2 stages. Using \u0027with_lockmode(\u0027update\u0027)\u0027 is quite popular way of locking in this file, so it seems to be a long way to make it compliant with galera. \nInvestigating with examples.","commit_id":"7ce5188fcfaf5aacd9e34429ff9afe960f998219"},{"author":{"_account_id":13768,"name":"Pavel Bondar","email":"pbondar@infoblox.com","username":"pavel_bondar"},"change_message_id":"855b3053526d276f6bbdadf6dfbe7f014fca3346","unresolved":false,"context_lines":[{"line_number":150,"context_line":"            db_models.IpamAllocationPool).filter_by("},{"line_number":151,"context_line":"            id\u003dallocation_pool_id)"},{"line_number":152,"context_line":"        if locking:"},{"line_number":153,"context_line":"            range_qry \u003d range_qry.with_lockmode(\u0027update\u0027)"},{"line_number":154,"context_line":"        return range_qry"},{"line_number":155,"context_line":""},{"line_number":156,"context_line":"    def create_range(self, session, allocation_pool_id,"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba15a1d1_b1730715","line":153,"in_reply_to":"ba15a1d1_1a5307e3","updated":"2015-09-15 11:25:38.000000000","message":"Can you shed some light on issues with galera multi-writers?\nAs I got from brief search:\nThe SQL construct \"select ... for update\" can cause deadlocks with galera multi-writers. Would it be enough to add retry_on_deadlock wrapper? Or some better way exists for dealing with galera?","commit_id":"7ce5188fcfaf5aacd9e34429ff9afe960f998219"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"1992caa9a6b375a6be0ea6756f492bde27e87fa7","unresolved":false,"context_lines":[{"line_number":150,"context_line":"            db_models.IpamAllocationPool).filter_by("},{"line_number":151,"context_line":"            id\u003dallocation_pool_id)"},{"line_number":152,"context_line":"        if locking:"},{"line_number":153,"context_line":"            range_qry \u003d range_qry.with_lockmode(\u0027update\u0027)"},{"line_number":154,"context_line":"        return range_qry"},{"line_number":155,"context_line":""},{"line_number":156,"context_line":"    def create_range(self, session, allocation_pool_id,"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba15a1d1_15097cdd","line":153,"in_reply_to":"ba15a1d1_4c2774b6","updated":"2015-09-15 12:17:42.000000000","message":"IMO, the right approach is to split the fix in 2 changes: one handling the non-galera case (simple and quick to merge), one handling the galera case (often, imply many iterations)","commit_id":"7ce5188fcfaf5aacd9e34429ff9afe960f998219"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"b3972b4c70a344deefecbfc1414c1f290e943d2e","unresolved":false,"context_lines":[{"line_number":150,"context_line":"            db_models.IpamAllocationPool).filter_by("},{"line_number":151,"context_line":"            id\u003dallocation_pool_id)"},{"line_number":152,"context_line":"        if locking:"},{"line_number":153,"context_line":"            range_qry \u003d range_qry.with_lockmode(\u0027update\u0027)"},{"line_number":154,"context_line":"        return range_qry"},{"line_number":155,"context_line":""},{"line_number":156,"context_line":"    def create_range(self, session, allocation_pool_id,"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba15a1d1_38bfd7fc","line":153,"in_reply_to":"ba15a1d1_8cdcac13","updated":"2015-09-15 12:37:35.000000000","message":"Technical debt? \n\nA \"normal\" backend locks the rows when the select for update is done and disallows \"overlapping\" concurrent select for update. A multi-writer galera backend is not able to ensure such lock and instead raises a deadlock for every session in conflicting (\"overlapping\") with a committed session ... so we have to handle such deadlock or replace range by a table with every allocatable ip (outch)","commit_id":"7ce5188fcfaf5aacd9e34429ff9afe960f998219"},{"author":{"_account_id":11682,"name":"Ryan Moats","email":"rmoats@us.ibm.com","username":"regXboi"},"change_message_id":"f499c8397f68c88d04bf12408d3238634b13f323","unresolved":false,"context_lines":[{"line_number":150,"context_line":"            db_models.IpamAllocationPool).filter_by("},{"line_number":151,"context_line":"            id\u003dallocation_pool_id)"},{"line_number":152,"context_line":"        if locking:"},{"line_number":153,"context_line":"            range_qry \u003d range_qry.with_lockmode(\u0027update\u0027)"},{"line_number":154,"context_line":"        return range_qry"},{"line_number":155,"context_line":""},{"line_number":156,"context_line":"    def create_range(self, session, allocation_pool_id,"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba15a1d1_8cdcac13","line":153,"in_reply_to":"ba15a1d1_b1730715","updated":"2015-09-15 11:47:36.000000000","message":"I\u0027d really prefer something *other* than retry_on_deadlock - that\u0027s already a big piece of technical debt and adding to it doesn\u0027t excite me","commit_id":"7ce5188fcfaf5aacd9e34429ff9afe960f998219"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"b266889d80f3a357009af67e8543eb1946f04e5d","unresolved":false,"context_lines":[{"line_number":150,"context_line":"            db_models.IpamAllocationPool).filter_by("},{"line_number":151,"context_line":"            id\u003dallocation_pool_id)"},{"line_number":152,"context_line":"        if locking:"},{"line_number":153,"context_line":"            range_qry \u003d range_qry.with_lockmode(\u0027update\u0027)"},{"line_number":154,"context_line":"        return range_qry"},{"line_number":155,"context_line":""},{"line_number":156,"context_line":"    def create_range(self, session, allocation_pool_id,"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba15a1d1_4c2774b6","line":153,"in_reply_to":"ba15a1d1_b1730715","updated":"2015-09-15 12:02:07.000000000","message":"It depends :)\n\nTypically if you select for update on a table in order to update an other table then no deadlock is raised as no update is done on \"selected for update\" rows ... an example[1] and how to handle such case[2].\n\nIn this case, i am not sure on what the select for update is applied because of the join: IpamAvailabilityRange or/and IpamAllocationPool:\n\n* If it\u0027s on IpamAllocationPool then no update is done on selected rows \u003d\u003e not working\n* Otherwise an update is done on selected rows so if 2 concurrent calls try to update the same range then the last one to call session commit will raise a deadlock\n\n\n\n[1] https://review.openstack.org/179955\n[2] https://review.openstack.org/187985","commit_id":"7ce5188fcfaf5aacd9e34429ff9afe960f998219"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"b266889d80f3a357009af67e8543eb1946f04e5d","unresolved":false,"context_lines":[{"line_number":151,"context_line":"            id\u003dallocation_pool_id)"},{"line_number":152,"context_line":"        if locking:"},{"line_number":153,"context_line":"            range_qry \u003d range_qry.with_lockmode(\u0027update\u0027)"},{"line_number":154,"context_line":"        return range_qry"},{"line_number":155,"context_line":""},{"line_number":156,"context_line":"    def create_range(self, session, allocation_pool_id,"},{"line_number":157,"context_line":"                     range_start, range_end):"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba15a1d1_2ceb20b2","line":154,"updated":"2015-09-15 12:02:07.000000000","message":"Moreover PostgreSQL disallows a select for .. update with a join on an empty select[1].\n\n[1] https://bugs.launchpad.net/neutron/+bug/1451558","commit_id":"7ce5188fcfaf5aacd9e34429ff9afe960f998219"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"4a1a8667210c555dda768ca8255375029a5a2aca","unresolved":false,"context_lines":[{"line_number":141,"context_line":"            id\u003dallocation_pool_id)"},{"line_number":142,"context_line":""},{"line_number":143,"context_line":"    def delete_range(self, session, db_range):"},{"line_number":144,"context_line":"        \"\"\"Return cound of deleted ranges"},{"line_number":145,"context_line":""},{"line_number":146,"context_line":"        :param session: database session"},{"line_number":147,"context_line":"        :param db_range: IpamAvailabilityRange db object"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a1a9d01_667de9e6","line":144,"updated":"2015-10-01 22:26:28.000000000","message":"nit:  *count","commit_id":"bd2b20f09c46f79d7299ce99839fe24de1e7df75"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"d57f2dd5f81477c31400cad56478feb8bf5baa66","unresolved":false,"context_lines":[{"line_number":158,"context_line":"        if last_ip:"},{"line_number":159,"context_line":"            opts[\u0027last_ip\u0027] \u003d str(last_ip)"},{"line_number":160,"context_line":"        if not opts:"},{"line_number":161,"context_line":"            return 0"},{"line_number":162,"context_line":"        try:"},{"line_number":163,"context_line":"            return session.query("},{"line_number":164,"context_line":"                db_models.IpamAvailabilityRange).filter_by("}],"source_content_type":"text/x-python","patch_set":21,"id":"7a2fa921_c7cd0867","line":161,"updated":"2015-10-09 18:56:02.000000000","message":"This seems a little strange to me to just return 0 if they don\u0027t pass in the right stuff. Wouldn\u0027t it be better to raise an Exception here? I\u0027m having a hard time thinking about how this is a legitimate use.","commit_id":"4c3414692e12766c9d5bed3d384c164525810f03"},{"author":{"_account_id":13768,"name":"Pavel Bondar","email":"pbondar@infoblox.com","username":"pavel_bondar"},"change_message_id":"1ebefb75b3540b367ee4b7db479378e2ac12e61e","unresolved":false,"context_lines":[{"line_number":158,"context_line":"        if last_ip:"},{"line_number":159,"context_line":"            opts[\u0027last_ip\u0027] \u003d str(last_ip)"},{"line_number":160,"context_line":"        if not opts:"},{"line_number":161,"context_line":"            return 0"},{"line_number":162,"context_line":"        try:"},{"line_number":163,"context_line":"            return session.query("},{"line_number":164,"context_line":"                db_models.IpamAvailabilityRange).filter_by("}],"source_content_type":"text/x-python","patch_set":21,"id":"7a2fa921_dd338a12","line":161,"in_reply_to":"7a2fa921_c7cd0867","updated":"2015-10-10 20:17:44.000000000","message":"yeah, will raise ValueError in this case","commit_id":"4c3414692e12766c9d5bed3d384c164525810f03"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"fe305b58e0b51b2aa5b39ebb82674a3f8c71b51f","unresolved":false,"context_lines":[{"line_number":158,"context_line":"        if last_ip:"},{"line_number":159,"context_line":"            opts[\u0027last_ip\u0027] \u003d str(last_ip)"},{"line_number":160,"context_line":"        if not opts:"},{"line_number":161,"context_line":"            raise ValueError(\"New value for first_ip or last_ip\""},{"line_number":162,"context_line":"                             \" has to be specified\")"},{"line_number":163,"context_line":"        try:"},{"line_number":164,"context_line":"            return session.query("}],"source_content_type":"text/x-python","patch_set":27,"id":"ba8a016a_d9494790","line":161,"updated":"2015-11-16 10:18:24.000000000","message":"missing translation\n\ncan you please add a space at the end of the sentence\n\nwhy are we not raising a Neutron exception here","commit_id":"58178d728d60f98cca0403a13f6a94b56f8c8739"},{"author":{"_account_id":13768,"name":"Pavel Bondar","email":"pbondar@infoblox.com","username":"pavel_bondar"},"change_message_id":"cafb883a404164b57e2ddfe8f23c234962364153","unresolved":false,"context_lines":[{"line_number":158,"context_line":"        if last_ip:"},{"line_number":159,"context_line":"            opts[\u0027last_ip\u0027] \u003d str(last_ip)"},{"line_number":160,"context_line":"        if not opts:"},{"line_number":161,"context_line":"            raise ValueError(\"New value for first_ip or last_ip\""},{"line_number":162,"context_line":"                             \" has to be specified\")"},{"line_number":163,"context_line":"        try:"},{"line_number":164,"context_line":"            return session.query("}],"source_content_type":"text/x-python","patch_set":27,"id":"ba8a016a_ece2c02e","line":161,"in_reply_to":"ba8a016a_d9494790","updated":"2015-11-18 14:33:52.000000000","message":"This error indicates wrong method usage, not invalid user input.\nSo this is developer faced issue and users should not see it.\nI guess it is ok to have it just ValueError in this case, but let me know if it still better to make in Neutron exception.\n\nAnd I\u0027ll add translation and space.","commit_id":"58178d728d60f98cca0403a13f6a94b56f8c8739"},{"author":{"_account_id":4187,"name":"Ryan Tidwell","email":"rtidwell@suse.com","username":"ryan-tidwell"},"change_message_id":"5c302674459c53684134a7ee7aab4d44f70b8d28","unresolved":false,"context_lines":[{"line_number":158,"context_line":"        if last_ip:"},{"line_number":159,"context_line":"            opts[\u0027last_ip\u0027] \u003d str(last_ip)"},{"line_number":160,"context_line":"        if not opts:"},{"line_number":161,"context_line":"            raise ValueError(_(\"New value for first_ip or last_ip\""},{"line_number":162,"context_line":"                               \" has to be specified \"))"},{"line_number":163,"context_line":"        try:"},{"line_number":164,"context_line":"            return session.query("}],"source_content_type":"text/x-python","patch_set":28,"id":"ba8a016a_bccccabb","line":161,"updated":"2015-11-19 00:04:49.000000000","message":"I think Gary has a good point.  If this error would ever be seen in a log file, it\u0027s probably best to raise a Neutron exception.  It would help with debugging.","commit_id":"0b8cfd5af63c815b3c1de2750b5981b7adcf7cf7"},{"author":{"_account_id":13768,"name":"Pavel Bondar","email":"pbondar@infoblox.com","username":"pavel_bondar"},"change_message_id":"8d0711a735107cccd2c121e9d780b1492e7c4c26","unresolved":false,"context_lines":[{"line_number":158,"context_line":"        if last_ip:"},{"line_number":159,"context_line":"            opts[\u0027last_ip\u0027] \u003d str(last_ip)"},{"line_number":160,"context_line":"        if not opts:"},{"line_number":161,"context_line":"            raise ValueError(_(\"New value for first_ip or last_ip\""},{"line_number":162,"context_line":"                               \" has to be specified \"))"},{"line_number":163,"context_line":"        try:"},{"line_number":164,"context_line":"            return session.query("}],"source_content_type":"text/x-python","patch_set":28,"id":"ba8a016a_4c7b9728","line":161,"in_reply_to":"ba8a016a_bccccabb","updated":"2015-11-19 12:13:27.000000000","message":"Ok, will do","commit_id":"0b8cfd5af63c815b3c1de2750b5981b7adcf7cf7"}],"neutron/ipam/drivers/neutrondb_ipam/driver.py":[{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"4a1a8667210c555dda768ca8255375029a5a2aca","unresolved":false,"context_lines":[{"line_number":183,"context_line":"        # large subnets, including IPv6 ones."},{"line_number":184,"context_line":"        final_ranges \u003d []"},{"line_number":185,"context_line":"        if allocation_pool_id:"},{"line_number":186,"context_line":"            av_ranges \u003d ("},{"line_number":187,"context_line":"                self.subnet_manager.list_ranges_by_allocation_pool("},{"line_number":188,"context_line":"                    session, allocation_pool_id))"},{"line_number":189,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a1a9d01_869efd61","line":186,"updated":"2015-10-01 22:26:28.000000000","message":"nit:  It should be possible to remove the locking parameter without so much reformatting.  Prefer not touching formatting if not necessary.","commit_id":"bd2b20f09c46f79d7299ce99839fe24de1e7df75"},{"author":{"_account_id":13768,"name":"Pavel Bondar","email":"pbondar@infoblox.com","username":"pavel_bondar"},"change_message_id":"6e67bb09cfe9bf9f1eaaa801dafd0ed532ef804b","unresolved":false,"context_lines":[{"line_number":183,"context_line":"        # large subnets, including IPv6 ones."},{"line_number":184,"context_line":"        final_ranges \u003d []"},{"line_number":185,"context_line":"        if allocation_pool_id:"},{"line_number":186,"context_line":"            av_ranges \u003d ("},{"line_number":187,"context_line":"                self.subnet_manager.list_ranges_by_allocation_pool("},{"line_number":188,"context_line":"                    session, allocation_pool_id))"},{"line_number":189,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a1a9d01_dfda6ae9","line":186,"in_reply_to":"9a1a9d01_869efd61","updated":"2015-10-02 08:44:48.000000000","message":"right, will fix this one","commit_id":"bd2b20f09c46f79d7299ce99839fe24de1e7df75"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"4a1a8667210c555dda768ca8255375029a5a2aca","unresolved":false,"context_lines":[{"line_number":325,"context_line":"        # with remote backends"},{"line_number":326,"context_line":"        session \u003d self._context.session"},{"line_number":327,"context_line":"        all_pool_id \u003d None"},{"line_number":328,"context_line":""},{"line_number":329,"context_line":"        # NOTE(salv-orlando): It would probably better to have a simpler"},{"line_number":330,"context_line":"        # model for address requests and just check whether there is a"},{"line_number":331,"context_line":"        # specific IP address specified in address_request"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a1a9d01_6693a950","line":328,"updated":"2015-10-01 22:26:28.000000000","message":"nit:  Avoid reformatting","commit_id":"bd2b20f09c46f79d7299ce99839fe24de1e7df75"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"7ed6859c73ebc9e66399f6e7a2a2d20d3b49ebc3","unresolved":false,"context_lines":[{"line_number":190,"context_line":"                session, allocation_pool_id)"},{"line_number":191,"context_line":"        else:"},{"line_number":192,"context_line":"            av_ranges \u003d self.subnet_manager.list_ranges_by_subnet_id("},{"line_number":193,"context_line":"                session)"},{"line_number":194,"context_line":"        for db_range in av_ranges:"},{"line_number":195,"context_line":"            initial_ip_set \u003d netaddr.IPSet(netaddr.IPRange("},{"line_number":196,"context_line":"                db_range[\u0027first_ip\u0027], db_range[\u0027last_ip\u0027]))"}],"source_content_type":"text/x-python","patch_set":30,"id":"ba8a016a_6a75f42f","line":193,"updated":"2015-11-20 00:31:44.000000000","message":"nit:  Put this up on the previous line.  No longer any need for a line break.","commit_id":"bfa8db1e803ed81f573229b13356c5ab81fe10d8"},{"author":{"_account_id":13768,"name":"Pavel Bondar","email":"pbondar@infoblox.com","username":"pavel_bondar"},"change_message_id":"dfac98cff9a17b869d68227476e4fd52da198fa6","unresolved":false,"context_lines":[{"line_number":190,"context_line":"                session, allocation_pool_id)"},{"line_number":191,"context_line":"        else:"},{"line_number":192,"context_line":"            av_ranges \u003d self.subnet_manager.list_ranges_by_subnet_id("},{"line_number":193,"context_line":"                session)"},{"line_number":194,"context_line":"        for db_range in av_ranges:"},{"line_number":195,"context_line":"            initial_ip_set \u003d netaddr.IPSet(netaddr.IPRange("},{"line_number":196,"context_line":"                db_range[\u0027first_ip\u0027], db_range[\u0027last_ip\u0027]))"}],"source_content_type":"text/x-python","patch_set":30,"id":"ba8a016a_701cf013","line":193,"in_reply_to":"ba8a016a_6a75f42f","updated":"2015-11-20 10:15:55.000000000","message":"Done","commit_id":"bfa8db1e803ed81f573229b13356c5ab81fe10d8"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"7ed6859c73ebc9e66399f6e7a2a2d20d3b49ebc3","unresolved":false,"context_lines":[{"line_number":233,"context_line":"                              new_ip_range[\u0027allocation_pool_id\u0027])"},{"line_number":234,"context_line":"                    final_ranges.append(new_ip_range)"},{"line_number":235,"context_line":""},{"line_number":236,"context_line":"        # If ip is autogenerated it should present in allocation pools,"},{"line_number":237,"context_line":"        # so retry if it is not there"},{"line_number":238,"context_line":"        if auto_generated and not ip_in_pools:"},{"line_number":239,"context_line":"            raise db_exc.RetryRequest(ipam_exc.IPAllocationFailed)"}],"source_content_type":"text/x-python","patch_set":30,"id":"ba8a016a_4a959030","line":236,"updated":"2015-11-20 00:31:44.000000000","message":"*should be present","commit_id":"bfa8db1e803ed81f573229b13356c5ab81fe10d8"},{"author":{"_account_id":13768,"name":"Pavel Bondar","email":"pbondar@infoblox.com","username":"pavel_bondar"},"change_message_id":"dfac98cff9a17b869d68227476e4fd52da198fa6","unresolved":false,"context_lines":[{"line_number":233,"context_line":"                              new_ip_range[\u0027allocation_pool_id\u0027])"},{"line_number":234,"context_line":"                    final_ranges.append(new_ip_range)"},{"line_number":235,"context_line":""},{"line_number":236,"context_line":"        # If ip is autogenerated it should present in allocation pools,"},{"line_number":237,"context_line":"        # so retry if it is not there"},{"line_number":238,"context_line":"        if auto_generated and not ip_in_pools:"},{"line_number":239,"context_line":"            raise db_exc.RetryRequest(ipam_exc.IPAllocationFailed)"}],"source_content_type":"text/x-python","patch_set":30,"id":"ba8a016a_301668f2","line":236,"in_reply_to":"ba8a016a_4a959030","updated":"2015-11-20 10:15:55.000000000","message":"Done","commit_id":"bfa8db1e803ed81f573229b13356c5ab81fe10d8"}]}
