)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"d0bdba4de8ea6e0948386f57372dd32e1cfe987a","unresolved":false,"context_lines":[{"line_number":11,"context_line":"when a port is deleted. This patch will process the event and detach"},{"line_number":12,"context_line":"the interface."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"If nuetorn\u003c-\u003enova event reporting is not turned on or lost for some"},{"line_number":15,"context_line":"reason, the deleted port can be discovered during the periodic refresh"},{"line_number":16,"context_line":"of info cache where network_info is saved. And obsolete ports can be"},{"line_number":17,"context_line":"discovered and detached."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"9a0c5dc1_e2545955","line":14,"range":{"start_line":14,"start_character":3,"end_line":14,"end_character":10},"updated":"2015-05-12 13:49:13.000000000","message":"neutron","commit_id":"e407203c45c4f292885e25f63abe0ce7b650a58c"},{"author":{"_account_id":6685,"name":"Baodong (Robert) Li","email":"baoli@cisco.com","username":"baoli"},"change_message_id":"50a13493418561df5a4c91307690d8a0d06d3103","unresolved":false,"context_lines":[{"line_number":11,"context_line":"when a port is deleted. This patch will process the event and detach"},{"line_number":12,"context_line":"the interface."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"If nuetorn\u003c-\u003enova event reporting is not turned on or lost for some"},{"line_number":15,"context_line":"reason, the deleted port can be discovered during the periodic refresh"},{"line_number":16,"context_line":"of info cache where network_info is saved. And obsolete ports can be"},{"line_number":17,"context_line":"discovered and detached."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"9a0c5dc1_9103a5b8","line":14,"in_reply_to":"9a0c5dc1_e2545955","updated":"2015-05-12 15:04:13.000000000","message":"Done","commit_id":"e407203c45c4f292885e25f63abe0ce7b650a58c"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"fc5dbc184d4250ea9076ef8160d22789c29b8e5c","unresolved":false,"context_lines":[{"line_number":11,"context_line":"when a port is deleted. This patch will process the event and detach"},{"line_number":12,"context_line":"the interface."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"If Neutron\u003c-\u003eNova event reporting is not turned on or lost for some"},{"line_number":15,"context_line":"reason, the deleted port can be discovered whenever nova queries"},{"line_number":16,"context_line":"neutron for network information. Check"},{"line_number":17,"context_line":"https://review.openstack.org/188783 for the patch to accomplish that."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":15,"id":"ba3cc151_a29c2c5e","line":14,"updated":"2015-07-10 21:54:53.000000000","message":"I\u0027m not sure we need to call https://review.openstack.org/#/c/188783/ out in this change given https://review.openstack.org/#/c/188783/ isn\u0027t approved and has a -1 on it.  If this change isn\u0027t dependent on https://review.openstack.org/#/c/188783/ (and it probably shouldn\u0027t be since orphaned ports aren\u0027t a new thing here), then I\u0027d actually prefer that we don\u0027t mention this, but I wouldn\u0027t block on it.","commit_id":"9da428f6275e7a6f7c2fd6760345ac4ef160bb3e"}],"nova/compute/manager.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"16886f0a8711ec9601ea259c7b73d11a7bcbcf75","unresolved":false,"context_lines":[{"line_number":5077,"context_line":"    @wrap_instance_fault"},{"line_number":5078,"context_line":"    def detach_interface(self, context, instance, port_id):"},{"line_number":5079,"context_line":"        \"\"\"Detach an network adapter from an instance.\"\"\""},{"line_number":5080,"context_line":"        network_info \u003d self._get_network_info_from_info_cache(instance)"},{"line_number":5081,"context_line":"        condemned \u003d None"},{"line_number":5082,"context_line":"        for vif in network_info:"},{"line_number":5083,"context_line":"            if vif[\u0027id\u0027] \u003d\u003d port_id:"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a0c5dc1_69171352","line":5080,"updated":"2015-05-13 00:43:30.000000000","message":"This is a net loss, IMHO. We\u0027re just getting the info_cache from the instance, but this makes it look like we\u0027re doing something more. Please leave this and use the attribute syntax in your new code too.","commit_id":"f0e3fe28c3c3fd73a6f2e01a12541d9fed18c6b3"},{"author":{"_account_id":6685,"name":"Baodong (Robert) Li","email":"baoli@cisco.com","username":"baoli"},"change_message_id":"12cd7b8fec24de8148cd1c0aa3bd535a447e8f51","unresolved":false,"context_lines":[{"line_number":5077,"context_line":"    @wrap_instance_fault"},{"line_number":5078,"context_line":"    def detach_interface(self, context, instance, port_id):"},{"line_number":5079,"context_line":"        \"\"\"Detach an network adapter from an instance.\"\"\""},{"line_number":5080,"context_line":"        network_info \u003d self._get_network_info_from_info_cache(instance)"},{"line_number":5081,"context_line":"        condemned \u003d None"},{"line_number":5082,"context_line":"        for vif in network_info:"},{"line_number":5083,"context_line":"            if vif[\u0027id\u0027] \u003d\u003d port_id:"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a0c5dc1_d1c56f8e","line":5080,"in_reply_to":"9a0c5dc1_69171352","updated":"2015-05-13 15:19:21.000000000","message":"the main reason for me to move this to a method instead of using the attribute syntax is due to the unit test failures in test_heal_instance_info_cache, which is using a dict for instance. Using the attribute syntax causes loading of the object.\n\nLet me know if there is a better way to resolve that without modifying the test too much.","commit_id":"f0e3fe28c3c3fd73a6f2e01a12541d9fed18c6b3"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"ab29be1883baa82b230cdff3c8fed423df54af8e","unresolved":false,"context_lines":[{"line_number":5077,"context_line":"    @wrap_instance_fault"},{"line_number":5078,"context_line":"    def detach_interface(self, context, instance, port_id):"},{"line_number":5079,"context_line":"        \"\"\"Detach an network adapter from an instance.\"\"\""},{"line_number":5080,"context_line":"        network_info \u003d self._get_network_info_from_info_cache(instance)"},{"line_number":5081,"context_line":"        condemned \u003d None"},{"line_number":5082,"context_line":"        for vif in network_info:"},{"line_number":5083,"context_line":"            if vif[\u0027id\u0027] \u003d\u003d port_id:"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a0c5dc1_2130f8e7","line":5080,"in_reply_to":"9a0c5dc1_d1c56f8e","updated":"2015-05-13 15:22:30.000000000","message":"So you want to mock this method to prevent it? That\u0027s a terrible reason to obfuscate the actual code, IMHO :)\n\nYou can just mock out Instance.obj_load_attr(), or (ideally) fix the test to not use a dict in a pre-patch. But please, let\u0027s not hurt the readability of the production code for that reason :)","commit_id":"f0e3fe28c3c3fd73a6f2e01a12541d9fed18c6b3"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"16886f0a8711ec9601ea259c7b73d11a7bcbcf75","unresolved":false,"context_lines":[{"line_number":5658,"context_line":"            try:"},{"line_number":5659,"context_line":"                # Call to network API to get instance info.. this will"},{"line_number":5660,"context_line":"                # force an update to the instance\u0027s info_cache."},{"line_number":5661,"context_line":"                # obsolete ports need to be detached from the intance."},{"line_number":5662,"context_line":"                old_nw_info \u003d self._get_network_info_from_info_cache(instance)"},{"line_number":5663,"context_line":"                new_nw_info \u003d self.network_api.get_instance_nw_info(context,"},{"line_number":5664,"context_line":"                                                                    instance)"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a0c5dc1_84090e2f","line":5661,"range":{"start_line":5661,"start_character":62,"end_line":5661,"end_character":69},"updated":"2015-05-13 00:43:30.000000000","message":"\"instance\" is misspelled","commit_id":"f0e3fe28c3c3fd73a6f2e01a12541d9fed18c6b3"},{"author":{"_account_id":6685,"name":"Baodong (Robert) Li","email":"baoli@cisco.com","username":"baoli"},"change_message_id":"12cd7b8fec24de8148cd1c0aa3bd535a447e8f51","unresolved":false,"context_lines":[{"line_number":5658,"context_line":"            try:"},{"line_number":5659,"context_line":"                # Call to network API to get instance info.. this will"},{"line_number":5660,"context_line":"                # force an update to the instance\u0027s info_cache."},{"line_number":5661,"context_line":"                # obsolete ports need to be detached from the intance."},{"line_number":5662,"context_line":"                old_nw_info \u003d self._get_network_info_from_info_cache(instance)"},{"line_number":5663,"context_line":"                new_nw_info \u003d self.network_api.get_instance_nw_info(context,"},{"line_number":5664,"context_line":"                                                                    instance)"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a0c5dc1_71ba430c","line":5661,"in_reply_to":"9a0c5dc1_84090e2f","updated":"2015-05-13 15:19:21.000000000","message":"Done","commit_id":"f0e3fe28c3c3fd73a6f2e01a12541d9fed18c6b3"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"16886f0a8711ec9601ea259c7b73d11a7bcbcf75","unresolved":false,"context_lines":[{"line_number":6545,"context_line":"                    if vif[\u0027id\u0027] \u003d\u003d event.tag:"},{"line_number":6546,"context_line":"                        self.driver.detach_interface(instance, vif)"},{"line_number":6547,"context_line":"                        break"},{"line_number":6548,"context_line":"                self.network_api.get_instance_nw_info(context, instance)"},{"line_number":6549,"context_line":"            else:"},{"line_number":6550,"context_line":"                self._process_instance_event(instance, event)"},{"line_number":6551,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"9a0c5dc1_c4d02656","line":6548,"updated":"2015-05-13 00:43:30.000000000","message":"You lack tests for this case.","commit_id":"f0e3fe28c3c3fd73a6f2e01a12541d9fed18c6b3"},{"author":{"_account_id":6685,"name":"Baodong (Robert) Li","email":"baoli@cisco.com","username":"baoli"},"change_message_id":"12cd7b8fec24de8148cd1c0aa3bd535a447e8f51","unresolved":false,"context_lines":[{"line_number":6545,"context_line":"                    if vif[\u0027id\u0027] \u003d\u003d event.tag:"},{"line_number":6546,"context_line":"                        self.driver.detach_interface(instance, vif)"},{"line_number":6547,"context_line":"                        break"},{"line_number":6548,"context_line":"                self.network_api.get_instance_nw_info(context, instance)"},{"line_number":6549,"context_line":"            else:"},{"line_number":6550,"context_line":"                self._process_instance_event(instance, event)"},{"line_number":6551,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"9a0c5dc1_7d8fb2cc","line":6548,"in_reply_to":"9a0c5dc1_c4d02656","updated":"2015-05-13 15:19:21.000000000","message":"was looking for the existing test that tests this method, and didn\u0027t see it in test_compute.py. Now I realized it\u0027s in test_compute_mgr.py.\n\nWill add","commit_id":"f0e3fe28c3c3fd73a6f2e01a12541d9fed18c6b3"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"1c66dbff765fa334822f7bb1462df2619962df42","unresolved":false,"context_lines":[{"line_number":6126,"context_line":"            if event.name \u003d\u003d \u0027network-changed\u0027:"},{"line_number":6127,"context_line":"                self.network_api.get_instance_nw_info(context, instance)"},{"line_number":6128,"context_line":"            elif event.name \u003d\u003d \u0027network-vif-deleted\u0027:"},{"line_number":6129,"context_line":"                # If an attached port is deleted by neutron, it needs to"},{"line_number":6130,"context_line":"                # be detached from the instance."},{"line_number":6131,"context_line":"                network_info \u003d instance.info_cache.network_info"},{"line_number":6132,"context_line":"                for vif in network_info:"}],"source_content_type":"text/x-python","patch_set":6,"id":"7a016987_8963c4b0","line":6129,"updated":"2015-06-01 13:08:22.000000000","message":"nit: No sure we want to speak about Neutron at this layer.","commit_id":"cbdde934b3ff4bfa4714cad5e88f5b7e01623058"},{"author":{"_account_id":6685,"name":"Baodong (Robert) Li","email":"baoli@cisco.com","username":"baoli"},"change_message_id":"993b1398b5503304fbb98d0281120fdd701d6651","unresolved":false,"context_lines":[{"line_number":6126,"context_line":"            if event.name \u003d\u003d \u0027network-changed\u0027:"},{"line_number":6127,"context_line":"                self.network_api.get_instance_nw_info(context, instance)"},{"line_number":6128,"context_line":"            elif event.name \u003d\u003d \u0027network-vif-deleted\u0027:"},{"line_number":6129,"context_line":"                # If an attached port is deleted by neutron, it needs to"},{"line_number":6130,"context_line":"                # be detached from the instance."},{"line_number":6131,"context_line":"                network_info \u003d instance.info_cache.network_info"},{"line_number":6132,"context_line":"                for vif in network_info:"}],"source_content_type":"text/x-python","patch_set":6,"id":"5afe65bd_c31a6e6e","line":6129,"in_reply_to":"7a016987_8963c4b0","updated":"2015-06-03 20:11:06.000000000","message":"there are quite a few references to neutron in this file.","commit_id":"cbdde934b3ff4bfa4714cad5e88f5b7e01623058"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"153fcf5b821c3c6fad8869d4bd536d4401a71a1e","unresolved":false,"context_lines":[{"line_number":6133,"context_line":"                    if vif[\u0027id\u0027] \u003d\u003d event.tag:"},{"line_number":6134,"context_line":"                        self.driver.detach_interface(instance, vif)"},{"line_number":6135,"context_line":"                        break"},{"line_number":6136,"context_line":"                self.network_api.get_instance_nw_info(context, instance)"},{"line_number":6137,"context_line":"            else:"},{"line_number":6138,"context_line":"                self._process_instance_event(instance, event)"},{"line_number":6139,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"5afe65bd_f32f93f4","line":6136,"updated":"2015-06-01 22:26:33.000000000","message":"Is this needed to make the instance\u0027s info_cache reflect the new state with vif from the event detached?","commit_id":"cbdde934b3ff4bfa4714cad5e88f5b7e01623058"},{"author":{"_account_id":6685,"name":"Baodong (Robert) Li","email":"baoli@cisco.com","username":"baoli"},"change_message_id":"993b1398b5503304fbb98d0281120fdd701d6651","unresolved":false,"context_lines":[{"line_number":6133,"context_line":"                    if vif[\u0027id\u0027] \u003d\u003d event.tag:"},{"line_number":6134,"context_line":"                        self.driver.detach_interface(instance, vif)"},{"line_number":6135,"context_line":"                        break"},{"line_number":6136,"context_line":"                self.network_api.get_instance_nw_info(context, instance)"},{"line_number":6137,"context_line":"            else:"},{"line_number":6138,"context_line":"                self._process_instance_event(instance, event)"},{"line_number":6139,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"5afe65bd_e390ca97","line":6136,"in_reply_to":"5afe65bd_f32f93f4","updated":"2015-06-03 20:11:06.000000000","message":"yes.","commit_id":"cbdde934b3ff4bfa4714cad5e88f5b7e01623058"},{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"e9697c0193b9a1a97efd6fed80766ab1334c5222","unresolved":false,"context_lines":[{"line_number":5254,"context_line":"                                                                    instance)"},{"line_number":5255,"context_line":"                cur_ids \u003d [vif[\u0027id\u0027] for vif in new_nw_info]"},{"line_number":5256,"context_line":"                for vif in old_nw_info:"},{"line_number":5257,"context_line":"                    if vif[\u0027id\u0027] not in cur_ids:"},{"line_number":5258,"context_line":"                        self.driver.detach_interface(instance, vif)"},{"line_number":5259,"context_line":"                LOG.debug(\u0027Updated the network info_cache for instance\u0027,"},{"line_number":5260,"context_line":"                          instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":7,"id":"5afe65bd_37c70447","line":5257,"updated":"2015-06-03 14:51:41.000000000","message":"guess we can add some logs here to\nhelp debug the potential issue","commit_id":"1610e297eedcd70cd3eba6f7f104e814d3574248"},{"author":{"_account_id":6685,"name":"Baodong (Robert) Li","email":"baoli@cisco.com","username":"baoli"},"change_message_id":"d73d4bf6327418e7a44f4c2e66c031b2bdc51602","unresolved":false,"context_lines":[{"line_number":5254,"context_line":"                                                                    instance)"},{"line_number":5255,"context_line":"                cur_ids \u003d [vif[\u0027id\u0027] for vif in new_nw_info]"},{"line_number":5256,"context_line":"                for vif in old_nw_info:"},{"line_number":5257,"context_line":"                    if vif[\u0027id\u0027] not in cur_ids:"},{"line_number":5258,"context_line":"                        self.driver.detach_interface(instance, vif)"},{"line_number":5259,"context_line":"                LOG.debug(\u0027Updated the network info_cache for instance\u0027,"},{"line_number":5260,"context_line":"                          instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":7,"id":"5afe65bd_7f7d45e6","line":5257,"in_reply_to":"5afe65bd_37c70447","updated":"2015-06-03 20:13:25.000000000","message":"I can add a log here.","commit_id":"1610e297eedcd70cd3eba6f7f104e814d3574248"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"2a5e05e3f8a40215419b5e4c870eaf26321dc788","unresolved":false,"context_lines":[{"line_number":5248,"context_line":"            try:"},{"line_number":5249,"context_line":"                # Call to network API to get instance info.. this will"},{"line_number":5250,"context_line":"                # force an update to the instance\u0027s info_cache."},{"line_number":5251,"context_line":"                # obsolete ports need to be detached from the instance."},{"line_number":5252,"context_line":"                old_nw_info \u003d instance.info_cache.network_info"},{"line_number":5253,"context_line":"                new_nw_info \u003d self.network_api.get_instance_nw_info(context,"},{"line_number":5254,"context_line":"                                                                    instance)"}],"source_content_type":"text/x-python","patch_set":8,"id":"5afe65bd_9546944d","line":5251,"updated":"2015-06-04 07:12:02.000000000","message":"This block is not directly related to your change, please submit an other patch.\n\n 1/ Make external_instance_event to handle the new event \"network...\"\n 2/ Make periodic task to handle vif deleted","commit_id":"ac8ff5073a996b1776f10bd64996fa58ce8f15aa"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"1fd3a619579343be1827cbd19f515c67fae829f3","unresolved":false,"context_lines":[{"line_number":5248,"context_line":"            try:"},{"line_number":5249,"context_line":"                # Call to network API to get instance info.. this will"},{"line_number":5250,"context_line":"                # force an update to the instance\u0027s info_cache."},{"line_number":5251,"context_line":"                # obsolete ports need to be detached from the instance."},{"line_number":5252,"context_line":"                old_nw_info \u003d instance.info_cache.network_info"},{"line_number":5253,"context_line":"                new_nw_info \u003d self.network_api.get_instance_nw_info(context,"},{"line_number":5254,"context_line":"                                                                    instance)"}],"source_content_type":"text/x-python","patch_set":8,"id":"3afb71cf_6b6399b2","line":5251,"in_reply_to":"3afb71cf_67c50f5a","updated":"2015-06-05 14:23:29.000000000","message":"Thank you, please CC me on the bug or review I would like to ensure we will backport it.","commit_id":"ac8ff5073a996b1776f10bd64996fa58ce8f15aa"},{"author":{"_account_id":6685,"name":"Baodong (Robert) Li","email":"baoli@cisco.com","username":"baoli"},"change_message_id":"7644c00e5009685243b624a638eb5faae3edb721","unresolved":false,"context_lines":[{"line_number":5248,"context_line":"            try:"},{"line_number":5249,"context_line":"                # Call to network API to get instance info.. this will"},{"line_number":5250,"context_line":"                # force an update to the instance\u0027s info_cache."},{"line_number":5251,"context_line":"                # obsolete ports need to be detached from the instance."},{"line_number":5252,"context_line":"                old_nw_info \u003d instance.info_cache.network_info"},{"line_number":5253,"context_line":"                new_nw_info \u003d self.network_api.get_instance_nw_info(context,"},{"line_number":5254,"context_line":"                                                                    instance)"}],"source_content_type":"text/x-python","patch_set":8,"id":"3afb71cf_67c50f5a","line":5251,"in_reply_to":"3afb71cf_bc268714","updated":"2015-06-05 14:16:21.000000000","message":"Sounds reasonable. I\u0027ll create a bug for that, and split this patch into 2.","commit_id":"ac8ff5073a996b1776f10bd64996fa58ce8f15aa"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"03db1cb73c1968e4ee272b49c2ff4f438cc31046","unresolved":false,"context_lines":[{"line_number":5248,"context_line":"            try:"},{"line_number":5249,"context_line":"                # Call to network API to get instance info.. this will"},{"line_number":5250,"context_line":"                # force an update to the instance\u0027s info_cache."},{"line_number":5251,"context_line":"                # obsolete ports need to be detached from the instance."},{"line_number":5252,"context_line":"                old_nw_info \u003d instance.info_cache.network_info"},{"line_number":5253,"context_line":"                new_nw_info \u003d self.network_api.get_instance_nw_info(context,"},{"line_number":5254,"context_line":"                                                                    instance)"}],"source_content_type":"text/x-python","patch_set":8,"id":"3afb71cf_bc268714","line":5251,"in_reply_to":"5afe65bd_88542aff","updated":"2015-06-05 07:23:59.000000000","message":"Well my concern is because here your are fixing a bug in the periodic task to refresh info_cache which should be reported and marked as backport-potential and The aim of this patch is to handle the new event introduced in Neutron.\n\nSo I would like to insist on reporting a bug to separate this change to make it able to be backported.","commit_id":"ac8ff5073a996b1776f10bd64996fa58ce8f15aa"},{"author":{"_account_id":6685,"name":"Baodong (Robert) Li","email":"baoli@cisco.com","username":"baoli"},"change_message_id":"9c03ee5ca78fee898137a6759bd2f7c8cd88a2b3","unresolved":false,"context_lines":[{"line_number":5248,"context_line":"            try:"},{"line_number":5249,"context_line":"                # Call to network API to get instance info.. this will"},{"line_number":5250,"context_line":"                # force an update to the instance\u0027s info_cache."},{"line_number":5251,"context_line":"                # obsolete ports need to be detached from the instance."},{"line_number":5252,"context_line":"                old_nw_info \u003d instance.info_cache.network_info"},{"line_number":5253,"context_line":"                new_nw_info \u003d self.network_api.get_instance_nw_info(context,"},{"line_number":5254,"context_line":"                                                                    instance)"}],"source_content_type":"text/x-python","patch_set":8,"id":"5afe65bd_88542aff","line":5251,"in_reply_to":"5afe65bd_9546944d","updated":"2015-06-04 13:24:27.000000000","message":"If you insist, I can do as you have suggested. But I think this patch is really about nova handling neutron initiated port delete, and making sure that the port detached from the instance. I guess that the least I can do is to change the patch summary title.","commit_id":"ac8ff5073a996b1776f10bd64996fa58ce8f15aa"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"237f83a56869ebc1782e077af8027b55767ee2ff","unresolved":false,"context_lines":[{"line_number":6121,"context_line":"            elif event.name \u003d\u003d \u0027network-vif-deleted\u0027:"},{"line_number":6122,"context_line":"                # If an attached port is deleted by neutron, it needs to"},{"line_number":6123,"context_line":"                # be detached from the instance."},{"line_number":6124,"context_line":"                network_info \u003d instance.info_cache.network_info"},{"line_number":6125,"context_line":"                for vif in network_info:"},{"line_number":6126,"context_line":"                    if vif[\u0027id\u0027] \u003d\u003d event.tag:"},{"line_number":6127,"context_line":"                        self.driver.detach_interface(instance, vif)"}],"source_content_type":"text/x-python","patch_set":10,"id":"3afb71cf_1dde7c3f","line":6124,"updated":"2015-06-08 08:06:01.000000000","message":"Actually I think all of this block is not necessary if you call at the end method \u0027network_api.get_instance_nw_info\u0027 wich will refresh info_cache.\n\nWhen we catch this event, calling network_api.get_instance_nw_info should be enough so you probably need to fix method \u0027_build_network_info_model\u0027 as indicated here https://review.openstack.org/#/c/188783/1/nova/compute/manager.py,cm and put this patch on top of it.","commit_id":"b8c126118d75866920b2baf1f207641cb5d9b72f"},{"author":{"_account_id":6685,"name":"Baodong (Robert) Li","email":"baoli@cisco.com","username":"baoli"},"change_message_id":"1d9349c1cf288996c75864b30c7223d6f636e99d","unresolved":false,"context_lines":[{"line_number":6121,"context_line":"            elif event.name \u003d\u003d \u0027network-vif-deleted\u0027:"},{"line_number":6122,"context_line":"                # If an attached port is deleted by neutron, it needs to"},{"line_number":6123,"context_line":"                # be detached from the instance."},{"line_number":6124,"context_line":"                network_info \u003d instance.info_cache.network_info"},{"line_number":6125,"context_line":"                for vif in network_info:"},{"line_number":6126,"context_line":"                    if vif[\u0027id\u0027] \u003d\u003d event.tag:"},{"line_number":6127,"context_line":"                        self.driver.detach_interface(instance, vif)"}],"source_content_type":"text/x-python","patch_set":10,"id":"3afb71cf_51eb46df","line":6124,"in_reply_to":"3afb71cf_1dde7c3f","updated":"2015-06-10 13:43:40.000000000","message":"we probably don\u0027t want to call get_instance_nw_info() any more as part of processing the network-vif-deleted event. Why calling neutron again when the required information has been available in the event itself. \n\nWould it be better off just deleting the vif and updating the info_cache instead?\n\nOtherwise, we may not need this new event network-vif-deleted any more since network-changed would cover this already.","commit_id":"b8c126118d75866920b2baf1f207641cb5d9b72f"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"8ea8ec668712a8e0f3e1d715450cdf7ab3908394","unresolved":false,"context_lines":[{"line_number":6121,"context_line":"            elif event.name \u003d\u003d \u0027network-vif-deleted\u0027:"},{"line_number":6122,"context_line":"                # If an attached port is deleted by neutron, it needs to"},{"line_number":6123,"context_line":"                # be detached from the instance."},{"line_number":6124,"context_line":"                network_info \u003d instance.info_cache.network_info"},{"line_number":6125,"context_line":"                for vif in network_info:"},{"line_number":6126,"context_line":"                    if vif[\u0027id\u0027] \u003d\u003d event.tag:"},{"line_number":6127,"context_line":"                        self.driver.detach_interface(instance, vif)"}],"source_content_type":"text/x-python","patch_set":10,"id":"3afb71cf_f8b419d5","line":6124,"in_reply_to":"3afb71cf_51eb46df","updated":"2015-06-11 15:12:13.000000000","message":"It seems way better to me for us to delete the actual vif and not just require a full sync to notice the change. I could be wrong, but if get_instance_nw_info() notices that a vif is deleted, I don\u0027t think that it will cause nova to detach the interface, right?\n\nI see that you\u0027re doing a full sync below as well. Why not just delete the vif matching event.tag from the network info in your loop and avoid the extra get_instance_nw_info() sync? That will make this much lighter weight.\n\nIf we\u0027re not going to do that, then we might as well use network-changed and make sure that we notice and delete removed vifs properly.","commit_id":"b8c126118d75866920b2baf1f207641cb5d9b72f"},{"author":{"_account_id":6685,"name":"Baodong (Robert) Li","email":"baoli@cisco.com","username":"baoli"},"change_message_id":"198ebc6286a07342a38510386b020d8f5d9a9c62","unresolved":false,"context_lines":[{"line_number":6121,"context_line":"            elif event.name \u003d\u003d \u0027network-vif-deleted\u0027:"},{"line_number":6122,"context_line":"                # If an attached port is deleted by neutron, it needs to"},{"line_number":6123,"context_line":"                # be detached from the instance."},{"line_number":6124,"context_line":"                network_info \u003d instance.info_cache.network_info"},{"line_number":6125,"context_line":"                for vif in network_info:"},{"line_number":6126,"context_line":"                    if vif[\u0027id\u0027] \u003d\u003d event.tag:"},{"line_number":6127,"context_line":"                        self.driver.detach_interface(instance, vif)"}],"source_content_type":"text/x-python","patch_set":10,"id":"3afb71cf_cedbd44e","line":6124,"in_reply_to":"3afb71cf_735dea47","updated":"2015-06-11 16:45:21.000000000","message":"Ok, let me submit a new patch that deletes the VIF, and updates the info cache, and doesn\u0027t call get_instance_nw_info any more.\n\nDan, can you take a look at the discussion in this patch: https://review.openstack.org/#/c/188783/1/nova/compute/manager.py. We need to decide how to move forward with that patch that deals with two things:\n   -- no neutron notification, or\n   -- the notification gets lost for some reason (e.g., restart, etc)\nthanks","commit_id":"b8c126118d75866920b2baf1f207641cb5d9b72f"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"30aa7624ce529c8e85c133dcd2da5c68e14c4515","unresolved":false,"context_lines":[{"line_number":6121,"context_line":"            elif event.name \u003d\u003d \u0027network-vif-deleted\u0027:"},{"line_number":6122,"context_line":"                # If an attached port is deleted by neutron, it needs to"},{"line_number":6123,"context_line":"                # be detached from the instance."},{"line_number":6124,"context_line":"                network_info \u003d instance.info_cache.network_info"},{"line_number":6125,"context_line":"                for vif in network_info:"},{"line_number":6126,"context_line":"                    if vif[\u0027id\u0027] \u003d\u003d event.tag:"},{"line_number":6127,"context_line":"                        self.driver.detach_interface(instance, vif)"}],"source_content_type":"text/x-python","patch_set":10,"id":"3afb71cf_735dea47","line":6124,"in_reply_to":"3afb71cf_f8b419d5","updated":"2015-06-11 15:29:44.000000000","message":"My first comment was a mistake I thought network.API provides an instance of the compute manager - So able to detach interfaces during the refresh.\n\nIn this case I\u0027m agreed the extra call of network_api.get_instance_nw_info() shouldn\u0027t be necessary.","commit_id":"b8c126118d75866920b2baf1f207641cb5d9b72f"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"9b07d9d089e4afad8b48237b3df48d76b0207ac8","unresolved":false,"context_lines":[{"line_number":6124,"context_line":"                           instance,"},{"line_number":6125,"context_line":"                           nw_info\u003dnetwork_info,"},{"line_number":6126,"context_line":"                           update_cells\u003dFalse)"},{"line_number":6127,"context_line":"                        self.driver.detach_interface(instance, vif)"},{"line_number":6128,"context_line":"                        break"},{"line_number":6129,"context_line":"            else:"},{"line_number":6130,"context_line":"                self._process_instance_event(instance, event)"}],"source_content_type":"text/x-python","patch_set":11,"id":"fa32b979_d93ce931","line":6127,"updated":"2015-06-14 07:34:09.000000000","message":"i think that we need a log warning here. this will at least provide the admin some information that an external event has driven the detachment of the interface from the vm.\n\ni think that deleting a port that is attached to an instance should be prevented in neutron. that sound like the real bug to me.","commit_id":"e856202f15b67e17a77169b3dbfea1e493f1f480"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"4bf95ddf6f2634101bac360ec8189cdd5cf18ef8","unresolved":false,"context_lines":[{"line_number":6124,"context_line":"                           instance,"},{"line_number":6125,"context_line":"                           nw_info\u003dnetwork_info,"},{"line_number":6126,"context_line":"                           update_cells\u003dFalse)"},{"line_number":6127,"context_line":"                        self.driver.detach_interface(instance, vif)"},{"line_number":6128,"context_line":"                        break"},{"line_number":6129,"context_line":"            else:"},{"line_number":6130,"context_line":"                self._process_instance_event(instance, event)"}],"source_content_type":"text/x-python","patch_set":11,"id":"fa32b979_c7861765","line":6127,"in_reply_to":"fa32b979_a003c472","updated":"2015-06-22 08:28:44.000000000","message":"I see, if we delete a port from Neutron side an event will be addressed to nova which seems to be good yes.\n\nThanks","commit_id":"e856202f15b67e17a77169b3dbfea1e493f1f480"},{"author":{"_account_id":6685,"name":"Baodong (Robert) Li","email":"baoli@cisco.com","username":"baoli"},"change_message_id":"711de012e4c1aaa3f931b89af637075348db23a7","unresolved":false,"context_lines":[{"line_number":6124,"context_line":"                           instance,"},{"line_number":6125,"context_line":"                           nw_info\u003dnetwork_info,"},{"line_number":6126,"context_line":"                           update_cells\u003dFalse)"},{"line_number":6127,"context_line":"                        self.driver.detach_interface(instance, vif)"},{"line_number":6128,"context_line":"                        break"},{"line_number":6129,"context_line":"            else:"},{"line_number":6130,"context_line":"                self._process_instance_event(instance, event)"}],"source_content_type":"text/x-python","patch_set":11,"id":"fa32b979_a003c472","line":6127,"in_reply_to":"fa32b979_a4bbeac3","updated":"2015-06-15 14:23:37.000000000","message":"I can add a warning.\n\nRegarding your comments on \"deleting a port that is attached to an instance should be prevented in neutron\", that\u0027s my first thought when looking at the issue. But given the current API, I don\u0027t see how it can be prevented. Nova will invoke neutron to delete the port when the attached instance is being deleted. And It doesn\u0027t seem to be possible to differentiate this action from that issued by any other user. Let me know otherwise.","commit_id":"e856202f15b67e17a77169b3dbfea1e493f1f480"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"f829d6ba609063ef8eb510b32a8cd4165d703e65","unresolved":false,"context_lines":[{"line_number":6124,"context_line":"                           instance,"},{"line_number":6125,"context_line":"                           nw_info\u003dnetwork_info,"},{"line_number":6126,"context_line":"                           update_cells\u003dFalse)"},{"line_number":6127,"context_line":"                        self.driver.detach_interface(instance, vif)"},{"line_number":6128,"context_line":"                        break"},{"line_number":6129,"context_line":"            else:"},{"line_number":6130,"context_line":"                self._process_instance_event(instance, event)"}],"source_content_type":"text/x-python","patch_set":11,"id":"fa32b979_a4bbeac3","line":6127,"in_reply_to":"fa32b979_a4d8ca54","updated":"2015-06-15 07:01:56.000000000","message":"I mean a port attached to an instance yes.","commit_id":"e856202f15b67e17a77169b3dbfea1e493f1f480"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"c3fd96a8d99fe149023c8bf2ae5450e244b2a369","unresolved":false,"context_lines":[{"line_number":6124,"context_line":"                           instance,"},{"line_number":6125,"context_line":"                           nw_info\u003dnetwork_info,"},{"line_number":6126,"context_line":"                           update_cells\u003dFalse)"},{"line_number":6127,"context_line":"                        self.driver.detach_interface(instance, vif)"},{"line_number":6128,"context_line":"                        break"},{"line_number":6129,"context_line":"            else:"},{"line_number":6130,"context_line":"                self._process_instance_event(instance, event)"}],"source_content_type":"text/x-python","patch_set":11,"id":"fa32b979_a4d8ca54","line":6127,"in_reply_to":"fa32b979_d93ce931","updated":"2015-06-15 07:00:58.000000000","message":"It\u0027s interesting Gary, why neutron would like to delete a port ?","commit_id":"e856202f15b67e17a77169b3dbfea1e493f1f480"},{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"38d1732636c7dc38dd4e5ce7301a816dbd4d92b0","unresolved":false,"context_lines":[{"line_number":6121,"context_line":"                        LOG.warning(_LW(\u0027Interface %(intf)s being detached \u0027"},{"line_number":6122,"context_line":"                                        \u0027due to event network-vif-deleted\u0027),"},{"line_number":6123,"context_line":"                                        {\u0027intf\u0027: vif[\u0027id\u0027]},"},{"line_number":6124,"context_line":"                                        instance\u003dinstance)"},{"line_number":6125,"context_line":"                        del network_info[index]"},{"line_number":6126,"context_line":"                        base_api.update_instance_cache_with_nw_info("},{"line_number":6127,"context_line":"                           self.network_api, context,"}],"source_content_type":"text/x-python","patch_set":12,"id":"fa32b979_c680abc1","line":6124,"updated":"2015-06-25 11:33:50.000000000","message":"this is just going to be cryptic to people, the log messages should be at least as illuminating as the code comments. I\u0027d rather this be:\n\nLOG.info(_LI(\"Neutron deleted %(intf), detached interface\"), ...)","commit_id":"50bd815a89c4914c88de6461962047929108dc3f"},{"author":{"_account_id":6685,"name":"Baodong (Robert) Li","email":"baoli@cisco.com","username":"baoli"},"change_message_id":"e55bf3deb84716ba5db53ef4129756a6e9a9e7d4","unresolved":false,"context_lines":[{"line_number":6121,"context_line":"                        LOG.warning(_LW(\u0027Interface %(intf)s being detached \u0027"},{"line_number":6122,"context_line":"                                        \u0027due to event network-vif-deleted\u0027),"},{"line_number":6123,"context_line":"                                        {\u0027intf\u0027: vif[\u0027id\u0027]},"},{"line_number":6124,"context_line":"                                        instance\u003dinstance)"},{"line_number":6125,"context_line":"                        del network_info[index]"},{"line_number":6126,"context_line":"                        base_api.update_instance_cache_with_nw_info("},{"line_number":6127,"context_line":"                           self.network_api, context,"}],"source_content_type":"text/x-python","patch_set":12,"id":"fa32b979_bdced12a","line":6124,"in_reply_to":"fa32b979_c680abc1","updated":"2015-06-25 14:40:52.000000000","message":"yep, yours sounds better, and will change. garyk suggested a warning rather than an info msg. So I\u0027ll keep it as a warning.","commit_id":"50bd815a89c4914c88de6461962047929108dc3f"},{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"38d1732636c7dc38dd4e5ce7301a816dbd4d92b0","unresolved":false,"context_lines":[{"line_number":6127,"context_line":"                           self.network_api, context,"},{"line_number":6128,"context_line":"                           instance,"},{"line_number":6129,"context_line":"                           nw_info\u003dnetwork_info,"},{"line_number":6130,"context_line":"                           update_cells\u003dFalse)"},{"line_number":6131,"context_line":"                        self.driver.detach_interface(instance, vif)"},{"line_number":6132,"context_line":"                        break"},{"line_number":6133,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":12,"id":"fa32b979_c66aebec","line":6130,"updated":"2015-06-25 11:33:50.000000000","message":"Question: so, I realize eventlet might protect us here, but the fact that we\u0027re doing a delete and overwriting nw_cache seems like a conceptual race. Is there no way to do the detach and regen the nw_cache?","commit_id":"50bd815a89c4914c88de6461962047929108dc3f"},{"author":{"_account_id":6685,"name":"Baodong (Robert) Li","email":"baoli@cisco.com","username":"baoli"},"change_message_id":"e55bf3deb84716ba5db53ef4129756a6e9a9e7d4","unresolved":false,"context_lines":[{"line_number":6127,"context_line":"                           self.network_api, context,"},{"line_number":6128,"context_line":"                           instance,"},{"line_number":6129,"context_line":"                           nw_info\u003dnetwork_info,"},{"line_number":6130,"context_line":"                           update_cells\u003dFalse)"},{"line_number":6131,"context_line":"                        self.driver.detach_interface(instance, vif)"},{"line_number":6132,"context_line":"                        break"},{"line_number":6133,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":12,"id":"fa32b979_e3003603","line":6130,"in_reply_to":"fa32b979_c66aebec","updated":"2015-06-25 14:40:52.000000000","message":"I\u0027m trying to understand what\u0027s the race going to be. In this case, all the data seems to be on the stack.Can you elaborate?\n\nOn your second question, in an earlier patch, get_instance_nw_info() is invoked to regenerate the info cache. But it was considered unnecessary since the deleted interface has already been carried in the event itself.","commit_id":"50bd815a89c4914c88de6461962047929108dc3f"},{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"38d1732636c7dc38dd4e5ce7301a816dbd4d92b0","unresolved":false,"context_lines":[{"line_number":6129,"context_line":"                           nw_info\u003dnetwork_info,"},{"line_number":6130,"context_line":"                           update_cells\u003dFalse)"},{"line_number":6131,"context_line":"                        self.driver.detach_interface(instance, vif)"},{"line_number":6132,"context_line":"                        break"},{"line_number":6133,"context_line":"            else:"},{"line_number":6134,"context_line":"                self._process_instance_event(instance, event)"},{"line_number":6135,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"fa32b979_e6b04fde","line":6132,"updated":"2015-06-25 11:33:50.000000000","message":"this feels like the wrong place to put this amount of logic, this function was previously a dispatcher. Is there a better place to isolation this as a function? Especially for testability.","commit_id":"50bd815a89c4914c88de6461962047929108dc3f"},{"author":{"_account_id":6685,"name":"Baodong (Robert) Li","email":"baoli@cisco.com","username":"baoli"},"change_message_id":"e55bf3deb84716ba5db53ef4129756a6e9a9e7d4","unresolved":false,"context_lines":[{"line_number":6129,"context_line":"                           nw_info\u003dnetwork_info,"},{"line_number":6130,"context_line":"                           update_cells\u003dFalse)"},{"line_number":6131,"context_line":"                        self.driver.detach_interface(instance, vif)"},{"line_number":6132,"context_line":"                        break"},{"line_number":6133,"context_line":"            else:"},{"line_number":6134,"context_line":"                self._process_instance_event(instance, event)"},{"line_number":6135,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"fa32b979_c3e732e1","line":6132,"in_reply_to":"fa32b979_e6b04fde","updated":"2015-06-25 14:40:52.000000000","message":"I can pull the above logic out and place them in a method, say, _process_vif_deleted_event(). How does that sound?","commit_id":"50bd815a89c4914c88de6461962047929108dc3f"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"da04b67922e8f8cd37b1c19522cb13b8a7c4f192","unresolved":false,"context_lines":[{"line_number":74,"context_line":"from nova.image import glance"},{"line_number":75,"context_line":"from nova import manager"},{"line_number":76,"context_line":"from nova import network"},{"line_number":77,"context_line":"from nova.network import base_api"},{"line_number":78,"context_line":"from nova.network import model as network_model"},{"line_number":79,"context_line":"from nova.network.security_group import openstack_driver"},{"line_number":80,"context_line":"from nova import objects"}],"source_content_type":"text/x-python","patch_set":15,"id":"9a41bdd9_7fad8f30","line":77,"updated":"2015-07-10 22:59:23.000000000","message":"Let\u0027s name this base_net_api or something, it\u0027s very obscure otherwise since we have other things like compute_api and volume_api in here.","commit_id":"9da428f6275e7a6f7c2fd6760345ac4ef160bb3e"},{"author":{"_account_id":6685,"name":"Baodong (Robert) Li","email":"baoli@cisco.com","username":"baoli"},"change_message_id":"5634480bbf83adff48a1f3602c24d4b655d20500","unresolved":false,"context_lines":[{"line_number":74,"context_line":"from nova.image import glance"},{"line_number":75,"context_line":"from nova import manager"},{"line_number":76,"context_line":"from nova import network"},{"line_number":77,"context_line":"from nova.network import base_api"},{"line_number":78,"context_line":"from nova.network import model as network_model"},{"line_number":79,"context_line":"from nova.network.security_group import openstack_driver"},{"line_number":80,"context_line":"from nova import objects"}],"source_content_type":"text/x-python","patch_set":15,"id":"3a50d1a3_c7a7114e","line":77,"in_reply_to":"9a41bdd9_7fad8f30","updated":"2015-07-20 14:41:15.000000000","message":"sure will do","commit_id":"9da428f6275e7a6f7c2fd6760345ac4ef160bb3e"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"fc5dbc184d4250ea9076ef8160d22789c29b8e5c","unresolved":false,"context_lines":[{"line_number":4675,"context_line":""},{"line_number":4676,"context_line":"    @wrap_exception()"},{"line_number":4677,"context_line":"    @reverts_task_state"},{"line_number":4678,"context_line":"    @wrap_instance_fault"},{"line_number":4679,"context_line":"    def detach_interface(self, context, instance, port_id):"},{"line_number":4680,"context_line":"        \"\"\"Detach an network adapter from an instance.\"\"\""},{"line_number":4681,"context_line":"        network_info \u003d instance.info_cache.network_info"}],"source_content_type":"text/x-python","patch_set":15,"id":"ba3cc151_6285c4ab","line":4678,"updated":"2015-07-10 21:54:53.000000000","message":"Just call this.","commit_id":"9da428f6275e7a6f7c2fd6760345ac4ef160bb3e"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"fc5dbc184d4250ea9076ef8160d22789c29b8e5c","unresolved":false,"context_lines":[{"line_number":6137,"context_line":""},{"line_number":6138,"context_line":"    def _process_instance_vif_deleted_event(self, context, instance,"},{"line_number":6139,"context_line":"                                            deleted_vif_id):"},{"line_number":6140,"context_line":"        # If an attached port is deleted by neutron, it needs to"},{"line_number":6141,"context_line":"        # be detached from the instance."},{"line_number":6142,"context_line":"        # And info cache needs to be updated."},{"line_number":6143,"context_line":"        network_info \u003d instance.info_cache.network_info"}],"source_content_type":"text/x-python","patch_set":15,"id":"ba3cc151_a25d0c7b","line":6140,"updated":"2015-07-10 21:54:53.000000000","message":"We should just be calling self.detach_interface which handles the call to the network_api to deallocate the port from the instance and handles the virt driver call to detach the interface.  Why do we need to duplicate that all here?\n\nThe issue I see might be if the network_api.deallocate_port_for_instance call fails because deleting the port fails because it\u0027s already deleted:\n\nhttp://git.openstack.org/cgit/openstack/nova/tree/nova/network/neutronv2/api.py#n740\n\nI think that would raise a PortNotFound which we could arguably handle and ignore since we know it\u0027s gone, and then bake that into self.detach_interface here in the compute manager.\n\nI just don\u0027t like re-inventing the wheel here.","commit_id":"9da428f6275e7a6f7c2fd6760345ac4ef160bb3e"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"64434fc7bfd3d78841b81348709bd26c5752a754","unresolved":false,"context_lines":[{"line_number":6137,"context_line":""},{"line_number":6138,"context_line":"    def _process_instance_vif_deleted_event(self, context, instance,"},{"line_number":6139,"context_line":"                                            deleted_vif_id):"},{"line_number":6140,"context_line":"        # If an attached port is deleted by neutron, it needs to"},{"line_number":6141,"context_line":"        # be detached from the instance."},{"line_number":6142,"context_line":"        # And info cache needs to be updated."},{"line_number":6143,"context_line":"        network_info \u003d instance.info_cache.network_info"}],"source_content_type":"text/x-python","patch_set":15,"id":"ba3cc151_3daefde7","line":6140,"in_reply_to":"ba3cc151_a25d0c7b","updated":"2015-07-10 21:59:51.000000000","message":"I guess this could be a result of the discussion here:\n\nhttps://review.openstack.org/#/c/179390/10/nova/compute/manager.py\n\nWhere it was pointed out we already have the info so we could just process the event here and not worry about the rest.\n\nI still kind of hate the duplication of code though since we\u0027re just duplicating our scope for bugs getting fixed in one place and not others.","commit_id":"9da428f6275e7a6f7c2fd6760345ac4ef160bb3e"},{"author":{"_account_id":6685,"name":"Baodong (Robert) Li","email":"baoli@cisco.com","username":"baoli"},"change_message_id":"5634480bbf83adff48a1f3602c24d4b655d20500","unresolved":false,"context_lines":[{"line_number":6137,"context_line":""},{"line_number":6138,"context_line":"    def _process_instance_vif_deleted_event(self, context, instance,"},{"line_number":6139,"context_line":"                                            deleted_vif_id):"},{"line_number":6140,"context_line":"        # If an attached port is deleted by neutron, it needs to"},{"line_number":6141,"context_line":"        # be detached from the instance."},{"line_number":6142,"context_line":"        # And info cache needs to be updated."},{"line_number":6143,"context_line":"        network_info \u003d instance.info_cache.network_info"}],"source_content_type":"text/x-python","patch_set":15,"id":"3a50d1a3_2aca3ca2","line":6140,"in_reply_to":"ba3cc151_a25d0c7b","updated":"2015-07-20 14:41:15.000000000","message":"I have to say that I disagree on this. First of all, I don\u0027t see any duplication except for the fact that both has to call the driver\u0027s detach_interface(). Most importantly, the triggers for them are different, and therefore they require different handling. To combine the two together would seem to be more cumbersome IMHO.","commit_id":"9da428f6275e7a6f7c2fd6760345ac4ef160bb3e"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"64434fc7bfd3d78841b81348709bd26c5752a754","unresolved":false,"context_lines":[{"line_number":6143,"context_line":"        network_info \u003d instance.info_cache.network_info"},{"line_number":6144,"context_line":"        for index, vif in enumerate(network_info):"},{"line_number":6145,"context_line":"            if vif[\u0027id\u0027] \u003d\u003d deleted_vif_id:"},{"line_number":6146,"context_line":"                LOG.warning(_LW(\u0027Neutron deleted interface %(intf)s, \u0027"},{"line_number":6147,"context_line":"                    \u0027detaching it from the instance and \u0027"},{"line_number":6148,"context_line":"                    \u0027deleting it from the info cache\u0027),"},{"line_number":6149,"context_line":"                    {\u0027intf\u0027: vif[\u0027id\u0027]},"}],"source_content_type":"text/x-python","patch_set":15,"id":"ba3cc151_3d959d87","line":6146,"updated":"2015-07-10 21:59:51.000000000","message":"Does this need to be a warning?  Shouldn\u0027t this just be INFO?","commit_id":"9da428f6275e7a6f7c2fd6760345ac4ef160bb3e"},{"author":{"_account_id":6685,"name":"Baodong (Robert) Li","email":"baoli@cisco.com","username":"baoli"},"change_message_id":"5634480bbf83adff48a1f3602c24d4b655d20500","unresolved":false,"context_lines":[{"line_number":6143,"context_line":"        network_info \u003d instance.info_cache.network_info"},{"line_number":6144,"context_line":"        for index, vif in enumerate(network_info):"},{"line_number":6145,"context_line":"            if vif[\u0027id\u0027] \u003d\u003d deleted_vif_id:"},{"line_number":6146,"context_line":"                LOG.warning(_LW(\u0027Neutron deleted interface %(intf)s, \u0027"},{"line_number":6147,"context_line":"                    \u0027detaching it from the instance and \u0027"},{"line_number":6148,"context_line":"                    \u0027deleting it from the info cache\u0027),"},{"line_number":6149,"context_line":"                    {\u0027intf\u0027: vif[\u0027id\u0027]},"}],"source_content_type":"text/x-python","patch_set":15,"id":"3a50d1a3_aa03acb7","line":6146,"in_reply_to":"ba3cc151_3d959d87","updated":"2015-07-20 14:41:15.000000000","message":"Used to be INFO in earlier patch. Someone suggests Warning. But I can change it back to INFO","commit_id":"9da428f6275e7a6f7c2fd6760345ac4ef160bb3e"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"fc5dbc184d4250ea9076ef8160d22789c29b8e5c","unresolved":false,"context_lines":[{"line_number":6171,"context_line":"                      instance\u003dinstance)"},{"line_number":6172,"context_line":"            if event.name \u003d\u003d \u0027network-changed\u0027:"},{"line_number":6173,"context_line":"                self.network_api.get_instance_nw_info(context, instance)"},{"line_number":6174,"context_line":"            elif event.name \u003d\u003d \u0027network-vif-deleted\u0027:"},{"line_number":6175,"context_line":"                self._process_instance_vif_deleted_event(context,"},{"line_number":6176,"context_line":"                                                         instance,"},{"line_number":6177,"context_line":"                                                         event.tag)"}],"source_content_type":"text/x-python","patch_set":15,"id":"ba3cc151_82e568dd","line":6174,"updated":"2015-07-10 21:54:53.000000000","message":"nit: I\u0027d prefer that we have a constant defined in nova.objects.external_event and then re-use that there and here so we\u0027re not hard-coding these enum values everywhere.","commit_id":"9da428f6275e7a6f7c2fd6760345ac4ef160bb3e"},{"author":{"_account_id":6685,"name":"Baodong (Robert) Li","email":"baoli@cisco.com","username":"baoli"},"change_message_id":"5634480bbf83adff48a1f3602c24d4b655d20500","unresolved":false,"context_lines":[{"line_number":6171,"context_line":"                      instance\u003dinstance)"},{"line_number":6172,"context_line":"            if event.name \u003d\u003d \u0027network-changed\u0027:"},{"line_number":6173,"context_line":"                self.network_api.get_instance_nw_info(context, instance)"},{"line_number":6174,"context_line":"            elif event.name \u003d\u003d \u0027network-vif-deleted\u0027:"},{"line_number":6175,"context_line":"                self._process_instance_vif_deleted_event(context,"},{"line_number":6176,"context_line":"                                                         instance,"},{"line_number":6177,"context_line":"                                                         event.tag)"}],"source_content_type":"text/x-python","patch_set":15,"id":"3a50d1a3_ea20d44b","line":6174,"in_reply_to":"ba3cc151_82e568dd","updated":"2015-07-20 14:41:15.000000000","message":"Let me see if it would incur a lot of unrelated changes. If not, I will do it in the next patch","commit_id":"9da428f6275e7a6f7c2fd6760345ac4ef160bb3e"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"01b9e1df14d14843a31aff512739eaccb9a43b30","unresolved":false,"context_lines":[{"line_number":6244,"context_line":"                                 self.network_api, context,"},{"line_number":6245,"context_line":"                                 instance,"},{"line_number":6246,"context_line":"                                 nw_info\u003dnetwork_info,"},{"line_number":6247,"context_line":"                                 update_cells\u003dFalse)"},{"line_number":6248,"context_line":"                self.driver.detach_interface(instance, vif)"},{"line_number":6249,"context_line":"                break"},{"line_number":6250,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"1a4dcd0f_ffd2a55a","line":6247,"updated":"2015-08-10 20:19:42.000000000","message":"I think this should have update_cells\u003dTrue (or leave the kwarg off to let it default to True) so that cells will also get the network_info change","commit_id":"59618cac34a49b68815eb73c30d998473185ecfa"},{"author":{"_account_id":6685,"name":"Baodong (Robert) Li","email":"baoli@cisco.com","username":"baoli"},"change_message_id":"5945ed74dd8d1284f25e9b117b601190914c5bb6","unresolved":false,"context_lines":[{"line_number":6244,"context_line":"                                 self.network_api, context,"},{"line_number":6245,"context_line":"                                 instance,"},{"line_number":6246,"context_line":"                                 nw_info\u003dnetwork_info,"},{"line_number":6247,"context_line":"                                 update_cells\u003dFalse)"},{"line_number":6248,"context_line":"                self.driver.detach_interface(instance, vif)"},{"line_number":6249,"context_line":"                break"},{"line_number":6250,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"1a4dcd0f_1a343fdc","line":6247,"in_reply_to":"1a4dcd0f_ffd2a55a","updated":"2015-08-10 20:41:21.000000000","message":"Done","commit_id":"59618cac34a49b68815eb73c30d998473185ecfa"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"bb34fa0add65cf63beca9134776432e6c08d7453","unresolved":false,"context_lines":[{"line_number":6246,"context_line":"                base_net_api.update_instance_cache_with_nw_info("},{"line_number":6247,"context_line":"                                 self.network_api, context,"},{"line_number":6248,"context_line":"                                 instance,"},{"line_number":6249,"context_line":"                                 nw_info\u003dnetwork_info)"},{"line_number":6250,"context_line":"                self.driver.detach_interface(instance, vif)"},{"line_number":6251,"context_line":"                break"},{"line_number":6252,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"1a4dcd0f_e61746ec","line":6249,"updated":"2015-08-11 18:43:31.000000000","message":"In a previous patch set, melwitt pointed out to not use update_cells\u003dFalse, and I\u0027m assuming update_cells\u003dFalse was originally there because that\u0027s how it\u0027s used in the base_net_api.get_instance_network_info which is called from neutronv2.api.deallocate_port_for_instance which is what does the refresh from the neutron API and comes back and refreshes instances.info_cache.network_info:\n\nhttp://git.openstack.org/cgit/openstack/nova/tree/nova/network/base_api.py#n241\n\nI guess we don\u0027t update cells in that case specifically because get_instance_nw_info happens all over the place and we don\u0027t want to overwhelm cells in that case when it\u0027s periodic.  This is not periodic so we can leave the default update_cells\u003dTrue as melwitt pointed out.","commit_id":"051f62ecf03378d0bc6e31cbe468d332703ff292"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"a1a8497da90fcbe481805f0e64668486488abefd","unresolved":false,"context_lines":[{"line_number":6246,"context_line":"                base_net_api.update_instance_cache_with_nw_info("},{"line_number":6247,"context_line":"                                 self.network_api, context,"},{"line_number":6248,"context_line":"                                 instance,"},{"line_number":6249,"context_line":"                                 nw_info\u003dnetwork_info)"},{"line_number":6250,"context_line":"                self.driver.detach_interface(instance, vif)"},{"line_number":6251,"context_line":"                break"},{"line_number":6252,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"1a4dcd0f_717e8e6b","line":6249,"in_reply_to":"1a4dcd0f_e61746ec","updated":"2015-08-11 18:50:30.000000000","message":"Yes, that\u0027s exactly right. update_cells\u003dFalse for the periodic case, I had asked alaski about it.","commit_id":"051f62ecf03378d0bc6e31cbe468d332703ff292"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"bb34fa0add65cf63beca9134776432e6c08d7453","unresolved":false,"context_lines":[{"line_number":6247,"context_line":"                                 self.network_api, context,"},{"line_number":6248,"context_line":"                                 instance,"},{"line_number":6249,"context_line":"                                 nw_info\u003dnetwork_info)"},{"line_number":6250,"context_line":"                self.driver.detach_interface(instance, vif)"},{"line_number":6251,"context_line":"                break"},{"line_number":6252,"context_line":""},{"line_number":6253,"context_line":"    @wrap_exception()"}],"source_content_type":"text/x-python","patch_set":18,"id":"1a4dcd0f_26fa0e76","line":6250,"updated":"2015-08-11 18:43:31.000000000","message":"You should handle any exception that comes out of this like the detach_interface method does above.  If this fails, it will raise out of external_instance_event and since that\u0027s in a loop, none of the other events in that loop after this will be processed, which is bad.","commit_id":"051f62ecf03378d0bc6e31cbe468d332703ff292"},{"author":{"_account_id":6685,"name":"Baodong (Robert) Li","email":"baoli@cisco.com","username":"baoli"},"change_message_id":"e52fee9ff322ca5e17dfb374510c2157eb0aa578","unresolved":false,"context_lines":[{"line_number":6247,"context_line":"                                 self.network_api, context,"},{"line_number":6248,"context_line":"                                 instance,"},{"line_number":6249,"context_line":"                                 nw_info\u003dnetwork_info)"},{"line_number":6250,"context_line":"                self.driver.detach_interface(instance, vif)"},{"line_number":6251,"context_line":"                break"},{"line_number":6252,"context_line":""},{"line_number":6253,"context_line":"    @wrap_exception()"}],"source_content_type":"text/x-python","patch_set":18,"id":"1a4dcd0f_6c70f5a4","line":6250,"in_reply_to":"1a4dcd0f_26fa0e76","updated":"2015-08-11 19:15:40.000000000","message":"Make sense. As discussed, I will catch, log, but not raise additional exception.","commit_id":"051f62ecf03378d0bc6e31cbe468d332703ff292"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"66f217fc5aed8f2315151af18adce1db111aecc3","unresolved":false,"context_lines":[{"line_number":6252,"context_line":"                except exception.NovaException as ex:"},{"line_number":6253,"context_line":"                    LOG.warning(_LW(\"Detach interface failed, \""},{"line_number":6254,"context_line":"                                    \"port_id\u003d%(port_id)s, reason: %(msg)s\"),"},{"line_number":6255,"context_line":"                                    {\u0027port_id\u0027: deleted_vif_id, \u0027msg\u0027: ex},"},{"line_number":6256,"context_line":"                                    instance\u003dinstance)"},{"line_number":6257,"context_line":"                break"},{"line_number":6258,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"1a4dcd0f_15efe81e","line":6255,"updated":"2015-08-12 03:05:09.000000000","message":"nit: the args and kwargs should be aligned with the _LW message object above.","commit_id":"9d1899b81f97abb8ff06d2e672dbfd07fe8c5411"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"2c540777704dd58cb570245f4dd607025563a531","unresolved":false,"context_lines":[{"line_number":6240,"context_line":"                LOG.info(_LI(\u0027Neutron deleted interface %(intf)s; \u0027"},{"line_number":6241,"context_line":"                             \u0027detaching it from the instance and \u0027"},{"line_number":6242,"context_line":"                             \u0027deleting it from the info cache\u0027),"},{"line_number":6243,"context_line":"                         {\u0027intf\u0027: vif[\u0027id\u0027]},"},{"line_number":6244,"context_line":"                         instance\u003dinstance)"},{"line_number":6245,"context_line":"                del network_info[index]"},{"line_number":6246,"context_line":"                base_net_api.update_instance_cache_with_nw_info("}],"source_content_type":"text/x-python","patch_set":20,"id":"1a4dcd0f_a3c102e6","line":6243,"updated":"2015-08-12 14:56:22.000000000","message":"ooo I missed this, thanks! :)","commit_id":"d3e9ddfb7f769c775132349e796acba2b7fa11b9"}],"nova/objects/external_event.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"16886f0a8711ec9601ea259c7b73d11a7bcbcf75","unresolved":false,"context_lines":[{"line_number":33,"context_line":"class InstanceExternalEvent(obj_base.NovaObject,"},{"line_number":34,"context_line":"                            obj_base.NovaObjectDictCompat):"},{"line_number":35,"context_line":"    # Version 1.0: Initial version"},{"line_number":36,"context_line":"    #              Supports network-changed and vif-plugged"},{"line_number":37,"context_line":"    VERSION \u003d \u00271.0\u0027"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"    fields \u003d {"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a0c5dc1_44979690","line":36,"updated":"2015-05-13 00:43:30.000000000","message":"You need to bump the version for the new event type.","commit_id":"f0e3fe28c3c3fd73a6f2e01a12541d9fed18c6b3"},{"author":{"_account_id":6685,"name":"Baodong (Robert) Li","email":"baoli@cisco.com","username":"baoli"},"change_message_id":"12cd7b8fec24de8148cd1c0aa3bd535a447e8f51","unresolved":false,"context_lines":[{"line_number":33,"context_line":"class InstanceExternalEvent(obj_base.NovaObject,"},{"line_number":34,"context_line":"                            obj_base.NovaObjectDictCompat):"},{"line_number":35,"context_line":"    # Version 1.0: Initial version"},{"line_number":36,"context_line":"    #              Supports network-changed and vif-plugged"},{"line_number":37,"context_line":"    VERSION \u003d \u00271.0\u0027"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"    fields \u003d {"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a0c5dc1_c2223f01","line":36,"in_reply_to":"9a0c5dc1_44979690","updated":"2015-05-13 15:19:21.000000000","message":"will do","commit_id":"f0e3fe28c3c3fd73a6f2e01a12541d9fed18c6b3"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"16886f0a8711ec9601ea259c7b73d11a7bcbcf75","unresolved":false,"context_lines":[{"line_number":38,"context_line":""},{"line_number":39,"context_line":"    fields \u003d {"},{"line_number":40,"context_line":"        \u0027instance_uuid\u0027: fields.UUIDField(),"},{"line_number":41,"context_line":"        \u0027name\u0027: fields.StringField(),"},{"line_number":42,"context_line":"        \u0027status\u0027: fields.StringField(),"},{"line_number":43,"context_line":"        \u0027tag\u0027: fields.StringField(nullable\u003dTrue),"},{"line_number":44,"context_line":"        \u0027data\u0027: fields.DictOfStringsField(),"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a0c5dc1_04919e99","line":41,"updated":"2015-05-13 00:43:30.000000000","message":"This should be an enum, we just didn\u0027t have it when this was written. If it was, this would have forced the version bump.","commit_id":"f0e3fe28c3c3fd73a6f2e01a12541d9fed18c6b3"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"2a5e05e3f8a40215419b5e4c870eaf26321dc788","unresolved":false,"context_lines":[{"line_number":34,"context_line":"                            obj_base.NovaObjectDictCompat):"},{"line_number":35,"context_line":"    # Version 1.0: Initial version"},{"line_number":36,"context_line":"    #              Supports network-changed and vif-plugged"},{"line_number":37,"context_line":"    # Version 1.1: adds network-vif-deleted event"},{"line_number":38,"context_line":"    VERSION \u003d \u00271.1\u0027"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"    fields \u003d {"}],"source_content_type":"text/x-python","patch_set":8,"id":"5afe65bd_ed0dfe3e","line":37,"updated":"2015-06-04 07:12:02.000000000","message":"No need to update the object version here.","commit_id":"ac8ff5073a996b1776f10bd64996fa58ce8f15aa"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"03db1cb73c1968e4ee272b49c2ff4f438cc31046","unresolved":false,"context_lines":[{"line_number":34,"context_line":"                            obj_base.NovaObjectDictCompat):"},{"line_number":35,"context_line":"    # Version 1.0: Initial version"},{"line_number":36,"context_line":"    #              Supports network-changed and vif-plugged"},{"line_number":37,"context_line":"    # Version 1.1: adds network-vif-deleted event"},{"line_number":38,"context_line":"    VERSION \u003d \u00271.1\u0027"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"    fields \u003d {"}],"source_content_type":"text/x-python","patch_set":8,"id":"3afb71cf_3c8f3725","line":37,"in_reply_to":"5afe65bd_26f9e6c7","updated":"2015-06-05 07:23:59.000000000","message":"My mistake, the field will well check for the enum values between versions.","commit_id":"ac8ff5073a996b1776f10bd64996fa58ce8f15aa"},{"author":{"_account_id":6685,"name":"Baodong (Robert) Li","email":"baoli@cisco.com","username":"baoli"},"change_message_id":"9c03ee5ca78fee898137a6759bd2f7c8cd88a2b3","unresolved":false,"context_lines":[{"line_number":34,"context_line":"                            obj_base.NovaObjectDictCompat):"},{"line_number":35,"context_line":"    # Version 1.0: Initial version"},{"line_number":36,"context_line":"    #              Supports network-changed and vif-plugged"},{"line_number":37,"context_line":"    # Version 1.1: adds network-vif-deleted event"},{"line_number":38,"context_line":"    VERSION \u003d \u00271.1\u0027"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"    fields \u003d {"}],"source_content_type":"text/x-python","patch_set":8,"id":"5afe65bd_ede3b0a2","line":37,"in_reply_to":"5afe65bd_ed0dfe3e","updated":"2015-06-04 13:24:27.000000000","message":"see comments in patch set 2. dan smith suggested bumping it up, which seems to be reasonable to me","commit_id":"ac8ff5073a996b1776f10bd64996fa58ce8f15aa"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"fb9925d93591c5b1f77ad823fc2c4448d63feeef","unresolved":false,"context_lines":[{"line_number":34,"context_line":"                            obj_base.NovaObjectDictCompat):"},{"line_number":35,"context_line":"    # Version 1.0: Initial version"},{"line_number":36,"context_line":"    #              Supports network-changed and vif-plugged"},{"line_number":37,"context_line":"    # Version 1.1: adds network-vif-deleted event"},{"line_number":38,"context_line":"    VERSION \u003d \u00271.1\u0027"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"    fields \u003d {"}],"source_content_type":"text/x-python","patch_set":8,"id":"5afe65bd_26f9e6c7","line":37,"in_reply_to":"5afe65bd_ede3b0a2","updated":"2015-06-04 14:32:24.000000000","message":"Yeah, absolutely need a version bump as this is changing the enum of a field on the object. Sahid, why do you think no version bump is needed?","commit_id":"ac8ff5073a996b1776f10bd64996fa58ce8f15aa"}],"nova/tests/unit/compute/test_compute.py":[{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"153fcf5b821c3c6fad8869d4bd536d4401a71a1e","unresolved":false,"context_lines":[{"line_number":6193,"context_line":"                raise exception.InstanceNotFound(instance_id\u003dinstance[\u0027uuid\u0027])"},{"line_number":6194,"context_line":""},{"line_number":6195,"context_line":"            # Each instance has one VIF"},{"line_number":6196,"context_line":"            vif1 \u003d fake_network_cache_model.new_vif()"},{"line_number":6197,"context_line":"            return [vif1]"},{"line_number":6198,"context_line":""},{"line_number":6199,"context_line":"        def fake_detach_interface(instance, vif):"}],"source_content_type":"text/x-python","patch_set":6,"id":"5afe65bd_b3a91be2","line":6196,"updated":"2015-06-01 22:26:33.000000000","message":"It would be ideal if you set vif1[\u0027id\u0027] to something so we can see without looking into fake_network_cache_model.new_vif() that the ids are different, since you\u0027re asserting on L6201 thatt vif with id\u003d2 was detached.","commit_id":"cbdde934b3ff4bfa4714cad5e88f5b7e01623058"},{"author":{"_account_id":6685,"name":"Baodong (Robert) Li","email":"baoli@cisco.com","username":"baoli"},"change_message_id":"993b1398b5503304fbb98d0281120fdd701d6651","unresolved":false,"context_lines":[{"line_number":6193,"context_line":"                raise exception.InstanceNotFound(instance_id\u003dinstance[\u0027uuid\u0027])"},{"line_number":6194,"context_line":""},{"line_number":6195,"context_line":"            # Each instance has one VIF"},{"line_number":6196,"context_line":"            vif1 \u003d fake_network_cache_model.new_vif()"},{"line_number":6197,"context_line":"            return [vif1]"},{"line_number":6198,"context_line":""},{"line_number":6199,"context_line":"        def fake_detach_interface(instance, vif):"}],"source_content_type":"text/x-python","patch_set":6,"id":"5afe65bd_03dbe67d","line":6196,"in_reply_to":"5afe65bd_b3a91be2","updated":"2015-06-03 20:11:06.000000000","message":"sure I can do that.","commit_id":"cbdde934b3ff4bfa4714cad5e88f5b7e01623058"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"153fcf5b821c3c6fad8869d4bd536d4401a71a1e","unresolved":false,"context_lines":[{"line_number":6217,"context_line":"        call_info[\u0027expected_instance\u0027] \u003d instances[2]"},{"line_number":6218,"context_line":"        self.compute._heal_instance_info_cache(ctxt)"},{"line_number":6219,"context_line":"        self.assertEqual(1, call_info[\u0027get_all_by_host\u0027])"},{"line_number":6220,"context_line":"        self.assertEqual(1, call_info[\u0027get_by_uuid\u0027])"},{"line_number":6221,"context_line":"        self.assertEqual(1, call_info[\u0027get_nw_info\u0027])"},{"line_number":6222,"context_line":""},{"line_number":6223,"context_line":"        call_info[\u0027expected_instance\u0027] \u003d instances[3]"}],"source_content_type":"text/x-python","patch_set":6,"id":"5afe65bd_8ecefa81","line":6220,"updated":"2015-06-01 22:26:33.000000000","message":"This adds an extra Instance lookup lazy-loading info_cache, but my assumption is it\u0027s better than joining \u0027info_cache\u0027 during InstanceList.get_by_host.","commit_id":"cbdde934b3ff4bfa4714cad5e88f5b7e01623058"}],"nova/tests/unit/compute/test_compute_mgr.py":[{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"153fcf5b821c3c6fad8869d4bd536d4401a71a1e","unresolved":false,"context_lines":[{"line_number":1711,"context_line":"                                                 instances, events)"},{"line_number":1712,"context_line":"            expected_calls \u003d [mock.call(self.context, instances[0]),"},{"line_number":1713,"context_line":"                              mock.call(self.context, instances[2])]"},{"line_number":1714,"context_line":"            get_instance_nw_info.assert_has_calls(expected_calls)"},{"line_number":1715,"context_line":"            _process_instance_event.assert_called_once_with(instances[1],"},{"line_number":1716,"context_line":"                                                            events[1])"},{"line_number":1717,"context_line":"            detach_interface.assert_called_once_with(instances[2], vif2)"}],"source_content_type":"text/x-python","patch_set":6,"id":"5afe65bd_1337cfb1","line":1714,"updated":"2015-06-01 22:26:33.000000000","message":"This isn\u0027t equivalent to assert_called_once_with unless you put bounds on assert_has_calls by also asserting call_count -- else it\u0027s possible get_instance_nw_info has more calls than expected.","commit_id":"cbdde934b3ff4bfa4714cad5e88f5b7e01623058"},{"author":{"_account_id":6685,"name":"Baodong (Robert) Li","email":"baoli@cisco.com","username":"baoli"},"change_message_id":"993b1398b5503304fbb98d0281120fdd701d6651","unresolved":false,"context_lines":[{"line_number":1711,"context_line":"                                                 instances, events)"},{"line_number":1712,"context_line":"            expected_calls \u003d [mock.call(self.context, instances[0]),"},{"line_number":1713,"context_line":"                              mock.call(self.context, instances[2])]"},{"line_number":1714,"context_line":"            get_instance_nw_info.assert_has_calls(expected_calls)"},{"line_number":1715,"context_line":"            _process_instance_event.assert_called_once_with(instances[1],"},{"line_number":1716,"context_line":"                                                            events[1])"},{"line_number":1717,"context_line":"            detach_interface.assert_called_once_with(instances[2], vif2)"}],"source_content_type":"text/x-python","patch_set":6,"id":"5afe65bd_fe23c103","line":1714,"in_reply_to":"5afe65bd_1337cfb1","updated":"2015-06-03 20:11:06.000000000","message":"ok, let me assert the call_count as well","commit_id":"cbdde934b3ff4bfa4714cad5e88f5b7e01623058"},{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"38d1732636c7dc38dd4e5ce7301a816dbd4d92b0","unresolved":false,"context_lines":[{"line_number":1717,"context_line":"            _process_instance_event.assert_called_once_with(instances[1],"},{"line_number":1718,"context_line":"                                                            events[1])"},{"line_number":1719,"context_line":"            detach_interface.assert_called_once_with(instances[2], vif2)"},{"line_number":1720,"context_line":"        do_test()"},{"line_number":1721,"context_line":""},{"line_number":1722,"context_line":"    def test_cancel_all_events(self):"},{"line_number":1723,"context_line":"        inst \u003d objects.Instance(uuid\u003d\u0027uuid\u0027)"}],"source_content_type":"text/x-python","patch_set":12,"id":"fa32b979_4179e591","line":1720,"updated":"2015-06-25 11:33:50.000000000","message":"honestly, this test method just exploded in complexity. I think this is a good instance where it should just be another test. And honestly, it would be nice for the deleted case to be followed with a plugged / deleted stack on the same uuid and tag.","commit_id":"50bd815a89c4914c88de6461962047929108dc3f"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"01b9e1df14d14843a31aff512739eaccb9a43b30","unresolved":false,"context_lines":[{"line_number":1747,"context_line":"                                                   self.context,"},{"line_number":1748,"context_line":"                                                   inst_obj,"},{"line_number":1749,"context_line":"                                                   nw_info\u003d[vif1],"},{"line_number":1750,"context_line":"                                                   update_cells\u003dFalse)"},{"line_number":1751,"context_line":"            detach_interface.assert_called_once_with(inst_obj, vif2)"},{"line_number":1752,"context_line":""},{"line_number":1753,"context_line":"    def test_external_instance_event(self):"}],"source_content_type":"text/x-python","patch_set":17,"id":"1a4dcd0f_bfcc1dbc","line":1750,"updated":"2015-08-10 20:19:42.000000000","message":"Same as prior comment, update_cells\u003dTrue or leave it out","commit_id":"59618cac34a49b68815eb73c30d998473185ecfa"},{"author":{"_account_id":6685,"name":"Baodong (Robert) Li","email":"baoli@cisco.com","username":"baoli"},"change_message_id":"5945ed74dd8d1284f25e9b117b601190914c5bb6","unresolved":false,"context_lines":[{"line_number":1747,"context_line":"                                                   self.context,"},{"line_number":1748,"context_line":"                                                   inst_obj,"},{"line_number":1749,"context_line":"                                                   nw_info\u003d[vif1],"},{"line_number":1750,"context_line":"                                                   update_cells\u003dFalse)"},{"line_number":1751,"context_line":"            detach_interface.assert_called_once_with(inst_obj, vif2)"},{"line_number":1752,"context_line":""},{"line_number":1753,"context_line":"    def test_external_instance_event(self):"}],"source_content_type":"text/x-python","patch_set":17,"id":"1a4dcd0f_fa4f1368","line":1750,"in_reply_to":"1a4dcd0f_bfcc1dbc","updated":"2015-08-10 20:41:21.000000000","message":"Done","commit_id":"59618cac34a49b68815eb73c30d998473185ecfa"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"82f988861437261375a065eb94bc83bbe49f5ff7","unresolved":false,"context_lines":[{"line_number":1748,"context_line":"                                                   inst_obj,"},{"line_number":1749,"context_line":"                                                   nw_info\u003d[vif1],"},{"line_number":1750,"context_line":"                                                   update_cells\u003dFalse)"},{"line_number":1751,"context_line":"            detach_interface.assert_called_once_with(inst_obj, vif2)"},{"line_number":1752,"context_line":""},{"line_number":1753,"context_line":"    def test_external_instance_event(self):"},{"line_number":1754,"context_line":"        instances \u003d ["}],"source_content_type":"text/x-python","patch_set":17,"id":"1a4dcd0f_548940c9","line":1751,"updated":"2015-08-10 20:08:08.000000000","message":"I don\u0027t see a call of do_test() in test_process_instance_vif_deleted_event","commit_id":"59618cac34a49b68815eb73c30d998473185ecfa"},{"author":{"_account_id":6685,"name":"Baodong (Robert) Li","email":"baoli@cisco.com","username":"baoli"},"change_message_id":"5945ed74dd8d1284f25e9b117b601190914c5bb6","unresolved":false,"context_lines":[{"line_number":1748,"context_line":"                                                   inst_obj,"},{"line_number":1749,"context_line":"                                                   nw_info\u003d[vif1],"},{"line_number":1750,"context_line":"                                                   update_cells\u003dFalse)"},{"line_number":1751,"context_line":"            detach_interface.assert_called_once_with(inst_obj, vif2)"},{"line_number":1752,"context_line":""},{"line_number":1753,"context_line":"    def test_external_instance_event(self):"},{"line_number":1754,"context_line":"        instances \u003d ["}],"source_content_type":"text/x-python","patch_set":17,"id":"1a4dcd0f_bfb89d76","line":1751,"in_reply_to":"1a4dcd0f_548940c9","updated":"2015-08-10 20:41:21.000000000","message":"good catch!","commit_id":"59618cac34a49b68815eb73c30d998473185ecfa"}]}
