)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":11307,"name":"Andreas Scheuring","email":"andreas.scheuring@de.ibm.com","username":"uniqueName"},"change_message_id":"95570d9fef6c03bae4fc96bdefd6cb2d8030b2d9","unresolved":false,"context_lines":[{"line_number":23,"context_line":"The fix is to explicitly notify nova if agent reports device up from a host"},{"line_number":24,"context_line":"other than port\u0027s current host."},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"Closes-Bug: #1414559"},{"line_number":27,"context_line":"Change-Id: Ifa919a9076a3cc2696688af3feadf8d7fa9e6fc2"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"ba8a016a_109b2b19","line":26,"updated":"2015-11-20 08:00:13.000000000","message":"Can you elaborate more on how this fix closes the bug?\n\nI\u0027m not sure if nova really can do something in this case. If I got it right, the problem is that it takes too long for the neutron agent to detect the new device, get the details and configure it accordingly (set port tag \u0026 flows). That\u0027s why the RARPs get dropped and learning takes long. Or am I missing a point here?\n\nIs there any nova driver listening on those events during live migration? I only know the libvirt driver a little bit, but I\u0027m not aware that he somehow relies on this event during Migration.","commit_id":"c54a9a043013e96ecfcb21a974178ac19fd4b0dd"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"e212ac6dbe03f554dffc9f01d6e6d765c13d6f26","unresolved":false,"context_lines":[{"line_number":23,"context_line":"The fix is to explicitly notify nova if agent reports device up from a host"},{"line_number":24,"context_line":"other than port\u0027s current host."},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"Closes-Bug: #1414559"},{"line_number":27,"context_line":"Change-Id: Ifa919a9076a3cc2696688af3feadf8d7fa9e6fc2"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"ba8a016a_86db657b","line":26,"in_reply_to":"ba8a016a_109b2b19","updated":"2015-11-20 08:24:16.000000000","message":"ok, I see the confusion: here closes bug means just neutron side, but there is also (main) fix on nova side https://review.openstack.org/#/c/246910\n\nI should mention it in the commit message","commit_id":"c54a9a043013e96ecfcb21a974178ac19fd4b0dd"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"26f2928adac8fefdde6b35e4b5dc3946b214cfce","unresolved":false,"context_lines":[{"line_number":23,"context_line":"The fix is to explicitly notify nova if agent reports device up from a host"},{"line_number":24,"context_line":"other than port\u0027s current host."},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"This is the fix on neutron side, the actual fix of the bug is on nova side:"},{"line_number":27,"context_line":"change-id Ib1cb9c2f6eb2f5ce6280c685ae44a691665b4e98"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"Closes-Bug: #1414559"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"5a710552_a7fd3670","line":26,"updated":"2015-12-14 19:26:57.000000000","message":"In this case are we working with the nova team on this fix. Is the nova team also reviewing this patch to see if it would solve the live migration   issue.","commit_id":"ab1ca30de3c5a67cceb22c7158f0e3ffa5d1866b"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"d05b1e4c964fbc19910dcb0be031d4cecdc8f2e2","unresolved":false,"context_lines":[{"line_number":23,"context_line":"The fix is to explicitly notify nova if agent reports device up from a host"},{"line_number":24,"context_line":"other than port\u0027s current host."},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"This is the fix on neutron side, the actual fix of the bug is on nova side:"},{"line_number":27,"context_line":"change-id Ib1cb9c2f6eb2f5ce6280c685ae44a691665b4e98"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"Closes-Bug: #1414559"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"5a710552_37f39c0c","line":26,"in_reply_to":"5a710552_a7fd3670","updated":"2015-12-15 08:16:47.000000000","message":"Nova patch depends on this one and has the link in the commit message, I beleive it should be enough","commit_id":"ab1ca30de3c5a67cceb22c7158f0e3ffa5d1866b"}],"neutron/notifiers/nova.py":[{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"821a9442e2cfe3bbbc752ae8fe5f2b00caf260a5","unresolved":false,"context_lines":[{"line_number":201,"context_line":"        self.batch_notifier.queue_event(event)"},{"line_number":202,"context_line":"        port._notify_event \u003d None"},{"line_number":203,"context_line":""},{"line_number":204,"context_line":"    def notify_port_active(self, port):"},{"line_number":205,"context_line":"        \"\"\"Notify nova about active port\"\"\""},{"line_number":206,"context_line":"        self.record_port_status_changed(port,"},{"line_number":207,"context_line":"                                        constants.PORT_STATUS_ACTIVE,"}],"source_content_type":"text/x-python","patch_set":5,"id":"5a710552_1cf101ce","line":204,"updated":"2015-12-14 18:58:06.000000000","message":"nit: I think the name can be confusing since this method is not called in the case when a port is created and turns active. Maybe something like \"notify_port_active_on_another_host\" or \"notify_port_active_live_migration\" ?","commit_id":"ab1ca30de3c5a67cceb22c7158f0e3ffa5d1866b"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"d05b1e4c964fbc19910dcb0be031d4cecdc8f2e2","unresolved":false,"context_lines":[{"line_number":201,"context_line":"        self.batch_notifier.queue_event(event)"},{"line_number":202,"context_line":"        port._notify_event \u003d None"},{"line_number":203,"context_line":""},{"line_number":204,"context_line":"    def notify_port_active(self, port):"},{"line_number":205,"context_line":"        \"\"\"Notify nova about active port\"\"\""},{"line_number":206,"context_line":"        self.record_port_status_changed(port,"},{"line_number":207,"context_line":"                                        constants.PORT_STATUS_ACTIVE,"}],"source_content_type":"text/x-python","patch_set":5,"id":"5a710552_7705a4c0","line":204,"in_reply_to":"5a710552_1cf101ce","updated":"2015-12-15 08:16:47.000000000","message":"makes sense, what about changing to \u0027notify_port_active_explicit\u0027 and adding more info about whent it might be needed to the docstring?","commit_id":"ab1ca30de3c5a67cceb22c7158f0e3ffa5d1866b"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"26f2928adac8fefdde6b35e4b5dc3946b214cfce","unresolved":false,"context_lines":[{"line_number":207,"context_line":"                                        constants.PORT_STATUS_ACTIVE,"},{"line_number":208,"context_line":"                                        constants.PORT_STATUS_BUILD,"},{"line_number":209,"context_line":"                                        None)"},{"line_number":210,"context_line":"        self.send_port_status(None, None, port)"},{"line_number":211,"context_line":""},{"line_number":212,"context_line":"    def send_events(self, batched_events):"},{"line_number":213,"context_line":"        LOG.debug(\"Sending events: %s\", batched_events)"}],"source_content_type":"text/x-python","patch_set":5,"id":"5a710552_07c1aae4","line":210,"updated":"2015-12-14 19:26:57.000000000","message":"In this case what would be the status of the port while doing live_migration. \nthe port is active in the primary host and now the port is plugged into the secondary node ( destination).\nDo you still say the port is active or the port is in transition or live_migration.","commit_id":"ab1ca30de3c5a67cceb22c7158f0e3ffa5d1866b"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"d05b1e4c964fbc19910dcb0be031d4cecdc8f2e2","unresolved":false,"context_lines":[{"line_number":207,"context_line":"                                        constants.PORT_STATUS_ACTIVE,"},{"line_number":208,"context_line":"                                        constants.PORT_STATUS_BUILD,"},{"line_number":209,"context_line":"                                        None)"},{"line_number":210,"context_line":"        self.send_port_status(None, None, port)"},{"line_number":211,"context_line":""},{"line_number":212,"context_line":"    def send_events(self, batched_events):"},{"line_number":213,"context_line":"        LOG.debug(\"Sending events: %s\", batched_events)"}],"source_content_type":"text/x-python","patch_set":5,"id":"5a710552_b7c46c40","line":210,"in_reply_to":"5a710552_07c1aae4","updated":"2015-12-15 08:16:47.000000000","message":"The status of the port remains ACTIVE because the port is acually active on the source host. When port is plugged on the destination host we\u0027re sending network-vif-plugged to nova to notidy about it. I don\u0027t think we need to change port status in this case.","commit_id":"ab1ca30de3c5a67cceb22c7158f0e3ffa5d1866b"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"26f2928adac8fefdde6b35e4b5dc3946b214cfce","unresolved":false,"context_lines":[{"line_number":208,"context_line":"                                        constants.PORT_STATUS_BUILD,"},{"line_number":209,"context_line":"                                        None)"},{"line_number":210,"context_line":"        self.send_port_status(None, None, port)"},{"line_number":211,"context_line":""},{"line_number":212,"context_line":"    def send_events(self, batched_events):"},{"line_number":213,"context_line":"        LOG.debug(\"Sending events: %s\", batched_events)"},{"line_number":214,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":5,"id":"5a710552_e717be52","line":211,"updated":"2015-12-14 19:26:57.000000000","message":"Also would it be nice to have the neutron port-binding to have information about the current-host and future-host.\n\nSo that it would be easy for us to track the future-host and current-host and take necessary action.\n\nThis can be in another patch.","commit_id":"ab1ca30de3c5a67cceb22c7158f0e3ffa5d1866b"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"d05b1e4c964fbc19910dcb0be031d4cecdc8f2e2","unresolved":false,"context_lines":[{"line_number":208,"context_line":"                                        constants.PORT_STATUS_BUILD,"},{"line_number":209,"context_line":"                                        None)"},{"line_number":210,"context_line":"        self.send_port_status(None, None, port)"},{"line_number":211,"context_line":""},{"line_number":212,"context_line":"    def send_events(self, batched_events):"},{"line_number":213,"context_line":"        LOG.debug(\"Sending events: %s\", batched_events)"},{"line_number":214,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":5,"id":"5a710552_173d402b","line":211,"in_reply_to":"5a710552_e717be52","updated":"2015-12-15 08:16:47.000000000","message":"Not sure I got why would we need to track the futere host. This is an API change so should have a clear rationale.","commit_id":"ab1ca30de3c5a67cceb22c7158f0e3ffa5d1866b"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"d714963050473b55fdf8c61c711e4b8928cd7ce5","unresolved":false,"context_lines":[{"line_number":214,"context_line":"        \"\"\""},{"line_number":215,"context_line":"        self.record_port_status_changed(port,"},{"line_number":216,"context_line":"                                        constants.PORT_STATUS_ACTIVE,"},{"line_number":217,"context_line":"                                        constants.PORT_STATUS_BUILD,"},{"line_number":218,"context_line":"                                        None)"},{"line_number":219,"context_line":"        self.send_port_status(None, None, port)"},{"line_number":220,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"ba0121b8_ae1ea15c","line":217,"range":{"start_line":217,"start_character":50,"end_line":217,"end_character":67},"updated":"2016-03-30 21:52:44.000000000","message":"The port status didn\u0027t change, right?  Is this just lying to record_port_status_changed to get it into the code path you want?\n\nIf so, this seems a little short sighted.  Wouldn\u0027t it be better to write the code to clearly handle this case the way it should be handled?  That is, no state transition but still set port._notify_event with active status and send the notification.","commit_id":"138db00afa1de3434c12a0c4c13f31d747c2ef92"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"1b680b0546ef3d50a55525ab7987f2551860bf2b","unresolved":false,"context_lines":[{"line_number":214,"context_line":"        \"\"\""},{"line_number":215,"context_line":"        self.record_port_status_changed(port,"},{"line_number":216,"context_line":"                                        constants.PORT_STATUS_ACTIVE,"},{"line_number":217,"context_line":"                                        constants.PORT_STATUS_BUILD,"},{"line_number":218,"context_line":"                                        None)"},{"line_number":219,"context_line":"        self.send_port_status(None, None, port)"},{"line_number":220,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"ba0121b8_2d256908","line":217,"range":{"start_line":217,"start_character":50,"end_line":217,"end_character":67},"in_reply_to":"ba0121b8_ae1ea15c","updated":"2016-03-31 08:02:05.000000000","message":"no prob, was just pursuing minimum code changes hoping that the comment above will help to avoid confusion. I\u0027ll rework.","commit_id":"138db00afa1de3434c12a0c4c13f31d747c2ef92"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"b01e511058f847ce834112f49bddfd1166bb00d2","unresolved":false,"context_lines":[{"line_number":153,"context_line":"        # If there is no device_id set there is nothing we can do here."},{"line_number":154,"context_line":"        if not port.device_id:"},{"line_number":155,"context_line":"            LOG.debug(\"device_id is not set on port yet.\")"},{"line_number":156,"context_line":"            return"},{"line_number":157,"context_line":""},{"line_number":158,"context_line":"        if not port.id:"},{"line_number":159,"context_line":"            LOG.warning(_LW(\"Port ID not set! Nova will not be notified of \""}],"source_content_type":"text/x-python","patch_set":15,"id":"5a18252c_6d6007a6","line":156,"updated":"2016-04-14 10:50:40.000000000","message":"can we change this to return False?","commit_id":"38f05dd962b95f25a5e6d758e6963ee0df293cf4"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"a823c4d231115732eb348931a66e6a3e13dac3f1","unresolved":false,"context_lines":[{"line_number":153,"context_line":"        # If there is no device_id set there is nothing we can do here."},{"line_number":154,"context_line":"        if not port.device_id:"},{"line_number":155,"context_line":"            LOG.debug(\"device_id is not set on port yet.\")"},{"line_number":156,"context_line":"            return"},{"line_number":157,"context_line":""},{"line_number":158,"context_line":"        if not port.id:"},{"line_number":159,"context_line":"            LOG.warning(_LW(\"Port ID not set! Nova will not be notified of \""}],"source_content_type":"text/x-python","patch_set":15,"id":"5a18252c_32514bd9","line":156,"in_reply_to":"5a18252c_6d6007a6","updated":"2016-04-14 11:48:26.000000000","message":"why not","commit_id":"38f05dd962b95f25a5e6d758e6963ee0df293cf4"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"b01e511058f847ce834112f49bddfd1166bb00d2","unresolved":false,"context_lines":[{"line_number":157,"context_line":""},{"line_number":158,"context_line":"        if not port.id:"},{"line_number":159,"context_line":"            LOG.warning(_LW(\"Port ID not set! Nova will not be notified of \""},{"line_number":160,"context_line":"                            \"port status change.\"))"},{"line_number":161,"context_line":"            return"},{"line_number":162,"context_line":""},{"line_number":163,"context_line":"        # We only want to notify about nova ports."}],"source_content_type":"text/x-python","patch_set":15,"id":"5a18252c_ad569fcb","line":160,"updated":"2016-04-14 10:50:40.000000000","message":"ditto","commit_id":"38f05dd962b95f25a5e6d758e6963ee0df293cf4"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"b01e511058f847ce834112f49bddfd1166bb00d2","unresolved":false,"context_lines":[{"line_number":162,"context_line":""},{"line_number":163,"context_line":"        # We only want to notify about nova ports."},{"line_number":164,"context_line":"        if not self._is_compute_port(port):"},{"line_number":165,"context_line":"            return"},{"line_number":166,"context_line":""},{"line_number":167,"context_line":"        return True"},{"line_number":168,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"5a18252c_cd715b78","line":165,"updated":"2016-04-14 10:50:40.000000000","message":"ditto","commit_id":"38f05dd962b95f25a5e6d758e6963ee0df293cf4"},{"author":{"_account_id":20254,"name":"dongwenshuai","email":"dong.wenshuai@zte.com.cn","username":"dongwenshuai"},"change_message_id":"a1be1bc9df92f2d02213187b06e0a7d355ba7cb0","unresolved":false,"context_lines":[{"line_number":149,"context_line":"            else:"},{"line_number":150,"context_line":"                return self._get_network_changed_event(port[\u0027device_id\u0027])"},{"line_number":151,"context_line":""},{"line_number":152,"context_line":"    def _can_notify(self, port):"},{"line_number":153,"context_line":"        # If there is no device_id set there is nothing we can do here."},{"line_number":154,"context_line":"        if not port.device_id:"},{"line_number":155,"context_line":"            LOG.debug(\"device_id is not set on port yet.\")"}],"source_content_type":"text/x-python","patch_set":17,"id":"1a122d0e_0a9e3806","line":152,"updated":"2016-04-21 09:39:07.000000000","message":"This function name is not very appropriate，because the next code after this function is also check can or not notify.I suggest that the function name should be like \"_port_property_check()\"","commit_id":"deee7a80c10c04c82bfd4e50fca546b1961fb270"},{"author":{"_account_id":20254,"name":"dongwenshuai","email":"dong.wenshuai@zte.com.cn","username":"dongwenshuai"},"change_message_id":"d09de690e76a8cc72edbc3402bf7e0299ad50073","unresolved":false,"context_lines":[{"line_number":149,"context_line":"            else:"},{"line_number":150,"context_line":"                return self._get_network_changed_event(port[\u0027device_id\u0027])"},{"line_number":151,"context_line":""},{"line_number":152,"context_line":"    def _can_notify(self, port):"},{"line_number":153,"context_line":"        # If there is no device_id set there is nothing we can do here."},{"line_number":154,"context_line":"        if not port.device_id:"},{"line_number":155,"context_line":"            LOG.debug(\"device_id is not set on port yet.\")"}],"source_content_type":"text/x-python","patch_set":17,"id":"1a122d0e_0c7e27ae","line":152,"in_reply_to":"1a122d0e_06c1e82e","updated":"2016-04-22 05:31:10.000000000","message":"port device_id is None or port id is None or port remaining state transitions ,from the point of view of code，we all have to \"return\".I don\u0027t think there are differenecs between \"can or not\" and \"should or not\".","commit_id":"deee7a80c10c04c82bfd4e50fca546b1961fb270"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"85e423cd3a737318d5805bc79ded78bc9c85e1a8","unresolved":false,"context_lines":[{"line_number":149,"context_line":"            else:"},{"line_number":150,"context_line":"                return self._get_network_changed_event(port[\u0027device_id\u0027])"},{"line_number":151,"context_line":""},{"line_number":152,"context_line":"    def _can_notify(self, port):"},{"line_number":153,"context_line":"        # If there is no device_id set there is nothing we can do here."},{"line_number":154,"context_line":"        if not port.device_id:"},{"line_number":155,"context_line":"            LOG.debug(\"device_id is not set on port yet.\")"}],"source_content_type":"text/x-python","patch_set":17,"id":"1a122d0e_c5925cf6","line":152,"in_reply_to":"1a122d0e_0a9e3806","updated":"2016-04-21 16:21:38.000000000","message":"Which code also checks? Can you please point?","commit_id":"deee7a80c10c04c82bfd4e50fca546b1961fb270"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"b4ceb050722c4a8435302768096a73a3cbb72c56","unresolved":false,"context_lines":[{"line_number":149,"context_line":"            else:"},{"line_number":150,"context_line":"                return self._get_network_changed_event(port[\u0027device_id\u0027])"},{"line_number":151,"context_line":""},{"line_number":152,"context_line":"    def _can_notify(self, port):"},{"line_number":153,"context_line":"        # If there is no device_id set there is nothing we can do here."},{"line_number":154,"context_line":"        if not port.device_id:"},{"line_number":155,"context_line":"            LOG.debug(\"device_id is not set on port yet.\")"}],"source_content_type":"text/x-python","patch_set":17,"id":"1a122d0e_b09ac66c","line":152,"in_reply_to":"1a122d0e_0c7e27ae","updated":"2016-04-22 17:21:13.000000000","message":"I think it\u0027s the matter of personal preference. \u0027_port_property_check()\u0027 seems too abstract to me and current name is more readable I think, so I\u0027d prefer to leave as is.","commit_id":"deee7a80c10c04c82bfd4e50fca546b1961fb270"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"4984545cec69950bab313c7185ea3a42d01b15a5","unresolved":false,"context_lines":[{"line_number":149,"context_line":"            else:"},{"line_number":150,"context_line":"                return self._get_network_changed_event(port[\u0027device_id\u0027])"},{"line_number":151,"context_line":""},{"line_number":152,"context_line":"    def _can_notify(self, port):"},{"line_number":153,"context_line":"        # If there is no device_id set there is nothing we can do here."},{"line_number":154,"context_line":"        if not port.device_id:"},{"line_number":155,"context_line":"            LOG.debug(\"device_id is not set on port yet.\")"}],"source_content_type":"text/x-python","patch_set":17,"id":"1a122d0e_06c1e82e","line":152,"in_reply_to":"1a122d0e_a059fc90","updated":"2016-04-22 03:13:11.000000000","message":"I\u0027d say status check answers the question \"should notify or not?\", this method only checks \"can or not\". Prefer to leave the name as is","commit_id":"deee7a80c10c04c82bfd4e50fca546b1961fb270"},{"author":{"_account_id":20254,"name":"dongwenshuai","email":"dong.wenshuai@zte.com.cn","username":"dongwenshuai"},"change_message_id":"641c03741fd7003a47e09104180ddf40b2326a70","unresolved":false,"context_lines":[{"line_number":149,"context_line":"            else:"},{"line_number":150,"context_line":"                return self._get_network_changed_event(port[\u0027device_id\u0027])"},{"line_number":151,"context_line":""},{"line_number":152,"context_line":"    def _can_notify(self, port):"},{"line_number":153,"context_line":"        # If there is no device_id set there is nothing we can do here."},{"line_number":154,"context_line":"        if not port.device_id:"},{"line_number":155,"context_line":"            LOG.debug(\"device_id is not set on port yet.\")"}],"source_content_type":"text/x-python","patch_set":17,"id":"1a122d0e_a059fc90","line":152,"in_reply_to":"1a122d0e_c5925cf6","updated":"2016-04-22 01:23:35.000000000","message":"Only can notify nova when a port status goes from ACTIVE to DOWN or goes from NO_VALUE/DOWN/BUILD to ACTIVE/ERROR.Other remaining state transitions are not necessary to notify nova","commit_id":"deee7a80c10c04c82bfd4e50fca546b1961fb270"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"66e271f5b68d0f25cad90f711d4db7376152fee8","unresolved":false,"context_lines":[{"line_number":152,"context_line":"    def _can_notify(self, port):"},{"line_number":153,"context_line":"        # If there is no device_id set there is nothing we can do here."},{"line_number":154,"context_line":"        if not port.device_id:"},{"line_number":155,"context_line":"            LOG.debug(\"device_id is not set on port yet.\")"},{"line_number":156,"context_line":"            return False"},{"line_number":157,"context_line":""},{"line_number":158,"context_line":"        if not port.id:"}],"source_content_type":"text/x-python","patch_set":17,"id":"1a122d0e_cdc9fa27","line":155,"updated":"2016-04-21 09:56:28.000000000","message":"can you please at the port id here so that we can troubleshoot if necessary","commit_id":"deee7a80c10c04c82bfd4e50fca546b1961fb270"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"8406ec38a30699a94b45afa00dc6e9316197e16b","unresolved":false,"context_lines":[{"line_number":152,"context_line":"    def _can_notify(self, port):"},{"line_number":153,"context_line":"        # If there is no device_id set there is nothing we can do here."},{"line_number":154,"context_line":"        if not port.device_id:"},{"line_number":155,"context_line":"            LOG.debug(\"device_id is not set on port yet.\")"},{"line_number":156,"context_line":"            return False"},{"line_number":157,"context_line":""},{"line_number":158,"context_line":"        if not port.id:"}],"source_content_type":"text/x-python","patch_set":17,"id":"1a122d0e_5e42aeab","line":155,"in_reply_to":"1a122d0e_a819f57b","updated":"2016-04-29 19:49:59.000000000","message":"ok I guess you consider it as blocker, so, done","commit_id":"deee7a80c10c04c82bfd4e50fca546b1961fb270"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"85e423cd3a737318d5805bc79ded78bc9c85e1a8","unresolved":false,"context_lines":[{"line_number":152,"context_line":"    def _can_notify(self, port):"},{"line_number":153,"context_line":"        # If there is no device_id set there is nothing we can do here."},{"line_number":154,"context_line":"        if not port.device_id:"},{"line_number":155,"context_line":"            LOG.debug(\"device_id is not set on port yet.\")"},{"line_number":156,"context_line":"            return False"},{"line_number":157,"context_line":""},{"line_number":158,"context_line":"        if not port.id:"}],"source_content_type":"text/x-python","patch_set":17,"id":"1a122d0e_a819f57b","line":155,"in_reply_to":"1a122d0e_cdc9fa27","updated":"2016-04-21 16:21:38.000000000","message":"Not changed in this patch, I just refactored to a separate method. Not a big deal to change but I\u0027d like to minimize the changes. Should it be a blocker?","commit_id":"deee7a80c10c04c82bfd4e50fca546b1961fb270"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"66e271f5b68d0f25cad90f711d4db7376152fee8","unresolved":false,"context_lines":[{"line_number":155,"context_line":"            LOG.debug(\"device_id is not set on port yet.\")"},{"line_number":156,"context_line":"            return False"},{"line_number":157,"context_line":""},{"line_number":158,"context_line":"        if not port.id:"},{"line_number":159,"context_line":"            LOG.warning(_LW(\"Port ID not set! Nova will not be notified of \""},{"line_number":160,"context_line":"                            \"port status change.\"))"},{"line_number":161,"context_line":"            return False"}],"source_content_type":"text/x-python","patch_set":17,"id":"1a122d0e_4d05ea43","line":158,"updated":"2016-04-21 09:56:28.000000000","message":"i think that you should do this prior to the check above (and that will enable you to log the port id)","commit_id":"deee7a80c10c04c82bfd4e50fca546b1961fb270"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"85e423cd3a737318d5805bc79ded78bc9c85e1a8","unresolved":false,"context_lines":[{"line_number":155,"context_line":"            LOG.debug(\"device_id is not set on port yet.\")"},{"line_number":156,"context_line":"            return False"},{"line_number":157,"context_line":""},{"line_number":158,"context_line":"        if not port.id:"},{"line_number":159,"context_line":"            LOG.warning(_LW(\"Port ID not set! Nova will not be notified of \""},{"line_number":160,"context_line":"                            \"port status change.\"))"},{"line_number":161,"context_line":"            return False"}],"source_content_type":"text/x-python","patch_set":17,"id":"1a122d0e_850b442b","line":158,"in_reply_to":"1a122d0e_4d05ea43","updated":"2016-04-21 16:21:38.000000000","message":"ditto","commit_id":"deee7a80c10c04c82bfd4e50fca546b1961fb270"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"8406ec38a30699a94b45afa00dc6e9316197e16b","unresolved":false,"context_lines":[{"line_number":155,"context_line":"            LOG.debug(\"device_id is not set on port yet.\")"},{"line_number":156,"context_line":"            return False"},{"line_number":157,"context_line":""},{"line_number":158,"context_line":"        if not port.id:"},{"line_number":159,"context_line":"            LOG.warning(_LW(\"Port ID not set! Nova will not be notified of \""},{"line_number":160,"context_line":"                            \"port status change.\"))"},{"line_number":161,"context_line":"            return False"}],"source_content_type":"text/x-python","patch_set":17,"id":"1a122d0e_be1302b7","line":158,"in_reply_to":"1a122d0e_850b442b","updated":"2016-04-29 19:49:59.000000000","message":"done","commit_id":"deee7a80c10c04c82bfd4e50fca546b1961fb270"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"7db90f9b3199e68125b091fa9d7347e4e8432c62","unresolved":false,"context_lines":[{"line_number":177,"context_line":"            LOG.debug(\"device_id is not set on port %s yet.\", port.id)"},{"line_number":178,"context_line":"            return False"},{"line_number":179,"context_line":""},{"line_number":180,"context_line":"        # We only want to notify about nova ports."},{"line_number":181,"context_line":"        if not self._is_compute_port(port):"},{"line_number":182,"context_line":"            return False"},{"line_number":183,"context_line":""}],"source_content_type":"text/x-python","patch_set":22,"id":"1aa78d24_6cf14095","line":180,"updated":"2016-07-06 10:56:14.000000000","message":"consider adding this check before the device_id check.","commit_id":"b7c303ee0a16a05c1fdb476dc7f4c7ca623a3f58"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"a358e777595d6615d5fff852dcbdf336bccb3a1f","unresolved":false,"context_lines":[{"line_number":177,"context_line":"            LOG.debug(\"device_id is not set on port %s yet.\", port.id)"},{"line_number":178,"context_line":"            return False"},{"line_number":179,"context_line":""},{"line_number":180,"context_line":"        # We only want to notify about nova ports."},{"line_number":181,"context_line":"        if not self._is_compute_port(port):"},{"line_number":182,"context_line":"            return False"},{"line_number":183,"context_line":""}],"source_content_type":"text/x-python","patch_set":22,"id":"1aa78d24_85bd5fb9","line":180,"in_reply_to":"1aa78d24_6cf14095","updated":"2016-07-06 11:52:25.000000000","message":"what\u0027s the benefit?","commit_id":"b7c303ee0a16a05c1fdb476dc7f4c7ca623a3f58"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"b7fb21bcf45cb982ca5d2a51c645384928003641","unresolved":false,"context_lines":[{"line_number":177,"context_line":"            LOG.debug(\"device_id is not set on port %s yet.\", port.id)"},{"line_number":178,"context_line":"            return False"},{"line_number":179,"context_line":""},{"line_number":180,"context_line":"        # We only want to notify about nova ports."},{"line_number":181,"context_line":"        if not self._is_compute_port(port):"},{"line_number":182,"context_line":"            return False"},{"line_number":183,"context_line":""}],"source_content_type":"text/x-python","patch_set":22,"id":"1aa78d24_bfd6a34c","line":180,"in_reply_to":"1aa78d24_85bd5fb9","updated":"2016-07-06 12:37:23.000000000","message":"benefit is that if it fails on the if below then you save an if.","commit_id":"b7c303ee0a16a05c1fdb476dc7f4c7ca623a3f58"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"7db90f9b3199e68125b091fa9d7347e4e8432c62","unresolved":false,"context_lines":[{"line_number":178,"context_line":"            return False"},{"line_number":179,"context_line":""},{"line_number":180,"context_line":"        # We only want to notify about nova ports."},{"line_number":181,"context_line":"        if not self._is_compute_port(port):"},{"line_number":182,"context_line":"            return False"},{"line_number":183,"context_line":""},{"line_number":184,"context_line":"        return True"}],"source_content_type":"text/x-python","patch_set":22,"id":"1aa78d24_8c32ac5d","line":181,"updated":"2016-07-06 10:56:14.000000000","message":"you have logs for the other cases. why not here?","commit_id":"b7c303ee0a16a05c1fdb476dc7f4c7ca623a3f58"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"a358e777595d6615d5fff852dcbdf336bccb3a1f","unresolved":false,"context_lines":[{"line_number":178,"context_line":"            return False"},{"line_number":179,"context_line":""},{"line_number":180,"context_line":"        # We only want to notify about nova ports."},{"line_number":181,"context_line":"        if not self._is_compute_port(port):"},{"line_number":182,"context_line":"            return False"},{"line_number":183,"context_line":""},{"line_number":184,"context_line":"        return True"}],"source_content_type":"text/x-python","patch_set":22,"id":"1aa78d24_a5069b83","line":181,"in_reply_to":"1aa78d24_8c32ac5d","updated":"2016-07-06 11:52:25.000000000","message":"No need to log that we\u0027re not going to notify nova for each non-compute port","commit_id":"b7c303ee0a16a05c1fdb476dc7f4c7ca623a3f58"},{"author":{"_account_id":8976,"name":"shihanzhang","email":"ayshihanzhang@gmail.com","username":"shihanzhang"},"change_message_id":"e14ebc87fd04f71bd92ccef3839d261dacb68a4d","unresolved":false,"context_lines":[{"line_number":232,"context_line":""},{"line_number":233,"context_line":"        Used when port was wired on the host other than port\u0027s current host"},{"line_number":234,"context_line":"        according to port binding. This happens during live migration."},{"line_number":235,"context_line":"        In this case ml2 plugin skips port status update but we still we need"},{"line_number":236,"context_line":"        to notify nova."},{"line_number":237,"context_line":"        \"\"\""},{"line_number":238,"context_line":"        if not self._can_notify(port):"}],"source_content_type":"text/x-python","patch_set":22,"id":"1aa78d24_32fe41ae","line":235,"range":{"start_line":235,"start_character":70,"end_line":235,"end_character":72},"updated":"2016-07-07 03:47:38.000000000","message":"there is a little mistake, remove the second \u0027we\u0027","commit_id":"b7c303ee0a16a05c1fdb476dc7f4c7ca623a3f58"}],"neutron/plugins/ml2/rpc.py":[{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"95a0e23ea4a9d0055dff46fa43a0b03d44300a8c","unresolved":false,"context_lines":[{"line_number":214,"context_line":"            # this might mean that a VM is in the process of live migration"},{"line_number":215,"context_line":"            # and vif was plugged on the destination compute node;"},{"line_number":216,"context_line":"            # need to notify nova explicitly"},{"line_number":217,"context_line":"            port \u003d ml2_db.get_port(rpc_context.session, port_id)"},{"line_number":218,"context_line":"            plugin.nova_notifier.record_port_status_changed("},{"line_number":219,"context_line":"                port,"},{"line_number":220,"context_line":"                n_const.PORT_STATUS_ACTIVE,"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba8a016a_b5c64266","line":217,"updated":"2015-11-18 12:21:18.000000000","message":"ned to check if port is compute port","commit_id":"580b670e30462986b5848c662f556cbbd7572496"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"e45c5281396f5bddde7eab4c7bca452dcc216604","unresolved":false,"context_lines":[{"line_number":215,"context_line":"            # and vif was plugged on the destination compute node;"},{"line_number":216,"context_line":"            # need to notify nova explicitly"},{"line_number":217,"context_line":"            port \u003d ml2_db.get_port(rpc_context.session, port_id)"},{"line_number":218,"context_line":"            plugin.nova_notifier.record_port_status_changed("},{"line_number":219,"context_line":"                port,"},{"line_number":220,"context_line":"                n_const.PORT_STATUS_ACTIVE,"},{"line_number":221,"context_line":"                n_const.PORT_STATUS_BUILD,"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba8a016a_ca7fa4a9","line":218,"updated":"2015-11-18 13:08:58.000000000","message":"218-223 logic better be encapsulated in nova_notifier","commit_id":"580b670e30462986b5848c662f556cbbd7572496"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"821a9442e2cfe3bbbc752ae8fe5f2b00caf260a5","unresolved":false,"context_lines":[{"line_number":216,"context_line":"            try:"},{"line_number":217,"context_line":"                port \u003d plugin._get_port(rpc_context, port_id)"},{"line_number":218,"context_line":"            except exceptions.PortNotFound:"},{"line_number":219,"context_line":"                pass"},{"line_number":220,"context_line":"            else:"},{"line_number":221,"context_line":"                if port.device_owner.startswith("},{"line_number":222,"context_line":"                        n_const.DEVICE_OWNER_COMPUTE_PREFIX):"}],"source_content_type":"text/x-python","patch_set":5,"id":"5a710552_c1a3924e","line":219,"updated":"2015-12-14 18:58:06.000000000","message":"we might want to log something in this case. It can be useful for debugging a problem","commit_id":"ab1ca30de3c5a67cceb22c7158f0e3ffa5d1866b"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"d05b1e4c964fbc19910dcb0be031d4cecdc8f2e2","unresolved":false,"context_lines":[{"line_number":216,"context_line":"            try:"},{"line_number":217,"context_line":"                port \u003d plugin._get_port(rpc_context, port_id)"},{"line_number":218,"context_line":"            except exceptions.PortNotFound:"},{"line_number":219,"context_line":"                pass"},{"line_number":220,"context_line":"            else:"},{"line_number":221,"context_line":"                if port.device_owner.startswith("},{"line_number":222,"context_line":"                        n_const.DEVICE_OWNER_COMPUTE_PREFIX):"}],"source_content_type":"text/x-python","patch_set":5,"id":"5a710552_375abc84","line":219,"in_reply_to":"5a710552_c1a3924e","updated":"2015-12-15 08:16:47.000000000","message":"agree","commit_id":"ab1ca30de3c5a67cceb22c7158f0e3ffa5d1866b"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"821a9442e2cfe3bbbc752ae8fe5f2b00caf260a5","unresolved":false,"context_lines":[{"line_number":218,"context_line":"            except exceptions.PortNotFound:"},{"line_number":219,"context_line":"                pass"},{"line_number":220,"context_line":"            else:"},{"line_number":221,"context_line":"                if port.device_owner.startswith("},{"line_number":222,"context_line":"                        n_const.DEVICE_OWNER_COMPUTE_PREFIX):"},{"line_number":223,"context_line":"                    plugin.nova_notifier.notify_port_active(port)"},{"line_number":224,"context_line":"            return"}],"source_content_type":"text/x-python","patch_set":5,"id":"5a710552_7c3e05ba","line":221,"updated":"2015-12-14 18:58:06.000000000","message":"there\u0027s already a check to see if device owner is compute in record_port_status_changed that is called by notify_port_active, no need to duplicate it here","commit_id":"ab1ca30de3c5a67cceb22c7158f0e3ffa5d1866b"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"d05b1e4c964fbc19910dcb0be031d4cecdc8f2e2","unresolved":false,"context_lines":[{"line_number":218,"context_line":"            except exceptions.PortNotFound:"},{"line_number":219,"context_line":"                pass"},{"line_number":220,"context_line":"            else:"},{"line_number":221,"context_line":"                if port.device_owner.startswith("},{"line_number":222,"context_line":"                        n_const.DEVICE_OWNER_COMPUTE_PREFIX):"},{"line_number":223,"context_line":"                    plugin.nova_notifier.notify_port_active(port)"},{"line_number":224,"context_line":"            return"}],"source_content_type":"text/x-python","patch_set":5,"id":"5a710552_9a04f515","line":221,"in_reply_to":"5a710552_7c3e05ba","updated":"2015-12-15 08:16:47.000000000","message":"Yeah, I just thought the check won\u0027t hurt here and will make the intention more clear (otherwise someone may wonder \u0027why should we notify nova if it is not a compute port?\u0027 before looking deeper into nova notifier code)","commit_id":"ab1ca30de3c5a67cceb22c7158f0e3ffa5d1866b"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"e4a8225cabb674863ff6d0d549d109f27491b9d6","unresolved":false,"context_lines":[{"line_number":221,"context_line":"                pass"},{"line_number":222,"context_line":"            else:"},{"line_number":223,"context_line":"                if port.device_owner.startswith("},{"line_number":224,"context_line":"                        n_const.DEVICE_OWNER_COMPUTE_PREFIX):"},{"line_number":225,"context_line":"                    plugin.nova_notifier.notify_port_active(port)"},{"line_number":226,"context_line":"            return"},{"line_number":227,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"5a710552_825a1a82","line":224,"updated":"2015-12-15 23:46:59.000000000","message":"Even here can we delay notifying the nova above the port-active until we finish of the router creation and then update later.","commit_id":"068b73f9b575c78c58c2ee2ac13d241975833398"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"512e32ffbccb06acf7e2a6356b7eafd5e6419585","unresolved":false,"context_lines":[{"line_number":221,"context_line":"                pass"},{"line_number":222,"context_line":"            else:"},{"line_number":223,"context_line":"                if port.device_owner.startswith("},{"line_number":224,"context_line":"                        n_const.DEVICE_OWNER_COMPUTE_PREFIX):"},{"line_number":225,"context_line":"                    plugin.nova_notifier.notify_port_active(port)"},{"line_number":226,"context_line":"            return"},{"line_number":227,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"5a710552_d8f2456f","line":224,"in_reply_to":"5a710552_825a1a82","updated":"2015-12-16 08:28:40.000000000","message":"Initially I didn\u0027t even get what was your comment about (which router???). That\u0027s the evil of trying to fix several issues with one patch and I\u0027m sure reviewers won\u0027t be happy with it. This should clearly be a separate patch dealing with live migration and dvr routers.","commit_id":"068b73f9b575c78c58c2ee2ac13d241975833398"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"e4a8225cabb674863ff6d0d549d109f27491b9d6","unresolved":false,"context_lines":[{"line_number":235,"context_line":"            port \u003d plugin._get_port(rpc_context, port_id)"},{"line_number":236,"context_line":"        except exceptions.PortNotFound:"},{"line_number":237,"context_line":"            LOG.debug(\u0027Port %s not found during update\u0027, port_id)"},{"line_number":238,"context_line":"        else:"},{"line_number":239,"context_line":"            kwargs \u003d {"},{"line_number":240,"context_line":"                \u0027context\u0027: rpc_context,"},{"line_number":241,"context_line":"                \u0027port\u0027: port,"}],"source_content_type":"text/x-python","patch_set":6,"id":"5a710552_a20f1687","line":238,"updated":"2015-12-15 23:46:59.000000000","message":"Is it possible to add the live migration details in here with the \"kwargs\".\n\nsuch as \"host\" and \"device_not_bound\" to the destination host.\n\nThis would be helpfull for us to take necessary action in pro-actively creating the routers for this port on the destination host ( DVR).","commit_id":"068b73f9b575c78c58c2ee2ac13d241975833398"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"512e32ffbccb06acf7e2a6356b7eafd5e6419585","unresolved":false,"context_lines":[{"line_number":235,"context_line":"            port \u003d plugin._get_port(rpc_context, port_id)"},{"line_number":236,"context_line":"        except exceptions.PortNotFound:"},{"line_number":237,"context_line":"            LOG.debug(\u0027Port %s not found during update\u0027, port_id)"},{"line_number":238,"context_line":"        else:"},{"line_number":239,"context_line":"            kwargs \u003d {"},{"line_number":240,"context_line":"                \u0027context\u0027: rpc_context,"},{"line_number":241,"context_line":"                \u0027port\u0027: port,"}],"source_content_type":"text/x-python","patch_set":6,"id":"5a710552_a372aaab","line":238,"in_reply_to":"5a710552_a20f1687","updated":"2015-12-16 08:28:40.000000000","message":"see above","commit_id":"068b73f9b575c78c58c2ee2ac13d241975833398"},{"author":{"_account_id":12860,"name":"Dongcan Ye","email":"yedongcan@yeah.net","username":"yedongcan"},"change_message_id":"011a785baf4e297837dbf93fd58f72fb5eca99f4","unresolved":false,"context_lines":[{"line_number":222,"context_line":"            else:"},{"line_number":223,"context_line":"                if port.device_owner.startswith("},{"line_number":224,"context_line":"                        n_const.DEVICE_OWNER_COMPUTE_PREFIX):"},{"line_number":225,"context_line":"                    plugin.nova_notifier.notify_port_active(port)"},{"line_number":226,"context_line":"            return"},{"line_number":227,"context_line":""},{"line_number":228,"context_line":"        port_id \u003d plugin.update_port_status(rpc_context, port_id,"}],"source_content_type":"text/x-python","patch_set":9,"id":"da6ed579_c07260e3","line":225,"updated":"2016-01-22 01:17:31.000000000","message":"This method call is not consistent with nova notifier.\n\nplugin.nova_notifier.notify_port_active_direct(port) ?","commit_id":"5ffa890a9937cb92de3266ecad1b87db447e030c"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"a7cabb7a7e0a816c75e04c17a9917d3f5cbcc11f","unresolved":false,"context_lines":[{"line_number":222,"context_line":"            else:"},{"line_number":223,"context_line":"                if port.device_owner.startswith("},{"line_number":224,"context_line":"                        n_const.DEVICE_OWNER_COMPUTE_PREFIX):"},{"line_number":225,"context_line":"                    plugin.nova_notifier.notify_port_active(port)"},{"line_number":226,"context_line":"            return"},{"line_number":227,"context_line":""},{"line_number":228,"context_line":"        port_id \u003d plugin.update_port_status(rpc_context, port_id,"}],"source_content_type":"text/x-python","patch_set":9,"id":"9a68dd71_11d89eee","line":225,"in_reply_to":"da6ed579_c07260e3","updated":"2016-01-22 07:35:16.000000000","message":"Good catch!","commit_id":"5ffa890a9937cb92de3266ecad1b87db447e030c"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"d714963050473b55fdf8c61c711e4b8928cd7ce5","unresolved":false,"context_lines":[{"line_number":216,"context_line":"            try:"},{"line_number":217,"context_line":"                port \u003d plugin._get_port(rpc_context, port_id)"},{"line_number":218,"context_line":"            except exceptions.PortNotFound:"},{"line_number":219,"context_line":"                # not adding log here as \u0027port not found\u0027 will be logged by"},{"line_number":220,"context_line":"                # update_port_status() below"},{"line_number":221,"context_line":"                pass"},{"line_number":222,"context_line":"            else:"},{"line_number":223,"context_line":"                if port.device_owner.startswith("}],"source_content_type":"text/x-python","patch_set":11,"id":"ba0121b8_c3580e8d","line":220,"range":{"start_line":219,"start_character":41,"end_line":220,"end_character":36},"updated":"2016-03-30 21:52:44.000000000","message":"I\u0027m a little bit confused.  Do you mean that L228 will log it?  The code will never reach that point because L226 will return.","commit_id":"138db00afa1de3434c12a0c4c13f31d747c2ef92"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"1b680b0546ef3d50a55525ab7987f2551860bf2b","unresolved":false,"context_lines":[{"line_number":216,"context_line":"            try:"},{"line_number":217,"context_line":"                port \u003d plugin._get_port(rpc_context, port_id)"},{"line_number":218,"context_line":"            except exceptions.PortNotFound:"},{"line_number":219,"context_line":"                # not adding log here as \u0027port not found\u0027 will be logged by"},{"line_number":220,"context_line":"                # update_port_status() below"},{"line_number":221,"context_line":"                pass"},{"line_number":222,"context_line":"            else:"},{"line_number":223,"context_line":"                if port.device_owner.startswith("}],"source_content_type":"text/x-python","patch_set":11,"id":"ba0121b8_edea5173","line":220,"range":{"start_line":219,"start_character":41,"end_line":220,"end_character":36},"in_reply_to":"ba0121b8_c3580e8d","updated":"2016-03-31 08:02:05.000000000","message":"good catch, seems I missed the return #226","commit_id":"138db00afa1de3434c12a0c4c13f31d747c2ef92"},{"author":{"_account_id":10267,"name":"venkata anil","email":"anilvenkata@redhat.com","username":"anil"},"change_message_id":"96c5b5c8f0f916d10eff2094740d9a3b5b0c7117","unresolved":false,"context_lines":[{"line_number":219,"context_line":"                LOG.debug(\"Port %s not found, will not notify nova.\", port_id)"},{"line_number":220,"context_line":"            else:"},{"line_number":221,"context_line":"                if port.device_owner.startswith("},{"line_number":222,"context_line":"                        n_const.DEVICE_OWNER_COMPUTE_PREFIX):"},{"line_number":223,"context_line":"                    plugin.nova_notifier.notify_port_active_direct(port)"},{"line_number":224,"context_line":"            return"},{"line_number":225,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"5a18252c_8ea92a93","line":222,"updated":"2016-04-14 06:58:13.000000000","message":"In previous file you added comment like - \"in case of live migration where port becomes ACTIVE on destination host while it also remains ACTIVE on source host\"\n\nSo make sure that you check port status before informing nova.\nif port.status \u003d\u003d n_const.PORT_STATUS_ACTIVE:\n  plugin.nova_notifier.notify_port_active_direct(port)\n\nport status can be DOWN if source host calls update_device_down() before destination host calls update_device_up().","commit_id":"a8067e5619796cc7b2a1df0e4a85118c106d67c6"},{"author":{"_account_id":10267,"name":"venkata anil","email":"anilvenkata@redhat.com","username":"anil"},"change_message_id":"e0c605eaf9c4d1bdbd3b54923c49c2fe9e9dad13","unresolved":false,"context_lines":[{"line_number":219,"context_line":"                LOG.debug(\"Port %s not found, will not notify nova.\", port_id)"},{"line_number":220,"context_line":"            else:"},{"line_number":221,"context_line":"                if port.device_owner.startswith("},{"line_number":222,"context_line":"                        n_const.DEVICE_OWNER_COMPUTE_PREFIX):"},{"line_number":223,"context_line":"                    plugin.nova_notifier.notify_port_active_direct(port)"},{"line_number":224,"context_line":"            return"},{"line_number":225,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"5a18252c_c47943ca","line":222,"in_reply_to":"5a18252c_4491b346","updated":"2016-04-14 08:04:40.000000000","message":"But your comment says - \" it also remains ACTIVE on source host\" which is not true as source host might have cleaned up the port.\nYou have to change your comment, something like \" port wired up on destination host, but we can\u0027t reply on port status as port binding from nova has not happened\"","commit_id":"a8067e5619796cc7b2a1df0e4a85118c106d67c6"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"74d5821707a0a5ad88b42f8d59868d88e05c7e08","unresolved":false,"context_lines":[{"line_number":219,"context_line":"                LOG.debug(\"Port %s not found, will not notify nova.\", port_id)"},{"line_number":220,"context_line":"            else:"},{"line_number":221,"context_line":"                if port.device_owner.startswith("},{"line_number":222,"context_line":"                        n_const.DEVICE_OWNER_COMPUTE_PREFIX):"},{"line_number":223,"context_line":"                    plugin.nova_notifier.notify_port_active_direct(port)"},{"line_number":224,"context_line":"            return"},{"line_number":225,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"5a18252c_4491b346","line":222,"in_reply_to":"5a18252c_8ea92a93","updated":"2016-04-14 07:53:23.000000000","message":"We still need to notify nova in this case: what matters is that port became active on the host other than port\u0027s current host.","commit_id":"a8067e5619796cc7b2a1df0e4a85118c106d67c6"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"c3a046391329d533cc113c8e8bd05bb5464eb770","unresolved":false,"context_lines":[{"line_number":219,"context_line":"                LOG.debug(\"Port %s not found, will not notify nova.\", port_id)"},{"line_number":220,"context_line":"            else:"},{"line_number":221,"context_line":"                if port.device_owner.startswith("},{"line_number":222,"context_line":"                        n_const.DEVICE_OWNER_COMPUTE_PREFIX):"},{"line_number":223,"context_line":"                    plugin.nova_notifier.notify_port_active_direct(port)"},{"line_number":224,"context_line":"            return"},{"line_number":225,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"5a18252c_675b11f7","line":222,"in_reply_to":"5a18252c_c47943ca","updated":"2016-04-14 08:16:56.000000000","message":"Yeah, let me update the comment a bit","commit_id":"a8067e5619796cc7b2a1df0e4a85118c106d67c6"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"7db90f9b3199e68125b091fa9d7347e4e8432c62","unresolved":false,"context_lines":[{"line_number":218,"context_line":"            except exceptions.PortNotFound:"},{"line_number":219,"context_line":"                LOG.debug(\"Port %s not found, will not notify nova.\", port_id)"},{"line_number":220,"context_line":"            else:"},{"line_number":221,"context_line":"                if port.device_owner.startswith("},{"line_number":222,"context_line":"                        n_const.DEVICE_OWNER_COMPUTE_PREFIX):"},{"line_number":223,"context_line":"                    plugin.nova_notifier.notify_port_active_direct(port)"},{"line_number":224,"context_line":"            return"}],"source_content_type":"text/x-python","patch_set":22,"id":"1aa78d24_ec81b0c4","line":221,"updated":"2016-07-06 10:56:14.000000000","message":"this check is done in the notifications.","commit_id":"b7c303ee0a16a05c1fdb476dc7f4c7ca623a3f58"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"a358e777595d6615d5fff852dcbdf336bccb3a1f","unresolved":false,"context_lines":[{"line_number":218,"context_line":"            except exceptions.PortNotFound:"},{"line_number":219,"context_line":"                LOG.debug(\"Port %s not found, will not notify nova.\", port_id)"},{"line_number":220,"context_line":"            else:"},{"line_number":221,"context_line":"                if port.device_owner.startswith("},{"line_number":222,"context_line":"                        n_const.DEVICE_OWNER_COMPUTE_PREFIX):"},{"line_number":223,"context_line":"                    plugin.nova_notifier.notify_port_active_direct(port)"},{"line_number":224,"context_line":"            return"}],"source_content_type":"text/x-python","patch_set":22,"id":"1aa78d24_454a57ad","line":221,"in_reply_to":"1aa78d24_ec81b0c4","updated":"2016-07-06 11:52:25.000000000","message":"just to save an unneeded call to nova_notifier. I believe it shouldn\u0027t hurt.","commit_id":"b7c303ee0a16a05c1fdb476dc7f4c7ca623a3f58"}],"neutron/tests/unit/notifiers/test_nova.py":[{"author":{"_account_id":11307,"name":"Andreas Scheuring","email":"andreas.scheuring@de.ibm.com","username":"uniqueName"},"change_message_id":"95570d9fef6c03bae4fc96bdefd6cb2d8030b2d9","unresolved":false,"context_lines":[{"line_number":324,"context_line":"        self.assertEqual("},{"line_number":325,"context_line":"            1, len(self.nova_notifier.batch_notifier.pending_events))"},{"line_number":326,"context_line":"        self.assertEqual(self.nova_notifier.batch_notifier.pending_events[0],"},{"line_number":327,"context_line":"                         expected_event)"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba8a016a_f0bea763","line":327,"updated":"2015-11-20 08:00:13.000000000","message":"use assertEqual(exptected, result) like in your first assert","commit_id":"c54a9a043013e96ecfcb21a974178ac19fd4b0dd"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"e212ac6dbe03f554dffc9f01d6e6d765c13d6f26","unresolved":false,"context_lines":[{"line_number":324,"context_line":"        self.assertEqual("},{"line_number":325,"context_line":"            1, len(self.nova_notifier.batch_notifier.pending_events))"},{"line_number":326,"context_line":"        self.assertEqual(self.nova_notifier.batch_notifier.pending_events[0],"},{"line_number":327,"context_line":"                         expected_event)"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba8a016a_e6d2715b","line":327,"in_reply_to":"ba8a016a_f0bea763","updated":"2015-11-20 08:24:16.000000000","message":"copy-pasting is bad.. will fix","commit_id":"c54a9a043013e96ecfcb21a974178ac19fd4b0dd"}]}
