)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"609c3eb0a559aeba121d8e36985b2e20a85c70e1","unresolved":false,"context_lines":[{"line_number":11,"context_line":"with the new workflow but have not activated the port binding."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"migrate_instance_finish calls _update_port_binding_for_instance"},{"line_number":14,"context_line":"which updated the old port binding to point to the new host"},{"line_number":15,"context_line":"instead of activating the inactive binding. This results in"},{"line_number":16,"context_line":"a violation of the unique constratin on the neutron port bindings"},{"line_number":17,"context_line":"db table as it would create both an active and inactive port binding"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"dfbec78f_b7b83d2a","line":14,"updated":"2019-05-08 22:46:46.000000000","message":"I\u0027m having a hard time wrapping my head around this. Is this a race where neutron is trying to do the wrong port binding update because we\u0027re updating the port\u0027s binding:host_id rather than manage the port binding resource directly?","commit_id":"819bb0f8989a26c916881ad9e515696dc296fb25"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"0ed1166ecba7216105a66a4fc66678cf6e9b924b","unresolved":false,"context_lines":[{"line_number":11,"context_line":"with the new workflow but have not activated the port binding."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"migrate_instance_finish calls _update_port_binding_for_instance"},{"line_number":14,"context_line":"which updated the old port binding to point to the new host"},{"line_number":15,"context_line":"instead of activating the inactive binding. This results in"},{"line_number":16,"context_line":"a violation of the unique constratin on the neutron port bindings"},{"line_number":17,"context_line":"db table as it would create both an active and inactive port binding"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"dfbec78f_5e7c67b4","line":14,"in_reply_to":"dfbec78f_b7b83d2a","updated":"2019-05-09 22:08:26.000000000","message":"After talking with Miguel he explained why this happens on the neutron side:\n\nhttp://eavesdrop.openstack.org/irclogs/%23openstack-neutron/%23openstack-neutron.2019-05-09.log.html#t2019-05-09T20:40:18\n\nI think what could be happening is if you\u0027re not using post-copy, and for whatever reason the migrate_instance_start in _post_live_migration doesn\u0027t activate the dest host port binding, then the migrate_instance_finish on the dest (via post_live_migration_at_destination) would hit the error.\n\nI\u0027m definitely hitting this in the cross-cell resize flow because I\u0027m not calling migrate_instance_start to activate the dest host port bindings before calling migrate_instance_finish (traditional resize doesn\u0027t have this problem b/c it doesn\u0027t use multiple port bindings like live migration and the cross-cell resize stuff is also using multiple port bindings).","commit_id":"819bb0f8989a26c916881ad9e515696dc296fb25"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"f225472e58a5863797be933969aae0781c090a58","unresolved":false,"context_lines":[{"line_number":21,"context_line":"for a single port on the same host."},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"It\u0027s important to note that activating the inactive dest host port"},{"line_number":24,"context_line":"binding with automatically update the port\u0027s binding:host_id value"},{"line_number":25,"context_line":"to the dest host (from the port binding resource), but the opposite"},{"line_number":26,"context_line":"is not true: updating the port\u0027s binding:host_id to point at the"},{"line_number":27,"context_line":"dest host binding does not automatically activate the inactive"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"bfb3d3c7_04dea010","line":24,"range":{"start_line":24,"start_character":8,"end_line":24,"end_character":12},"updated":"2019-05-23 14:28:06.000000000","message":"will?","commit_id":"a193f2c15f1f1c523011970f7b8a0655340bba00"}],"/PATCHSET_LEVEL":[{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"393350310ad1ea55cae11f4a8e5b6f4282f55d9a","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":6,"id":"5521fcd2_7d253ddb","updated":"2023-08-26 01:56:10.000000000","message":"this is not mergabel i\ndid a rebase and resolved some conflict but im not sure if this is anything close to correct\n\ni mainliy want to  se what happens when this executes in devstack\n\nrealisticly this might need to be rewritten from scratch given the change that have happend in the last 3 years.","commit_id":"56694ce3cc8c4e2406deeaaf8b7ff557332945f8"}],"nova/network/neutronv2/api.py":[{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"c27c41ab5921dacbc729622ae30a24299c7ef433","unresolved":false,"context_lines":[{"line_number":3333,"context_line":"            if p.get(BINDING_HOST_ID) !\u003d host or vif_type in FAILED_VIF_TYPES:"},{"line_number":3334,"context_line":"                client, resp \u003d self.has_port_binding_on_host(context, p, host,"},{"line_number":3335,"context_line":"                                                             client\u003dclient)"},{"line_number":3336,"context_line":"                if resp"},{"line_number":3337,"context_line":"                    if resp.json()[\u0027binding\u0027][\u0027status\u0027] !\u003d \u0027ACTIVE\u0027:"},{"line_number":3338,"context_line":"                        self.activate_port_binding(client, p[\u0027id\u0027], host)"},{"line_number":3339,"context_line":"                    continue"}],"source_content_type":"text/x-python","patch_set":1,"id":"3fce034c_8254ae54","line":3336,"range":{"start_line":3336,"start_character":16,"end_line":3336,"end_character":23},"updated":"2019-04-17 20:49:47.000000000","message":"so yes as was mentioned on irc im missing a :","commit_id":"7bcdae3802af1a43d3197cd62307a0d858397cce"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"c399273cd961431f6782052ab13c6446f3bffa5d","unresolved":false,"context_lines":[{"line_number":3335,"context_line":"                                                             client\u003dclient)"},{"line_number":3336,"context_line":"                if resp:"},{"line_number":3337,"context_line":"                    if resp.json()[\u0027binding\u0027][\u0027status\u0027] !\u003d \u0027ACTIVE\u0027:"},{"line_number":3338,"context_line":"                        self.activate_port_binding(client, p[\u0027id\u0027], host)"},{"line_number":3339,"context_line":"                    continue"},{"line_number":3340,"context_line":""},{"line_number":3341,"context_line":"                # TODO(gibi): To support ports with resource request during"}],"source_content_type":"text/x-python","patch_set":2,"id":"dfbec78f_211874d1","line":3338,"range":{"start_line":3338,"start_character":24,"end_line":3338,"end_character":73},"updated":"2019-05-09 22:47:07.000000000","message":"You don\u0027t actually have a test that hits this condition I don\u0027t think.","commit_id":"819bb0f8989a26c916881ad9e515696dc296fb25"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"daac6dcc8d861b98cd20b928c0a2f661837da539","unresolved":false,"context_lines":[{"line_number":3335,"context_line":"                                                             client\u003dclient)"},{"line_number":3336,"context_line":"                if resp:"},{"line_number":3337,"context_line":"                    if resp.json()[\u0027binding\u0027][\u0027status\u0027] !\u003d \u0027ACTIVE\u0027:"},{"line_number":3338,"context_line":"                        self.activate_port_binding(client, p[\u0027id\u0027], host)"},{"line_number":3339,"context_line":"                    continue"},{"line_number":3340,"context_line":""},{"line_number":3341,"context_line":"                # TODO(gibi): To support ports with resource request during"}],"source_content_type":"text/x-python","patch_set":2,"id":"dfbec78f_3e6dc1cb","line":3338,"range":{"start_line":3338,"start_character":24,"end_line":3338,"end_character":73},"in_reply_to":"dfbec78f_211874d1","updated":"2019-05-13 19:37:33.000000000","message":"correct i was trying to just get the existing tests to pass before adding new tests.","commit_id":"819bb0f8989a26c916881ad9e515696dc296fb25"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"609c3eb0a559aeba121d8e36985b2e20a85c70e1","unresolved":false,"context_lines":[{"line_number":3336,"context_line":"                if resp:"},{"line_number":3337,"context_line":"                    if resp.json()[\u0027binding\u0027][\u0027status\u0027] !\u003d \u0027ACTIVE\u0027:"},{"line_number":3338,"context_line":"                        self.activate_port_binding(client, p[\u0027id\u0027], host)"},{"line_number":3339,"context_line":"                    continue"},{"line_number":3340,"context_line":""},{"line_number":3341,"context_line":"                # TODO(gibi): To support ports with resource request during"},{"line_number":3342,"context_line":"                # server move operations we need to take care of \u0027allocation\u0027"}],"source_content_type":"text/x-python","patch_set":2,"id":"dfbec78f_979e59b6","line":3339,"updated":"2019-05-08 22:46:46.000000000","message":"You\u0027re potentially missing all of the other stuff in here regarding updating the port. That might be fine for live migration, but likely won\u0027t fly for a cross-cell resize which is trying to use the new port binding stuff as well.","commit_id":"819bb0f8989a26c916881ad9e515696dc296fb25"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"daac6dcc8d861b98cd20b928c0a2f661837da539","unresolved":false,"context_lines":[{"line_number":3336,"context_line":"                if resp:"},{"line_number":3337,"context_line":"                    if resp.json()[\u0027binding\u0027][\u0027status\u0027] !\u003d \u0027ACTIVE\u0027:"},{"line_number":3338,"context_line":"                        self.activate_port_binding(client, p[\u0027id\u0027], host)"},{"line_number":3339,"context_line":"                    continue"},{"line_number":3340,"context_line":""},{"line_number":3341,"context_line":"                # TODO(gibi): To support ports with resource request during"},{"line_number":3342,"context_line":"                # server move operations we need to take care of \u0027allocation\u0027"}],"source_content_type":"text/x-python","patch_set":2,"id":"dfbec78f_3ea2a1fd","line":3339,"in_reply_to":"dfbec78f_979e59b6","updated":"2019-05-13 19:37:33.000000000","message":"well the multiple port binding flow is currently only used for live migrations so this block would not never be entered for cross cell migration or any other non live migration case which is why i used continue to skip the rest of the updates.","commit_id":"819bb0f8989a26c916881ad9e515696dc296fb25"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"daac6dcc8d861b98cd20b928c0a2f661837da539","unresolved":false,"context_lines":[{"line_number":3355,"context_line":"                except exception.PortBindingActivationFailed:"},{"line_number":3356,"context_line":"                    # If something failed then just try to update the"},{"line_number":3357,"context_line":"                    # port\u0027s binding:host_id directly."},{"line_number":3358,"context_line":"                    updates[BINDING_HOST_ID] \u003d host"},{"line_number":3359,"context_line":"        else:"},{"line_number":3360,"context_line":"            updates[BINDING_HOST_ID] \u003d host"},{"line_number":3361,"context_line":"        return client, updates"}],"source_content_type":"text/x-python","patch_set":4,"id":"dfbec78f_3e54e1fd","line":3358,"range":{"start_line":3358,"start_character":19,"end_line":3358,"end_character":51},"updated":"2019-05-13 19:37:33.000000000","message":"this would still cause the same issue as the original bug in that the unique constraint on the db would be violated.\n\nwith that said it is not a regression to try this but im not sure in what situation this will actully work.\n\nwe could delete the dest port binding if we failed to activate it? in which case the update of the souce bidning should then work.","commit_id":"847da27c0e7d0ebc5da59837ac96930fc88b534f"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b6f24b1acc4b4cea68e963cfaae1b78686f6ba40","unresolved":false,"context_lines":[{"line_number":3355,"context_line":"                except exception.PortBindingActivationFailed:"},{"line_number":3356,"context_line":"                    # If something failed then just try to update the"},{"line_number":3357,"context_line":"                    # port\u0027s binding:host_id directly."},{"line_number":3358,"context_line":"                    updates[BINDING_HOST_ID] \u003d host"},{"line_number":3359,"context_line":"        else:"},{"line_number":3360,"context_line":"            updates[BINDING_HOST_ID] \u003d host"},{"line_number":3361,"context_line":"        return client, updates"}],"source_content_type":"text/x-python","patch_set":4,"id":"dfbec78f_aa2e478f","line":3358,"range":{"start_line":3358,"start_character":19,"end_line":3358,"end_character":51},"in_reply_to":"dfbec78f_3e54e1fd","updated":"2019-05-13 20:28:03.000000000","message":"We could remove this, I was just thinking if we lost a race or something we could try the old way, but activate_port_binding should deal with a 409 race trying to activate an already active dest host binding, so maybe it\u0027d just be more confusing to try and fallback to this and then have it fail.","commit_id":"847da27c0e7d0ebc5da59837ac96930fc88b534f"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"97980a7bb0faf9fc8a1d9f1a8f190648376de743","unresolved":false,"context_lines":[{"line_number":3355,"context_line":"                except exception.PortBindingActivationFailed:"},{"line_number":3356,"context_line":"                    # If something failed then just try to update the"},{"line_number":3357,"context_line":"                    # port\u0027s binding:host_id directly."},{"line_number":3358,"context_line":"                    updates[BINDING_HOST_ID] \u003d host"},{"line_number":3359,"context_line":"        else:"},{"line_number":3360,"context_line":"            updates[BINDING_HOST_ID] \u003d host"},{"line_number":3361,"context_line":"        return client, updates"}],"source_content_type":"text/x-python","patch_set":4,"id":"dfbec78f_7e66d4c3","line":3358,"range":{"start_line":3358,"start_character":19,"end_line":3358,"end_character":51},"in_reply_to":"dfbec78f_aa2e478f","updated":"2019-05-13 21:39:22.000000000","message":"I\u0027ll just remove the try/except and let the error raise up. I don\u0027t really want to try and delete the dest host port binding and do the update - this is all workaround for a weird edge case anyway, so if we can\u0027t activate the inactivate dest host port binding we should probably just give up.","commit_id":"847da27c0e7d0ebc5da59837ac96930fc88b534f"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"4391d3a90740fb52b06d0cb129558ea91741f152","unresolved":false,"context_lines":[{"line_number":3355,"context_line":"                except exception.PortBindingActivationFailed:"},{"line_number":3356,"context_line":"                    # If something failed then just try to update the"},{"line_number":3357,"context_line":"                    # port\u0027s binding:host_id directly."},{"line_number":3358,"context_line":"                    updates[BINDING_HOST_ID] \u003d host"},{"line_number":3359,"context_line":"        else:"},{"line_number":3360,"context_line":"            updates[BINDING_HOST_ID] \u003d host"},{"line_number":3361,"context_line":"        return client, updates"}],"source_content_type":"text/x-python","patch_set":4,"id":"dfbec78f_7ea1f4f7","line":3358,"range":{"start_line":3358,"start_character":19,"end_line":3358,"end_character":51},"in_reply_to":"dfbec78f_aa2e478f","updated":"2019-05-13 21:37:21.000000000","message":"my preference would be either to fast fail\nor if we do try to recover delete the inactive port bidning and update the souce binding using the old flow.\n\nfast failing meets my expectation that we either migrate with all interfaces or we dont migrate.\n\nif we delete the inactive port binding and fallback to the old way that will give 1 more opertunity for the update to happen which i think is also fine but really i would hope this code path would be never or almost never used.","commit_id":"847da27c0e7d0ebc5da59837ac96930fc88b534f"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"daac6dcc8d861b98cd20b928c0a2f661837da539","unresolved":false,"context_lines":[{"line_number":3389,"context_line":"                # server move operations we need to take care of \u0027allocation\u0027"},{"line_number":3390,"context_line":"                # key in the binding profile per binding."},{"line_number":3391,"context_line":""},{"line_number":3392,"context_line":"                # If the host changed, the AZ could have also changed so we"},{"line_number":3393,"context_line":"                # need to update the device_owner."},{"line_number":3394,"context_line":"                updates[\u0027device_owner\u0027] \u003d ("},{"line_number":3395,"context_line":"                        \u0027compute:%s\u0027 % instance.availability_zone)"},{"line_number":3396,"context_line":"                # NOTE: Before updating the port binding make sure we"},{"line_number":3397,"context_line":"                # remove the pre-migration status from the binding profile"},{"line_number":3398,"context_line":"                if binding_profile.get(MIGRATING_ATTR):"}],"source_content_type":"text/x-python","patch_set":4,"id":"dfbec78f_a469a0f9","line":3395,"range":{"start_line":3392,"start_character":11,"end_line":3395,"end_character":66},"updated":"2019-05-13 19:37:33.000000000","message":"this is unrelated but we shoudl really be doing this in\n\nhttps://github.com/openstack/nova/blob/71b11292fb6c37b3854ba1bbfc00c729b4b5ecf4/nova/network/neutronv2/api.py#L1222-L1313\n\nso it gets updated by the conductor in the live mgiration flow instead of relying on this to fix the az on the port.","commit_id":"847da27c0e7d0ebc5da59837ac96930fc88b534f"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"4391d3a90740fb52b06d0cb129558ea91741f152","unresolved":false,"context_lines":[{"line_number":3389,"context_line":"                # server move operations we need to take care of \u0027allocation\u0027"},{"line_number":3390,"context_line":"                # key in the binding profile per binding."},{"line_number":3391,"context_line":""},{"line_number":3392,"context_line":"                # If the host changed, the AZ could have also changed so we"},{"line_number":3393,"context_line":"                # need to update the device_owner."},{"line_number":3394,"context_line":"                updates[\u0027device_owner\u0027] \u003d ("},{"line_number":3395,"context_line":"                        \u0027compute:%s\u0027 % instance.availability_zone)"},{"line_number":3396,"context_line":"                # NOTE: Before updating the port binding make sure we"},{"line_number":3397,"context_line":"                # remove the pre-migration status from the binding profile"},{"line_number":3398,"context_line":"                if binding_profile.get(MIGRATING_ATTR):"}],"source_content_type":"text/x-python","patch_set":4,"id":"dfbec78f_fe108450","line":3395,"range":{"start_line":3392,"start_character":11,"end_line":3395,"end_character":66},"in_reply_to":"dfbec78f_6a804f47","updated":"2019-05-13 21:37:21.000000000","message":"ah you are right device owner is a property on the port not on the port bindings dict.\n\nthe fact that we set the az in the device owner field in general has other issue and is likely incorrect long term for several reason but really we should store all info related to where and how a port is bound ign the port bindings rather then the port object.\n\nbut yes you are right given todays workflow we should only update this after/when we activate the port binding on the destination.","commit_id":"847da27c0e7d0ebc5da59837ac96930fc88b534f"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b6f24b1acc4b4cea68e963cfaae1b78686f6ba40","unresolved":false,"context_lines":[{"line_number":3389,"context_line":"                # server move operations we need to take care of \u0027allocation\u0027"},{"line_number":3390,"context_line":"                # key in the binding profile per binding."},{"line_number":3391,"context_line":""},{"line_number":3392,"context_line":"                # If the host changed, the AZ could have also changed so we"},{"line_number":3393,"context_line":"                # need to update the device_owner."},{"line_number":3394,"context_line":"                updates[\u0027device_owner\u0027] \u003d ("},{"line_number":3395,"context_line":"                        \u0027compute:%s\u0027 % instance.availability_zone)"},{"line_number":3396,"context_line":"                # NOTE: Before updating the port binding make sure we"},{"line_number":3397,"context_line":"                # remove the pre-migration status from the binding profile"},{"line_number":3398,"context_line":"                if binding_profile.get(MIGRATING_ATTR):"}],"source_content_type":"text/x-python","patch_set":4,"id":"dfbec78f_6a804f47","line":3395,"range":{"start_line":3392,"start_character":11,"end_line":3395,"end_character":66},"in_reply_to":"dfbec78f_a469a0f9","updated":"2019-05-13 20:28:03.000000000","message":"I\u0027m not sure about that, why would we change the device_owner to the dest (in conductor) before we\u0027ve activated the dest host port binding?","commit_id":"847da27c0e7d0ebc5da59837ac96930fc88b534f"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"daac6dcc8d861b98cd20b928c0a2f661837da539","unresolved":false,"context_lines":[{"line_number":3395,"context_line":"                        \u0027compute:%s\u0027 % instance.availability_zone)"},{"line_number":3396,"context_line":"                # NOTE: Before updating the port binding make sure we"},{"line_number":3397,"context_line":"                # remove the pre-migration status from the binding profile"},{"line_number":3398,"context_line":"                if binding_profile.get(MIGRATING_ATTR):"},{"line_number":3399,"context_line":"                    del binding_profile[MIGRATING_ATTR]"},{"line_number":3400,"context_line":"                    updates[BINDING_PROFILE] \u003d binding_profile"},{"line_number":3401,"context_line":""},{"line_number":3402,"context_line":"            # Update port with newly allocated PCI devices.  Even if the"},{"line_number":3403,"context_line":"            # resize is happening on the same host, a new PCI device can be"}],"source_content_type":"text/x-python","patch_set":4,"id":"dfbec78f_245e1044","line":3400,"range":{"start_line":3398,"start_character":15,"end_line":3400,"end_character":62},"updated":"2019-05-13 19:37:33.000000000","message":"the migration info i think would have been removed when we activited the biding in the live migration flow so i think the device_owner is ths only thing in the rest fo this loop that might be needed that the continue would have skipped.","commit_id":"847da27c0e7d0ebc5da59837ac96930fc88b534f"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b6f24b1acc4b4cea68e963cfaae1b78686f6ba40","unresolved":false,"context_lines":[{"line_number":3395,"context_line":"                        \u0027compute:%s\u0027 % instance.availability_zone)"},{"line_number":3396,"context_line":"                # NOTE: Before updating the port binding make sure we"},{"line_number":3397,"context_line":"                # remove the pre-migration status from the binding profile"},{"line_number":3398,"context_line":"                if binding_profile.get(MIGRATING_ATTR):"},{"line_number":3399,"context_line":"                    del binding_profile[MIGRATING_ATTR]"},{"line_number":3400,"context_line":"                    updates[BINDING_PROFILE] \u003d binding_profile"},{"line_number":3401,"context_line":""},{"line_number":3402,"context_line":"            # Update port with newly allocated PCI devices.  Even if the"},{"line_number":3403,"context_line":"            # resize is happening on the same host, a new PCI device can be"}],"source_content_type":"text/x-python","patch_set":4,"id":"dfbec78f_ca605bd2","line":3400,"range":{"start_line":3398,"start_character":15,"end_line":3400,"end_character":62},"in_reply_to":"dfbec78f_245e1044","updated":"2019-05-13 20:28:03.000000000","message":"I\u0027m not really sure, and we don\u0027t have a live migration job that uses DVR which relies on this MIGRATING_ATTR.","commit_id":"847da27c0e7d0ebc5da59837ac96930fc88b534f"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"daac6dcc8d861b98cd20b928c0a2f661837da539","unresolved":false,"context_lines":[{"line_number":3410,"context_line":"                    and migration is not None"},{"line_number":3411,"context_line":"                    and migration[\u0027migration_type\u0027] !\u003d"},{"line_number":3412,"context_line":"                    constants.LIVE_MIGRATION):"},{"line_number":3413,"context_line":"                # Note(adrianc): for live migration binding profile was already"},{"line_number":3414,"context_line":"                # updated in conductor when calling bind_ports_to_host()"},{"line_number":3415,"context_line":"                if not pci_mapping:"},{"line_number":3416,"context_line":"                    pci_mapping \u003d self._get_pci_mapping_for_migration(context,"},{"line_number":3417,"context_line":"                        instance, migration)"}],"source_content_type":"text/x-python","patch_set":4,"id":"dfbec78f_e44238ab","line":3414,"range":{"start_line":3413,"start_character":16,"end_line":3414,"end_character":72},"updated":"2019-05-13 19:37:33.000000000","message":"this is a little consing considerign this block is only ever executed when not live migrating.\n\nwe shoudl add somethign like\n\"for non live migration we need to update the binding here instead.\" or something similar to make it clear why we are doing this.","commit_id":"847da27c0e7d0ebc5da59837ac96930fc88b534f"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"daac6dcc8d861b98cd20b928c0a2f661837da539","unresolved":false,"context_lines":[{"line_number":3410,"context_line":"                    and migration is not None"},{"line_number":3411,"context_line":"                    and migration[\u0027migration_type\u0027] !\u003d"},{"line_number":3412,"context_line":"                    constants.LIVE_MIGRATION):"},{"line_number":3413,"context_line":"                # Note(adrianc): for live migration binding profile was already"},{"line_number":3414,"context_line":"                # updated in conductor when calling bind_ports_to_host()"},{"line_number":3415,"context_line":"                if not pci_mapping:"},{"line_number":3416,"context_line":"                    pci_mapping \u003d self._get_pci_mapping_for_migration(context,"},{"line_number":3417,"context_line":"                        instance, migration)"},{"line_number":3418,"context_line":""},{"line_number":3419,"context_line":"                pci_slot \u003d binding_profile.get(\u0027pci_slot\u0027)"},{"line_number":3420,"context_line":"                new_dev \u003d pci_mapping.get(pci_slot)"}],"source_content_type":"text/x-python","patch_set":4,"id":"dfbec78f_e4ed58b7","line":3417,"range":{"start_line":3413,"start_character":15,"end_line":3417,"end_character":44},"updated":"2019-05-13 19:37:33.000000000","message":"this code is wrong.\n\n\n\nis this not dead code\n\nin the live migration case we shoudl not need to update the port bidnigns due to the fact we have already updated the bindigns in the conductor here\n\nhttps://github.com/openstack/nova/blob/780f737547ee0b8f39f0bc1e4d6c4de6f8d1dd54/nova/conductor/tasks/live_migrate.py#L358-L379\n\nif the cloud does not support the multiple port bindign flow we do not support migrating with pci requests\n\nhttps://github.com/openstack/nova/blob/780f737547ee0b8f39f0bc1e4d6c4de6f8d1dd54/nova/conductor/tasks/live_migrate.py#L203-L243\n\nso we should never have to execute this code as","commit_id":"847da27c0e7d0ebc5da59837ac96930fc88b534f"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b6f24b1acc4b4cea68e963cfaae1b78686f6ba40","unresolved":false,"context_lines":[{"line_number":3410,"context_line":"                    and migration is not None"},{"line_number":3411,"context_line":"                    and migration[\u0027migration_type\u0027] !\u003d"},{"line_number":3412,"context_line":"                    constants.LIVE_MIGRATION):"},{"line_number":3413,"context_line":"                # Note(adrianc): for live migration binding profile was already"},{"line_number":3414,"context_line":"                # updated in conductor when calling bind_ports_to_host()"},{"line_number":3415,"context_line":"                if not pci_mapping:"},{"line_number":3416,"context_line":"                    pci_mapping \u003d self._get_pci_mapping_for_migration(context,"},{"line_number":3417,"context_line":"                        instance, migration)"},{"line_number":3418,"context_line":""},{"line_number":3419,"context_line":"                pci_slot \u003d binding_profile.get(\u0027pci_slot\u0027)"},{"line_number":3420,"context_line":"                new_dev \u003d pci_mapping.get(pci_slot)"}],"source_content_type":"text/x-python","patch_set":4,"id":"dfbec78f_ea8bdf64","line":3417,"range":{"start_line":3413,"start_character":15,"end_line":3417,"end_character":44},"in_reply_to":"dfbec78f_2fcfc956","updated":"2019-05-13 20:28:03.000000000","message":"Umm, OK, the new comment from adrianc was from the newly added SR-IOV live migration support which I didn\u0027t review so I can\u0027t say.","commit_id":"847da27c0e7d0ebc5da59837ac96930fc88b534f"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"0f8210cc747593f30ecd26f085a3736b0ddfa3ef","unresolved":false,"context_lines":[{"line_number":3410,"context_line":"                    and migration is not None"},{"line_number":3411,"context_line":"                    and migration[\u0027migration_type\u0027] !\u003d"},{"line_number":3412,"context_line":"                    constants.LIVE_MIGRATION):"},{"line_number":3413,"context_line":"                # Note(adrianc): for live migration binding profile was already"},{"line_number":3414,"context_line":"                # updated in conductor when calling bind_ports_to_host()"},{"line_number":3415,"context_line":"                if not pci_mapping:"},{"line_number":3416,"context_line":"                    pci_mapping \u003d self._get_pci_mapping_for_migration(context,"},{"line_number":3417,"context_line":"                        instance, migration)"},{"line_number":3418,"context_line":""},{"line_number":3419,"context_line":"                pci_slot \u003d binding_profile.get(\u0027pci_slot\u0027)"},{"line_number":3420,"context_line":"                new_dev \u003d pci_mapping.get(pci_slot)"}],"source_content_type":"text/x-python","patch_set":4,"id":"dfbec78f_2fcfc956","line":3417,"range":{"start_line":3413,"start_character":15,"end_line":3417,"end_character":44},"in_reply_to":"dfbec78f_e4ed58b7","updated":"2019-05-13 19:50:07.000000000","message":"ignore this. i figured out later what this was doing but that is why i said the comment above is confusing as it lead me down the path of thinging you only wanted to execute the contence fo the if if you are live migrating.","commit_id":"847da27c0e7d0ebc5da59837ac96930fc88b534f"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"4391d3a90740fb52b06d0cb129558ea91741f152","unresolved":false,"context_lines":[{"line_number":3410,"context_line":"                    and migration is not None"},{"line_number":3411,"context_line":"                    and migration[\u0027migration_type\u0027] !\u003d"},{"line_number":3412,"context_line":"                    constants.LIVE_MIGRATION):"},{"line_number":3413,"context_line":"                # Note(adrianc): for live migration binding profile was already"},{"line_number":3414,"context_line":"                # updated in conductor when calling bind_ports_to_host()"},{"line_number":3415,"context_line":"                if not pci_mapping:"},{"line_number":3416,"context_line":"                    pci_mapping \u003d self._get_pci_mapping_for_migration(context,"},{"line_number":3417,"context_line":"                        instance, migration)"},{"line_number":3418,"context_line":""},{"line_number":3419,"context_line":"                pci_slot \u003d binding_profile.get(\u0027pci_slot\u0027)"},{"line_number":3420,"context_line":"                new_dev \u003d pci_mapping.get(pci_slot)"}],"source_content_type":"text/x-python","patch_set":4,"id":"dfbec78f_3ece1cb4","line":3417,"range":{"start_line":3413,"start_character":15,"end_line":3417,"end_character":44},"in_reply_to":"dfbec78f_ea8bdf64","updated":"2019-05-13 21:37:21.000000000","message":"this code should be fine.\n\ni intally got confused about how pci_mappings was ever not going to be none but then i realied its defiend outside the loop body.\n\nso really this coudl have been pull out of the loop.\nthen  i got confused by the comment as i tough it was asserting the code in the if should\nonly run when live migration but this is to handle correctly updating the port bidinging in the non live migration case to refect the fact the pci address of the port might chagne.","commit_id":"847da27c0e7d0ebc5da59837ac96930fc88b534f"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"e10726dd1eac157b4180c43daae539b58e7e511e","unresolved":false,"context_lines":[{"line_number":2786,"context_line":"                      \u0027updated later.\u0027, instance\u003dinstance)"},{"line_number":2787,"context_line":"            return"},{"line_number":2788,"context_line":""},{"line_number":2789,"context_line":"        client \u003d None"},{"line_number":2790,"context_line":"        dest_host \u003d migration[\u0027dest_compute\u0027]"},{"line_number":2791,"context_line":"        for vif in instance.get_network_info():"},{"line_number":2792,"context_line":"            # Not all compute migration flows use the port binding-extended"}],"source_content_type":"text/x-python","patch_set":5,"id":"bfb3d3c7_dd7b92bb","line":2789,"updated":"2019-05-22 16:07:35.000000000","message":"I guess you want to spare a client creation if the below loop is a no-op. I think this is a performance optimization that should be do outside of this bugfix.","commit_id":"a193f2c15f1f1c523011970f7b8a0655340bba00"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"215c012d5b2c39df4598a839b535afde751cfc73","unresolved":false,"context_lines":[{"line_number":2786,"context_line":"                      \u0027updated later.\u0027, instance\u003dinstance)"},{"line_number":2787,"context_line":"            return"},{"line_number":2788,"context_line":""},{"line_number":2789,"context_line":"        client \u003d None"},{"line_number":2790,"context_line":"        dest_host \u003d migration[\u0027dest_compute\u0027]"},{"line_number":2791,"context_line":"        for vif in instance.get_network_info():"},{"line_number":2792,"context_line":"            # Not all compute migration flows use the port binding-extended"}],"source_content_type":"text/x-python","patch_set":5,"id":"bfb3d3c7_f270fca7","line":2789,"in_reply_to":"bfb3d3c7_dd7b92bb","updated":"2019-05-22 20:30:18.000000000","message":"Well, yes but it\u0027s also baked into _get_binding_host_updates_for_port and get_port_binding_for_host so we don\u0027t have the same thing all over the place (is there a client? no? ok create one for each method that is called).","commit_id":"a193f2c15f1f1c523011970f7b8a0655340bba00"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"e10726dd1eac157b4180c43daae539b58e7e511e","unresolved":false,"context_lines":[{"line_number":3314,"context_line":"                            if old.request_id \u003d\u003d new.request_id}"},{"line_number":3315,"context_line":"        return {}"},{"line_number":3316,"context_line":""},{"line_number":3317,"context_line":"    def _get_binding_host_updates_for_port(self, context, port_id, host,"},{"line_number":3318,"context_line":"                                           client\u003dNone):"},{"line_number":3319,"context_line":"        \"\"\"Get the port binding:host_id updates or activate host binding"},{"line_number":3320,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"bfb3d3c7_1de28a02","line":3317,"range":{"start_line":3317,"start_character":8,"end_line":3317,"end_character":42},"updated":"2019-05-22 16:07:35.000000000","message":"This is called a \u0027get\u0027 but sometimes it has a side effect of activating an inactive binding. This feels bad. Can we do something like:\n1) gather information about the current state of the bindings\n2) decide what to do to achieve the state we need\n3) do the action\n\nThe current solution does the possible #3) action in two different places depending on the original state of the port","commit_id":"a193f2c15f1f1c523011970f7b8a0655340bba00"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"215c012d5b2c39df4598a839b535afde751cfc73","unresolved":false,"context_lines":[{"line_number":3314,"context_line":"                            if old.request_id \u003d\u003d new.request_id}"},{"line_number":3315,"context_line":"        return {}"},{"line_number":3316,"context_line":""},{"line_number":3317,"context_line":"    def _get_binding_host_updates_for_port(self, context, port_id, host,"},{"line_number":3318,"context_line":"                                           client\u003dNone):"},{"line_number":3319,"context_line":"        \"\"\"Get the port binding:host_id updates or activate host binding"},{"line_number":3320,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"bfb3d3c7_52ed4823","line":3317,"range":{"start_line":3317,"start_character":8,"end_line":3317,"end_character":42},"in_reply_to":"bfb3d3c7_1de28a02","updated":"2019-05-22 20:30:18.000000000","message":"In other words you\u0027d rather have what Sean was originally doing?\n\nhttps://review.opendev.org/#/c/653506/2/nova/network/neutronv2/api.py@3334\n\nAs you can see in there, the problem is we potentially miss some updates. It also makes testing a bit harder since it\u0027s all baked into the already large _update_port_binding_for_instance method.\n\nI suppose the issue I had could be resolved by avoiding the continue and handling \"updates[BINDING_HOST_ID] \u003d host\" with an else where appropriate (which is what this method does which is why I centralized it).\n\nI agree this method isn\u0027t awesome. The idea with the \u0027get\u0027 is that you get the port binding:host_id update to make if you need to make one, but if we activated the inactive port then you don\u0027t need to explicitly update port.binding:host_id.\n\nAnyway, I can change back, just let me know.","commit_id":"a193f2c15f1f1c523011970f7b8a0655340bba00"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"f225472e58a5863797be933969aae0781c090a58","unresolved":false,"context_lines":[{"line_number":3314,"context_line":"                            if old.request_id \u003d\u003d new.request_id}"},{"line_number":3315,"context_line":"        return {}"},{"line_number":3316,"context_line":""},{"line_number":3317,"context_line":"    def _get_binding_host_updates_for_port(self, context, port_id, host,"},{"line_number":3318,"context_line":"                                           client\u003dNone):"},{"line_number":3319,"context_line":"        \"\"\"Get the port binding:host_id updates or activate host binding"},{"line_number":3320,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"bfb3d3c7_44ad7886","line":3317,"range":{"start_line":3317,"start_character":8,"end_line":3317,"end_character":42},"in_reply_to":"bfb3d3c7_52ed4823","updated":"2019-05-23 14:28:06.000000000","message":"fwiw, I\u0027d also prefer not to bring this out, particularly if it\u0027s only done for test expediency","commit_id":"a193f2c15f1f1c523011970f7b8a0655340bba00"}],"nova/tests/unit/network/test_neutronv2.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"0c33982732cebdc81af1e6fca37fecdc395c3bc4","unresolved":false,"context_lines":[{"line_number":4103,"context_line":"                                                        port_req_body)"},{"line_number":4104,"context_line":""},{"line_number":4105,"context_line":"    @mock.patch.object(neutronapi.API, \u0027get_port_binding_for_host\u0027,"},{"line_number":4106,"context_line":"                       return_value\u003d(mock.Mock(), None))"},{"line_number":4107,"context_line":"    @mock.patch.object(neutronapi, \u0027get_client\u0027, return_value\u003dmock.Mock())"},{"line_number":4108,"context_line":"    def test_update_port_bindings_for_instance_with_migration_profile("},{"line_number":4109,"context_line":"        self, get_client_mock, get_binding_mock):"}],"source_content_type":"text/x-python","patch_set":3,"id":"dfbec78f_c4b646fb","line":4106,"range":{"start_line":4106,"start_character":50,"end_line":4106,"end_character":54},"updated":"2019-05-09 23:55:40.000000000","message":"This isn\u0027t realistic, should return a fake response with a 404.","commit_id":"51a4982fe194cd64ed1d0ef340ab09dd2c8ff9f6"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"daac6dcc8d861b98cd20b928c0a2f661837da539","unresolved":false,"context_lines":[{"line_number":4139,"context_line":"                                     neutronapi.BINDING_PROFILE: {"},{"line_number":4140,"context_line":"                                         \u0027fake_profile\u0027: \u0027fake_data\u0027}}})"},{"line_number":4141,"context_line":""},{"line_number":4142,"context_line":"    @mock.patch.object(neutronapi.API, \u0027get_port_binding_for_host\u0027,"},{"line_number":4143,"context_line":"                       return_value\u003d(mock.Mock(), fake_req.FakeResponse(404)))"},{"line_number":4144,"context_line":"    @mock.patch.object(neutronapi, \u0027get_client\u0027, return_value\u003dmock.Mock())"},{"line_number":4145,"context_line":"    def test_update_port_bindings_for_instance_binding_profile_none("},{"line_number":4146,"context_line":"        self, get_client_mock, get_binding_mock):"}],"source_content_type":"text/x-python","patch_set":4,"id":"dfbec78f_64164858","line":4143,"range":{"start_line":4142,"start_character":1,"end_line":4143,"end_character":78},"updated":"2019-05-13 19:37:33.000000000","message":"ya this is a better way to mock this then how i was doing it before.","commit_id":"847da27c0e7d0ebc5da59837ac96930fc88b534f"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"daac6dcc8d861b98cd20b928c0a2f661837da539","unresolved":false,"context_lines":[{"line_number":4491,"context_line":"        with mock.patch.object(self.api, \u0027activate_port_binding\u0027) as activate:"},{"line_number":4492,"context_line":"            client, updates \u003d self.api._get_binding_host_updates_for_port("},{"line_number":4493,"context_line":"                self.context, uuids.port_id, \u0027host1\u0027)"},{"line_number":4494,"context_line":"        activate.assert_called_once_with(mock_client, uuids.port_id, \u0027host1\u0027)"},{"line_number":4495,"context_line":"        self.assertIs(client, mock_client)"},{"line_number":4496,"context_line":"        self.assertEqual({}, updates)"},{"line_number":4497,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"dfbec78f_6f24e1af","line":4494,"range":{"start_line":4494,"start_character":8,"end_line":4494,"end_character":77},"updated":"2019-05-13 19:37:33.000000000","message":"activate should be out of scope at this point as you are outside of the block created by the with statement.\n\nthis coudl be one of those case where python does not handel object scoping properly but this shoudl be indented one level.","commit_id":"847da27c0e7d0ebc5da59837ac96930fc88b534f"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b6f24b1acc4b4cea68e963cfaae1b78686f6ba40","unresolved":false,"context_lines":[{"line_number":4491,"context_line":"        with mock.patch.object(self.api, \u0027activate_port_binding\u0027) as activate:"},{"line_number":4492,"context_line":"            client, updates \u003d self.api._get_binding_host_updates_for_port("},{"line_number":4493,"context_line":"                self.context, uuids.port_id, \u0027host1\u0027)"},{"line_number":4494,"context_line":"        activate.assert_called_once_with(mock_client, uuids.port_id, \u0027host1\u0027)"},{"line_number":4495,"context_line":"        self.assertIs(client, mock_client)"},{"line_number":4496,"context_line":"        self.assertEqual({}, updates)"},{"line_number":4497,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"dfbec78f_4af0ebfd","line":4494,"range":{"start_line":4494,"start_character":8,"end_line":4494,"end_character":77},"in_reply_to":"dfbec78f_6f24e1af","updated":"2019-05-13 20:28:03.000000000","message":"The mock is still fine, I\u0027ve written lots of tests like this.","commit_id":"847da27c0e7d0ebc5da59837ac96930fc88b534f"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"daac6dcc8d861b98cd20b928c0a2f661837da539","unresolved":false,"context_lines":[{"line_number":4509,"context_line":"        with mock.patch.object(self.api, \u0027activate_port_binding\u0027) as activate:"},{"line_number":4510,"context_line":"            client, updates \u003d self.api._get_binding_host_updates_for_port("},{"line_number":4511,"context_line":"                self.context, uuids.port_id, \u0027host1\u0027, client\u003dmock_client)"},{"line_number":4512,"context_line":"        activate.assert_not_called()"},{"line_number":4513,"context_line":"        self.assertIs(client, mock_client)"},{"line_number":4514,"context_line":"        self.assertEqual({}, updates)"},{"line_number":4515,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"dfbec78f_cf32adf2","line":4512,"range":{"start_line":4512,"start_character":7,"end_line":4512,"end_character":36},"updated":"2019-05-13 19:37:33.000000000","message":"same as above","commit_id":"847da27c0e7d0ebc5da59837ac96930fc88b534f"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"daac6dcc8d861b98cd20b928c0a2f661837da539","unresolved":false,"context_lines":[{"line_number":4516,"context_line":"    @mock.patch.object(neutronapi.API, \u0027get_port_binding_for_host\u0027)"},{"line_number":4517,"context_line":"    def test_get_binding_host_updates_for_port_activate_fails("},{"line_number":4518,"context_line":"            self, get_binding_mock):"},{"line_number":4519,"context_line":"        \"\"\"Tests the scenario that there is an inactive port binding for the"},{"line_number":4520,"context_line":"        given host but we fail to activate it so the binding:host_id update"},{"line_number":4521,"context_line":"        is returned."},{"line_number":4522,"context_line":"        \"\"\""},{"line_number":4523,"context_line":"        mock_client \u003d mock.Mock()"},{"line_number":4524,"context_line":"        fake_resp \u003d fake_req.FakeResponse("},{"line_number":4525,"context_line":"            200, \u0027{\"binding\": {\"status\": \"INACTIVE\"}}\u0027)"}],"source_content_type":"text/x-python","patch_set":4,"id":"dfbec78f_0f42053f","line":4522,"range":{"start_line":4519,"start_character":6,"end_line":4522,"end_character":11},"updated":"2019-05-13 19:37:33.000000000","message":"this should result in the same db conflict we are trying to avoid.","commit_id":"847da27c0e7d0ebc5da59837ac96930fc88b534f"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b6f24b1acc4b4cea68e963cfaae1b78686f6ba40","unresolved":false,"context_lines":[{"line_number":4516,"context_line":"    @mock.patch.object(neutronapi.API, \u0027get_port_binding_for_host\u0027)"},{"line_number":4517,"context_line":"    def test_get_binding_host_updates_for_port_activate_fails("},{"line_number":4518,"context_line":"            self, get_binding_mock):"},{"line_number":4519,"context_line":"        \"\"\"Tests the scenario that there is an inactive port binding for the"},{"line_number":4520,"context_line":"        given host but we fail to activate it so the binding:host_id update"},{"line_number":4521,"context_line":"        is returned."},{"line_number":4522,"context_line":"        \"\"\""},{"line_number":4523,"context_line":"        mock_client \u003d mock.Mock()"},{"line_number":4524,"context_line":"        fake_resp \u003d fake_req.FakeResponse("},{"line_number":4525,"context_line":"            200, \u0027{\"binding\": {\"status\": \"INACTIVE\"}}\u0027)"}],"source_content_type":"text/x-python","patch_set":4,"id":"dfbec78f_6ace0fb5","line":4522,"range":{"start_line":4519,"start_character":6,"end_line":4522,"end_character":11},"in_reply_to":"dfbec78f_0f42053f","updated":"2019-05-13 20:28:03.000000000","message":"Sure maybe, honestly without even knowing why _post_live_migration was failing to activate the dest host port binding before getting this far in that CityNetwork bug is pretty mysterious.","commit_id":"847da27c0e7d0ebc5da59837ac96930fc88b534f"}]}
