)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"41cb56d4e2bf93a355b3316985e264b41496bc74","unresolved":false,"context_lines":[{"line_number":23,"context_line":"used within each cell, but this does allow the deployer to have"},{"line_number":24,"context_line":"the flexibility of live migrating between different network"},{"line_number":25,"context_line":"backends (eventually anyway). The ability to live migrate between"},{"line_number":26,"context_line":"different VIF types is being worked on as part of blueprint"},{"line_number":27,"context_line":"neutron-new-port-binding-api."},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"Change-Id: I0f3ab6604d8b79bdb75cf67571e359cfecc039d8"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"bf659307_c0a8c7dc","line":27,"range":{"start_line":26,"start_character":50,"end_line":27,"end_character":29},"updated":"2018-04-06 14:38:52.000000000","message":"But this isn\u0027t part of that bp?  (Your topic is currently set to this, not sure if that\u0027s correct.)","commit_id":"f19e88644a5823818993e2f352519600c2173807"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"b24b1276f226083a91a0d93742291aec4de3d912","unresolved":false,"context_lines":[{"line_number":23,"context_line":"used within each cell, but this does allow the deployer to have"},{"line_number":24,"context_line":"the flexibility of live migrating between different network"},{"line_number":25,"context_line":"backends (eventually anyway). The ability to live migrate between"},{"line_number":26,"context_line":"different VIF types is being worked on as part of blueprint"},{"line_number":27,"context_line":"neutron-new-port-binding-api."},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"Change-Id: I0f3ab6604d8b79bdb75cf67571e359cfecc039d8"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"bf659307_ecf5c584","line":27,"range":{"start_line":26,"start_character":50,"end_line":27,"end_character":29},"in_reply_to":"bf659307_2cf73df8","updated":"2018-04-06 16:24:45.000000000","message":"Okay.  Perhaps the spec could use an edit to include the version bump, because that kind of thing typically requires speccing, yah?\n\nRegardless, I would think at least a\n\n Related-Blueprint: neutron-new-port-binding-api\n\nwould be appropriate here.","commit_id":"f19e88644a5823818993e2f352519600c2173807"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"98294e80ae06f5052a6899a49a49fe2bfd94565c","unresolved":false,"context_lines":[{"line_number":23,"context_line":"used within each cell, but this does allow the deployer to have"},{"line_number":24,"context_line":"the flexibility of live migrating between different network"},{"line_number":25,"context_line":"backends (eventually anyway). The ability to live migrate between"},{"line_number":26,"context_line":"different VIF types is being worked on as part of blueprint"},{"line_number":27,"context_line":"neutron-new-port-binding-api."},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"Change-Id: I0f3ab6604d8b79bdb75cf67571e359cfecc039d8"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"bf659307_9114d5a1","line":27,"range":{"start_line":26,"start_character":50,"end_line":27,"end_character":29},"in_reply_to":"bf659307_95e2082f","updated":"2018-04-12 17:05:58.000000000","message":"Done","commit_id":"f19e88644a5823818993e2f352519600c2173807"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"275241be489feec21d6d69de51290d98f4df2195","unresolved":false,"context_lines":[{"line_number":23,"context_line":"used within each cell, but this does allow the deployer to have"},{"line_number":24,"context_line":"the flexibility of live migrating between different network"},{"line_number":25,"context_line":"backends (eventually anyway). The ability to live migrate between"},{"line_number":26,"context_line":"different VIF types is being worked on as part of blueprint"},{"line_number":27,"context_line":"neutron-new-port-binding-api."},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"Change-Id: I0f3ab6604d8b79bdb75cf67571e359cfecc039d8"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"bf659307_2cf73df8","line":27,"range":{"start_line":26,"start_character":50,"end_line":27,"end_character":29},"in_reply_to":"bf659307_c0a8c7dc","updated":"2018-04-06 16:12:41.000000000","message":"Yes and no. When we discussed this in the spec, we said this was a latent bug really, but it was also something needed as part of this blueprint since we want to make sure the VIFs are plugged on the dest host before starting the live migration since we also have the port bindings on the dest host at the end of this series, so when we activate those dest host port bindings (once the guest transfer is in post-copy mode), we want to make sure the VIFs are all properly wired up.\n\nHaving said that, in the spec we didn\u0027t consider needing to pass this information back from the dest host to the source host over RPC which requires that version bump on the migrate data object, so even if it\u0027s a latent bug, because of that RPC change it\u0027s not something we\u0027ll be backporting.","commit_id":"f19e88644a5823818993e2f352519600c2173807"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"a09b18bbeb38ae4069aaab095bc437879d6e15bc","unresolved":false,"context_lines":[{"line_number":23,"context_line":"used within each cell, but this does allow the deployer to have"},{"line_number":24,"context_line":"the flexibility of live migrating between different network"},{"line_number":25,"context_line":"backends (eventually anyway). The ability to live migrate between"},{"line_number":26,"context_line":"different VIF types is being worked on as part of blueprint"},{"line_number":27,"context_line":"neutron-new-port-binding-api."},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"Change-Id: I0f3ab6604d8b79bdb75cf67571e359cfecc039d8"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"bf659307_95e2082f","line":27,"range":{"start_line":26,"start_character":50,"end_line":27,"end_character":29},"in_reply_to":"bf659307_ecf5c584","updated":"2018-04-06 18:33:48.000000000","message":"\u003e Perhaps the spec could use an edit to include the version bump, because that kind of thing typically requires speccing, yah?\n\nWe don\u0027t require specs for RPC version bumps, unless it\u0027s a major change in behavior, i.e. new features.\n\nI can add the related blueprint link.","commit_id":"f19e88644a5823818993e2f352519600c2173807"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"048b52dbb81cea1b8cbc2b0f6e8493b706ddd57a","unresolved":false,"context_lines":[{"line_number":10,"context_line":"during pre_live_migration and the value is returned back to the"},{"line_number":11,"context_line":"source host, which can be used to determine, from the source host,"},{"line_number":12,"context_line":"if it should wait for a \"network-vif-plugged\" event due to VIFs"},{"line_number":13,"context_line":"being plugged on the destination host."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"The option is disabled by default for backward compatibliity and"},{"line_number":16,"context_line":"also because certain networking backends, like OpenDaylight, are"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"5f7c97a3_a1ea6cd5","line":13,"updated":"2018-06-18 12:04:08.000000000","message":"Why does the source host need to wait for the vif plug on the destination host? Is this ensure that the network connectivity is not interrupted during the live migration?","commit_id":"13fd0d0eeb3966ee45b78d46c41d1372d6e72704"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"fc87838baef326d51ce6f1e3429f325a205430e6","unresolved":false,"context_lines":[{"line_number":10,"context_line":"during pre_live_migration and the value is returned back to the"},{"line_number":11,"context_line":"source host, which can be used to determine, from the source host,"},{"line_number":12,"context_line":"if it should wait for a \"network-vif-plugged\" event due to VIFs"},{"line_number":13,"context_line":"being plugged on the destination host."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"The option is disabled by default for backward compatibliity and"},{"line_number":16,"context_line":"also because certain networking backends, like OpenDaylight, are"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"5f7c97a3_5548ba5a","line":13,"in_reply_to":"5f7c97a3_0cd34703","updated":"2018-06-20 10:42:02.000000000","message":"Thanks for the explanation.","commit_id":"13fd0d0eeb3966ee45b78d46c41d1372d6e72704"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"36039773ecff73d497f2e02b310093808b9e9c34","unresolved":false,"context_lines":[{"line_number":10,"context_line":"during pre_live_migration and the value is returned back to the"},{"line_number":11,"context_line":"source host, which can be used to determine, from the source host,"},{"line_number":12,"context_line":"if it should wait for a \"network-vif-plugged\" event due to VIFs"},{"line_number":13,"context_line":"being plugged on the destination host."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"The option is disabled by default for backward compatibliity and"},{"line_number":16,"context_line":"also because certain networking backends, like OpenDaylight, are"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"5f7c97a3_0cd34703","line":13,"in_reply_to":"5f7c97a3_a1ea6cd5","updated":"2018-06-18 21:21:56.000000000","message":"Because the vif plugged event will get routed to the source host since that\u0027s where the instance currently resides:\n\nhttps://github.com/openstack/nova/blob/530c24596a74a6115f2e944176c46e4f3d199811/nova/compute/api.py#L4642\n\nAnd we don\u0027t have a migration_context during live migration because the migration_context is created in the resource tracker during a claim, and we don\u0027t (currently) do RT claims during live migration.\n\nSo the source host waits for the vif plugging that happens on the dest host to determine if it should proceed with the guest transfer in the hypervisor. It\u0027s not so much about interrupt as much as avoid the guest transfer at all if vif plugging failed on the dest host, which we just wouldn\u0027t find out until post live migration and then we have to rollback, which sucks.","commit_id":"13fd0d0eeb3966ee45b78d46c41d1372d6e72704"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"048b52dbb81cea1b8cbc2b0f6e8493b706ddd57a","unresolved":false,"context_lines":[{"line_number":12,"context_line":"if it should wait for a \"network-vif-plugged\" event due to VIFs"},{"line_number":13,"context_line":"being plugged on the destination host."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"The option is disabled by default for backward compatibliity and"},{"line_number":16,"context_line":"also because certain networking backends, like OpenDaylight, are"},{"line_number":17,"context_line":"known to not send network-vif-plugged events unless the port host"},{"line_number":18,"context_line":"binding information changes, which for live migration doesn\u0027t happen"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"5f7c97a3_8118901e","line":15,"range":{"start_line":15,"start_character":56,"end_line":15,"end_character":58},"updated":"2018-06-18 12:04:08.000000000","message":"nit: remove an i","commit_id":"13fd0d0eeb3966ee45b78d46c41d1372d6e72704"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"36039773ecff73d497f2e02b310093808b9e9c34","unresolved":false,"context_lines":[{"line_number":12,"context_line":"if it should wait for a \"network-vif-plugged\" event due to VIFs"},{"line_number":13,"context_line":"being plugged on the destination host."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"The option is disabled by default for backward compatibliity and"},{"line_number":16,"context_line":"also because certain networking backends, like OpenDaylight, are"},{"line_number":17,"context_line":"known to not send network-vif-plugged events unless the port host"},{"line_number":18,"context_line":"binding information changes, which for live migration doesn\u0027t happen"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"5f7c97a3_2cf7238f","line":15,"range":{"start_line":15,"start_character":56,"end_line":15,"end_character":58},"in_reply_to":"5f7c97a3_8118901e","updated":"2018-06-18 21:21:56.000000000","message":"Done","commit_id":"13fd0d0eeb3966ee45b78d46c41d1372d6e72704"}],"nova/compute/manager.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"c1467cf0831ef795560a833d5d2f5c3e00b7f573","unresolved":false,"context_lines":[{"line_number":6092,"context_line":"            migrate_data.migration \u003d migration"},{"line_number":6093,"context_line":"        LOG.debug(\u0027live_migration data is %s\u0027, migrate_data)"},{"line_number":6094,"context_line":""},{"line_number":6095,"context_line":"        events \u003d self._get_neutron_events_for_live_migration("},{"line_number":6096,"context_line":"            migrate_data, instance.get_network_info())"},{"line_number":6097,"context_line":"        try:"},{"line_number":6098,"context_line":"            deadline \u003d CONF.vif_plugging_timeout"}],"source_content_type":"text/x-python","patch_set":1,"id":"bf659307_f3fc39b6","line":6095,"updated":"2018-03-31 14:03:33.000000000","message":"For debug, if there are events, we should log them and the deadline.","commit_id":"46806cbe786e06bcdcb25e52c24f65619e045985"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b93b3da11c0264fbd0ea54809a5f4721a8038bf0","unresolved":false,"context_lines":[{"line_number":6092,"context_line":"            migrate_data.migration \u003d migration"},{"line_number":6093,"context_line":"        LOG.debug(\u0027live_migration data is %s\u0027, migrate_data)"},{"line_number":6094,"context_line":""},{"line_number":6095,"context_line":"        events \u003d self._get_neutron_events_for_live_migration("},{"line_number":6096,"context_line":"            migrate_data, instance.get_network_info())"},{"line_number":6097,"context_line":"        try:"},{"line_number":6098,"context_line":"            deadline \u003d CONF.vif_plugging_timeout"}],"source_content_type":"text/x-python","patch_set":1,"id":"bf659307_af27f4c6","line":6095,"in_reply_to":"bf659307_f3fc39b6","updated":"2018-04-04 14:17:10.000000000","message":"Done","commit_id":"46806cbe786e06bcdcb25e52c24f65619e045985"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"d27bd706f929c29fdede6e8474995a167a1445b3","unresolved":false,"context_lines":[{"line_number":6097,"context_line":"        try:"},{"line_number":6098,"context_line":"            deadline \u003d CONF.vif_plugging_timeout"},{"line_number":6099,"context_line":"            error_cb \u003d self._neutron_failed_live_migration_callback"},{"line_number":6100,"context_line":"            # TODO(mriedem): We should probably start waiting before calling"},{"line_number":6101,"context_line":"            # pre_live_migration in case there is a race and the event comes"},{"line_number":6102,"context_line":"            # before we get the pre_live_migration result. Can"},{"line_number":6103,"context_line":"            # wait_for_instance_event be changed to yield the event and then"}],"source_content_type":"text/x-python","patch_set":1,"id":"bf659307_2120d49b","line":6100,"updated":"2018-04-04 17:02:33.000000000","message":"Raising an exception from within the context block should work, then just handle it as a try/except/ignore scenario.","commit_id":"46806cbe786e06bcdcb25e52c24f65619e045985"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"142c3e3b9a88f78c189485f2c04b784164963f61","unresolved":false,"context_lines":[{"line_number":6095,"context_line":"        events \u003d self._get_neutron_events_for_live_migration("},{"line_number":6096,"context_line":"            migrate_data, instance.get_network_info())"},{"line_number":6097,"context_line":"        if events:"},{"line_number":6098,"context_line":"            LOG.debug(\u0027Waiting for neutron events before starting \u0027"},{"line_number":6099,"context_line":"                      \u0027guest live migration: %s\u0027, events, instance\u003dinstance)"},{"line_number":6100,"context_line":"        try:"},{"line_number":6101,"context_line":"            deadline \u003d CONF.vif_plugging_timeout"}],"source_content_type":"text/x-python","patch_set":2,"id":"bf659307_12d63cc5","line":6098,"updated":"2018-04-04 19:39:44.000000000","message":"Looks like this works based on the test patch that enables the flag:\n\nhttp://logs.openstack.org/06/558006/3/check/legacy-tempest-dsvm-multinode-live-migration/d7eb2d4/logs/screen-n-cpu.txt.gz#_Apr_04_18_12_24_369387\n\nApr 04 18:12:24.369387 ubuntu-xenial-rax-iad-0003339484 nova-compute[31326]: DEBUG nova.compute.manager [None req-83226830-ad95-43a7-8898-ff17b5061b9d service nova] [instance: 2189c4ff-daf2-4f50-bcc4-1a4db9ce9a1a] Waiting for neutron events before starting guest live migration: [(\u0027network-vif-plugged\u0027, u\u0027f0b9b161-2ffb-420b-911e-38890f3871f5\u0027)] {{(pid\u003d31326) _do_live_migration /opt/stack/new/nova/nova/compute/manager.py:6102}}\n\nBut is clearly on the wrong place, it should be around pre_live_migration, not self.driver.live_migration because that means we\u0027re waiting for events once self.driver.live_migration completes, which is too late.","commit_id":"831ed671f1429d7be28ee65e8ea9dd438df69c58"},{"author":{"_account_id":10608,"name":"Matthew Edmonds","email":"edmondsw@us.ibm.com","username":"edmondsw"},"change_message_id":"d1e4be2996463d78c484e35ec7c88f178cd7a318","unresolved":false,"context_lines":[{"line_number":6039,"context_line":"        msg \u003d (\u0027Neutron reported failure during live migration \u0027"},{"line_number":6040,"context_line":"               \u0027with %(event)s for instance %(uuid)s\u0027 %"},{"line_number":6041,"context_line":"               {\u0027event\u0027: event_name, \u0027uuid\u0027: instance.uuid})"},{"line_number":6042,"context_line":"        if CONF.vif_plugging_is_fatal:"},{"line_number":6043,"context_line":"            raise exception.VirtualInterfacePlugException(msg)"},{"line_number":6044,"context_line":"        LOG.error(msg)"},{"line_number":6045,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"bf659307_5566b053","line":6042,"updated":"2018-04-06 18:49:08.000000000","message":"The new CONF.compute.live_migration_wait_for_vif_plug value is only supposed to indicate whether we should wait before attempting the migration. Shouldn\u0027t we go ahead and attempt migration regardless of CONF.vif_plugging_is_fatal and let that raise or not raise an error where it would have before?","commit_id":"f19e88644a5823818993e2f352519600c2173807"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"d849bdbe7bef0f845a3dfa67141468fee9c76d5e","unresolved":false,"context_lines":[{"line_number":6039,"context_line":"        msg \u003d (\u0027Neutron reported failure during live migration \u0027"},{"line_number":6040,"context_line":"               \u0027with %(event)s for instance %(uuid)s\u0027 %"},{"line_number":6041,"context_line":"               {\u0027event\u0027: event_name, \u0027uuid\u0027: instance.uuid})"},{"line_number":6042,"context_line":"        if CONF.vif_plugging_is_fatal:"},{"line_number":6043,"context_line":"            raise exception.VirtualInterfacePlugException(msg)"},{"line_number":6044,"context_line":"        LOG.error(msg)"},{"line_number":6045,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"bf659307_961a8b7a","line":6042,"in_reply_to":"bf659307_0f3ec428","updated":"2018-04-12 16:41:07.000000000","message":"I talked with Dan about this and we both agree that if you\u0027re setting the \u0027wait for vif plugged\u0027 option, you want us to actually do that and it should succeed or fail, not move on. The libvirt driver code for slowing down a live migration for linuxbridge plug events will also fail:\n\nhttps://github.com/openstack/nova/blob/2251c6e0c977584ebdc5abc8517b4d696972e47f/nova/virt/libvirt/driver.py#L5560\n\nIn fact, in the libvirt driver it\u0027s not even conditional on CONF.vif_plugging_is_fatal.\n\nSame for timeout:\n\nhttps://github.com/openstack/nova/blob/2251c6e0c977584ebdc5abc8517b4d696972e47f/nova/virt/libvirt/driver.py#L7431","commit_id":"f19e88644a5823818993e2f352519600c2173807"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"af97a3c6f9f2cac33238390a2748d63234090678","unresolved":false,"context_lines":[{"line_number":6039,"context_line":"        msg \u003d (\u0027Neutron reported failure during live migration \u0027"},{"line_number":6040,"context_line":"               \u0027with %(event)s for instance %(uuid)s\u0027 %"},{"line_number":6041,"context_line":"               {\u0027event\u0027: event_name, \u0027uuid\u0027: instance.uuid})"},{"line_number":6042,"context_line":"        if CONF.vif_plugging_is_fatal:"},{"line_number":6043,"context_line":"            raise exception.VirtualInterfacePlugException(msg)"},{"line_number":6044,"context_line":"        LOG.error(msg)"},{"line_number":6045,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"bf659307_bcf4d0d0","line":6042,"in_reply_to":"bf659307_5566b053","updated":"2018-04-07 13:48:17.000000000","message":"I\u0027d like Dan Smith\u0027s opinion on that. To me, if you said yes wait for networking to be hooked up before you start migrating the guest, but that doesn\u0027t happen, I probably want it to fail before I start the guest transfer.","commit_id":"f19e88644a5823818993e2f352519600c2173807"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"314c169cedc9b2888ad21a0bec1f7c4481a0027c","unresolved":false,"context_lines":[{"line_number":6039,"context_line":"        msg \u003d (\u0027Neutron reported failure during live migration \u0027"},{"line_number":6040,"context_line":"               \u0027with %(event)s for instance %(uuid)s\u0027 %"},{"line_number":6041,"context_line":"               {\u0027event\u0027: event_name, \u0027uuid\u0027: instance.uuid})"},{"line_number":6042,"context_line":"        if CONF.vif_plugging_is_fatal:"},{"line_number":6043,"context_line":"            raise exception.VirtualInterfacePlugException(msg)"},{"line_number":6044,"context_line":"        LOG.error(msg)"},{"line_number":6045,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"bf659307_0f3ec428","line":6042,"in_reply_to":"bf659307_bcf4d0d0","updated":"2018-04-09 17:22:19.000000000","message":"I was thinking about this later, and figured that if we don\u0027t fail on timeout, then I\u0027m not sure there is much point in even adding the RPC changes to the LiveMigrateData object, and we could just have the config option be considered global, which would simplify this change, and remove the confusion around the fact the option is read from the dest host but used on the source host.","commit_id":"f19e88644a5823818993e2f352519600c2173807"},{"author":{"_account_id":10608,"name":"Matthew Edmonds","email":"edmondsw@us.ibm.com","username":"edmondsw"},"change_message_id":"d1e4be2996463d78c484e35ec7c88f178cd7a318","unresolved":false,"context_lines":[{"line_number":6041,"context_line":"               {\u0027event\u0027: event_name, \u0027uuid\u0027: instance.uuid})"},{"line_number":6042,"context_line":"        if CONF.vif_plugging_is_fatal:"},{"line_number":6043,"context_line":"            raise exception.VirtualInterfacePlugException(msg)"},{"line_number":6044,"context_line":"        LOG.error(msg)"},{"line_number":6045,"context_line":""},{"line_number":6046,"context_line":"    @staticmethod"},{"line_number":6047,"context_line":"    def _get_neutron_events_for_live_migration(instance):"}],"source_content_type":"text/x-python","patch_set":3,"id":"bf659307_75f2d49c","line":6044,"updated":"2018-04-06 18:49:08.000000000","message":"do we need to return True here so that it will continue waiting for other events?","commit_id":"f19e88644a5823818993e2f352519600c2173807"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"af97a3c6f9f2cac33238390a2748d63234090678","unresolved":false,"context_lines":[{"line_number":6041,"context_line":"               {\u0027event\u0027: event_name, \u0027uuid\u0027: instance.uuid})"},{"line_number":6042,"context_line":"        if CONF.vif_plugging_is_fatal:"},{"line_number":6043,"context_line":"            raise exception.VirtualInterfacePlugException(msg)"},{"line_number":6044,"context_line":"        LOG.error(msg)"},{"line_number":6045,"context_line":""},{"line_number":6046,"context_line":"    @staticmethod"},{"line_number":6047,"context_line":"    def _get_neutron_events_for_live_migration(instance):"}],"source_content_type":"text/x-python","patch_set":3,"id":"bf659307_9cf78cd5","line":6044,"in_reply_to":"bf659307_75f2d49c","updated":"2018-04-07 13:48:17.000000000","message":"The return value on this isn\u0027t checked, it\u0027s just a callback.","commit_id":"f19e88644a5823818993e2f352519600c2173807"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"314c169cedc9b2888ad21a0bec1f7c4481a0027c","unresolved":false,"context_lines":[{"line_number":6041,"context_line":"               {\u0027event\u0027: event_name, \u0027uuid\u0027: instance.uuid})"},{"line_number":6042,"context_line":"        if CONF.vif_plugging_is_fatal:"},{"line_number":6043,"context_line":"            raise exception.VirtualInterfacePlugException(msg)"},{"line_number":6044,"context_line":"        LOG.error(msg)"},{"line_number":6045,"context_line":""},{"line_number":6046,"context_line":"    @staticmethod"},{"line_number":6047,"context_line":"    def _get_neutron_events_for_live_migration(instance):"}],"source_content_type":"text/x-python","patch_set":3,"id":"bf659307_0ff9e47e","line":6044,"in_reply_to":"bf659307_9cf78cd5","updated":"2018-04-09 17:22:19.000000000","message":"I guess you\u0027re right and the return value is checked, but only stops if we explicitly return False:\n\nhttps://github.com/openstack/nova/blob/e2d5dc4e2c5f69fcbcb04c29b2ed469725122787/nova/compute/manager.py#L481\n\nI was just modeling this on how the libvirt driver callback works.","commit_id":"f19e88644a5823818993e2f352519600c2173807"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"41cb56d4e2bf93a355b3316985e264b41496bc74","unresolved":false,"context_lines":[{"line_number":6045,"context_line":""},{"line_number":6046,"context_line":"    @staticmethod"},{"line_number":6047,"context_line":"    def _get_neutron_events_for_live_migration(instance):"},{"line_number":6048,"context_line":"        if CONF.vif_plugging_timeout and utils.is_neutron():"},{"line_number":6049,"context_line":"            # TODO(mriedem): Do we need to filter on active ports at all? They"},{"line_number":6050,"context_line":"            # should all be active right now so it probably doesn\u0027t matter."},{"line_number":6051,"context_line":"            return [(\u0027network-vif-plugged\u0027, vif[\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":3,"id":"bf659307_603d3b2b","line":6048,"range":{"start_line":6048,"start_character":11,"end_line":6048,"end_character":36},"updated":"2018-04-06 14:38:52.000000000","message":"Should this be\n\n CONF.compute.live_migration_wait_for_vif_plug\n\n?\n\n(If so, it means you\u0027re missing a test that has vif_plugging_timeout\u003d\u003d0)","commit_id":"f19e88644a5823818993e2f352519600c2173807"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"b24b1276f226083a91a0d93742291aec4de3d912","unresolved":false,"context_lines":[{"line_number":6045,"context_line":""},{"line_number":6046,"context_line":"    @staticmethod"},{"line_number":6047,"context_line":"    def _get_neutron_events_for_live_migration(instance):"},{"line_number":6048,"context_line":"        if CONF.vif_plugging_timeout and utils.is_neutron():"},{"line_number":6049,"context_line":"            # TODO(mriedem): Do we need to filter on active ports at all? They"},{"line_number":6050,"context_line":"            # should all be active right now so it probably doesn\u0027t matter."},{"line_number":6051,"context_line":"            return [(\u0027network-vif-plugged\u0027, vif[\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":3,"id":"bf659307_4c1391b9","line":6048,"range":{"start_line":6048,"start_character":11,"end_line":6048,"end_character":36},"in_reply_to":"bf659307_2cd09d50","updated":"2018-04-06 16:24:45.000000000","message":"ah, rightright, on the source host, so we don\u0027t yet know whether we\u0027re supposed to be waiting, etc.\n\nSo yeah, a comment explaining that esoterica would be pretty neat.  Including why we\u0027re conditioned on vif_plugging_timeout, which isn\u0027t immediately obvious.","commit_id":"f19e88644a5823818993e2f352519600c2173807"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"00b44d7c8483c51c8d43ac6b07f5a7da7af097cc","unresolved":false,"context_lines":[{"line_number":6045,"context_line":""},{"line_number":6046,"context_line":"    @staticmethod"},{"line_number":6047,"context_line":"    def _get_neutron_events_for_live_migration(instance):"},{"line_number":6048,"context_line":"        if CONF.vif_plugging_timeout and utils.is_neutron():"},{"line_number":6049,"context_line":"            # TODO(mriedem): Do we need to filter on active ports at all? They"},{"line_number":6050,"context_line":"            # should all be active right now so it probably doesn\u0027t matter."},{"line_number":6051,"context_line":"            return [(\u0027network-vif-plugged\u0027, vif[\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":3,"id":"bf659307_3192a958","line":6048,"range":{"start_line":6048,"start_character":11,"end_line":6048,"end_character":36},"in_reply_to":"bf659307_2f188f7f","updated":"2018-04-12 16:58:47.000000000","message":"Done","commit_id":"f19e88644a5823818993e2f352519600c2173807"},{"author":{"_account_id":10608,"name":"Matthew Edmonds","email":"edmondsw@us.ibm.com","username":"edmondsw"},"change_message_id":"d1e4be2996463d78c484e35ec7c88f178cd7a318","unresolved":false,"context_lines":[{"line_number":6045,"context_line":""},{"line_number":6046,"context_line":"    @staticmethod"},{"line_number":6047,"context_line":"    def _get_neutron_events_for_live_migration(instance):"},{"line_number":6048,"context_line":"        if CONF.vif_plugging_timeout and utils.is_neutron():"},{"line_number":6049,"context_line":"            # TODO(mriedem): Do we need to filter on active ports at all? They"},{"line_number":6050,"context_line":"            # should all be active right now so it probably doesn\u0027t matter."},{"line_number":6051,"context_line":"            return [(\u0027network-vif-plugged\u0027, vif[\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":3,"id":"bf659307_2f188f7f","line":6048,"range":{"start_line":6048,"start_character":11,"end_line":6048,"end_character":36},"in_reply_to":"bf659307_4c1391b9","updated":"2018-04-06 18:49:08.000000000","message":"Something like https://github.com/openstack/nova/blob/dc9a4bba281b5a70f7e69cf6b57f2dfbffd2c2b3/nova/virt/libvirt/driver.py#L7389-L7390","commit_id":"f19e88644a5823818993e2f352519600c2173807"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"275241be489feec21d6d69de51290d98f4df2195","unresolved":false,"context_lines":[{"line_number":6045,"context_line":""},{"line_number":6046,"context_line":"    @staticmethod"},{"line_number":6047,"context_line":"    def _get_neutron_events_for_live_migration(instance):"},{"line_number":6048,"context_line":"        if CONF.vif_plugging_timeout and utils.is_neutron():"},{"line_number":6049,"context_line":"            # TODO(mriedem): Do we need to filter on active ports at all? They"},{"line_number":6050,"context_line":"            # should all be active right now so it probably doesn\u0027t matter."},{"line_number":6051,"context_line":"            return [(\u0027network-vif-plugged\u0027, vif[\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":3,"id":"bf659307_2cd09d50","line":6048,"range":{"start_line":6048,"start_character":11,"end_line":6048,"end_character":36},"in_reply_to":"bf659307_603d3b2b","updated":"2018-04-06 16:12:41.000000000","message":"No, at this point we\u0027re on the source compute host and we\u0027re building a list of events to wait on, provided the dest compute host says we should wait for those events, and the dest compute host is what reads CONF.compute.live_migration_wait_for_vif_plug and sends it back (pre_live_migration runs on the dest host, and is RPC called from the source host).","commit_id":"f19e88644a5823818993e2f352519600c2173807"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"41cb56d4e2bf93a355b3316985e264b41496bc74","unresolved":false,"context_lines":[{"line_number":6079,"context_line":"        self._rollback_live_migration(context, instance, dest,"},{"line_number":6080,"context_line":"                                      migrate_data)"},{"line_number":6081,"context_line":""},{"line_number":6082,"context_line":"    def _do_live_migration(self, context, dest, instance, block_migration,"},{"line_number":6083,"context_line":"                           migration, migrate_data):"},{"line_number":6084,"context_line":"        # NOTE(danms): We should enhance the RT to account for migrations"},{"line_number":6085,"context_line":"        # and use the status field to denote when the accounting has been"}],"source_content_type":"text/x-python","patch_set":3,"id":"bf659307_c08687dc","line":6082,"range":{"start_line":6082,"start_character":8,"end_line":6082,"end_character":26},"updated":"2018-04-06 14:38:52.000000000","message":"This runs on the source, yah?  A comment/docstring to that effect wouldn\u0027t go amiss (not related to this patch).","commit_id":"f19e88644a5823818993e2f352519600c2173807"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"275241be489feec21d6d69de51290d98f4df2195","unresolved":false,"context_lines":[{"line_number":6079,"context_line":"        self._rollback_live_migration(context, instance, dest,"},{"line_number":6080,"context_line":"                                      migrate_data)"},{"line_number":6081,"context_line":""},{"line_number":6082,"context_line":"    def _do_live_migration(self, context, dest, instance, block_migration,"},{"line_number":6083,"context_line":"                           migration, migrate_data):"},{"line_number":6084,"context_line":"        # NOTE(danms): We should enhance the RT to account for migrations"},{"line_number":6085,"context_line":"        # and use the status field to denote when the accounting has been"}],"source_content_type":"text/x-python","patch_set":3,"id":"bf659307_ac690d8c","line":6082,"range":{"start_line":6082,"start_character":8,"end_line":6082,"end_character":26},"in_reply_to":"bf659307_c08687dc","updated":"2018-04-06 16:12:41.000000000","message":"Yeah. The way I\u0027ve remembered this over time is the methods with a \u0027dest\u0027 parameter mean they are running on the source host, but agree it\u0027s confusing, and also why I still owe you a shiny nickel for:\n\nhttps://docs.openstack.org/nova/latest/reference/live-migration.html\n\nI did a similar doc effort for cold migration, and really should do similar for live migration:\n\nI4f0c99bb11d921d2875737c5cfbbb866be55c37c","commit_id":"f19e88644a5823818993e2f352519600c2173807"},{"author":{"_account_id":10608,"name":"Matthew Edmonds","email":"edmondsw@us.ibm.com","username":"edmondsw"},"change_message_id":"d1e4be2996463d78c484e35ec7c88f178cd7a318","unresolved":false,"context_lines":[{"line_number":6101,"context_line":"            else:"},{"line_number":6102,"context_line":"                disk \u003d None"},{"line_number":6103,"context_line":""},{"line_number":6104,"context_line":"            deadline \u003d CONF.vif_plugging_timeout"},{"line_number":6105,"context_line":"            error_cb \u003d self._neutron_failed_live_migration_callback"},{"line_number":6106,"context_line":"            # In order to avoid a race with the vif plugging that the virt"},{"line_number":6107,"context_line":"            # driver does on the destination host, we register our events"}],"source_content_type":"text/x-python","patch_set":3,"id":"bf659307_3a4beb87","line":6104,"updated":"2018-04-06 18:49:08.000000000","message":"it will be possible for vif_plugging_timeout to be reached by the wait here even if it was not reached by the driver on the destination host (the place this CONF value was used prior to this change) because we\u0027re starting the wait earlier. Seems like we need a separate CONF value for this, or add some buffer to the value, or something to account for the fact that this is a larger time window.","commit_id":"f19e88644a5823818993e2f352519600c2173807"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"af97a3c6f9f2cac33238390a2748d63234090678","unresolved":false,"context_lines":[{"line_number":6101,"context_line":"            else:"},{"line_number":6102,"context_line":"                disk \u003d None"},{"line_number":6103,"context_line":""},{"line_number":6104,"context_line":"            deadline \u003d CONF.vif_plugging_timeout"},{"line_number":6105,"context_line":"            error_cb \u003d self._neutron_failed_live_migration_callback"},{"line_number":6106,"context_line":"            # In order to avoid a race with the vif plugging that the virt"},{"line_number":6107,"context_line":"            # driver does on the destination host, we register our events"}],"source_content_type":"text/x-python","patch_set":3,"id":"bf659307_1c2dbc45","line":6104,"in_reply_to":"bf659307_3a4beb87","updated":"2018-04-07 13:48:17.000000000","message":"\u003e even if it was not reached by the driver on the destination host (the place this CONF value was used prior to this change) \n\nI\u0027m not following you there, the driver pre_live_migration call on the dest host isn\u0027t waiting for vif plugged events, that\u0027s why we\u0027re adding it here.\n\nI get the buffer argument, but not sure if it\u0027s going to be that much of an issue that would warrant yet another timeout option.","commit_id":"f19e88644a5823818993e2f352519600c2173807"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"41cb56d4e2bf93a355b3316985e264b41496bc74","unresolved":false,"context_lines":[{"line_number":6103,"context_line":""},{"line_number":6104,"context_line":"            deadline \u003d CONF.vif_plugging_timeout"},{"line_number":6105,"context_line":"            error_cb \u003d self._neutron_failed_live_migration_callback"},{"line_number":6106,"context_line":"            # In order to avoid a race with the vif plugging that the virt"},{"line_number":6107,"context_line":"            # driver does on the destination host, we register our events"},{"line_number":6108,"context_line":"            # to wait for before calling pre_live_migration. Then if the"},{"line_number":6109,"context_line":"            # dest host reports back that we shouldn\u0027t wait, we can break"},{"line_number":6110,"context_line":"            # out of the context manager using _BreakWaitForInstanceEvent."},{"line_number":6111,"context_line":"            with self.virtapi.wait_for_instance_event("},{"line_number":6112,"context_line":"                    instance, events, deadline\u003ddeadline,"},{"line_number":6113,"context_line":"                    error_callback\u003derror_cb):"}],"source_content_type":"text/x-python","patch_set":3,"id":"bf659307_c05f6770","line":6110,"range":{"start_line":6106,"start_character":0,"end_line":6110,"end_character":74},"updated":"2018-04-06 14:38:52.000000000","message":"Uck... but neat.","commit_id":"f19e88644a5823818993e2f352519600c2173807"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"981abec24cfc538245ec4f89fff1e8edc349e6f9","unresolved":false,"context_lines":[{"line_number":6108,"context_line":"            # to wait for before calling pre_live_migration. Then if the"},{"line_number":6109,"context_line":"            # dest host reports back that we shouldn\u0027t wait, we can break"},{"line_number":6110,"context_line":"            # out of the context manager using _BreakWaitForInstanceEvent."},{"line_number":6111,"context_line":"            with self.virtapi.wait_for_instance_event("},{"line_number":6112,"context_line":"                    instance, events, deadline\u003ddeadline,"},{"line_number":6113,"context_line":"                    error_callback\u003derror_cb):"},{"line_number":6114,"context_line":"                migrate_data \u003d self.compute_rpcapi.pre_live_migration("}],"source_content_type":"text/x-python","patch_set":3,"id":"bf659307_43be0c00","line":6111,"updated":"2018-04-06 02:13:51.000000000","message":"From a run that is using this, this is when we start waiting for the network-vif-plugged event:\n\nhttp://logs.openstack.org/06/558006/4/check/legacy-tempest-dsvm-multinode-live-migration/92c72ec/logs/screen-n-cpu.txt.gz#_Apr_05_21_45_35_897783\n\nApr 05 21:45:35.897783 ubuntu-xenial-inap-mtl01-0003361680 nova-compute[31096]: DEBUG nova.compute.manager [None req-2d5502bc-6a29-416a-b4fe-2d98400c837e tempest-LiveMigrationRemoteConsolesV26Test-26915431 tempest-LiveMigrationRemoteConsolesV26Test-26915431] [instance: 53b5cf49-ee8e-4ce4-bdca-fd24377c4150] Preparing to wait for external event network-vif-plugged-d727affb-ca36-4386-99ac-1323efbdc9f9 {{(pid\u003d31096) prepare_for_instance_event /opt/stack/new/nova/nova/compute/manager.py:326}}\n\n5 seconds later we get the event:\n\nhttp://logs.openstack.org/06/558006/4/check/legacy-tempest-dsvm-multinode-live-migration/92c72ec/logs/screen-n-cpu.txt.gz#_Apr_05_21_45_40_565363\n\nApr 05 21:45:40.565363 ubuntu-xenial-inap-mtl01-0003361680 nova-compute[31096]: DEBUG nova.compute.manager [None req-a7876ad0-8c8e-423f-914a-d8cf860c2d8f service nova] [instance: 53b5cf49-ee8e-4ce4-bdca-fd24377c4150] Received event network-vif-plugged-d727affb-ca36-4386-99ac-1323efbdc9f9 {{(pid\u003d31096) external_instance_event /opt/stack/new/nova/nova/compute/manager.py:7743}}\n\nIt looks like we\u0027re also getting an unexpected network-vif-unplugged event, I\u0027m not sure what that is about:\n\nApr 05 21:45:39.936710 ubuntu-xenial-inap-mtl01-0003361680 nova-compute[31096]: WARNING nova.compute.manager [None req-18c9e744-b8a7-4ae4-ad23-f21929e2932d service nova] [instance: 53b5cf49-ee8e-4ce4-bdca-fd24377c4150] Received unexpected event network-vif-unplugged-d727affb-ca36-4386-99ac-1323efbdc9f9 for instance with vm_state active and task_state migrating.","commit_id":"f19e88644a5823818993e2f352519600c2173807"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"322da2e0c744bad6c30eb45508e62de23a899f7b","unresolved":false,"context_lines":[{"line_number":6108,"context_line":"            # to wait for before calling pre_live_migration. Then if the"},{"line_number":6109,"context_line":"            # dest host reports back that we shouldn\u0027t wait, we can break"},{"line_number":6110,"context_line":"            # out of the context manager using _BreakWaitForInstanceEvent."},{"line_number":6111,"context_line":"            with self.virtapi.wait_for_instance_event("},{"line_number":6112,"context_line":"                    instance, events, deadline\u003ddeadline,"},{"line_number":6113,"context_line":"                    error_callback\u003derror_cb):"},{"line_number":6114,"context_line":"                migrate_data \u003d self.compute_rpcapi.pre_live_migration("}],"source_content_type":"text/x-python","patch_set":3,"id":"bf659307_a3dcac18","line":6111,"in_reply_to":"bf659307_43be0c00","updated":"2018-04-08 07:19:07.000000000","message":"Hmm, did some reading on this, but no luck :(","commit_id":"f19e88644a5823818993e2f352519600c2173807"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"91be945b7730aa71918220c58a19bf5f2f90364c","unresolved":false,"context_lines":[{"line_number":6121,"context_line":"                    raise _BreakWaitForInstanceEvent"},{"line_number":6122,"context_line":"        except _BreakWaitForInstanceEvent:"},{"line_number":6123,"context_line":"            if events:"},{"line_number":6124,"context_line":"                LOG.debug(\u0027Not waiting for events after pre_live_migration: \u0027"},{"line_number":6125,"context_line":"                          \u0027%s. \u0027, events, instance\u003dinstance)"},{"line_number":6126,"context_line":"        except exception.VirtualInterfacePlugException:"},{"line_number":6127,"context_line":"            with excutils.save_and_reraise_exception():"}],"source_content_type":"text/x-python","patch_set":3,"id":"bf659307_2393d851","line":6124,"updated":"2018-04-06 02:20:34.000000000","message":"Here is an example where we aren\u0027t waiting for network-vif-plugged and exit the wait context.\n\nWe\u0027re registering the events here:\n\nhttp://logs.openstack.org/01/558001/3/check/legacy-tempest-dsvm-multinode-live-migration/0b04b83/logs/screen-n-cpu.txt.gz#_Apr_05_21_50_54_689995\n\nAnd here we log that we\u0027re not going to wait for it:\n\nhttp://logs.openstack.org/01/558001/3/check/legacy-tempest-dsvm-multinode-live-migration/0b04b83/logs/screen-n-cpu.txt.gz#_Apr_05_21_50_58_043528\n\nAnd here we get the warning that we got the event but nothing was waiting for it:\n\nhttp://logs.openstack.org/01/558001/3/check/legacy-tempest-dsvm-multinode-live-migration/0b04b83/logs/screen-n-cpu.txt.gz#_Apr_05_21_50_59_399659","commit_id":"f19e88644a5823818993e2f352519600c2173807"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"53b125876c6254ec1bbd1f06013c2a5b29cc0c63","unresolved":false,"context_lines":[{"line_number":6114,"context_line":"                migrate_data \u003d self.compute_rpcapi.pre_live_migration("},{"line_number":6115,"context_line":"                    context, instance,"},{"line_number":6116,"context_line":"                    block_migration, disk, dest, migrate_data)"},{"line_number":6117,"context_line":"                wait_for_vif_plugged \u003d ("},{"line_number":6118,"context_line":"                    \u0027wait_for_vif_plugged\u0027 in migrate_data and"},{"line_number":6119,"context_line":"                    migrate_data.wait_for_vif_plugged or False)"},{"line_number":6120,"context_line":"                if events and not wait_for_vif_plugged:"},{"line_number":6121,"context_line":"                    raise _BreakWaitForInstanceEvent"},{"line_number":6122,"context_line":"        except _BreakWaitForInstanceEvent:"},{"line_number":6123,"context_line":"            if events:"},{"line_number":6124,"context_line":"                LOG.debug(\u0027Not waiting for events after pre_live_migration: \u0027"},{"line_number":6125,"context_line":"                          \u0027%s. \u0027, events, instance\u003dinstance)"},{"line_number":6126,"context_line":"        except exception.VirtualInterfacePlugException:"},{"line_number":6127,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":6128,"context_line":"                LOG.exception(\u0027Failed waiting for network virtual interfaces \u0027"}],"source_content_type":"text/x-python","patch_set":3,"id":"bf659307_e3ef04e7","line":6125,"range":{"start_line":6117,"start_character":0,"end_line":6125,"end_character":60},"updated":"2018-04-08 07:04:27.000000000","message":"hmm, interesting implementation","commit_id":"f19e88644a5823818993e2f352519600c2173807"},{"author":{"_account_id":10608,"name":"Matthew Edmonds","email":"edmondsw@us.ibm.com","username":"edmondsw"},"change_message_id":"d1e4be2996463d78c484e35ec7c88f178cd7a318","unresolved":false,"context_lines":[{"line_number":6133,"context_line":"        except eventlet.timeout.Timeout:"},{"line_number":6134,"context_line":"            msg \u003d _(\u0027Timed out waiting for events: %s\u0027) % events"},{"line_number":6135,"context_line":"            LOG.warning(msg, instance\u003dinstance)"},{"line_number":6136,"context_line":"            if CONF.vif_plugging_is_fatal:"},{"line_number":6137,"context_line":"                self._cleanup_pre_live_migration("},{"line_number":6138,"context_line":"                    context, dest, instance, migration, migrate_data)"},{"line_number":6139,"context_line":"                raise exception.MigrationError(reason\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":3,"id":"bf659307_15603832","line":6136,"updated":"2018-04-06 18:49:08.000000000","message":"as commented above, I\u0027m not sure we should be checking CONF.vif_plugging_is_fatal in this new logic. Why isn\u0027t the old logic sufficient for that?","commit_id":"f19e88644a5823818993e2f352519600c2173807"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"af97a3c6f9f2cac33238390a2748d63234090678","unresolved":false,"context_lines":[{"line_number":6133,"context_line":"        except eventlet.timeout.Timeout:"},{"line_number":6134,"context_line":"            msg \u003d _(\u0027Timed out waiting for events: %s\u0027) % events"},{"line_number":6135,"context_line":"            LOG.warning(msg, instance\u003dinstance)"},{"line_number":6136,"context_line":"            if CONF.vif_plugging_is_fatal:"},{"line_number":6137,"context_line":"                self._cleanup_pre_live_migration("},{"line_number":6138,"context_line":"                    context, dest, instance, migration, migrate_data)"},{"line_number":6139,"context_line":"                raise exception.MigrationError(reason\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":3,"id":"bf659307_fc2b282d","line":6136,"in_reply_to":"bf659307_15603832","updated":"2018-04-07 13:48:17.000000000","message":"\u003e Why isn\u0027t the old logic sufficient for that?\n\nWhat is the old logic that you\u0027re referring to? That we didn\u0027t check at all and just hoped to get lucky and have everything wired up by the time we completed the guest transfer?","commit_id":"f19e88644a5823818993e2f352519600c2173807"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"d849bdbe7bef0f845a3dfa67141468fee9c76d5e","unresolved":false,"context_lines":[{"line_number":6133,"context_line":"        except eventlet.timeout.Timeout:"},{"line_number":6134,"context_line":"            msg \u003d _(\u0027Timed out waiting for events: %s\u0027) % events"},{"line_number":6135,"context_line":"            LOG.warning(msg, instance\u003dinstance)"},{"line_number":6136,"context_line":"            if CONF.vif_plugging_is_fatal:"},{"line_number":6137,"context_line":"                self._cleanup_pre_live_migration("},{"line_number":6138,"context_line":"                    context, dest, instance, migration, migrate_data)"},{"line_number":6139,"context_line":"                raise exception.MigrationError(reason\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":3,"id":"bf659307_d131edee","line":6136,"in_reply_to":"bf659307_fc2b282d","updated":"2018-04-12 16:41:07.000000000","message":"Per above, if the admin tell us to wait and we timeout, it should be a failure if CONF.vif_plugging_is_fatal.","commit_id":"f19e88644a5823818993e2f352519600c2173807"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"981abec24cfc538245ec4f89fff1e8edc349e6f9","unresolved":false,"context_lines":[{"line_number":6148,"context_line":""},{"line_number":6149,"context_line":"        if migrate_data:"},{"line_number":6150,"context_line":"            migrate_data.migration \u003d migration"},{"line_number":6151,"context_line":"        LOG.debug(\u0027live_migration data is %s\u0027, migrate_data)"},{"line_number":6152,"context_line":"        try:"},{"line_number":6153,"context_line":"            self.driver.live_migration(context, instance, dest,"},{"line_number":6154,"context_line":"                                       self._post_live_migration,"}],"source_content_type":"text/x-python","patch_set":3,"id":"bf659307_63e23032","line":6151,"updated":"2018-04-06 02:13:51.000000000","message":"Here is an example run with wait_for_vif_plugged\u003dTrue:\n\nhttp://logs.openstack.org/06/558006/4/check/legacy-tempest-dsvm-multinode-live-migration/92c72ec/logs/screen-n-cpu.txt.gz#_Apr_05_21_45_40_586702\n\nApr 05 21:45:40.586702 ubuntu-xenial-inap-mtl01-0003361680 nova-compute[31096]: DEBUG nova.compute.manager [None req-a7876ad0-8c8e-423f-914a-d8cf860c2d8f service nova] live_migration data is LibvirtLiveMigrateData(bdms\u003d[],block_migration\u003dTrue,disk_available_mb\u003d126976,disk_over_commit\u003dFalse,filename\u003d\u0027tmphVBxW6\u0027,graphics_listen_addr_spice\u003d127.0.0.1,graphics_listen_addr_vnc\u003d127.0.0.1,image_type\u003d\u0027default\u0027,instance_relative_path\u003d\u002753b5cf49-ee8e-4ce4-bdca-fd24377c4150\u0027,is_shared_block_storage\u003dFalse,is_shared_instance_path\u003dFalse,is_volume_backed\u003dFalse,migration\u003dMigration(d26498d9-6cfc-483a-82de-6e47a35917b6),old_vol_attachment_ids\u003d{},serial_listen_addr\u003dNone,serial_listen_ports\u003d[],src_supports_native_luks\u003dTrue,supported_perf_events\u003d[],target_connect_addr\u003dNone,wait_for_vif_plugged\u003dTrue) {{(pid\u003d31096) _do_live_migration /opt/stack/new/nova/nova/compute/manager.py:6157}}","commit_id":"f19e88644a5823818993e2f352519600c2173807"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"88970cb19fa3c2b7f3864c78326ba0de8a0a3af5","unresolved":false,"context_lines":[{"line_number":6120,"context_line":"                    migrate_data.wait_for_vif_plugged or False)"},{"line_number":6121,"context_line":"                if events and not wait_for_vif_plugged:"},{"line_number":6122,"context_line":"                    raise _BreakWaitForInstanceEvent"},{"line_number":6123,"context_line":"        except _BreakWaitForInstanceEvent:"},{"line_number":6124,"context_line":"            if events:"},{"line_number":6125,"context_line":"                LOG.debug(\u0027Not waiting for events after pre_live_migration: \u0027"},{"line_number":6126,"context_line":"                          \u0027%s. \u0027, events, instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":4,"id":"9f6a8fd7_242d76a7","line":6123,"range":{"start_line":6123,"start_character":15,"end_line":6123,"end_character":41},"updated":"2018-04-24 14:57:26.000000000","message":"Seeing something kind of strange in a later change at the top of this series.\n\nThose logs are from the source node and see we that we\u0027re not waiting for events:\n\nhttp://logs.openstack.org/37/522537/21/check/legacy-tempest-dsvm-multinode-live-migration/f6c4d07/logs/subnode-2/screen-n-cpu.txt.gz#_Apr_12_19_40_39_389949\n\nThen we start the live migration which fails because it can\u0027t connect to the destination host (for whatever reason). The weird thing is _BreakWaitForInstanceEvent shows up in the error message:\n\nhttp://logs.openstack.org/37/522537/21/check/legacy-tempest-dsvm-multinode-live-migration/f6c4d07/logs/subnode-2/screen-n-cpu.txt.gz#_Apr_12_19_40_39_983892\n\nBut that\u0027s coming from the virt driver, and doesn\u0027t even include the error:\n\nhttps://github.com/openstack/nova/blob/95d4d471b90f2e05a32a50ebe5ba8c20c7ed49d4/nova/virt/libvirt/driver.py#L7302\n\nI wonder if there is something in oslo.log that has the previous error traceback cached?","commit_id":"7ff7087b692339bcb6fdf27f880fd5ddd5fa6331"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"13cc2cfdc7399eb9bf9f0d350f4d24fa481839f7","unresolved":false,"context_lines":[{"line_number":6120,"context_line":"                    migrate_data.wait_for_vif_plugged or False)"},{"line_number":6121,"context_line":"                if events and not wait_for_vif_plugged:"},{"line_number":6122,"context_line":"                    raise _BreakWaitForInstanceEvent"},{"line_number":6123,"context_line":"        except _BreakWaitForInstanceEvent:"},{"line_number":6124,"context_line":"            if events:"},{"line_number":6125,"context_line":"                LOG.debug(\u0027Not waiting for events after pre_live_migration: \u0027"},{"line_number":6126,"context_line":"                          \u0027%s. \u0027, events, instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":4,"id":"9f6a8fd7_c75b5cf3","line":6123,"range":{"start_line":6123,"start_character":15,"end_line":6123,"end_character":41},"in_reply_to":"9f6a8fd7_242d76a7","updated":"2018-04-24 15:08:41.000000000","message":"OK it\u0027s an oslo.log-ism. The virt driver error log is somehow picking up the exception from here and including it in the message, maybe because they are in the same thread?\n\nhttp://git.openstack.org/cgit/openstack/oslo.log/tree/oslo_log/formatters.py#n127\n\nhttp://git.openstack.org/cgit/openstack/oslo.log/tree/oslo_log/formatters.py#n480\n\nLooks like I need to call sys.exc_clear() here.","commit_id":"7ff7087b692339bcb6fdf27f880fd5ddd5fa6331"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"e13f966598146382de161b6f90b764434c1b4b81","unresolved":false,"context_lines":[{"line_number":6107,"context_line":"            # This is a bit weird, but we need to clear sys.exc_info() so that"},{"line_number":6108,"context_line":"            # oslo.log formatting does not inadvertently use it later if an"},{"line_number":6109,"context_line":"            # error message is logged without an explicit exc_info."},{"line_number":6110,"context_line":"            sys.exc_clear()"},{"line_number":6111,"context_line":"        except exception.VirtualInterfacePlugException:"},{"line_number":6112,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":6113,"context_line":"                LOG.exception(\u0027Failed waiting for network virtual interfaces \u0027"}],"source_content_type":"text/x-python","patch_set":5,"id":"9f6a8fd7_e805f614","line":6110,"updated":"2018-04-25 15:32:11.000000000","message":"Apparently this doesn\u0027t exist in python 3 so I need a conditional around this.","commit_id":"c57d196361ea0c6d4d95cd159becff6beb082b75"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"d04298a707a4b7f5d33fde1d0489c25131d39abd","unresolved":false,"context_lines":[{"line_number":6024,"context_line":"                                       disk,"},{"line_number":6025,"context_line":"                                       migrate_data)"},{"line_number":6026,"context_line":"        LOG.debug(\u0027driver pre_live_migration data is %s\u0027, migrate_data)"},{"line_number":6027,"context_line":"        # driver.pre_live_migration is what plugs vifs on the destination host"},{"line_number":6028,"context_line":"        # so now we can set the wait_for_vif_plugged flag in the migrate_data"},{"line_number":6029,"context_line":"        # object which the source compute will use to determine if it should"},{"line_number":6030,"context_line":"        # wait for a \u0027network-vif-plugged\u0027 event from neutron before starting"}],"source_content_type":"text/x-python","patch_set":8,"id":"5f7c97a3_2ad1becc","line":6027,"range":{"start_line":6027,"start_character":10,"end_line":6027,"end_character":78},"updated":"2018-06-12 20:36:18.000000000","message":"Doesn\u0027t this mean that, by the time the source receives the migrate_data, it may have missed the event?\n\n[Later] Oh, it started waiting for the event before we got here.  That would be worth mentioning in this comment (I see it\u0027s discussed below).","commit_id":"13fd0d0eeb3966ee45b78d46c41d1372d6e72704"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"d04298a707a4b7f5d33fde1d0489c25131d39abd","unresolved":false,"context_lines":[{"line_number":6026,"context_line":"        LOG.debug(\u0027driver pre_live_migration data is %s\u0027, migrate_data)"},{"line_number":6027,"context_line":"        # driver.pre_live_migration is what plugs vifs on the destination host"},{"line_number":6028,"context_line":"        # so now we can set the wait_for_vif_plugged flag in the migrate_data"},{"line_number":6029,"context_line":"        # object which the source compute will use to determine if it should"},{"line_number":6030,"context_line":"        # wait for a \u0027network-vif-plugged\u0027 event from neutron before starting"},{"line_number":6031,"context_line":"        # the actual guest transfer in the hypervisor"},{"line_number":6032,"context_line":"        migrate_data.wait_for_vif_plugged \u003d ("},{"line_number":6033,"context_line":"            CONF.compute.live_migration_wait_for_vif_plug)"}],"source_content_type":"text/x-python","patch_set":8,"id":"5f7c97a3_8a8fb2cb","line":6030,"range":{"start_line":6029,"start_character":54,"end_line":6030,"end_character":14},"updated":"2018-06-12 20:36:18.000000000","message":"so like, \"determine if it should continue waiting,\" plus explanation of why it was waiting in the first place if it didn\u0027t know whether live_migration_wait_for_vif_plug was set.","commit_id":"13fd0d0eeb3966ee45b78d46c41d1372d6e72704"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"d04298a707a4b7f5d33fde1d0489c25131d39abd","unresolved":false,"context_lines":[{"line_number":6070,"context_line":"               {\u0027event\u0027: event_name, \u0027uuid\u0027: instance.uuid})"},{"line_number":6071,"context_line":"        if CONF.vif_plugging_is_fatal:"},{"line_number":6072,"context_line":"            raise exception.VirtualInterfacePlugException(msg)"},{"line_number":6073,"context_line":"        LOG.error(msg)"},{"line_number":6074,"context_line":""},{"line_number":6075,"context_line":"    @staticmethod"},{"line_number":6076,"context_line":"    def _get_neutron_events_for_live_migration(instance):"}],"source_content_type":"text/x-python","patch_set":8,"id":"5f7c97a3_c5135d5b","line":6073,"range":{"start_line":6073,"start_character":18,"end_line":6073,"end_character":21},"updated":"2018-06-12 20:36:18.000000000","message":"Be nice if we could use instance\u003dinstance here, but then we would lose it from the exception message (unless we duplicated stuff, which is sad-making).\n\nBut we should be deferring interpolation in the log message, like:\n\n msg \u003d \"blah %(blah)s\"\n msg_args \u003d {\u0027blah\u0027: foo}\n if fatal:\n     raise exception.VirtualInterfacePlugException(msg % msg_args)\n LOG.error(msg, **msg_args)","commit_id":"13fd0d0eeb3966ee45b78d46c41d1372d6e72704"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"36039773ecff73d497f2e02b310093808b9e9c34","unresolved":false,"context_lines":[{"line_number":6070,"context_line":"               {\u0027event\u0027: event_name, \u0027uuid\u0027: instance.uuid})"},{"line_number":6071,"context_line":"        if CONF.vif_plugging_is_fatal:"},{"line_number":6072,"context_line":"            raise exception.VirtualInterfacePlugException(msg)"},{"line_number":6073,"context_line":"        LOG.error(msg)"},{"line_number":6074,"context_line":""},{"line_number":6075,"context_line":"    @staticmethod"},{"line_number":6076,"context_line":"    def _get_neutron_events_for_live_migration(instance):"}],"source_content_type":"text/x-python","patch_set":8,"id":"5f7c97a3_0c4107a7","line":6073,"range":{"start_line":6073,"start_character":18,"end_line":6073,"end_character":21},"in_reply_to":"5f7c97a3_c5135d5b","updated":"2018-06-18 21:21:56.000000000","message":"Done","commit_id":"13fd0d0eeb3966ee45b78d46c41d1372d6e72704"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"d04298a707a4b7f5d33fde1d0489c25131d39abd","unresolved":false,"context_lines":[{"line_number":6116,"context_line":"        # reporting"},{"line_number":6117,"context_line":"        self._set_migration_status(migration, \u0027preparing\u0027)"},{"line_number":6118,"context_line":""},{"line_number":6119,"context_line":"        class _BreakWaitForInstanceEvent(Exception):"},{"line_number":6120,"context_line":"            pass"},{"line_number":6121,"context_line":""},{"line_number":6122,"context_line":"        events \u003d self._get_neutron_events_for_live_migration(instance)"}],"source_content_type":"text/x-python","patch_set":8,"id":"5f7c97a3_856005d1","line":6119,"range":{"start_line":6119,"start_character":8,"end_line":6119,"end_character":52},"updated":"2018-06-12 20:36:18.000000000","message":"\"\"\"Used as a signal to stop waiting for the network-vif-plugged event when we discover that [compute]live_migration_wait_for_vif_plug is not set on the destination.\"\"\"","commit_id":"13fd0d0eeb3966ee45b78d46c41d1372d6e72704"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"36039773ecff73d497f2e02b310093808b9e9c34","unresolved":false,"context_lines":[{"line_number":6116,"context_line":"        # reporting"},{"line_number":6117,"context_line":"        self._set_migration_status(migration, \u0027preparing\u0027)"},{"line_number":6118,"context_line":""},{"line_number":6119,"context_line":"        class _BreakWaitForInstanceEvent(Exception):"},{"line_number":6120,"context_line":"            pass"},{"line_number":6121,"context_line":""},{"line_number":6122,"context_line":"        events \u003d self._get_neutron_events_for_live_migration(instance)"}],"source_content_type":"text/x-python","patch_set":8,"id":"5f7c97a3_ac11f3b1","line":6119,"range":{"start_line":6119,"start_character":8,"end_line":6119,"end_character":52},"in_reply_to":"5f7c97a3_856005d1","updated":"2018-06-18 21:21:56.000000000","message":"Done","commit_id":"13fd0d0eeb3966ee45b78d46c41d1372d6e72704"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"d04298a707a4b7f5d33fde1d0489c25131d39abd","unresolved":false,"context_lines":[{"line_number":6145,"context_line":"                    block_migration, disk, dest, migrate_data)"},{"line_number":6146,"context_line":"                wait_for_vif_plugged \u003d ("},{"line_number":6147,"context_line":"                    \u0027wait_for_vif_plugged\u0027 in migrate_data and"},{"line_number":6148,"context_line":"                    migrate_data.wait_for_vif_plugged or False)"},{"line_number":6149,"context_line":"                if events and not wait_for_vif_plugged:"},{"line_number":6150,"context_line":"                    raise _BreakWaitForInstanceEvent"},{"line_number":6151,"context_line":"        except _BreakWaitForInstanceEvent:"}],"source_content_type":"text/x-python","patch_set":8,"id":"5f7c97a3_2557b103","line":6148,"range":{"start_line":6148,"start_character":53,"end_line":6148,"end_character":62},"updated":"2018-06-12 20:36:18.000000000","message":"why is this necessary?","commit_id":"13fd0d0eeb3966ee45b78d46c41d1372d6e72704"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"d27516b35227eb349895de7c4ea5ca36ff4cfdb0","unresolved":false,"context_lines":[{"line_number":6145,"context_line":"                    block_migration, disk, dest, migrate_data)"},{"line_number":6146,"context_line":"                wait_for_vif_plugged \u003d ("},{"line_number":6147,"context_line":"                    \u0027wait_for_vif_plugged\u0027 in migrate_data and"},{"line_number":6148,"context_line":"                    migrate_data.wait_for_vif_plugged or False)"},{"line_number":6149,"context_line":"                if events and not wait_for_vif_plugged:"},{"line_number":6150,"context_line":"                    raise _BreakWaitForInstanceEvent"},{"line_number":6151,"context_line":"        except _BreakWaitForInstanceEvent:"}],"source_content_type":"text/x-python","patch_set":8,"id":"5f7c97a3_de2b2be8","line":6148,"range":{"start_line":6148,"start_character":53,"end_line":6148,"end_character":62},"in_reply_to":"5f7c97a3_2557b103","updated":"2018-06-12 23:37:16.000000000","message":"If \u0027wait_for_vif_plugged\u0027 isn\u0027t in migrate_data, in case we\u0027re talking to an older dest compute that doesn\u0027t have that code.","commit_id":"13fd0d0eeb3966ee45b78d46c41d1372d6e72704"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"048b52dbb81cea1b8cbc2b0f6e8493b706ddd57a","unresolved":false,"context_lines":[{"line_number":6145,"context_line":"                    block_migration, disk, dest, migrate_data)"},{"line_number":6146,"context_line":"                wait_for_vif_plugged \u003d ("},{"line_number":6147,"context_line":"                    \u0027wait_for_vif_plugged\u0027 in migrate_data and"},{"line_number":6148,"context_line":"                    migrate_data.wait_for_vif_plugged or False)"},{"line_number":6149,"context_line":"                if events and not wait_for_vif_plugged:"},{"line_number":6150,"context_line":"                    raise _BreakWaitForInstanceEvent"},{"line_number":6151,"context_line":"        except _BreakWaitForInstanceEvent:"}],"source_content_type":"text/x-python","patch_set":8,"id":"5f7c97a3_e1caa444","line":6148,"range":{"start_line":6148,"start_character":53,"end_line":6148,"end_character":62},"in_reply_to":"5f7c97a3_c945a670","updated":"2018-06-18 12:04:08.000000000","message":"agree that \u0027or False\u0027 seems redundant","commit_id":"13fd0d0eeb3966ee45b78d46c41d1372d6e72704"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"dd029ced85e5d63d9f7fc0078c0bccc342982fa2","unresolved":false,"context_lines":[{"line_number":6145,"context_line":"                    block_migration, disk, dest, migrate_data)"},{"line_number":6146,"context_line":"                wait_for_vif_plugged \u003d ("},{"line_number":6147,"context_line":"                    \u0027wait_for_vif_plugged\u0027 in migrate_data and"},{"line_number":6148,"context_line":"                    migrate_data.wait_for_vif_plugged or False)"},{"line_number":6149,"context_line":"                if events and not wait_for_vif_plugged:"},{"line_number":6150,"context_line":"                    raise _BreakWaitForInstanceEvent"},{"line_number":6151,"context_line":"        except _BreakWaitForInstanceEvent:"}],"source_content_type":"text/x-python","patch_set":8,"id":"5f7c97a3_c945a670","line":6148,"range":{"start_line":6148,"start_character":53,"end_line":6148,"end_character":62},"in_reply_to":"5f7c97a3_de2b2be8","updated":"2018-06-13 12:52:13.000000000","message":"I\u0027m saying the `or False` should be redundant.","commit_id":"13fd0d0eeb3966ee45b78d46c41d1372d6e72704"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"36039773ecff73d497f2e02b310093808b9e9c34","unresolved":false,"context_lines":[{"line_number":6145,"context_line":"                    block_migration, disk, dest, migrate_data)"},{"line_number":6146,"context_line":"                wait_for_vif_plugged \u003d ("},{"line_number":6147,"context_line":"                    \u0027wait_for_vif_plugged\u0027 in migrate_data and"},{"line_number":6148,"context_line":"                    migrate_data.wait_for_vif_plugged or False)"},{"line_number":6149,"context_line":"                if events and not wait_for_vif_plugged:"},{"line_number":6150,"context_line":"                    raise _BreakWaitForInstanceEvent"},{"line_number":6151,"context_line":"        except _BreakWaitForInstanceEvent:"}],"source_content_type":"text/x-python","patch_set":8,"id":"5f7c97a3_4c205ff9","line":6148,"range":{"start_line":6148,"start_character":53,"end_line":6148,"end_character":62},"in_reply_to":"5f7c97a3_e1caa444","updated":"2018-06-18 21:21:56.000000000","message":"Done","commit_id":"13fd0d0eeb3966ee45b78d46c41d1372d6e72704"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"d04298a707a4b7f5d33fde1d0489c25131d39abd","unresolved":false,"context_lines":[{"line_number":6146,"context_line":"                wait_for_vif_plugged \u003d ("},{"line_number":6147,"context_line":"                    \u0027wait_for_vif_plugged\u0027 in migrate_data and"},{"line_number":6148,"context_line":"                    migrate_data.wait_for_vif_plugged or False)"},{"line_number":6149,"context_line":"                if events and not wait_for_vif_plugged:"},{"line_number":6150,"context_line":"                    raise _BreakWaitForInstanceEvent"},{"line_number":6151,"context_line":"        except _BreakWaitForInstanceEvent:"},{"line_number":6152,"context_line":"            if events:"}],"source_content_type":"text/x-python","patch_set":8,"id":"5f7c97a3_e56f798f","line":6149,"range":{"start_line":6149,"start_character":19,"end_line":6149,"end_character":29},"updated":"2018-06-12 20:36:18.000000000","message":"This feels weird.  If events is [], it means either timeout is disabled or we\u0027re not using neutron (the latter becoming n/a as we remove nova_network?).  Why is _BreakWaitForInstanceEvent not appropriate when timeout is disabled?","commit_id":"13fd0d0eeb3966ee45b78d46c41d1372d6e72704"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"dd029ced85e5d63d9f7fc0078c0bccc342982fa2","unresolved":false,"context_lines":[{"line_number":6146,"context_line":"                wait_for_vif_plugged \u003d ("},{"line_number":6147,"context_line":"                    \u0027wait_for_vif_plugged\u0027 in migrate_data and"},{"line_number":6148,"context_line":"                    migrate_data.wait_for_vif_plugged or False)"},{"line_number":6149,"context_line":"                if events and not wait_for_vif_plugged:"},{"line_number":6150,"context_line":"                    raise _BreakWaitForInstanceEvent"},{"line_number":6151,"context_line":"        except _BreakWaitForInstanceEvent:"},{"line_number":6152,"context_line":"            if events:"}],"source_content_type":"text/x-python","patch_set":8,"id":"5f7c97a3_e931820c","line":6149,"range":{"start_line":6149,"start_character":19,"end_line":6149,"end_character":29},"in_reply_to":"5f7c97a3_9e31335c","updated":"2018-06-13 12:52:13.000000000","message":"Right, I get that, but having the extra check in this condition is confusing, particularly because it doesn\u0027t seem to serve any purpose.","commit_id":"13fd0d0eeb3966ee45b78d46c41d1372d6e72704"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"d27516b35227eb349895de7c4ea5ca36ff4cfdb0","unresolved":false,"context_lines":[{"line_number":6146,"context_line":"                wait_for_vif_plugged \u003d ("},{"line_number":6147,"context_line":"                    \u0027wait_for_vif_plugged\u0027 in migrate_data and"},{"line_number":6148,"context_line":"                    migrate_data.wait_for_vif_plugged or False)"},{"line_number":6149,"context_line":"                if events and not wait_for_vif_plugged:"},{"line_number":6150,"context_line":"                    raise _BreakWaitForInstanceEvent"},{"line_number":6151,"context_line":"        except _BreakWaitForInstanceEvent:"},{"line_number":6152,"context_line":"            if events:"}],"source_content_type":"text/x-python","patch_set":8,"id":"5f7c97a3_9e31335c","line":6149,"range":{"start_line":6149,"start_character":19,"end_line":6149,"end_character":29},"in_reply_to":"5f7c97a3_e56f798f","updated":"2018-06-12 23:37:16.000000000","message":"If there are no events, wait_for_instance_event is going to noop and we won\u0027t wait anyway.","commit_id":"13fd0d0eeb3966ee45b78d46c41d1372d6e72704"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"048b52dbb81cea1b8cbc2b0f6e8493b706ddd57a","unresolved":false,"context_lines":[{"line_number":6146,"context_line":"                wait_for_vif_plugged \u003d ("},{"line_number":6147,"context_line":"                    \u0027wait_for_vif_plugged\u0027 in migrate_data and"},{"line_number":6148,"context_line":"                    migrate_data.wait_for_vif_plugged or False)"},{"line_number":6149,"context_line":"                if events and not wait_for_vif_plugged:"},{"line_number":6150,"context_line":"                    raise _BreakWaitForInstanceEvent"},{"line_number":6151,"context_line":"        except _BreakWaitForInstanceEvent:"},{"line_number":6152,"context_line":"            if events:"}],"source_content_type":"text/x-python","patch_set":8,"id":"5f7c97a3_216f3cfd","line":6149,"range":{"start_line":6149,"start_character":19,"end_line":6149,"end_character":29},"in_reply_to":"5f7c97a3_e931820c","updated":"2018-06-18 12:04:08.000000000","message":"@Eric: I read this like:\nStop waiting (by raising _BreakWaitForInstanceEvent) if there  are possible events to wait for but we are instructed not to wait.\n\nIf there is no events to wait for then there is no need to stop waiting as we won\u0027t wait anyhow.\n\n@Eric: please also note that event [] could also mean that timeout is not disabled, we are using neutron, but the instance has no network interfaces at all as L6080 will return [] in this case too.","commit_id":"13fd0d0eeb3966ee45b78d46c41d1372d6e72704"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"d04298a707a4b7f5d33fde1d0489c25131d39abd","unresolved":false,"context_lines":[{"line_number":6149,"context_line":"                if events and not wait_for_vif_plugged:"},{"line_number":6150,"context_line":"                    raise _BreakWaitForInstanceEvent"},{"line_number":6151,"context_line":"        except _BreakWaitForInstanceEvent:"},{"line_number":6152,"context_line":"            if events:"},{"line_number":6153,"context_line":"                LOG.debug(\u0027Not waiting for events after pre_live_migration: \u0027"},{"line_number":6154,"context_line":"                          \u0027%s. \u0027, events, instance\u003dinstance)"},{"line_number":6155,"context_line":"            # This is a bit weird, but we need to clear sys.exc_info() so that"}],"source_content_type":"text/x-python","patch_set":8,"id":"5f7c97a3_856a457e","line":6152,"range":{"start_line":6152,"start_character":12,"end_line":6152,"end_character":22},"updated":"2018-06-12 20:36:18.000000000","message":"As written, this is redundant.\n\nThough I\u0027m not sure why the debug message is inappropriate when timeout is disabled.","commit_id":"13fd0d0eeb3966ee45b78d46c41d1372d6e72704"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"d04298a707a4b7f5d33fde1d0489c25131d39abd","unresolved":false,"context_lines":[{"line_number":6160,"context_line":"                sys.exc_clear()"},{"line_number":6161,"context_line":"        except exception.VirtualInterfacePlugException:"},{"line_number":6162,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":6163,"context_line":"                LOG.exception(\u0027Failed waiting for network virtual interfaces \u0027"},{"line_number":6164,"context_line":"                              \u0027to be plugged on the destination host %s.\u0027,"},{"line_number":6165,"context_line":"                              dest, instance\u003dinstance)"},{"line_number":6166,"context_line":"                self._cleanup_pre_live_migration("},{"line_number":6167,"context_line":"                    context, dest, instance, migration, migrate_data)"}],"source_content_type":"text/x-python","patch_set":8,"id":"5f7c97a3_25281131","line":6164,"range":{"start_line":6163,"start_character":31,"end_line":6164,"end_character":44},"updated":"2018-06-12 20:36:18.000000000","message":"Isn\u0027t it more like \"virtual interface plugging failed on the destination host\" ?  The waiting has nothing to do with it.","commit_id":"13fd0d0eeb3966ee45b78d46c41d1372d6e72704"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"d04298a707a4b7f5d33fde1d0489c25131d39abd","unresolved":false,"context_lines":[{"line_number":6166,"context_line":"                self._cleanup_pre_live_migration("},{"line_number":6167,"context_line":"                    context, dest, instance, migration, migrate_data)"},{"line_number":6168,"context_line":"        except eventlet.timeout.Timeout:"},{"line_number":6169,"context_line":"            msg \u003d _(\u0027Timed out waiting for events: %s\u0027) % events"},{"line_number":6170,"context_line":"            LOG.warning(msg, instance\u003dinstance)"},{"line_number":6171,"context_line":"            if CONF.vif_plugging_is_fatal:"},{"line_number":6172,"context_line":"                self._cleanup_pre_live_migration("}],"source_content_type":"text/x-python","patch_set":8,"id":"5f7c97a3_05dab549","line":6169,"range":{"start_line":6169,"start_character":12,"end_line":6169,"end_character":64},"updated":"2018-06-12 20:36:18.000000000","message":"defer interpolation again","commit_id":"13fd0d0eeb3966ee45b78d46c41d1372d6e72704"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"36039773ecff73d497f2e02b310093808b9e9c34","unresolved":false,"context_lines":[{"line_number":6166,"context_line":"                self._cleanup_pre_live_migration("},{"line_number":6167,"context_line":"                    context, dest, instance, migration, migrate_data)"},{"line_number":6168,"context_line":"        except eventlet.timeout.Timeout:"},{"line_number":6169,"context_line":"            msg \u003d _(\u0027Timed out waiting for events: %s\u0027) % events"},{"line_number":6170,"context_line":"            LOG.warning(msg, instance\u003dinstance)"},{"line_number":6171,"context_line":"            if CONF.vif_plugging_is_fatal:"},{"line_number":6172,"context_line":"                self._cleanup_pre_live_migration("}],"source_content_type":"text/x-python","patch_set":8,"id":"5f7c97a3_cc79cffb","line":6169,"range":{"start_line":6169,"start_character":12,"end_line":6169,"end_character":64},"in_reply_to":"5f7c97a3_05dab549","updated":"2018-06-18 21:21:56.000000000","message":"Done","commit_id":"13fd0d0eeb3966ee45b78d46c41d1372d6e72704"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"095ddaf8db21e8455c32250541b767ed486af09f","unresolved":false,"context_lines":[{"line_number":6093,"context_line":"    @staticmethod"},{"line_number":6094,"context_line":"    def _get_neutron_events_for_live_migration(instance):"},{"line_number":6095,"context_line":"        # We don\u0027t generate events if CONF.vif_plugging_timeout\u003d0"},{"line_number":6096,"context_line":"        # meaning that the operator disabled using them."},{"line_number":6097,"context_line":"        if CONF.vif_plugging_timeout and utils.is_neutron():"},{"line_number":6098,"context_line":"            return [(\u0027network-vif-plugged\u0027, vif[\u0027id\u0027])"},{"line_number":6099,"context_line":"                    for vif in instance.get_network_info()]"}],"source_content_type":"text/x-python","patch_set":10,"id":"3f79a3b5_d49b2615","line":6096,"updated":"2018-08-13 17:19:12.000000000","message":"So, this isn\u0027t really true. The neutron side will still send the event, we just don\u0027t wait for it if timeout\u003d0. I think that since we send to both source and destination once the migration is created, we\u0027re good to just always wait on either node if configured to do so, right?","commit_id":"5aadff75c3ac4f2019838600df6580481a96db0f"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"3966e23c154e8339b3dd4df5fceb986f739f8fe1","unresolved":false,"context_lines":[{"line_number":6093,"context_line":"    @staticmethod"},{"line_number":6094,"context_line":"    def _get_neutron_events_for_live_migration(instance):"},{"line_number":6095,"context_line":"        # We don\u0027t generate events if CONF.vif_plugging_timeout\u003d0"},{"line_number":6096,"context_line":"        # meaning that the operator disabled using them."},{"line_number":6097,"context_line":"        if CONF.vif_plugging_timeout and utils.is_neutron():"},{"line_number":6098,"context_line":"            return [(\u0027network-vif-plugged\u0027, vif[\u0027id\u0027])"},{"line_number":6099,"context_line":"                    for vif in instance.get_network_info()]"}],"source_content_type":"text/x-python","patch_set":10,"id":"3f79a3b5_9307e418","line":6096,"in_reply_to":"3f79a3b5_29bf92d1","updated":"2018-08-15 01:43:45.000000000","message":"Because with this blueprint in rocky we support live migration between networking backends, so the vif type on the source might not be the same as the vif type on the dest, and we know that some networking backends don\u0027t send events for vif plugging, only for port host binding (ODL - that was the issue with the hard reboot vif plugging wait that we had to revert). I originally didn\u0027t want it to be this complicated to take into account the destination host vif type, but because of those caveats and the fact we\u0027re supporting live migration between types, and the vif plug on the dest determines if the event will show up on the source, we did the RPC thing.","commit_id":"5aadff75c3ac4f2019838600df6580481a96db0f"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"fbe9a2dd15f104da06e456e100d4ff703242f805","unresolved":false,"context_lines":[{"line_number":6093,"context_line":"    @staticmethod"},{"line_number":6094,"context_line":"    def _get_neutron_events_for_live_migration(instance):"},{"line_number":6095,"context_line":"        # We don\u0027t generate events if CONF.vif_plugging_timeout\u003d0"},{"line_number":6096,"context_line":"        # meaning that the operator disabled using them."},{"line_number":6097,"context_line":"        if CONF.vif_plugging_timeout and utils.is_neutron():"},{"line_number":6098,"context_line":"            return [(\u0027network-vif-plugged\u0027, vif[\u0027id\u0027])"},{"line_number":6099,"context_line":"                    for vif in instance.get_network_info()]"}],"source_content_type":"text/x-python","patch_set":10,"id":"3f79a3b5_ebed1cb7","line":6096,"in_reply_to":"3f79a3b5_d49b2615","updated":"2018-08-14 01:44:17.000000000","message":"\u003e The neutron side will still send the event, we just don\u0027t wait for it if timeout\u003d0.\n\nCorrect, should say \"We don\u0027t wait for events if ....\".\n\n\u003e I think that since we send to both source and destination once the migration is created, we\u0027re good to just always wait on either node if configured to do so, right?\n\nIncorrect. We don\u0027t send to both hosts for live migration because that code in the API relies on the migration context being created by the RT, which doesn\u0027t happen for live migration b/c we don\u0027t use the RT.","commit_id":"5aadff75c3ac4f2019838600df6580481a96db0f"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"f14574b328b5b7966f83bf9ada735d45328ef01d","unresolved":false,"context_lines":[{"line_number":6093,"context_line":"    @staticmethod"},{"line_number":6094,"context_line":"    def _get_neutron_events_for_live_migration(instance):"},{"line_number":6095,"context_line":"        # We don\u0027t generate events if CONF.vif_plugging_timeout\u003d0"},{"line_number":6096,"context_line":"        # meaning that the operator disabled using them."},{"line_number":6097,"context_line":"        if CONF.vif_plugging_timeout and utils.is_neutron():"},{"line_number":6098,"context_line":"            return [(\u0027network-vif-plugged\u0027, vif[\u0027id\u0027])"},{"line_number":6099,"context_line":"                    for vif in instance.get_network_info()]"}],"source_content_type":"text/x-python","patch_set":10,"id":"3f79a3b5_29bf92d1","line":6096,"in_reply_to":"3f79a3b5_ebed1cb7","updated":"2018-08-14 14:53:37.000000000","message":"Okay, but since you\u0027re doing this early enough we\u0027ll get the event on the source since the instance hasn\u0027t moved yet, right? So I\u0027m still not sure why we need the communication between the source and destination in migratedata for this.","commit_id":"5aadff75c3ac4f2019838600df6580481a96db0f"}],"nova/conf/compute.py":[{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"41cb56d4e2bf93a355b3316985e264b41496bc74","unresolved":false,"context_lines":[{"line_number":647,"context_line":"        # TODO(mriedem): Change to default\u003dTrue starting in Stein."},{"line_number":648,"context_line":"        default\u003dFalse,"},{"line_number":649,"context_line":"        help\u003d\"\"\""},{"line_number":650,"context_line":"Determine if the source compute host should wait for a ``network-vif-plugged``"},{"line_number":651,"context_line":"event from the (neutron) networking service before starting the actual transfer"},{"line_number":652,"context_line":"of the guest to the destination compute host."},{"line_number":653,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"bf659307_c0ed278c","line":650,"updated":"2018-04-06 14:38:52.000000000","message":"It was not clear from my initial read that this option needs to be set on the live-migrate *destination*.  It\u0027s hinted at on L655-656.  But I had to read the code to grok that for sure.  And it\u0027s usually not going to matter because deployments will likely set it to the same value everywhere.  But nevertheless, suggest adding an explicit statement at the front of this docstring.","commit_id":"f19e88644a5823818993e2f352519600c2173807"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"00b44d7c8483c51c8d43ac6b07f5a7da7af097cc","unresolved":false,"context_lines":[{"line_number":647,"context_line":"        # TODO(mriedem): Change to default\u003dTrue starting in Stein."},{"line_number":648,"context_line":"        default\u003dFalse,"},{"line_number":649,"context_line":"        help\u003d\"\"\""},{"line_number":650,"context_line":"Determine if the source compute host should wait for a ``network-vif-plugged``"},{"line_number":651,"context_line":"event from the (neutron) networking service before starting the actual transfer"},{"line_number":652,"context_line":"of the guest to the destination compute host."},{"line_number":653,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"bf659307_912e1541","line":650,"in_reply_to":"bf659307_0ce9197f","updated":"2018-04-12 16:58:47.000000000","message":"Done","commit_id":"f19e88644a5823818993e2f352519600c2173807"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"b24b1276f226083a91a0d93742291aec4de3d912","unresolved":false,"context_lines":[{"line_number":647,"context_line":"        # TODO(mriedem): Change to default\u003dTrue starting in Stein."},{"line_number":648,"context_line":"        default\u003dFalse,"},{"line_number":649,"context_line":"        help\u003d\"\"\""},{"line_number":650,"context_line":"Determine if the source compute host should wait for a ``network-vif-plugged``"},{"line_number":651,"context_line":"event from the (neutron) networking service before starting the actual transfer"},{"line_number":652,"context_line":"of the guest to the destination compute host."},{"line_number":653,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"bf659307_0ce9197f","line":650,"in_reply_to":"bf659307_2ce17dff","updated":"2018-04-06 16:24:45.000000000","message":"Yeah, it\u0027s a weird one.  But it definitely isn\u0027t clear just from the **on the destination host** hint below.  Here\u0027s a rough attempt:\n\n\".. note: This option is read on the destination host of a live migration.  (If you set this option the same on all of your compute hosts, which you should do if you use the same networking backend universally, you don\u0027t have to worry about this.)\"","commit_id":"f19e88644a5823818993e2f352519600c2173807"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"275241be489feec21d6d69de51290d98f4df2195","unresolved":false,"context_lines":[{"line_number":647,"context_line":"        # TODO(mriedem): Change to default\u003dTrue starting in Stein."},{"line_number":648,"context_line":"        default\u003dFalse,"},{"line_number":649,"context_line":"        help\u003d\"\"\""},{"line_number":650,"context_line":"Determine if the source compute host should wait for a ``network-vif-plugged``"},{"line_number":651,"context_line":"event from the (neutron) networking service before starting the actual transfer"},{"line_number":652,"context_line":"of the guest to the destination compute host."},{"line_number":653,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"bf659307_2ce17dff","line":650,"in_reply_to":"bf659307_c0ed278c","updated":"2018-04-06 16:12:41.000000000","message":"That\u0027s why I have \"**on the destination host**\" on L656 below.\n\nI know this is confusing, but as you said, when you set this, it\u0027s likely going to be set everywhere since I at least assume, for now anyway, people have the same networking backend for at least all hosts within the same cell, otherwise they are forced to use host aggregates most likely for live migrating things.\n\nI didn\u0027t want to say, \"this goes on the destination host\" because unless you\u0027re specifying a host during live migration, you don\u0027t know what is going to be the destination host that the scheduler picks, you just know it\u0027s not the source host. I don\u0027t really know how to re-word this to make that more clear.\n\nMaybe I should just say something like, \"If you use the same networking backend universally, set this option the same on all of your compute hosts.\"","commit_id":"f19e88644a5823818993e2f352519600c2173807"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"41cb56d4e2bf93a355b3316985e264b41496bc74","unresolved":false,"context_lines":[{"line_number":655,"context_line":"compute host, including plugging virtual interfaces. Depending on the"},{"line_number":656,"context_line":"networking backend **on the destination host**, a ``network-vif-plugged``"},{"line_number":657,"context_line":"event may be triggered and then received on the source compute host and the"},{"line_number":658,"context_line":"source compute can wait for that event to ensure networking is setup on the"},{"line_number":659,"context_line":"destination host before starting the guest transfer in the hypervisor."},{"line_number":660,"context_line":""},{"line_number":661,"context_line":"By default, this is False for two reasons:"}],"source_content_type":"text/x-python","patch_set":3,"id":"bf659307_a07cb372","line":658,"range":{"start_line":658,"start_character":63,"end_line":658,"end_character":68},"updated":"2018-04-06 14:38:52.000000000","message":"set up","commit_id":"f19e88644a5823818993e2f352519600c2173807"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"00b44d7c8483c51c8d43ac6b07f5a7da7af097cc","unresolved":false,"context_lines":[{"line_number":655,"context_line":"compute host, including plugging virtual interfaces. Depending on the"},{"line_number":656,"context_line":"networking backend **on the destination host**, a ``network-vif-plugged``"},{"line_number":657,"context_line":"event may be triggered and then received on the source compute host and the"},{"line_number":658,"context_line":"source compute can wait for that event to ensure networking is setup on the"},{"line_number":659,"context_line":"destination host before starting the guest transfer in the hypervisor."},{"line_number":660,"context_line":""},{"line_number":661,"context_line":"By default, this is False for two reasons:"}],"source_content_type":"text/x-python","patch_set":3,"id":"bf659307_311f0909","line":658,"range":{"start_line":658,"start_character":63,"end_line":658,"end_character":68},"in_reply_to":"bf659307_a07cb372","updated":"2018-04-12 16:58:47.000000000","message":"Done","commit_id":"f19e88644a5823818993e2f352519600c2173807"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"53b125876c6254ec1bbd1f06013c2a5b29cc0c63","unresolved":false,"context_lines":[{"line_number":647,"context_line":"        # TODO(mriedem): Change to default\u003dTrue starting in Stein."},{"line_number":648,"context_line":"        default\u003dFalse,"},{"line_number":649,"context_line":"        help\u003d\"\"\""},{"line_number":650,"context_line":"Determine if the source compute host should wait for a ``network-vif-plugged``"},{"line_number":651,"context_line":"event from the (neutron) networking service before starting the actual transfer"},{"line_number":652,"context_line":"of the guest to the destination compute host."},{"line_number":653,"context_line":""},{"line_number":654,"context_line":"Before starting the transfer of the guest, some setup occurs on the destination"},{"line_number":655,"context_line":"compute host, including plugging virtual interfaces. Depending on the"},{"line_number":656,"context_line":"networking backend **on the destination host**, a ``network-vif-plugged``"},{"line_number":657,"context_line":"event may be triggered and then received on the source compute host and the"},{"line_number":658,"context_line":"source compute can wait for that event to ensure networking is setup on the"},{"line_number":659,"context_line":"destination host before starting the guest transfer in the hypervisor."},{"line_number":660,"context_line":""},{"line_number":661,"context_line":"By default, this is False for two reasons:"},{"line_number":662,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"bf659307_63cbf4a4","line":659,"range":{"start_line":650,"start_character":0,"end_line":659,"end_character":70},"updated":"2018-04-08 07:04:27.000000000","message":"IMO, put the information that this config option is for \u0027destination\u0027 host earlier and more straight forward(probably like the things you put in the commit message) could make readers to understand how should it be used easier.","commit_id":"f19e88644a5823818993e2f352519600c2173807"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"d849bdbe7bef0f845a3dfa67141468fee9c76d5e","unresolved":false,"context_lines":[{"line_number":647,"context_line":"        # TODO(mriedem): Change to default\u003dTrue starting in Stein."},{"line_number":648,"context_line":"        default\u003dFalse,"},{"line_number":649,"context_line":"        help\u003d\"\"\""},{"line_number":650,"context_line":"Determine if the source compute host should wait for a ``network-vif-plugged``"},{"line_number":651,"context_line":"event from the (neutron) networking service before starting the actual transfer"},{"line_number":652,"context_line":"of the guest to the destination compute host."},{"line_number":653,"context_line":""},{"line_number":654,"context_line":"Before starting the transfer of the guest, some setup occurs on the destination"},{"line_number":655,"context_line":"compute host, including plugging virtual interfaces. Depending on the"},{"line_number":656,"context_line":"networking backend **on the destination host**, a ``network-vif-plugged``"},{"line_number":657,"context_line":"event may be triggered and then received on the source compute host and the"},{"line_number":658,"context_line":"source compute can wait for that event to ensure networking is setup on the"},{"line_number":659,"context_line":"destination host before starting the guest transfer in the hypervisor."},{"line_number":660,"context_line":""},{"line_number":661,"context_line":"By default, this is False for two reasons:"},{"line_number":662,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"bf659307_f64187a7","line":659,"range":{"start_line":650,"start_character":0,"end_line":659,"end_character":70},"in_reply_to":"bf659307_63cbf4a4","updated":"2018-04-12 16:41:07.000000000","message":"\u003e probably like the things you put in the commit message\n\nThat\u0027s a good suggestion, I\u0027ll try to work something in here.","commit_id":"f19e88644a5823818993e2f352519600c2173807"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"d04298a707a4b7f5d33fde1d0489c25131d39abd","unresolved":false,"context_lines":[{"line_number":680,"context_line":"do if you use the same networking backend universally, you do not have to"},{"line_number":681,"context_line":"worry about this."},{"line_number":682,"context_line":""},{"line_number":683,"context_line":"Before starting the transfer of the guest, some setup occurs on the destination"},{"line_number":684,"context_line":"compute host, including plugging virtual interfaces. Depending on the"},{"line_number":685,"context_line":"networking backend **on the destination host**, a ``network-vif-plugged``"},{"line_number":686,"context_line":"event may be triggered and then received on the source compute host and the"},{"line_number":687,"context_line":"source compute can wait for that event to ensure networking is set up on the"},{"line_number":688,"context_line":"destination host before starting the guest transfer in the hypervisor."},{"line_number":689,"context_line":""},{"line_number":690,"context_line":"By default, this is False for two reasons:"},{"line_number":691,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"5f7c97a3_0596353f","line":688,"range":{"start_line":683,"start_character":0,"end_line":688,"end_character":70},"updated":"2018-06-12 20:36:18.000000000","message":"This is somewhat repetitive of the first paragraph.","commit_id":"13fd0d0eeb3966ee45b78d46c41d1372d6e72704"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"d27516b35227eb349895de7c4ea5ca36ff4cfdb0","unresolved":false,"context_lines":[{"line_number":680,"context_line":"do if you use the same networking backend universally, you do not have to"},{"line_number":681,"context_line":"worry about this."},{"line_number":682,"context_line":""},{"line_number":683,"context_line":"Before starting the transfer of the guest, some setup occurs on the destination"},{"line_number":684,"context_line":"compute host, including plugging virtual interfaces. Depending on the"},{"line_number":685,"context_line":"networking backend **on the destination host**, a ``network-vif-plugged``"},{"line_number":686,"context_line":"event may be triggered and then received on the source compute host and the"},{"line_number":687,"context_line":"source compute can wait for that event to ensure networking is set up on the"},{"line_number":688,"context_line":"destination host before starting the guest transfer in the hypervisor."},{"line_number":689,"context_line":""},{"line_number":690,"context_line":"By default, this is False for two reasons:"},{"line_number":691,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"5f7c97a3_fe1707a2","line":688,"range":{"start_line":683,"start_character":0,"end_line":688,"end_character":70},"in_reply_to":"5f7c97a3_0596353f","updated":"2018-06-12 23:37:16.000000000","message":"Not sure if you remember how many times we went through the help text for this option in earlier reviews, but it was a lot.","commit_id":"13fd0d0eeb3966ee45b78d46c41d1372d6e72704"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"dd029ced85e5d63d9f7fc0078c0bccc342982fa2","unresolved":false,"context_lines":[{"line_number":680,"context_line":"do if you use the same networking backend universally, you do not have to"},{"line_number":681,"context_line":"worry about this."},{"line_number":682,"context_line":""},{"line_number":683,"context_line":"Before starting the transfer of the guest, some setup occurs on the destination"},{"line_number":684,"context_line":"compute host, including plugging virtual interfaces. Depending on the"},{"line_number":685,"context_line":"networking backend **on the destination host**, a ``network-vif-plugged``"},{"line_number":686,"context_line":"event may be triggered and then received on the source compute host and the"},{"line_number":687,"context_line":"source compute can wait for that event to ensure networking is set up on the"},{"line_number":688,"context_line":"destination host before starting the guest transfer in the hypervisor."},{"line_number":689,"context_line":""},{"line_number":690,"context_line":"By default, this is False for two reasons:"},{"line_number":691,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"5f7c97a3_690ed23b","line":688,"range":{"start_line":683,"start_character":0,"end_line":688,"end_character":70},"in_reply_to":"5f7c97a3_fe1707a2","updated":"2018-06-13 12:52:13.000000000","message":"I don\u0027t remember, which I suppose is the advantage to having not looked at this patch in a while - fresh eyes.\n\nYou don\u0027t have to change it; it\u0027s all really good information.  But someone is going to read it and be like, \"Hrm, you just said that.\"","commit_id":"13fd0d0eeb3966ee45b78d46c41d1372d6e72704"}],"nova/objects/migrate_data.py":[{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"048b52dbb81cea1b8cbc2b0f6e8493b706ddd57a","unresolved":false,"context_lines":[{"line_number":378,"context_line":"        super(PowerVMLiveMigrateData, self).obj_make_compatible("},{"line_number":379,"context_line":"            primitive, target_version)"},{"line_number":380,"context_line":"        target_version \u003d versionutils.convert_version_to_tuple(target_version)"},{"line_number":381,"context_line":"        if target_version \u003c (1, 3) and \u0027wait_for_vif_plugged\u0027 in primitive:"},{"line_number":382,"context_line":"            del primitive[\u0027wait_for_vif_plugged\u0027]"},{"line_number":383,"context_line":"        if target_version \u003c (1, 2):"},{"line_number":384,"context_line":"            if \u0027old_vol_attachment_ids\u0027 in primitive:"},{"line_number":385,"context_line":"                del primitive[\u0027old_vol_attachment_ids\u0027]"}],"source_content_type":"text/x-python","patch_set":8,"id":"5f7c97a3_7c471b4e","line":382,"range":{"start_line":381,"start_character":0,"end_line":382,"end_character":49},"updated":"2018-06-18 12:04:08.000000000","message":"note to myself: These backportings per derived class feels redundant as the field is added in the base class. However this redundancy is needed as the base class does not define object version and therefore cannot implement a generic obj_make_compatible() call.","commit_id":"13fd0d0eeb3966ee45b78d46c41d1372d6e72704"}],"nova/tests/unit/compute/test_compute.py":[{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"048b52dbb81cea1b8cbc2b0f6e8493b706ddd57a","unresolved":false,"context_lines":[{"line_number":6144,"context_line":"                                                  disk\u003dNone,"},{"line_number":6145,"context_line":"                                                  migrate_data\u003dmigrate_data)"},{"line_number":6146,"context_line":"        self.assertIs(migrate_data, ret)"},{"line_number":6147,"context_line":"        self.assertTrue(ret.wait_for_vif_plugged, ret)"},{"line_number":6148,"context_line":"        self.assertEqual(len(fake_notifier.NOTIFICATIONS), 2)"},{"line_number":6149,"context_line":"        msg \u003d fake_notifier.NOTIFICATIONS[0]"},{"line_number":6150,"context_line":"        self.assertEqual(msg.event_type,"}],"source_content_type":"text/x-python","patch_set":8,"id":"5f7c97a3_3ccf63b4","line":6147,"range":{"start_line":6147,"start_character":50,"end_line":6147,"end_character":53},"updated":"2018-06-18 12:04:08.000000000","message":"Is it intentional to use \u0027ret\u0027 as the error message if the assertTrue fails?","commit_id":"13fd0d0eeb3966ee45b78d46c41d1372d6e72704"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"36039773ecff73d497f2e02b310093808b9e9c34","unresolved":false,"context_lines":[{"line_number":6144,"context_line":"                                                  disk\u003dNone,"},{"line_number":6145,"context_line":"                                                  migrate_data\u003dmigrate_data)"},{"line_number":6146,"context_line":"        self.assertIs(migrate_data, ret)"},{"line_number":6147,"context_line":"        self.assertTrue(ret.wait_for_vif_plugged, ret)"},{"line_number":6148,"context_line":"        self.assertEqual(len(fake_notifier.NOTIFICATIONS), 2)"},{"line_number":6149,"context_line":"        msg \u003d fake_notifier.NOTIFICATIONS[0]"},{"line_number":6150,"context_line":"        self.assertEqual(msg.event_type,"}],"source_content_type":"text/x-python","patch_set":8,"id":"5f7c97a3_0c6fc728","line":6147,"range":{"start_line":6147,"start_character":50,"end_line":6147,"end_character":53},"in_reply_to":"5f7c97a3_3ccf63b4","updated":"2018-06-18 21:21:56.000000000","message":"Yes, to dump the object, otherwise you get an unhelpful assertion message.","commit_id":"13fd0d0eeb3966ee45b78d46c41d1372d6e72704"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"048b52dbb81cea1b8cbc2b0f6e8493b706ddd57a","unresolved":false,"context_lines":[{"line_number":6172,"context_line":""},{"line_number":6173,"context_line":"        # cleanup"},{"line_number":6174,"context_line":"        db.instance_destroy(c, instance[\u0027uuid\u0027])"},{"line_number":6175,"context_line":""},{"line_number":6176,"context_line":"    @mock.patch.object(fake.FakeDriver, \u0027get_instance_disk_info\u0027)"},{"line_number":6177,"context_line":"    @mock.patch.object(compute_rpcapi.ComputeAPI, \u0027pre_live_migration\u0027)"},{"line_number":6178,"context_line":"    @mock.patch.object(objects.ComputeNode,"}],"source_content_type":"text/x-python","patch_set":8,"id":"5f7c97a3_fc56cbce","line":6175,"updated":"2018-06-18 12:04:08.000000000","message":"I think we need to assert that test_pre_live_migration_works_correctly passes also when the config is live_migration_wait_for_vif_plug\u003dFalse","commit_id":"13fd0d0eeb3966ee45b78d46c41d1372d6e72704"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"36039773ecff73d497f2e02b310093808b9e9c34","unresolved":false,"context_lines":[{"line_number":6172,"context_line":""},{"line_number":6173,"context_line":"        # cleanup"},{"line_number":6174,"context_line":"        db.instance_destroy(c, instance[\u0027uuid\u0027])"},{"line_number":6175,"context_line":""},{"line_number":6176,"context_line":"    @mock.patch.object(fake.FakeDriver, \u0027get_instance_disk_info\u0027)"},{"line_number":6177,"context_line":"    @mock.patch.object(compute_rpcapi.ComputeAPI, \u0027pre_live_migration\u0027)"},{"line_number":6178,"context_line":"    @mock.patch.object(objects.ComputeNode,"}],"source_content_type":"text/x-python","patch_set":8,"id":"5f7c97a3_2c01633a","line":6175,"in_reply_to":"5f7c97a3_fc56cbce","updated":"2018-06-18 21:21:56.000000000","message":"Since that\u0027s the default in the config option, we already get that in functional tests for live migration.","commit_id":"13fd0d0eeb3966ee45b78d46c41d1372d6e72704"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"d04298a707a4b7f5d33fde1d0489c25131d39abd","unresolved":false,"context_lines":[{"line_number":6280,"context_line":"        c \u003d context.get_admin_context()"},{"line_number":6281,"context_line":"        params \u003d {\u0027info_cache\u0027: objects.InstanceInfoCache("},{"line_number":6282,"context_line":"            network_info\u003dnetwork_model.NetworkInfo([]))}"},{"line_number":6283,"context_line":"        instance \u003d self._create_fake_instance_obj(params, context\u003dc)"},{"line_number":6284,"context_line":"        instance.host \u003d self.compute.host"},{"line_number":6285,"context_line":"        dest \u003d \u0027desthost\u0027"},{"line_number":6286,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"5f7c97a3_a5ebc1a1","line":6283,"range":{"start_line":6283,"start_character":50,"end_line":6283,"end_character":56},"updated":"2018-06-12 20:36:18.000000000","message":"name kwargs","commit_id":"13fd0d0eeb3966ee45b78d46c41d1372d6e72704"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"36039773ecff73d497f2e02b310093808b9e9c34","unresolved":false,"context_lines":[{"line_number":6280,"context_line":"        c \u003d context.get_admin_context()"},{"line_number":6281,"context_line":"        params \u003d {\u0027info_cache\u0027: objects.InstanceInfoCache("},{"line_number":6282,"context_line":"            network_info\u003dnetwork_model.NetworkInfo([]))}"},{"line_number":6283,"context_line":"        instance \u003d self._create_fake_instance_obj(params, context\u003dc)"},{"line_number":6284,"context_line":"        instance.host \u003d self.compute.host"},{"line_number":6285,"context_line":"        dest \u003d \u0027desthost\u0027"},{"line_number":6286,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"5f7c97a3_ec8febca","line":6283,"range":{"start_line":6283,"start_character":50,"end_line":6283,"end_character":56},"in_reply_to":"5f7c97a3_a5ebc1a1","updated":"2018-06-18 21:21:56.000000000","message":"Done","commit_id":"13fd0d0eeb3966ee45b78d46c41d1372d6e72704"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"d04298a707a4b7f5d33fde1d0489c25131d39abd","unresolved":false,"context_lines":[{"line_number":6336,"context_line":"        c \u003d context.get_admin_context()"},{"line_number":6337,"context_line":"        params \u003d {\u0027info_cache\u0027: objects.InstanceInfoCache("},{"line_number":6338,"context_line":"            network_info\u003dnetwork_model.NetworkInfo([]))}"},{"line_number":6339,"context_line":"        instance \u003d self._create_fake_instance_obj(params, context\u003dc)"},{"line_number":6340,"context_line":"        instance.host \u003d self.compute.host"},{"line_number":6341,"context_line":"        dest \u003d \u0027desthost\u0027"},{"line_number":6342,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"5f7c97a3_25357145","line":6339,"range":{"start_line":6339,"start_character":50,"end_line":6339,"end_character":56},"updated":"2018-06-12 20:36:18.000000000","message":"ditto","commit_id":"13fd0d0eeb3966ee45b78d46c41d1372d6e72704"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"36039773ecff73d497f2e02b310093808b9e9c34","unresolved":false,"context_lines":[{"line_number":6336,"context_line":"        c \u003d context.get_admin_context()"},{"line_number":6337,"context_line":"        params \u003d {\u0027info_cache\u0027: objects.InstanceInfoCache("},{"line_number":6338,"context_line":"            network_info\u003dnetwork_model.NetworkInfo([]))}"},{"line_number":6339,"context_line":"        instance \u003d self._create_fake_instance_obj(params, context\u003dc)"},{"line_number":6340,"context_line":"        instance.host \u003d self.compute.host"},{"line_number":6341,"context_line":"        dest \u003d \u0027desthost\u0027"},{"line_number":6342,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"5f7c97a3_0c8b47c0","line":6339,"range":{"start_line":6339,"start_character":50,"end_line":6339,"end_character":56},"in_reply_to":"5f7c97a3_25357145","updated":"2018-06-18 21:21:56.000000000","message":"Done","commit_id":"13fd0d0eeb3966ee45b78d46c41d1372d6e72704"}],"nova/tests/unit/compute/test_compute_mgr.py":[{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"41cb56d4e2bf93a355b3316985e264b41496bc74","unresolved":false,"context_lines":[{"line_number":6895,"context_line":"        # 3. no VIFs"},{"line_number":6896,"context_line":"        self.assertEqual("},{"line_number":6897,"context_line":"            [], self.compute._get_neutron_events_for_live_migration([]))"},{"line_number":6898,"context_line":""},{"line_number":6899,"context_line":"    @mock.patch(\u0027nova.compute.rpcapi.ComputeAPI.pre_live_migration\u0027)"},{"line_number":6900,"context_line":"    @mock.patch(\u0027nova.compute.manager.ComputeManager._post_live_migration\u0027)"},{"line_number":6901,"context_line":"    def test_live_migration_wait_vif_plugged("}],"source_content_type":"text/x-python","patch_set":3,"id":"bf659307_06081826","line":6898,"updated":"2018-04-06 14:38:52.000000000","message":"I\u0027m sure it gets tested implicitly below, but it would be nice to have an explicit test where timeout is nonzero, use_neutron is True, and we assert that _get_neutron_events_for_live_migration returns a nonempty list.","commit_id":"f19e88644a5823818993e2f352519600c2173807"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"275241be489feec21d6d69de51290d98f4df2195","unresolved":false,"context_lines":[{"line_number":6895,"context_line":"        # 3. no VIFs"},{"line_number":6896,"context_line":"        self.assertEqual("},{"line_number":6897,"context_line":"            [], self.compute._get_neutron_events_for_live_migration([]))"},{"line_number":6898,"context_line":""},{"line_number":6899,"context_line":"    @mock.patch(\u0027nova.compute.rpcapi.ComputeAPI.pre_live_migration\u0027)"},{"line_number":6900,"context_line":"    @mock.patch(\u0027nova.compute.manager.ComputeManager._post_live_migration\u0027)"},{"line_number":6901,"context_line":"    def test_live_migration_wait_vif_plugged("}],"source_content_type":"text/x-python","patch_set":3,"id":"bf659307_0c835906","line":6898,"in_reply_to":"bf659307_06081826","updated":"2018-04-06 16:12:41.000000000","message":"That\u0027s what 6919 does:\n\nself.assertEqual(2, len(wait_for_event.call_args[0][1]))\n\nIt\u0027s not explicit, but it\u0027s the same thing. Doing an explicit test can be done on just that one method, but it\u0027s redundant. Doesn\u0027t bother me to add it though for clarity.","commit_id":"f19e88644a5823818993e2f352519600c2173807"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"b24b1276f226083a91a0d93742291aec4de3d912","unresolved":false,"context_lines":[{"line_number":6895,"context_line":"        # 3. no VIFs"},{"line_number":6896,"context_line":"        self.assertEqual("},{"line_number":6897,"context_line":"            [], self.compute._get_neutron_events_for_live_migration([]))"},{"line_number":6898,"context_line":""},{"line_number":6899,"context_line":"    @mock.patch(\u0027nova.compute.rpcapi.ComputeAPI.pre_live_migration\u0027)"},{"line_number":6900,"context_line":"    @mock.patch(\u0027nova.compute.manager.ComputeManager._post_live_migration\u0027)"},{"line_number":6901,"context_line":"    def test_live_migration_wait_vif_plugged("}],"source_content_type":"text/x-python","patch_set":3,"id":"bf659307_cc87a1b6","line":6898,"in_reply_to":"bf659307_0c835906","updated":"2018-04-06 16:24:45.000000000","message":"Thanks for pointing it out.  Now that I\u0027m convinced it gets tested, adding an explicit (redundant) line here is up to you.","commit_id":"f19e88644a5823818993e2f352519600c2173807"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"048b52dbb81cea1b8cbc2b0f6e8493b706ddd57a","unresolved":false,"context_lines":[{"line_number":7007,"context_line":"        self.flags(vif_plugging_timeout\u003d300, use_neutron\u003dFalse)"},{"line_number":7008,"context_line":"        self.assertEqual("},{"line_number":7009,"context_line":"            [], self.compute._get_neutron_events_for_live_migration(nw))"},{"line_number":7010,"context_line":"        # 3. no VIFs"},{"line_number":7011,"context_line":"        self.assertEqual("},{"line_number":7012,"context_line":"            [], self.compute._get_neutron_events_for_live_migration([]))"},{"line_number":7013,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"5f7c97a3_3c0203bc","line":7010,"updated":"2018-06-18 12:04:08.000000000","message":"I think you missed the\n\n    self.flag(vif_plugging_timeout\u003d300, use_neutron\u003dTrue)\n\nfor this case. \nIn the current way _get_neutron_events_for_live_migration() needs to return [] even if you pass in some VIFs.","commit_id":"13fd0d0eeb3966ee45b78d46c41d1372d6e72704"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"36039773ecff73d497f2e02b310093808b9e9c34","unresolved":false,"context_lines":[{"line_number":7007,"context_line":"        self.flags(vif_plugging_timeout\u003d300, use_neutron\u003dFalse)"},{"line_number":7008,"context_line":"        self.assertEqual("},{"line_number":7009,"context_line":"            [], self.compute._get_neutron_events_for_live_migration(nw))"},{"line_number":7010,"context_line":"        # 3. no VIFs"},{"line_number":7011,"context_line":"        self.assertEqual("},{"line_number":7012,"context_line":"            [], self.compute._get_neutron_events_for_live_migration([]))"},{"line_number":7013,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"5f7c97a3_6c3e7b8c","line":7010,"in_reply_to":"5f7c97a3_3c0203bc","updated":"2018-06-18 21:21:56.000000000","message":"Ah yes good catch.","commit_id":"13fd0d0eeb3966ee45b78d46c41d1372d6e72704"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"048b52dbb81cea1b8cbc2b0f6e8493b706ddd57a","unresolved":false,"context_lines":[{"line_number":7033,"context_line":"                migrate_data)"},{"line_number":7034,"context_line":"        self.assertEqual(2, len(wait_for_event.call_args[0][1]))"},{"line_number":7035,"context_line":"        self.assertEqual(CONF.vif_plugging_timeout,"},{"line_number":7036,"context_line":"                         wait_for_event.call_args[1][\u0027deadline\u0027])"},{"line_number":7037,"context_line":""},{"line_number":7038,"context_line":"    @mock.patch(\u0027nova.compute.rpcapi.ComputeAPI.pre_live_migration\u0027)"},{"line_number":7039,"context_line":"    @mock.patch(\u0027nova.compute.manager.ComputeManager._post_live_migration\u0027)"}],"source_content_type":"text/x-python","patch_set":8,"id":"5f7c97a3_dcc98f79","line":7036,"updated":"2018-06-18 12:04:08.000000000","message":"nit: you could assert that pre_live_migration() was called once","commit_id":"13fd0d0eeb3966ee45b78d46c41d1372d6e72704"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"36039773ecff73d497f2e02b310093808b9e9c34","unresolved":false,"context_lines":[{"line_number":7033,"context_line":"                migrate_data)"},{"line_number":7034,"context_line":"        self.assertEqual(2, len(wait_for_event.call_args[0][1]))"},{"line_number":7035,"context_line":"        self.assertEqual(CONF.vif_plugging_timeout,"},{"line_number":7036,"context_line":"                         wait_for_event.call_args[1][\u0027deadline\u0027])"},{"line_number":7037,"context_line":""},{"line_number":7038,"context_line":"    @mock.patch(\u0027nova.compute.rpcapi.ComputeAPI.pre_live_migration\u0027)"},{"line_number":7039,"context_line":"    @mock.patch(\u0027nova.compute.manager.ComputeManager._post_live_migration\u0027)"}],"source_content_type":"text/x-python","patch_set":8,"id":"5f7c97a3_ccbeaf63","line":7036,"in_reply_to":"5f7c97a3_dcc98f79","updated":"2018-06-18 21:21:56.000000000","message":"Done","commit_id":"13fd0d0eeb3966ee45b78d46c41d1372d6e72704"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"d04298a707a4b7f5d33fde1d0489c25131d39abd","unresolved":false,"context_lines":[{"line_number":7055,"context_line":"            self.compute._do_live_migration("},{"line_number":7056,"context_line":"                self.context, \u0027dest-host\u0027, self.instance, None, self.migration,"},{"line_number":7057,"context_line":"                migrate_data)"},{"line_number":7058,"context_line":"        # This isn\u0027t awesome, but we need a way to assert that we"},{"line_number":7059,"context_line":"        # short-circuit\u0027ed the wait_for_instance_event context manager."},{"line_number":7060,"context_line":"        self.assertEqual(2, mock_log_debug.call_count)"},{"line_number":7061,"context_line":"        self.assertIn(\u0027Not waiting for events after pre_live_migration\u0027,"},{"line_number":7062,"context_line":"                      mock_log_debug.call_args_list[0][0][0])  # first call/arg"}],"source_content_type":"text/x-python","patch_set":8,"id":"5f7c97a3_a5518132","line":7059,"range":{"start_line":7058,"start_character":8,"end_line":7059,"end_character":71},"updated":"2018-06-12 20:36:18.000000000","message":"Seems like you could make this (and all the tests) a bit prettier by making a fixture for wait_for_instance_event, including mocking eventlet.event.Event.wait so you can assert its calls (none in this case).\n\nMaybe something for the future.","commit_id":"13fd0d0eeb3966ee45b78d46c41d1372d6e72704"}],"nova/tests/unit/objects/test_migrate_data.py":[{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"0bcc300c6b03c48f86bb13e5496d251e4c94c2e3","unresolved":false,"context_lines":[{"line_number":393,"context_line":"            is_shared_instance_path\u003dTrue,"},{"line_number":394,"context_line":"            old_vol_attachment_ids\u003d{\u0027yes\u0027: \u0027no\u0027},"},{"line_number":395,"context_line":"            wait_for_vif_plugged\u003dTrue)"},{"line_number":396,"context_line":""},{"line_number":397,"context_line":"        data \u003d lambda x: x[\u0027nova_object.data\u0027]"},{"line_number":398,"context_line":""},{"line_number":399,"context_line":"        primitive \u003d data(obj.obj_to_primitive())"},{"line_number":400,"context_line":"        self.assertIn(\u0027is_shared_instance_path\u0027, primitive)"},{"line_number":401,"context_line":"        primitive \u003d data(obj.obj_to_primitive(target_version\u003d\u00271.0\u0027))"},{"line_number":402,"context_line":"        self.assertNotIn(\u0027is_shared_instance_path\u0027, primitive)"}],"source_content_type":"text/x-python","patch_set":10,"id":"5f7c97a3_d095c689","line":399,"range":{"start_line":396,"start_character":0,"end_line":399,"end_character":48},"updated":"2018-06-19 22:41:56.000000000","message":"here","commit_id":"5aadff75c3ac4f2019838600df6580481a96db0f"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"0bcc300c6b03c48f86bb13e5496d251e4c94c2e3","unresolved":false,"context_lines":[{"line_number":471,"context_line":""},{"line_number":472,"context_line":"    def test_obj_make_compatible(self):"},{"line_number":473,"context_line":"        obj \u003d self._mk_obj()"},{"line_number":474,"context_line":""},{"line_number":475,"context_line":"        data \u003d lambda x: x[\u0027nova_object.data\u0027]"},{"line_number":476,"context_line":""},{"line_number":477,"context_line":"        primitive \u003d data(obj.obj_to_primitive())"},{"line_number":478,"context_line":"        self.assertIn(\u0027vea_vlan_mappings\u0027, primitive)"},{"line_number":479,"context_line":"        primitive \u003d data(obj.obj_to_primitive(target_version\u003d\u00271.0\u0027))"},{"line_number":480,"context_line":"        self.assertNotIn(\u0027vea_vlan_mappings\u0027, primitive)"},{"line_number":481,"context_line":"        primitive \u003d data(obj.obj_to_primitive(target_version\u003d\u00271.1\u0027))"}],"source_content_type":"text/x-python","patch_set":10,"id":"5f7c97a3_f0900299","line":478,"range":{"start_line":474,"start_character":0,"end_line":478,"end_character":1},"updated":"2018-06-19 22:41:56.000000000","message":"and here","commit_id":"5aadff75c3ac4f2019838600df6580481a96db0f"}],"releasenotes/notes/live_migration_wait_for_vif_plug-c9dcb034067890d8.yaml":[{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"41cb56d4e2bf93a355b3316985e264b41496bc74","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"other:"},{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    A new configuration option, ``[compute]/live_migration_wait_for_vif_plug``,"},{"line_number":5,"context_line":"    has been added which can be used to configure compute services to wait"},{"line_number":6,"context_line":"    for network interface plugging to complete on the destination host before"},{"line_number":7,"context_line":"    starting the guest transfer on the source host during live migration."}],"source_content_type":"text/x-yaml","patch_set":3,"id":"bf659307_e60e4431","line":4,"updated":"2018-04-06 14:38:52.000000000","message":"Here also mention that the option is processed on the destination host.","commit_id":"f19e88644a5823818993e2f352519600c2173807"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"00b44d7c8483c51c8d43ac6b07f5a7da7af097cc","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"other:"},{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    A new configuration option, ``[compute]/live_migration_wait_for_vif_plug``,"},{"line_number":5,"context_line":"    has been added which can be used to configure compute services to wait"},{"line_number":6,"context_line":"    for network interface plugging to complete on the destination host before"},{"line_number":7,"context_line":"    starting the guest transfer on the source host during live migration."}],"source_content_type":"text/x-yaml","patch_set":3,"id":"bf659307_d1a80d79","line":4,"in_reply_to":"bf659307_2c9dfd58","updated":"2018-04-12 16:58:47.000000000","message":"Done","commit_id":"f19e88644a5823818993e2f352519600c2173807"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"275241be489feec21d6d69de51290d98f4df2195","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"other:"},{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    A new configuration option, ``[compute]/live_migration_wait_for_vif_plug``,"},{"line_number":5,"context_line":"    has been added which can be used to configure compute services to wait"},{"line_number":6,"context_line":"    for network interface plugging to complete on the destination host before"},{"line_number":7,"context_line":"    starting the guest transfer on the source host during live migration."}],"source_content_type":"text/x-yaml","patch_set":3,"id":"bf659307_2c9dfd58","line":4,"in_reply_to":"bf659307_e60e4431","updated":"2018-04-06 16:12:41.000000000","message":"Same reply, I don\u0027t really know how to make that clear and not make it also confusing (even saying that, I just confused myself).","commit_id":"f19e88644a5823818993e2f352519600c2173807"}]}
