)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"d8ff795a2308ddc9b27025122a72d32255d49389","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     LIU Yulong \u003cliuyulong@letv.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2016-01-12 17:57:35 +0800"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Catch exceptions during deleting tenant last HA router"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"To delete last HA router will also delete the HA network"},{"line_number":10,"context_line":"concurrently, race happened between deleting the HA network"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"da6ed579_14ea0210","line":7,"range":{"start_line":7,"start_character":17,"end_line":7,"end_character":23},"updated":"2016-01-12 22:24:28.000000000","message":"Catch exceptions during the delete of tenant last HA router","commit_id":"40184aca98f5e4025e6a8cca112aad5920ce4cbf"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"87828371136bb11729a84b027efd93b54038c18c","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     LIU Yulong \u003cliuyulong@letv.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2016-01-12 17:57:35 +0800"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Catch exceptions during deleting tenant last HA router"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"To delete last HA router will also delete the HA network"},{"line_number":10,"context_line":"concurrently, race happened between deleting the HA network"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"da6ed579_5acbbc1e","line":7,"range":{"start_line":7,"start_character":17,"end_line":7,"end_character":23},"in_reply_to":"da6ed579_14ea0210","updated":"2016-01-13 02:14:00.000000000","message":"Done","commit_id":"40184aca98f5e4025e6a8cca112aad5920ce4cbf"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"d8ff795a2308ddc9b27025122a72d32255d49389","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Catch exceptions during deleting tenant last HA router"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"To delete last HA router will also delete the HA network"},{"line_number":10,"context_line":"concurrently, race happened between deleting the HA network"},{"line_number":11,"context_line":"and a new HA router API call."},{"line_number":12,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"da6ed579_74681e88","line":9,"range":{"start_line":9,"start_character":10,"end_line":9,"end_character":14},"updated":"2016-01-12 22:24:28.000000000","message":"I don\u0027t understand the sentence, do you mean:\n\nDuring the delete of tenant last HA router, neutron will also delete the HA network which can be racy if a new HA router is created concurrently.","commit_id":"40184aca98f5e4025e6a8cca112aad5920ce4cbf"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"87828371136bb11729a84b027efd93b54038c18c","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Catch exceptions during deleting tenant last HA router"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"To delete last HA router will also delete the HA network"},{"line_number":10,"context_line":"concurrently, race happened between deleting the HA network"},{"line_number":11,"context_line":"and a new HA router API call."},{"line_number":12,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"da6ed579_fad150ce","line":9,"range":{"start_line":9,"start_character":10,"end_line":9,"end_character":14},"in_reply_to":"da6ed579_74681e88","updated":"2016-01-13 02:14:00.000000000","message":"Done","commit_id":"40184aca98f5e4025e6a8cca112aad5920ce4cbf"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"d8ff795a2308ddc9b27025122a72d32255d49389","unresolved":false,"context_lines":[{"line_number":10,"context_line":"concurrently, race happened between deleting the HA network"},{"line_number":11,"context_line":"and a new HA router API call."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"This patch ensure that the new HA router can be processed"},{"line_number":14,"context_line":"properly."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Change-Id: I26ab4f89d749e6cf66f7bc0b80c36ee30a55f571"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"da6ed579_340946de","line":13,"range":{"start_line":13,"start_character":11,"end_line":13,"end_character":17},"updated":"2016-01-12 22:24:28.000000000","message":"ensures","commit_id":"40184aca98f5e4025e6a8cca112aad5920ce4cbf"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"87828371136bb11729a84b027efd93b54038c18c","unresolved":false,"context_lines":[{"line_number":10,"context_line":"concurrently, race happened between deleting the HA network"},{"line_number":11,"context_line":"and a new HA router API call."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"This patch ensure that the new HA router can be processed"},{"line_number":14,"context_line":"properly."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Change-Id: I26ab4f89d749e6cf66f7bc0b80c36ee30a55f571"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"da6ed579_badc38e5","line":13,"range":{"start_line":13,"start_character":11,"end_line":13,"end_character":17},"in_reply_to":"da6ed579_340946de","updated":"2016-01-13 02:14:00.000000000","message":"Done","commit_id":"40184aca98f5e4025e6a8cca112aad5920ce4cbf"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"f9750fe810e42157460deda12e30845c2e6f0425","unresolved":false,"context_lines":[{"line_number":14,"context_line":"properly."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Change-Id: I26ab4f89d749e6cf66f7bc0b80c36ee30a55f571"},{"line_number":17,"context_line":"Closes-Bug: #1523780"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"da6ed579_37994820","line":17,"range":{"start_line":17,"start_character":13,"end_line":17,"end_character":20},"updated":"2016-01-12 23:02:30.000000000","message":"I\u0027ve got a bunch of reviews that claim to close the same bug [1-7].  In general, we can only have one review close a bug.  If it needs other patches then it needs to depend on them and then wait for them all to get merged and then close the bug.\n\nAs it is now, the first one of these to merge will close the bug and then we\u0027ll be reviewing the rest on a bug marked closed.  Something needs to be done.  Here are some options.\n\n1.  You could line them all up properly with most of them marked with related-bug instead of closes-bug with the last one coming in a closing it.\n2.  You could keep them independent and file a bug for each independent fix.\n3.  Some mix of 1 and 2.\n4.  Tell me that they are all independent fixes for the same bug and which one is the best one to review (probably abandon most of the others).\n\n[1] https://review.openstack.org/#/c/265672/\n[2] https://review.openstack.org/#/c/265676/\n[3] https://review.openstack.org/#/c/265680/\n[4] https://review.openstack.org/#/c/265682/\n[5] https://review.openstack.org/#/c/265685/\n[6] https://review.openstack.org/#/c/266109/\n[7] https://review.openstack.org/#/c/260303/","commit_id":"40184aca98f5e4025e6a8cca112aad5920ce4cbf"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"87828371136bb11729a84b027efd93b54038c18c","unresolved":false,"context_lines":[{"line_number":14,"context_line":"properly."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Change-Id: I26ab4f89d749e6cf66f7bc0b80c36ee30a55f571"},{"line_number":17,"context_line":"Closes-Bug: #1523780"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"da6ed579_9ae1349d","line":17,"range":{"start_line":17,"start_character":13,"end_line":17,"end_character":20},"in_reply_to":"da6ed579_37994820","updated":"2016-01-13 02:14:00.000000000","message":"Thank you, as Kevin Benton mentioned in Patch Set 10 https://review.openstack.org/#/c/260303/10:\n\"to elaborate, the commit message identifies 4 different race conditions. please fix one in each patch so it\u0027s clear what is being done\". Different people have different views, so now each patch deal with each one race.","commit_id":"40184aca98f5e4025e6a8cca112aad5920ce4cbf"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"d2d535564a458209be980bce982c022b612168ee","unresolved":false,"context_lines":[{"line_number":14,"context_line":"properly."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Change-Id: I26ab4f89d749e6cf66f7bc0b80c36ee30a55f571"},{"line_number":17,"context_line":"Closes-Bug: #1523780"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"da6ed579_908fd5cb","line":17,"range":{"start_line":17,"start_character":13,"end_line":17,"end_character":20},"in_reply_to":"da6ed579_9ae1349d","updated":"2016-01-13 03:06:40.000000000","message":"The new LP bug #1533440","commit_id":"40184aca98f5e4025e6a8cca112aad5920ce4cbf"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"f48517eaaf06832932772de8dc4bc130e3931632","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"During the delete of tenant last HA router, neutron"},{"line_number":10,"context_line":"will also delete the HA network which can be racy"},{"line_number":11,"context_line":"if a new HA router is created concurrently."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"This patch ensures that the new HA router can be processed"},{"line_number":14,"context_line":"properly."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"9a68dd71_ec3bda36","line":11,"updated":"2016-01-21 14:55:32.000000000","message":"concurrently in the same network.","commit_id":"7d34509e490928885e89174ac99d60fef17c31ad"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"4c5b706288cde002b7af4701e0d4c6880e3acb9c","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"During the delete of tenant last HA router, neutron"},{"line_number":10,"context_line":"will also delete the HA network which can be racy"},{"line_number":11,"context_line":"if a new HA router is created concurrently."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"This patch ensures that the new HA router can be processed"},{"line_number":14,"context_line":"properly."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"9a68dd71_bed40447","line":11,"in_reply_to":"9a68dd71_ec3bda36","updated":"2016-01-22 03:33:35.000000000","message":"Done","commit_id":"7d34509e490928885e89174ac99d60fef17c31ad"}],"neutron/db/common_db_mixin.py":[{"author":{"_account_id":7249,"name":"Ann Taraday","email":"akamyshnikova@mirantis.com","username":"AKamyshnikova"},"change_message_id":"c7aec8fdceb151160fc93bdce5ca5ef104a0b0d0","unresolved":false,"context_lines":[{"line_number":53,"context_line":""},{"line_number":54,"context_line":"    with context.session.begin(subtransactions\u003dTrue):"},{"line_number":55,"context_line":"        obj \u003d create_fn()"},{"line_number":56,"context_line":"        if not obj:"},{"line_number":57,"context_line":"            return None, None"},{"line_number":58,"context_line":"        try:"},{"line_number":59,"context_line":"            value \u003d create_bindings(obj[\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a68dd71_9cdc4c47","line":56,"range":{"start_line":56,"start_character":8,"end_line":56,"end_character":18},"updated":"2016-01-25 08:33:34.000000000","message":"What is the situation when obj is not returned? (it is better to check \"if obj is None\")","commit_id":"86f523dfeb425284466f9d4370bc87a167765561"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"dbf0edf6289b0f0656b116067b3dae7408e17b7c","unresolved":false,"context_lines":[{"line_number":53,"context_line":""},{"line_number":54,"context_line":"    with context.session.begin(subtransactions\u003dTrue):"},{"line_number":55,"context_line":"        obj \u003d create_fn()"},{"line_number":56,"context_line":"        if not obj:"},{"line_number":57,"context_line":"            return None, None"},{"line_number":58,"context_line":"        try:"},{"line_number":59,"context_line":"            value \u003d create_bindings(obj[\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a68dd71_cfcbbaa2","line":56,"range":{"start_line":56,"start_character":8,"end_line":56,"end_character":18},"in_reply_to":"9a68dd71_72af412a","updated":"2016-01-26 01:45:03.000000000","message":"Remove this in next patch, since https://review.openstack.org/#/c/260303/ has already done this.","commit_id":"86f523dfeb425284466f9d4370bc87a167765561"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"5d09a01b259d794dde4cfb295efcda8e1bf16ba4","unresolved":false,"context_lines":[{"line_number":53,"context_line":""},{"line_number":54,"context_line":"    with context.session.begin(subtransactions\u003dTrue):"},{"line_number":55,"context_line":"        obj \u003d create_fn()"},{"line_number":56,"context_line":"        if not obj:"},{"line_number":57,"context_line":"            return None, None"},{"line_number":58,"context_line":"        try:"},{"line_number":59,"context_line":"            value \u003d create_bindings(obj[\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a68dd71_72af412a","line":56,"range":{"start_line":56,"start_character":8,"end_line":56,"end_character":18},"in_reply_to":"9a68dd71_9cdc4c47","updated":"2016-01-25 09:42:11.000000000","message":"This patch catch _create_ha_port exceptions, so here return None.","commit_id":"86f523dfeb425284466f9d4370bc87a167765561"}],"neutron/db/l3_hamode_db.py":[{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"f1192aa976aecad53fe9c7caa8ca179fb0c83c17","unresolved":false,"context_lines":[{"line_number":326,"context_line":"                \u0027device_owner\u0027: constants.DEVICE_OWNER_ROUTER_HA_INTF,"},{"line_number":327,"context_line":"                \u0027name\u0027: constants.HA_PORT_NAME % tenant_id}"},{"line_number":328,"context_line":""},{"line_number":329,"context_line":"        try:"},{"line_number":330,"context_line":"            port \u003d p_utils.create_port(self._core_plugin, context,"},{"line_number":331,"context_line":"                                       {\u0027port\u0027: args})"},{"line_number":332,"context_line":"        except Exception as e:"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa69d971_f0583433","line":329,"updated":"2016-01-11 12:33:12.000000000","message":"why not:\ntry:\n   port \u003d p_utils.create_port\nexcept n_exc.NetworkNotFound:\n   log whatever\nexcept n_exc.IpAddressGenerationFailure:\n  log whatever","commit_id":"769986190f873431d0525f3cc1cbf9fae72a83d6"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"df671cc0c30937855285e0b695c4a901f0731436","unresolved":false,"context_lines":[{"line_number":326,"context_line":"                \u0027device_owner\u0027: constants.DEVICE_OWNER_ROUTER_HA_INTF,"},{"line_number":327,"context_line":"                \u0027name\u0027: constants.HA_PORT_NAME % tenant_id}"},{"line_number":328,"context_line":""},{"line_number":329,"context_line":"        try:"},{"line_number":330,"context_line":"            port \u003d p_utils.create_port(self._core_plugin, context,"},{"line_number":331,"context_line":"                                       {\u0027port\u0027: args})"},{"line_number":332,"context_line":"        except Exception as e:"}],"source_content_type":"text/x-python","patch_set":2,"id":"da6ed579_06a1a2a9","line":329,"in_reply_to":"fa69d971_4ca4044a","updated":"2016-01-12 09:58:52.000000000","message":"OK, thank you, and done","commit_id":"769986190f873431d0525f3cc1cbf9fae72a83d6"},{"author":{"_account_id":7249,"name":"Ann Taraday","email":"akamyshnikova@mirantis.com","username":"AKamyshnikova"},"change_message_id":"73f57857c0bb17c3816cf78eb47491ca188b9e19","unresolved":false,"context_lines":[{"line_number":326,"context_line":"                \u0027device_owner\u0027: constants.DEVICE_OWNER_ROUTER_HA_INTF,"},{"line_number":327,"context_line":"                \u0027name\u0027: constants.HA_PORT_NAME % tenant_id}"},{"line_number":328,"context_line":""},{"line_number":329,"context_line":"        try:"},{"line_number":330,"context_line":"            port \u003d p_utils.create_port(self._core_plugin, context,"},{"line_number":331,"context_line":"                                       {\u0027port\u0027: args})"},{"line_number":332,"context_line":"        except Exception as e:"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa69d971_4ca4044a","line":329,"in_reply_to":"fa69d971_7623d9bd","updated":"2016-01-11 14:47:28.000000000","message":"So, why not\n\n   try:\n      port \u003d p_utils.create_port\n   except n_exc.NetworkNotFound:\n      log whatever\n   except n_exc.IpAddressGenerationFailure:\n      log whatever\n   except Exception: \n      reraise or log\n\nThis will look much better and clear. \n\nAlso, consider moving this logic to a separate help function _create_ha_port in scope of conflicts with https://review.openstack.org/#/c/230481.","commit_id":"769986190f873431d0525f3cc1cbf9fae72a83d6"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"9ce654b6dfcdc7c44b40f26d0c286ef04efd7e6d","unresolved":false,"context_lines":[{"line_number":326,"context_line":"                \u0027device_owner\u0027: constants.DEVICE_OWNER_ROUTER_HA_INTF,"},{"line_number":327,"context_line":"                \u0027name\u0027: constants.HA_PORT_NAME % tenant_id}"},{"line_number":328,"context_line":""},{"line_number":329,"context_line":"        try:"},{"line_number":330,"context_line":"            port \u003d p_utils.create_port(self._core_plugin, context,"},{"line_number":331,"context_line":"                                       {\u0027port\u0027: args})"},{"line_number":332,"context_line":"        except Exception as e:"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa69d971_7623d9bd","line":329,"in_reply_to":"fa69d971_f0583433","updated":"2016-01-11 14:05:42.000000000","message":"As Hong Hui Xiao mentioned here:\nhttps://review.openstack.org/#/c/260303/10/neutron/db/l3_hamode_db.py in the original patch, we can not decide what other exceptions could be raised here, so just reraise the unknow exception.","commit_id":"769986190f873431d0525f3cc1cbf9fae72a83d6"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"d8ff795a2308ddc9b27025122a72d32255d49389","unresolved":false,"context_lines":[{"line_number":329,"context_line":"            LOG.warning(_LW(\"Failed to create HA port because HA network \""},{"line_number":330,"context_line":"                            \"has no subnet, or the subnet of HA network \""},{"line_number":331,"context_line":"                            \"was deleted concurrently.\"))"},{"line_number":332,"context_line":"        except Exception as e:"},{"line_number":333,"context_line":"            LOG.error(_LE(\"Failed to create HA port %s\"), e)"},{"line_number":334,"context_line":""},{"line_number":335,"context_line":"    def add_ha_port(self, context, router_id, network_id, tenant_id):"}],"source_content_type":"text/x-python","patch_set":3,"id":"da6ed579_54ae3a86","line":332,"range":{"start_line":332,"start_character":15,"end_line":332,"end_character":24},"updated":"2016-01-12 22:24:28.000000000","message":"I don\u0027t understand how this catch is related to the change.","commit_id":"40184aca98f5e4025e6a8cca112aad5920ce4cbf"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"87828371136bb11729a84b027efd93b54038c18c","unresolved":false,"context_lines":[{"line_number":329,"context_line":"            LOG.warning(_LW(\"Failed to create HA port because HA network \""},{"line_number":330,"context_line":"                            \"has no subnet, or the subnet of HA network \""},{"line_number":331,"context_line":"                            \"was deleted concurrently.\"))"},{"line_number":332,"context_line":"        except Exception as e:"},{"line_number":333,"context_line":"            LOG.error(_LE(\"Failed to create HA port %s\"), e)"},{"line_number":334,"context_line":""},{"line_number":335,"context_line":"    def add_ha_port(self, context, router_id, network_id, tenant_id):"}],"source_content_type":"text/x-python","patch_set":3,"id":"da6ed579_7a4fa0bd","line":332,"range":{"start_line":332,"start_character":15,"end_line":332,"end_character":24},"in_reply_to":"da6ed579_54ae3a86","updated":"2016-01-13 02:14:00.000000000","message":"We have discussed this in patch set 2 and here https://review.openstack.org/#/c/260303/10/neutron/db/l3_hamode_db.py, maybe you can find the answer.","commit_id":"40184aca98f5e4025e6a8cca112aad5920ce4cbf"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"5960979ef9d634bad20df5c21c0d64e09aed62d8","unresolved":false,"context_lines":[{"line_number":331,"context_line":""},{"line_number":332,"context_line":"    def _create_ha_port(self, context, plugin, port_args):"},{"line_number":333,"context_line":"        try:"},{"line_number":334,"context_line":"            return p_utils.create_port(plugin, context, {\u0027port\u0027: port_args})"},{"line_number":335,"context_line":"        except n_exc.NetworkNotFound:"},{"line_number":336,"context_line":"            LOG.warning(_LW(\"Failed to create HA port because HA network \""},{"line_number":337,"context_line":"                            \"was deleted concurrently.\"))"}],"source_content_type":"text/x-python","patch_set":4,"id":"da6ed579_ccd9f223","line":334,"range":{"start_line":334,"start_character":47,"end_line":334,"end_character":54},"updated":"2016-01-14 03:47:36.000000000","message":"I guess here may also get DBReferenceError(IntegrityError) during the create port insert query, because the ports table has foreign key constraint of network_id.","commit_id":"59c40b169f0242e0668c1761c3a3531948b79ccc"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"f48517eaaf06832932772de8dc4bc130e3931632","unresolved":false,"context_lines":[{"line_number":334,"context_line":"            return p_utils.create_port(plugin, context, {\u0027port\u0027: port_args})"},{"line_number":335,"context_line":"        except n_exc.NetworkNotFound:"},{"line_number":336,"context_line":"            LOG.warning(_LW(\"Failed to create HA port because HA network \""},{"line_number":337,"context_line":"                            \"was deleted concurrently.\"))"},{"line_number":338,"context_line":"        except n_exc.IpAddressGenerationFailure:"},{"line_number":339,"context_line":"            LOG.warning(_LW(\"Failed to create HA port because HA network \""},{"line_number":340,"context_line":"                            \"has no subnet, or the subnet of HA network \""}],"source_content_type":"text/x-python","patch_set":5,"id":"9a68dd71_0c10ae00","line":337,"range":{"start_line":337,"start_character":41,"end_line":337,"end_character":53},"updated":"2016-01-21 14:55:32.000000000","message":"I\u0027d provide the network id as part of the warning.","commit_id":"7d34509e490928885e89174ac99d60fef17c31ad"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"4c5b706288cde002b7af4701e0d4c6880e3acb9c","unresolved":false,"context_lines":[{"line_number":334,"context_line":"            return p_utils.create_port(plugin, context, {\u0027port\u0027: port_args})"},{"line_number":335,"context_line":"        except n_exc.NetworkNotFound:"},{"line_number":336,"context_line":"            LOG.warning(_LW(\"Failed to create HA port because HA network \""},{"line_number":337,"context_line":"                            \"was deleted concurrently.\"))"},{"line_number":338,"context_line":"        except n_exc.IpAddressGenerationFailure:"},{"line_number":339,"context_line":"            LOG.warning(_LW(\"Failed to create HA port because HA network \""},{"line_number":340,"context_line":"                            \"has no subnet, or the subnet of HA network \""}],"source_content_type":"text/x-python","patch_set":5,"id":"9a68dd71_e33509da","line":337,"range":{"start_line":337,"start_character":41,"end_line":337,"end_character":53},"in_reply_to":"9a68dd71_0c10ae00","updated":"2016-01-22 03:33:35.000000000","message":"Done","commit_id":"7d34509e490928885e89174ac99d60fef17c31ad"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"f48517eaaf06832932772de8dc4bc130e3931632","unresolved":false,"context_lines":[{"line_number":338,"context_line":"        except n_exc.IpAddressGenerationFailure:"},{"line_number":339,"context_line":"            LOG.warning(_LW(\"Failed to create HA port because HA network \""},{"line_number":340,"context_line":"                            \"has no subnet, or the subnet of HA network \""},{"line_number":341,"context_line":"                            \"was deleted concurrently.\"))"},{"line_number":342,"context_line":"        except n_exc.DBReferenceError as rferr:"},{"line_number":343,"context_line":"            if not isinstance(rferr.inner_exception, sql_exc.IntegrityError):"},{"line_number":344,"context_line":"                raise"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a68dd71_ecf51acb","line":341,"updated":"2016-01-21 14:55:32.000000000","message":"ditto.","commit_id":"7d34509e490928885e89174ac99d60fef17c31ad"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"4c5b706288cde002b7af4701e0d4c6880e3acb9c","unresolved":false,"context_lines":[{"line_number":338,"context_line":"        except n_exc.IpAddressGenerationFailure:"},{"line_number":339,"context_line":"            LOG.warning(_LW(\"Failed to create HA port because HA network \""},{"line_number":340,"context_line":"                            \"has no subnet, or the subnet of HA network \""},{"line_number":341,"context_line":"                            \"was deleted concurrently.\"))"},{"line_number":342,"context_line":"        except n_exc.DBReferenceError as rferr:"},{"line_number":343,"context_line":"            if not isinstance(rferr.inner_exception, sql_exc.IntegrityError):"},{"line_number":344,"context_line":"                raise"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a68dd71_03313dec","line":341,"in_reply_to":"9a68dd71_ecf51acb","updated":"2016-01-22 03:33:35.000000000","message":"Done","commit_id":"7d34509e490928885e89174ac99d60fef17c31ad"},{"author":{"_account_id":7249,"name":"Ann Taraday","email":"akamyshnikova@mirantis.com","username":"AKamyshnikova"},"change_message_id":"5b7508550793595a7b164284845bd50bb4759d8f","unresolved":false,"context_lines":[{"line_number":339,"context_line":"            LOG.warning(_LW(\"Failed to create HA port because HA network \""},{"line_number":340,"context_line":"                            \"has no subnet, or the subnet of HA network \""},{"line_number":341,"context_line":"                            \"was deleted concurrently.\"))"},{"line_number":342,"context_line":"        except n_exc.DBReferenceError as rferr:"},{"line_number":343,"context_line":"            if not isinstance(rferr.inner_exception, sql_exc.IntegrityError):"},{"line_number":344,"context_line":"                raise"},{"line_number":345,"context_line":"            LOG.warning(_LW(\"Failed to create HA port because HA network \""},{"line_number":346,"context_line":"                            \"was deleted concurrently.\"))"},{"line_number":347,"context_line":"        except Exception as e:"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a68dd71_3ea12a95","line":344,"range":{"start_line":342,"start_character":8,"end_line":344,"end_character":21},"updated":"2016-01-21 09:14:29.000000000","message":"with excutils.save_and_reraise_exception() should be used here, it has reraise parameter which can be set to False here. For reference: http://docs.openstack.org/developer/oslo.utils/api/excutils.html#oslo_utils.excutils.save_and_reraise_exception   \n\nLike this:\n \n   except n_exc.DBReferenceError as rferr:\n       with excutils.save_and_reraise_exception(reraise\u003dFalse) as ctxt:\n           if not isinstance(rferr.inner_exception, sql_exc.IntegrityError):\n                 ctxt.reraise \u003d True\n\nAlso it returns the same message as the NetworkNotFound error so probably they can be combined somehow.","commit_id":"7d34509e490928885e89174ac99d60fef17c31ad"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"f48517eaaf06832932772de8dc4bc130e3931632","unresolved":false,"context_lines":[{"line_number":339,"context_line":"            LOG.warning(_LW(\"Failed to create HA port because HA network \""},{"line_number":340,"context_line":"                            \"has no subnet, or the subnet of HA network \""},{"line_number":341,"context_line":"                            \"was deleted concurrently.\"))"},{"line_number":342,"context_line":"        except n_exc.DBReferenceError as rferr:"},{"line_number":343,"context_line":"            if not isinstance(rferr.inner_exception, sql_exc.IntegrityError):"},{"line_number":344,"context_line":"                raise"},{"line_number":345,"context_line":"            LOG.warning(_LW(\"Failed to create HA port because HA network \""},{"line_number":346,"context_line":"                            \"was deleted concurrently.\"))"},{"line_number":347,"context_line":"        except Exception as e:"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a68dd71_ecd99a84","line":344,"range":{"start_line":342,"start_character":8,"end_line":344,"end_character":21},"in_reply_to":"9a68dd71_3ea12a95","updated":"2016-01-21 14:55:32.000000000","message":"Ann, silly question, what\u0027s the advantage of excutils.save_and_reraise_exception ?\n\nNot sure if it\u0027s easy to re-join the two exception captures, given  isistance discrimination, may be moving the LOG.warning part to a separate function to avoid replication.","commit_id":"7d34509e490928885e89174ac99d60fef17c31ad"},{"author":{"_account_id":7249,"name":"Ann Taraday","email":"akamyshnikova@mirantis.com","username":"AKamyshnikova"},"change_message_id":"22b1e350fd7684f4b391100503d70c4c50f53edd","unresolved":false,"context_lines":[{"line_number":339,"context_line":"            LOG.warning(_LW(\"Failed to create HA port because HA network \""},{"line_number":340,"context_line":"                            \"has no subnet, or the subnet of HA network \""},{"line_number":341,"context_line":"                            \"was deleted concurrently.\"))"},{"line_number":342,"context_line":"        except n_exc.DBReferenceError as rferr:"},{"line_number":343,"context_line":"            if not isinstance(rferr.inner_exception, sql_exc.IntegrityError):"},{"line_number":344,"context_line":"                raise"},{"line_number":345,"context_line":"            LOG.warning(_LW(\"Failed to create HA port because HA network \""},{"line_number":346,"context_line":"                            \"was deleted concurrently.\"))"},{"line_number":347,"context_line":"        except Exception as e:"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a68dd71_43a09043","line":344,"range":{"start_line":342,"start_character":8,"end_line":344,"end_character":21},"in_reply_to":"9a68dd71_835bed2d","updated":"2016-01-22 06:39:13.000000000","message":"We have a special tool for reraising exceptions, why we should not use it?\n\nI\u0027m not insist on combining them.","commit_id":"7d34509e490928885e89174ac99d60fef17c31ad"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"4c5b706288cde002b7af4701e0d4c6880e3acb9c","unresolved":false,"context_lines":[{"line_number":339,"context_line":"            LOG.warning(_LW(\"Failed to create HA port because HA network \""},{"line_number":340,"context_line":"                            \"has no subnet, or the subnet of HA network \""},{"line_number":341,"context_line":"                            \"was deleted concurrently.\"))"},{"line_number":342,"context_line":"        except n_exc.DBReferenceError as rferr:"},{"line_number":343,"context_line":"            if not isinstance(rferr.inner_exception, sql_exc.IntegrityError):"},{"line_number":344,"context_line":"                raise"},{"line_number":345,"context_line":"            LOG.warning(_LW(\"Failed to create HA port because HA network \""},{"line_number":346,"context_line":"                            \"was deleted concurrently.\"))"},{"line_number":347,"context_line":"        except Exception as e:"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a68dd71_835bed2d","line":344,"range":{"start_line":342,"start_character":8,"end_line":344,"end_character":21},"in_reply_to":"9a68dd71_ecd99a84","updated":"2016-01-22 03:33:35.000000000","message":"Do not think too much, let\u0027s just leave this easy and straightforward.","commit_id":"7d34509e490928885e89174ac99d60fef17c31ad"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"f48517eaaf06832932772de8dc4bc130e3931632","unresolved":false,"context_lines":[{"line_number":344,"context_line":"                raise"},{"line_number":345,"context_line":"            LOG.warning(_LW(\"Failed to create HA port because HA network \""},{"line_number":346,"context_line":"                            \"was deleted concurrently.\"))"},{"line_number":347,"context_line":"        except Exception as e:"},{"line_number":348,"context_line":"            LOG.error(_LE(\"Failed to create HA port in HA network for \""},{"line_number":349,"context_line":"                          \"HA router, got unknow exception %s\"), e)"},{"line_number":350,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"9a68dd71_6c8cca35","line":347,"range":{"start_line":347,"start_character":15,"end_line":347,"end_character":24},"updated":"2016-01-21 14:55:32.000000000","message":"I believe capturing Exception is unsafe, and will hide issues under the carpet.\n\nshouldn\u0027t we probably analyze any later exception if that happens?","commit_id":"7d34509e490928885e89174ac99d60fef17c31ad"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"4c5b706288cde002b7af4701e0d4c6880e3acb9c","unresolved":false,"context_lines":[{"line_number":344,"context_line":"                raise"},{"line_number":345,"context_line":"            LOG.warning(_LW(\"Failed to create HA port because HA network \""},{"line_number":346,"context_line":"                            \"was deleted concurrently.\"))"},{"line_number":347,"context_line":"        except Exception as e:"},{"line_number":348,"context_line":"            LOG.error(_LE(\"Failed to create HA port in HA network for \""},{"line_number":349,"context_line":"                          \"HA router, got unknow exception %s\"), e)"},{"line_number":350,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"9a68dd71_fee35c31","line":347,"range":{"start_line":347,"start_character":15,"end_line":347,"end_character":24},"in_reply_to":"9a68dd71_6c8cca35","updated":"2016-01-22 03:33:35.000000000","message":"The above three exceptions can be predictable. But here, it\u0027s not easy to analyze other exceptions. In another perspective if we capture all exceptions here, what will happened next ? What will happen if this function return a None to its caller? Could the caller handle it gracefully? If so, nothing harms here.","commit_id":"7d34509e490928885e89174ac99d60fef17c31ad"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"4c5b706288cde002b7af4701e0d4c6880e3acb9c","unresolved":false,"context_lines":[{"line_number":365,"context_line":"                \u0027device_owner\u0027: constants.DEVICE_OWNER_ROUTER_HA_INTF,"},{"line_number":366,"context_line":"                \u0027name\u0027: constants.HA_PORT_NAME % tenant_id}"},{"line_number":367,"context_line":""},{"line_number":368,"context_line":"        port \u003d self._create_ha_port(context, self._core_plugin, args)"},{"line_number":369,"context_line":""},{"line_number":370,"context_line":"        try:"},{"line_number":371,"context_line":"            return self._create_ha_port_binding(context, port[\u0027id\u0027], router_id)"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a68dd71_83244daf","line":368,"updated":"2016-01-22 03:33:35.000000000","message":"Finally the patch \"Make object creation methods in l3_hamode_db atomic\" was merged. Here self._create_ha_port will be the \"creation\" method of the \"atomic\" action. But the \"creation\" return None is not handled by the \"atomic\".","commit_id":"7d34509e490928885e89174ac99d60fef17c31ad"},{"author":{"_account_id":7249,"name":"Ann Taraday","email":"akamyshnikova@mirantis.com","username":"AKamyshnikova"},"change_message_id":"c7aec8fdceb151160fc93bdce5ca5ef104a0b0d0","unresolved":false,"context_lines":[{"line_number":347,"context_line":"                \u0027device_owner\u0027: constants.DEVICE_OWNER_ROUTER_HA_INTF,"},{"line_number":348,"context_line":"                \u0027name\u0027: constants.HA_PORT_NAME % tenant_id}"},{"line_number":349,"context_line":"        creation \u003d functools.partial(p_utils.create_port, self._core_plugin,"},{"line_number":350,"context_line":"                                     context, {\u0027port\u0027: args})"},{"line_number":351,"context_line":"        content \u003d functools.partial(self._create_ha_port_binding, context,"},{"line_number":352,"context_line":"                                    router_id)"},{"line_number":353,"context_line":"        deletion \u003d functools.partial(self._core_plugin.delete_port, context,"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a68dd71_dc02c409","side":"PARENT","line":350,"range":{"start_line":350,"start_character":46,"end_line":350,"end_character":60},"updated":"2016-01-25 08:33:34.000000000","message":"Why is this changed?","commit_id":"13d7ee5ab7d3ae30269f7704bcd8146b25339517"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"5d09a01b259d794dde4cfb295efcda8e1bf16ba4","unresolved":false,"context_lines":[{"line_number":347,"context_line":"                \u0027device_owner\u0027: constants.DEVICE_OWNER_ROUTER_HA_INTF,"},{"line_number":348,"context_line":"                \u0027name\u0027: constants.HA_PORT_NAME % tenant_id}"},{"line_number":349,"context_line":"        creation \u003d functools.partial(p_utils.create_port, self._core_plugin,"},{"line_number":350,"context_line":"                                     context, {\u0027port\u0027: args})"},{"line_number":351,"context_line":"        content \u003d functools.partial(self._create_ha_port_binding, context,"},{"line_number":352,"context_line":"                                    router_id)"},{"line_number":353,"context_line":"        deletion \u003d functools.partial(self._core_plugin.delete_port, context,"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a68dd71_6d6764e9","side":"PARENT","line":350,"range":{"start_line":350,"start_character":46,"end_line":350,"end_character":60},"in_reply_to":"9a68dd71_dc02c409","updated":"2016-01-25 09:42:11.000000000","message":"use _create_ha_port instead","commit_id":"13d7ee5ab7d3ae30269f7704bcd8146b25339517"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"a0de40d2277c0c2cea01653a91965433df2cbaab","unresolved":false,"context_lines":[{"line_number":330,"context_line":"                            \u0027Router %s has already been removed \u0027"},{"line_number":331,"context_line":"                            \u0027by concurrent operation\u0027), router_id)"},{"line_number":332,"context_line":""},{"line_number":333,"context_line":"    def _create_ha_port(self, context, plugin, port_args):"},{"line_number":334,"context_line":"        try:"},{"line_number":335,"context_line":"            return p_utils.create_port(plugin, context, {\u0027port\u0027: port_args})"},{"line_number":336,"context_line":"        except n_exc.NetworkNotFound:"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a68dd71_8125c95c","line":333,"updated":"2016-01-25 08:03:51.000000000","message":"This comment is not for my -1, just for discussion. \nThis method is a wrapper of p_utils.create_port. And, to me, concurrent create/delete are corner cases. Is it necessary to check the different type of exception here and print corresponding log? I think a general Exception will be enough.","commit_id":"86f523dfeb425284466f9d4370bc87a167765561"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"5d09a01b259d794dde4cfb295efcda8e1bf16ba4","unresolved":false,"context_lines":[{"line_number":330,"context_line":"                            \u0027Router %s has already been removed \u0027"},{"line_number":331,"context_line":"                            \u0027by concurrent operation\u0027), router_id)"},{"line_number":332,"context_line":""},{"line_number":333,"context_line":"    def _create_ha_port(self, context, plugin, port_args):"},{"line_number":334,"context_line":"        try:"},{"line_number":335,"context_line":"            return p_utils.create_port(plugin, context, {\u0027port\u0027: port_args})"},{"line_number":336,"context_line":"        except n_exc.NetworkNotFound:"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a68dd71_8df2d804","line":333,"in_reply_to":"9a68dd71_8125c95c","updated":"2016-01-25 09:42:11.000000000","message":"Deleting last HA router may also deleting HA network, this is the may point. And as Miguel Angel Ajo mentioned that catching all exception may not be safe.","commit_id":"86f523dfeb425284466f9d4370bc87a167765561"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"a0de40d2277c0c2cea01653a91965433df2cbaab","unresolved":false,"context_lines":[{"line_number":346,"context_line":"        except db_exc.DBReferenceError as rferr:"},{"line_number":347,"context_line":"            with excutils.save_and_reraise_exception() as ctxt:"},{"line_number":348,"context_line":"                if isinstance(rferr.inner_exception, sql_exc.IntegrityError):"},{"line_number":349,"context_line":"                    ctxt.reraise \u003d False"},{"line_number":350,"context_line":"                    LOG.warning(_LW(\"Failed to create HA port because \""},{"line_number":351,"context_line":"                                    \"HA network %s was deleted concurrently.\"),"},{"line_number":352,"context_line":"                                port_args[\u0027network_id\u0027])"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a68dd71_61121559","line":349,"updated":"2016-01-25 08:03:51.000000000","message":"Why just not reraise sql_exc.IntegrityError, but reraise other DBReferenceError?","commit_id":"86f523dfeb425284466f9d4370bc87a167765561"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"5d09a01b259d794dde4cfb295efcda8e1bf16ba4","unresolved":false,"context_lines":[{"line_number":346,"context_line":"        except db_exc.DBReferenceError as rferr:"},{"line_number":347,"context_line":"            with excutils.save_and_reraise_exception() as ctxt:"},{"line_number":348,"context_line":"                if isinstance(rferr.inner_exception, sql_exc.IntegrityError):"},{"line_number":349,"context_line":"                    ctxt.reraise \u003d False"},{"line_number":350,"context_line":"                    LOG.warning(_LW(\"Failed to create HA port because \""},{"line_number":351,"context_line":"                                    \"HA network %s was deleted concurrently.\"),"},{"line_number":352,"context_line":"                                port_args[\u0027network_id\u0027])"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a68dd71_cd29b08b","line":349,"in_reply_to":"9a68dd71_61121559","updated":"2016-01-25 09:42:11.000000000","message":"HA network is deleting concurrently, so port network_id may get IntegrityError. So we cannot ensure what other DBReferenceError may raise, and what will cause, just reraise it.","commit_id":"86f523dfeb425284466f9d4370bc87a167765561"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"a0de40d2277c0c2cea01653a91965433df2cbaab","unresolved":false,"context_lines":[{"line_number":351,"context_line":"                                    \"HA network %s was deleted concurrently.\"),"},{"line_number":352,"context_line":"                                port_args[\u0027network_id\u0027])"},{"line_number":353,"context_line":"        except Exception as err:"},{"line_number":354,"context_line":"            LOG.error(_LE(\"Failed to create HA port in HA network \""},{"line_number":355,"context_line":"                          \"%(network_id)s for HA router %(router_id)s, \""},{"line_number":356,"context_line":"                          \"got unknow exception %(error)s\"),"},{"line_number":357,"context_line":"                      {\"network_id\": port_args[\u0027network_id\u0027],"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a68dd71_e1efe51b","line":354,"updated":"2016-01-25 08:03:51.000000000","message":"What make this message deserve a log.error, but others are log.warning. I think they all failed the operation.","commit_id":"86f523dfeb425284466f9d4370bc87a167765561"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"5d09a01b259d794dde4cfb295efcda8e1bf16ba4","unresolved":false,"context_lines":[{"line_number":351,"context_line":"                                    \"HA network %s was deleted concurrently.\"),"},{"line_number":352,"context_line":"                                port_args[\u0027network_id\u0027])"},{"line_number":353,"context_line":"        except Exception as err:"},{"line_number":354,"context_line":"            LOG.error(_LE(\"Failed to create HA port in HA network \""},{"line_number":355,"context_line":"                          \"%(network_id)s for HA router %(router_id)s, \""},{"line_number":356,"context_line":"                          \"got unknow exception %(error)s\"),"},{"line_number":357,"context_line":"                      {\"network_id\": port_args[\u0027network_id\u0027],"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a68dd71_8daad883","line":354,"in_reply_to":"9a68dd71_bcf590ed","updated":"2016-01-25 09:42:11.000000000","message":"OK, let other exceptions just raise and die happy. I will remove this catch.","commit_id":"86f523dfeb425284466f9d4370bc87a167765561"},{"author":{"_account_id":7249,"name":"Ann Taraday","email":"akamyshnikova@mirantis.com","username":"AKamyshnikova"},"change_message_id":"c7aec8fdceb151160fc93bdce5ca5ef104a0b0d0","unresolved":false,"context_lines":[{"line_number":351,"context_line":"                                    \"HA network %s was deleted concurrently.\"),"},{"line_number":352,"context_line":"                                port_args[\u0027network_id\u0027])"},{"line_number":353,"context_line":"        except Exception as err:"},{"line_number":354,"context_line":"            LOG.error(_LE(\"Failed to create HA port in HA network \""},{"line_number":355,"context_line":"                          \"%(network_id)s for HA router %(router_id)s, \""},{"line_number":356,"context_line":"                          \"got unknow exception %(error)s\"),"},{"line_number":357,"context_line":"                      {\"network_id\": port_args[\u0027network_id\u0027],"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a68dd71_bcf590ed","line":354,"in_reply_to":"9a68dd71_e1efe51b","updated":"2016-01-25 08:33:34.000000000","message":"I don\u0027t like that we catching Exception here, because why should not it fail if port can be created? Previous exceptions are caught for some reason, but I don\u0027t understand why we should do this will all exceptions.","commit_id":"86f523dfeb425284466f9d4370bc87a167765561"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"2f0a3764dfd158d826a70de4d462837eb00a084a","unresolved":false,"context_lines":[{"line_number":399,"context_line":"            for index in range(num_agents):"},{"line_number":400,"context_line":"                binding \u003d self.add_ha_port(admin_ctx, router.id,"},{"line_number":401,"context_line":"                                           ha_network.network[\u0027id\u0027],"},{"line_number":402,"context_line":"                                           router.tenant_id)"},{"line_number":403,"context_line":"                if binding:"},{"line_number":404,"context_line":"                    port_ids.append(binding.port_id)"},{"line_number":405,"context_line":"        except Exception:"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a68dd71_af33e660","line":402,"range":{"start_line":402,"start_character":50,"end_line":402,"end_character":59},"updated":"2016-01-26 02:01:58.000000000","message":"Consider here will get a None binding because the HA network has no more available IP, so next patch I will add some mechanism or exception to make the original router creating failing procedure work properly.","commit_id":"86f523dfeb425284466f9d4370bc87a167765561"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"7af12fdd4230b8f9e4b7753e717f737583b814bb","unresolved":false,"context_lines":[{"line_number":339,"context_line":"        try:"},{"line_number":340,"context_line":"            return p_utils.create_port(plugin, context, {\u0027port\u0027: port_args})"},{"line_number":341,"context_line":"        except n_exc.NetworkNotFound:"},{"line_number":342,"context_line":"            LOG.warning(_LW(\"Failed to create HA port because HA network \""},{"line_number":343,"context_line":"                            \"%s was deleted concurrently.\"),"},{"line_number":344,"context_line":"                        port_args[\u0027network_id\u0027])"},{"line_number":345,"context_line":"        except n_exc.IpAddressGenerationFailure:"}],"source_content_type":"text/x-python","patch_set":10,"id":"bae84128_f73d46bc","line":342,"updated":"2016-02-22 08:22:22.000000000","message":"Consider just saying that the network does not exist.","commit_id":"30544e3fa43da311b2923a142e2b7b800d81aa00"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"7af12fdd4230b8f9e4b7753e717f737583b814bb","unresolved":false,"context_lines":[{"line_number":346,"context_line":"            LOG.warning(_LW(\"Failed to create HA port because HA network \""},{"line_number":347,"context_line":"                            \"%s has no more available IP in its subnets, \""},{"line_number":348,"context_line":"                            \"or the subnet of HA network \""},{"line_number":349,"context_line":"                            \"was deleted concurrently.\"),"},{"line_number":350,"context_line":"                        port_args[\u0027network_id\u0027])"},{"line_number":351,"context_line":"        except db_exc.DBReferenceError as rferr:"},{"line_number":352,"context_line":"            with excutils.save_and_reraise_exception() as ctxt:"}],"source_content_type":"text/x-python","patch_set":10,"id":"bae84128_9775da99","line":349,"updated":"2016-02-22 08:22:22.000000000","message":"Consider just saying that it is unable to create an IP address.","commit_id":"30544e3fa43da311b2923a142e2b7b800d81aa00"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"7af12fdd4230b8f9e4b7753e717f737583b814bb","unresolved":false,"context_lines":[{"line_number":352,"context_line":"            with excutils.save_and_reraise_exception() as ctxt:"},{"line_number":353,"context_line":"                if isinstance(rferr.inner_exception, sql_exc.IntegrityError):"},{"line_number":354,"context_line":"                    ctxt.reraise \u003d False"},{"line_number":355,"context_line":"                    LOG.warning(_LW(\"Failed to create HA port because \""},{"line_number":356,"context_line":"                                    \"HA network %s was deleted concurrently.\"),"},{"line_number":357,"context_line":"                                port_args[\u0027network_id\u0027])"},{"line_number":358,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"bae84128_b7729eab","line":355,"updated":"2016-02-22 08:22:22.000000000","message":"what if the DB was disconnected and this has nothing to do with concurreny","commit_id":"30544e3fa43da311b2923a142e2b7b800d81aa00"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"e43d87ed33b50eced49c47683d2bda57af5d0369","unresolved":false,"context_lines":[{"line_number":348,"context_line":"                         isinstance(e.inner_exception,"},{"line_number":349,"context_line":"                                    sql_exc.IntegrityError))):"},{"line_number":350,"context_line":"                    ctxt.reraise \u003d False"},{"line_number":351,"context_line":"                    LOG.warning(_LW(\"HA network %s is not existed.\"),"},{"line_number":352,"context_line":"                                port_args[\u0027network_id\u0027])"},{"line_number":353,"context_line":"                    raise l3_ha.TenantHASharedResourceNotValid()"},{"line_number":354,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"7af24918_a26eeb2c","line":351,"range":{"start_line":351,"start_character":51,"end_line":351,"end_character":65},"updated":"2016-03-02 10:40:52.000000000","message":"please change this to \"does not exist\"","commit_id":"a34574df4403b1583d2c813a0890076a1d76d177"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"b3bd329582fab18658de5494844b0ab1c5fb1a06","unresolved":false,"context_lines":[{"line_number":348,"context_line":"                         isinstance(e.inner_exception,"},{"line_number":349,"context_line":"                                    sql_exc.IntegrityError))):"},{"line_number":350,"context_line":"                    ctxt.reraise \u003d False"},{"line_number":351,"context_line":"                    LOG.warning(_LW(\"HA network %s is not existed.\"),"},{"line_number":352,"context_line":"                                port_args[\u0027network_id\u0027])"},{"line_number":353,"context_line":"                    raise l3_ha.TenantHASharedResourceNotValid()"},{"line_number":354,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"7af24918_4742963f","line":351,"range":{"start_line":351,"start_character":51,"end_line":351,"end_character":65},"in_reply_to":"7af24918_a26eeb2c","updated":"2016-03-02 11:08:39.000000000","message":"Done","commit_id":"a34574df4403b1583d2c813a0890076a1d76d177"}],"neutron/extensions/l3_ext_ha_mode.py":[{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"e43d87ed33b50eced49c47683d2bda57af5d0369","unresolved":false,"context_lines":[{"line_number":96,"context_line":"    message \u003d _(\"Failed to create %(num_agents)s number of HA port \""},{"line_number":97,"context_line":"                \"bindings for HA router %(router_id)s in HA network \""},{"line_number":98,"context_line":"                \"%(network_id)s, only %(num_ports)s HA port bindings \""},{"line_number":99,"context_line":"                \"was created.\")"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"class TenantHASharedResourceNotValid(exceptions.NeutronException):"}],"source_content_type":"text/x-python","patch_set":14,"id":"7af24918_a2dc2be5","line":99,"range":{"start_line":99,"start_character":17,"end_line":99,"end_character":20},"updated":"2016-03-02 10:40:52.000000000","message":"was \u003d\u003e were","commit_id":"a34574df4403b1583d2c813a0890076a1d76d177"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"b3bd329582fab18658de5494844b0ab1c5fb1a06","unresolved":false,"context_lines":[{"line_number":96,"context_line":"    message \u003d _(\"Failed to create %(num_agents)s number of HA port \""},{"line_number":97,"context_line":"                \"bindings for HA router %(router_id)s in HA network \""},{"line_number":98,"context_line":"                \"%(network_id)s, only %(num_ports)s HA port bindings \""},{"line_number":99,"context_line":"                \"was created.\")"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"class TenantHASharedResourceNotValid(exceptions.NeutronException):"}],"source_content_type":"text/x-python","patch_set":14,"id":"7af24918_473bb6d1","line":99,"range":{"start_line":99,"start_character":17,"end_line":99,"end_character":20},"in_reply_to":"7af24918_a2dc2be5","updated":"2016-03-02 11:08:39.000000000","message":"Done","commit_id":"a34574df4403b1583d2c813a0890076a1d76d177"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"e43d87ed33b50eced49c47683d2bda57af5d0369","unresolved":false,"context_lines":[{"line_number":100,"context_line":""},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"class TenantHASharedResourceNotValid(exceptions.NeutronException):"},{"line_number":103,"context_line":"    message \u003d _(\"Failed to create HA router while there is a running deleting \""},{"line_number":104,"context_line":"                \"procedure of shared resource. Please try again later.\")"},{"line_number":105,"context_line":""},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"class L3_ext_ha_mode(extensions.ExtensionDescriptor):"}],"source_content_type":"text/x-python","patch_set":14,"id":"7af24918_82fe4f36","line":104,"range":{"start_line":103,"start_character":44,"end_line":104,"end_character":45},"updated":"2016-03-02 10:40:52.000000000","message":"i think that you can drop this code","commit_id":"a34574df4403b1583d2c813a0890076a1d76d177"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"b3bd329582fab18658de5494844b0ab1c5fb1a06","unresolved":false,"context_lines":[{"line_number":100,"context_line":""},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"class TenantHASharedResourceNotValid(exceptions.NeutronException):"},{"line_number":103,"context_line":"    message \u003d _(\"Failed to create HA router while there is a running deleting \""},{"line_number":104,"context_line":"                \"procedure of shared resource. Please try again later.\")"},{"line_number":105,"context_line":""},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"class L3_ext_ha_mode(extensions.ExtensionDescriptor):"}],"source_content_type":"text/x-python","patch_set":14,"id":"7af24918_e723e2a5","line":104,"range":{"start_line":103,"start_character":44,"end_line":104,"end_character":45},"in_reply_to":"7af24918_82fe4f36","updated":"2016-03-02 11:08:39.000000000","message":"Done","commit_id":"a34574df4403b1583d2c813a0890076a1d76d177"}],"neutron/scheduler/l3_agent_scheduler.py":[{"author":{"_account_id":18658,"name":"Jas Singh","email":"singhj@us.ibm.com","username":"singhj"},"change_message_id":"7ed686608ea479696f3d37206000734d0e659ac7","unresolved":false,"context_lines":[{"line_number":296,"context_line":"            port_binding \u003d plugin.add_ha_port(context.elevated(), router_id,"},{"line_number":297,"context_line":"                                              ha_network.network.id, tenant_id)"},{"line_number":298,"context_line":"        except AttributeError:"},{"line_number":299,"context_line":"            LOG.error(_LE(\"HA network was delete\"))"},{"line_number":300,"context_line":"            return"},{"line_number":301,"context_line":""},{"line_number":302,"context_line":"        if not port_binding:"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa69d971_17e950e6","line":299,"range":{"start_line":299,"start_character":12,"end_line":299,"end_character":51},"updated":"2016-01-11 04:55:13.000000000","message":"Maybe this could be a little more clear.","commit_id":"e47c67bb1f9aa8fefd241e40572642e27aabcb60"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"42056cb95978449123031c53c7cfb8320d3a3910","unresolved":false,"context_lines":[{"line_number":296,"context_line":"            port_binding \u003d plugin.add_ha_port(context.elevated(), router_id,"},{"line_number":297,"context_line":"                                              ha_network.network.id, tenant_id)"},{"line_number":298,"context_line":"        except AttributeError:"},{"line_number":299,"context_line":"            LOG.error(_LE(\"HA network was delete\"))"},{"line_number":300,"context_line":"            return"},{"line_number":301,"context_line":""},{"line_number":302,"context_line":"        if not port_binding:"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa69d971_1704f047","line":299,"range":{"start_line":299,"start_character":12,"end_line":299,"end_character":51},"in_reply_to":"fa69d971_17e950e6","updated":"2016-01-11 05:41:32.000000000","message":"Done","commit_id":"e47c67bb1f9aa8fefd241e40572642e27aabcb60"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"f1192aa976aecad53fe9c7caa8ca179fb0c83c17","unresolved":false,"context_lines":[{"line_number":296,"context_line":"            port_binding \u003d plugin.add_ha_port(context.elevated(), router_id,"},{"line_number":297,"context_line":"                                              ha_network.network.id, tenant_id)"},{"line_number":298,"context_line":"        except AttributeError:"},{"line_number":299,"context_line":"            LOG.error(_LE(\"Tenant %s HA network was deleted \""},{"line_number":300,"context_line":"                          \"by concurrently operation.\"),"},{"line_number":301,"context_line":"                      tenant_id)"},{"line_number":302,"context_line":"            return"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa69d971_10d4e81d","line":299,"updated":"2016-01-11 12:33:12.000000000","message":"can you please add the network id and router id here","commit_id":"769986190f873431d0525f3cc1cbf9fae72a83d6"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"9ce654b6dfcdc7c44b40f26d0c286ef04efd7e6d","unresolved":false,"context_lines":[{"line_number":296,"context_line":"            port_binding \u003d plugin.add_ha_port(context.elevated(), router_id,"},{"line_number":297,"context_line":"                                              ha_network.network.id, tenant_id)"},{"line_number":298,"context_line":"        except AttributeError:"},{"line_number":299,"context_line":"            LOG.error(_LE(\"Tenant %s HA network was deleted \""},{"line_number":300,"context_line":"                          \"by concurrently operation.\"),"},{"line_number":301,"context_line":"                      tenant_id)"},{"line_number":302,"context_line":"            return"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa69d971_36ec81ba","line":299,"in_reply_to":"fa69d971_10d4e81d","updated":"2016-01-11 14:05:42.000000000","message":"Actually the exception was raised by the expression \"ha_network.network.id\".","commit_id":"769986190f873431d0525f3cc1cbf9fae72a83d6"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"d8ff795a2308ddc9b27025122a72d32255d49389","unresolved":false,"context_lines":[{"line_number":295,"context_line":"        try:"},{"line_number":296,"context_line":"            port_binding \u003d plugin.add_ha_port(context.elevated(), router_id,"},{"line_number":297,"context_line":"                                              ha_network.network.id, tenant_id)"},{"line_number":298,"context_line":"        except AttributeError:"},{"line_number":299,"context_line":"            LOG.error(_LE(\"Tenant %s HA network was deleted \""},{"line_number":300,"context_line":"                          \"by concurrently operation.\"),"},{"line_number":301,"context_line":"                      tenant_id)"}],"source_content_type":"text/x-python","patch_set":3,"id":"da6ed579_14052279","line":298,"range":{"start_line":298,"start_character":15,"end_line":298,"end_character":29},"updated":"2016-01-12 22:24:28.000000000","message":"AttributeError or TypeError?\n\nthis is a wrong way to handle an error catched in _create_ha_port indeed nothing ensures the error is raised when port is None","commit_id":"40184aca98f5e4025e6a8cca112aad5920ce4cbf"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"87828371136bb11729a84b027efd93b54038c18c","unresolved":false,"context_lines":[{"line_number":295,"context_line":"        try:"},{"line_number":296,"context_line":"            port_binding \u003d plugin.add_ha_port(context.elevated(), router_id,"},{"line_number":297,"context_line":"                                              ha_network.network.id, tenant_id)"},{"line_number":298,"context_line":"        except AttributeError:"},{"line_number":299,"context_line":"            LOG.error(_LE(\"Tenant %s HA network was deleted \""},{"line_number":300,"context_line":"                          \"by concurrently operation.\"),"},{"line_number":301,"context_line":"                      tenant_id)"}],"source_content_type":"text/x-python","patch_set":3,"id":"da6ed579_5a2f3cf6","line":298,"range":{"start_line":298,"start_character":15,"end_line":298,"end_character":29},"in_reply_to":"da6ed579_14052279","updated":"2016-01-13 02:14:00.000000000","message":"Race happened in the expression \"ha_network.network.id\" because the ha_network is None, so AttributeError is OK. And Ann Kamyshnikova\u0027s patch https://review.openstack.org/#/c/230481 will handle the port stuffs.","commit_id":"40184aca98f5e4025e6a8cca112aad5920ce4cbf"},{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"d8ff795a2308ddc9b27025122a72d32255d49389","unresolved":false,"context_lines":[{"line_number":297,"context_line":"                                              ha_network.network.id, tenant_id)"},{"line_number":298,"context_line":"        except AttributeError:"},{"line_number":299,"context_line":"            LOG.error(_LE(\"Tenant %s HA network was deleted \""},{"line_number":300,"context_line":"                          \"by concurrently operation.\"),"},{"line_number":301,"context_line":"                      tenant_id)"},{"line_number":302,"context_line":"            return"},{"line_number":303,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"da6ed579_94559251","line":300,"range":{"start_line":300,"start_character":30,"end_line":300,"end_character":42},"updated":"2016-01-12 22:24:28.000000000","message":"concurrent","commit_id":"40184aca98f5e4025e6a8cca112aad5920ce4cbf"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"87828371136bb11729a84b027efd93b54038c18c","unresolved":false,"context_lines":[{"line_number":297,"context_line":"                                              ha_network.network.id, tenant_id)"},{"line_number":298,"context_line":"        except AttributeError:"},{"line_number":299,"context_line":"            LOG.error(_LE(\"Tenant %s HA network was deleted \""},{"line_number":300,"context_line":"                          \"by concurrently operation.\"),"},{"line_number":301,"context_line":"                      tenant_id)"},{"line_number":302,"context_line":"            return"},{"line_number":303,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"da6ed579_da3b2c37","line":300,"range":{"start_line":300,"start_character":30,"end_line":300,"end_character":42},"in_reply_to":"da6ed579_94559251","updated":"2016-01-13 02:14:00.000000000","message":"Done","commit_id":"40184aca98f5e4025e6a8cca112aad5920ce4cbf"},{"author":{"_account_id":7249,"name":"Ann Taraday","email":"akamyshnikova@mirantis.com","username":"AKamyshnikova"},"change_message_id":"5b7508550793595a7b164284845bd50bb4759d8f","unresolved":false,"context_lines":[{"line_number":296,"context_line":"            port_binding \u003d plugin.add_ha_port(context.elevated(), router_id,"},{"line_number":297,"context_line":"                                              ha_network.network.id, tenant_id)"},{"line_number":298,"context_line":"        except AttributeError:"},{"line_number":299,"context_line":"            LOG.error(_LE(\"Tenant %s HA network was deleted \""},{"line_number":300,"context_line":"                          \"by concurrent operation.\"),"},{"line_number":301,"context_line":"                      tenant_id)"},{"line_number":302,"context_line":"            return"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a68dd71_bee2fad3","line":299,"range":{"start_line":299,"start_character":16,"end_line":299,"end_character":21},"updated":"2016-01-21 09:14:29.000000000","message":"I\u0027m not sure that this should be an error message.","commit_id":"7d34509e490928885e89174ac99d60fef17c31ad"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"4c5b706288cde002b7af4701e0d4c6880e3acb9c","unresolved":false,"context_lines":[{"line_number":296,"context_line":"            port_binding \u003d plugin.add_ha_port(context.elevated(), router_id,"},{"line_number":297,"context_line":"                                              ha_network.network.id, tenant_id)"},{"line_number":298,"context_line":"        except AttributeError:"},{"line_number":299,"context_line":"            LOG.error(_LE(\"Tenant %s HA network was deleted \""},{"line_number":300,"context_line":"                          \"by concurrent operation.\"),"},{"line_number":301,"context_line":"                      tenant_id)"},{"line_number":302,"context_line":"            return"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a68dd71_9ed1005a","line":299,"range":{"start_line":299,"start_character":16,"end_line":299,"end_character":21},"in_reply_to":"9a68dd71_8cdc9e13","updated":"2016-01-22 03:33:35.000000000","message":"Done","commit_id":"7d34509e490928885e89174ac99d60fef17c31ad"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"f48517eaaf06832932772de8dc4bc130e3931632","unresolved":false,"context_lines":[{"line_number":296,"context_line":"            port_binding \u003d plugin.add_ha_port(context.elevated(), router_id,"},{"line_number":297,"context_line":"                                              ha_network.network.id, tenant_id)"},{"line_number":298,"context_line":"        except AttributeError:"},{"line_number":299,"context_line":"            LOG.error(_LE(\"Tenant %s HA network was deleted \""},{"line_number":300,"context_line":"                          \"by concurrent operation.\"),"},{"line_number":301,"context_line":"                      tenant_id)"},{"line_number":302,"context_line":"            return"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a68dd71_8cdc9e13","line":299,"range":{"start_line":299,"start_character":16,"end_line":299,"end_character":21},"in_reply_to":"9a68dd71_bee2fad3","updated":"2016-01-21 14:55:32.000000000","message":"+1 for warning","commit_id":"7d34509e490928885e89174ac99d60fef17c31ad"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"a0de40d2277c0c2cea01653a91965433df2cbaab","unresolved":false,"context_lines":[{"line_number":295,"context_line":"        try:"},{"line_number":296,"context_line":"            port_binding \u003d plugin.add_ha_port(context.elevated(), router_id,"},{"line_number":297,"context_line":"                                              ha_network.network.id, tenant_id)"},{"line_number":298,"context_line":"        except AttributeError:"},{"line_number":299,"context_line":"            LOG.warning(_LW(\"Tenant %s HA network was deleted \""},{"line_number":300,"context_line":"                            \"by concurrent operation.\"),"},{"line_number":301,"context_line":"                        tenant_id)"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a68dd71_01f1d9cc","line":298,"updated":"2016-01-25 08:03:51.000000000","message":"Since your code in [1], is it still possible to have a \nAttributeError here?\n\n[1] https://review.openstack.org/#/c/265682/7/neutron/db/common_db_mixin.py","commit_id":"86f523dfeb425284466f9d4370bc87a167765561"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"5d09a01b259d794dde4cfb295efcda8e1bf16ba4","unresolved":false,"context_lines":[{"line_number":295,"context_line":"        try:"},{"line_number":296,"context_line":"            port_binding \u003d plugin.add_ha_port(context.elevated(), router_id,"},{"line_number":297,"context_line":"                                              ha_network.network.id, tenant_id)"},{"line_number":298,"context_line":"        except AttributeError:"},{"line_number":299,"context_line":"            LOG.warning(_LW(\"Tenant %s HA network was deleted \""},{"line_number":300,"context_line":"                            \"by concurrent operation.\"),"},{"line_number":301,"context_line":"                        tenant_id)"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a68dd71_6d7be428","line":298,"in_reply_to":"9a68dd71_01f1d9cc","updated":"2016-01-25 09:42:11.000000000","message":"ha_network may get a None value because of the race.","commit_id":"86f523dfeb425284466f9d4370bc87a167765561"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"7af12fdd4230b8f9e4b7753e717f737583b814bb","unresolved":false,"context_lines":[{"line_number":283,"context_line":"        except db_exc.DBDuplicateEntry:"},{"line_number":284,"context_line":"            LOG.debug(\"Router %(router)s already scheduled for agent \""},{"line_number":285,"context_line":"                      \"%(agent)s\", {\u0027router\u0027: router_id, \u0027agent\u0027: agent[\u0027id\u0027]})"},{"line_number":286,"context_line":"        except AttributeError:"},{"line_number":287,"context_line":"            LOG.warning(_LW(\"Tenant %s HA network was deleted \""},{"line_number":288,"context_line":"                            \"by concurrent operation.\"),"},{"line_number":289,"context_line":"                        tenant_id)"}],"source_content_type":"text/x-python","patch_set":10,"id":"bae84128_b7a9fee1","line":286,"updated":"2016-02-22 08:22:22.000000000","message":"could an attribute error arise from anything else?","commit_id":"30544e3fa43da311b2923a142e2b7b800d81aa00"}],"neutron/tests/unit/db/test_l3_hamode_db.py":[{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"2d4d72cd27c942ed397d7a8f525d3627c4464808","unresolved":false,"context_lines":[{"line_number":937,"context_line":""},{"line_number":938,"context_line":"        try:"},{"line_number":939,"context_line":"            self._create_router(True, tenant_id)"},{"line_number":940,"context_line":"        except Exception:"},{"line_number":941,"context_line":"            pass"},{"line_number":942,"context_line":""},{"line_number":943,"context_line":"        # Tenant first/last HA router create failed due to there"}],"source_content_type":"text/x-python","patch_set":10,"id":"dae33548_ae4bb02a","line":940,"range":{"start_line":940,"start_character":15,"end_line":940,"end_character":24},"updated":"2016-02-15 09:42:04.000000000","message":"It is weird that here the _create_router will get the following exceiton:\nhttp://paste.openstack.org/show/486953/\n\n\nSome logs:\n      File \"neutron/db/common_db_mixin.py\", line 80, in safe_creation\n        return obj, value\n\n\nThe changes are in the parent patch:\nhttps://review.openstack.org/#/c/260303/21/neutron/db/common_db_mixin.py","commit_id":"30544e3fa43da311b2923a142e2b7b800d81aa00"}]}
