)]}'
{"nova/conductor/tasks/live_migrate.py":[{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"1c7349c833c318c46b707bce4547e210436f7ed4","unresolved":false,"context_lines":[{"line_number":203,"context_line":""},{"line_number":204,"context_line":"        # check support for new workflow on both nodes"},{"line_number":205,"context_line":"        # https://git.openstack.org/cgit/openstack/nova-specs/tree/specs/queens/approved/neutron-new-port-binding-api.rst#n136"},{"line_number":206,"context_line":"        # src_service \u003d objects.Service.get_by_host_and_binary(self.context,"},{"line_number":207,"context_line":"        #                                                     self.source,"},{"line_number":208,"context_line":"        #                                                     \u0027nova-compute\u0027)"},{"line_number":209,"context_line":"        # dest_service \u003d objects.Service.get_by_host_and_binary(self.context,"},{"line_number":210,"context_line":"        #                                                      destination,"},{"line_number":211,"context_line":"        #                                                      \u0027nova-compute\u0027)"},{"line_number":212,"context_line":"        # check neutron extentions support for multiple bindings"},{"line_number":213,"context_line":"        # TODO(sean-k-mooney): do this propperly e.g."},{"line_number":214,"context_line":"        # if neutron has extention and src_service.version()\u003e\u003d \"pike\" and dest_service.version()\u003e\u003d \"pike\":"}],"source_content_type":"text/x-python","patch_set":1,"id":"ff82abbf_29e51fdc","line":211,"range":{"start_line":206,"start_character":9,"end_line":211,"end_character":78},"updated":"2017-11-30 00:26:17.000000000","message":"we might want to check the neutron extention support and short circurt so that we only check the source and destination bindings if neutron support the extention.","commit_id":"c5e7ae007463d3553af240b0ab3ff9b482095ba6"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"35a8fcb88bb6f89ffa9492b03a2d99f960874c57","unresolved":false,"context_lines":[{"line_number":211,"context_line":"        #                                                      \u0027nova-compute\u0027)"},{"line_number":212,"context_line":"        # check neutron extentions support for multiple bindings"},{"line_number":213,"context_line":"        # TODO(sean-k-mooney): do this propperly e.g."},{"line_number":214,"context_line":"        # if neutron has extention and src_service.version()\u003e\u003d \"pike\" and dest_service.version()\u003e\u003d \"pike\":"},{"line_number":215,"context_line":"        if False:"},{"line_number":216,"context_line":"            # TODO(sean-k-mooney): implement neutron_api.bind_destination"},{"line_number":217,"context_line":"            # https://git.openstack.org/cgit/openstack/nova-specs/tree/specs/queens/approved/neutron-new-port-binding-api.rst#n139"}],"source_content_type":"text/x-python","patch_set":1,"id":"ff82abbf_c94113a8","line":214,"range":{"start_line":214,"start_character":13,"end_line":214,"end_character":34},"updated":"2017-11-30 00:31:11.000000000","message":"call \nsupports_port_binding_extension\nintoduced in https://review.openstack.org/#/c/523548/3/nova/network/neutronv2/api.py","commit_id":"c5e7ae007463d3553af240b0ab3ff9b482095ba6"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"bdfb0f50b46f405584075b35c5c32fb28dee59f6","unresolved":false,"context_lines":[{"line_number":265,"context_line":"                    migrate_vif \u003d objects.VIFMigrateData("},{"line_number":266,"context_line":"                        port_id\u003dport_id, **binding)"},{"line_number":267,"context_line":"                    migrate_vifs.append(migrate_vif)"},{"line_number":268,"context_line":"                data[\u0027vifs\u0027] \u003d migrate_vifs"},{"line_number":269,"context_line":"            except exception.PortBindingFailed as e:"},{"line_number":270,"context_line":"                # Port binding failed for that host, try another one."},{"line_number":271,"context_line":"                raise exception.MigrationPreCheckError("}],"source_content_type":"text/x-python","patch_set":7,"id":"df7087c5_d17c8c73","line":268,"range":{"start_line":268,"start_character":16,"end_line":268,"end_character":28},"updated":"2018-03-14 20:40:33.000000000","message":"data.vifs:\n\nhttp://logs.openstack.org/73/552173/2/check/legacy-tempest-dsvm-multinode-live-migration/47a8e1c/logs/screen-n-super-cond.txt.gz?level\u003dTRACE#_Mar_13_22_30_49_131229","commit_id":"dbf0767269e1f37124d95fbbbb9700584540a7ee"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b438aad87f3d387d5656245ece54464aef0a94a4","unresolved":false,"context_lines":[{"line_number":265,"context_line":"        # that was bound. This information is then stuffed into the"},{"line_number":266,"context_line":"        # migrate_data."},{"line_number":267,"context_line":"        try:"},{"line_number":268,"context_line":"            bindings \u003d self.network_api.bind_ports_to_host("},{"line_number":269,"context_line":"                self.context, self.instance, destination)"},{"line_number":270,"context_line":"        except exception.PortBindingFailed as e:"},{"line_number":271,"context_line":"            # Port binding failed for that host, try another one."}],"source_content_type":"text/x-python","patch_set":10,"id":"bf659307_4d13b90e","line":268,"updated":"2018-03-23 20:32:08.000000000","message":"Random thought: alternative to doing this in conductor, is that we could set a flag in the migrate_data object telling the computes to do the new style port binding stuff, and then pre_live_migration on the dest compute can call setup_networks_on_host and that could create the port bindings, along with setting the migrating_to attribute in the port binding profile. Then the VIFMigrateData stuff could be put into the migrate_data object and passed back to the live_migration on the source compute host to use it.\n\nOne issue with that is live_migration (source) RPC calls pre_live_migration (dest) so adding more stuff to pre_live_migration would increase it\u0027s chances for timing out.\n\nDan Smith is working on some RPC heartbeat stuff for that in oslo.messaging which might eventually make it a non-issue, and it sure would be nice to do the migrating_to binding profile and new style port binding stuff from the same setup_networks_on_host method in the neutronv2 API code.","commit_id":"c5fe3c38d890d00a48cd6b40f975817127723ec2"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"df5402f953dd263ad8f987279b5e06147ce3847e","unresolved":false,"context_lines":[{"line_number":256,"context_line":""},{"line_number":257,"context_line":"        self.migrate_data \u003d data"},{"line_number":258,"context_line":""},{"line_number":259,"context_line":"    # NOTE(mriedem): Alternative to doing this in conductor, is that we could"},{"line_number":260,"context_line":"    # set a flag in the migrate_data object telling the computes to do the new"},{"line_number":261,"context_line":"    # style port binding stuff, and then pre_live_migration on the dest compute"},{"line_number":262,"context_line":"    # can call setup_networks_on_host and that could create the port bindings,"},{"line_number":263,"context_line":"    # along with setting the migrating_to attribute in the port binding"},{"line_number":264,"context_line":"    # profile. Then the VIFMigrateData stuff could be put into the migrate_data"},{"line_number":265,"context_line":"    # object and passed back to the live_migration on the source compute host"},{"line_number":266,"context_line":"    # to use it."},{"line_number":267,"context_line":"    # One issue with that is live_migration (source) RPC calls"},{"line_number":268,"context_line":"    # pre_live_migration (dest) so adding more stuff to pre_live_migration"},{"line_number":269,"context_line":"    # would increase it\u0027s chances for timing out."},{"line_number":270,"context_line":"    # Dan Smith is working on some RPC heartbeat stuff for that in"},{"line_number":271,"context_line":"    # oslo.messaging which might eventually make it a non-issue, and it sure"},{"line_number":272,"context_line":"    # would be nice to do the migrating_to binding profile and new style port"},{"line_number":273,"context_line":"    # binding stuff from the same setup_networks_on_host method in the"},{"line_number":274,"context_line":"    # neutronv2 API code."},{"line_number":275,"context_line":"    def _bind_ports_on_destination(self, destination):"},{"line_number":276,"context_line":"        LOG.debug(\u0027Start binding ports on destination host: %s\u0027, destination,"},{"line_number":277,"context_line":"                  instance\u003dself.instance)"}],"source_content_type":"text/x-python","patch_set":13,"id":"bf659307_b6079a82","line":274,"range":{"start_line":259,"start_character":4,"end_line":274,"end_character":25},"updated":"2018-03-30 15:17:16.000000000","message":"Remove this as it ignores the fact that part of the point in doing this in conductor where we\u0027re doing it is if port binding fails for a candidate destination host, conductor can try another host. Once we get to pre_live_migration on the dest host, conductor has already RPC cast to the source compute to start the live migration and we don\u0027t have any plumbing in place for reschedules.","commit_id":"cb7c162e92b6c83b757709c223dc4ad7a4117bc7"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"a10ab69e407649a0b0f0e68ced36b378dee1c009","unresolved":false,"context_lines":[{"line_number":218,"context_line":""},{"line_number":219,"context_line":"    def _call_livem_checks_on_host(self, destination):"},{"line_number":220,"context_line":"        try:"},{"line_number":221,"context_line":"            self.migrate_data \u003d self.compute_rpcapi.\\"},{"line_number":222,"context_line":"                check_can_live_migrate_destination(self.context, self.instance,"},{"line_number":223,"context_line":"                    destination, self.block_migration, self.disk_over_commit)"},{"line_number":224,"context_line":"        except messaging.MessagingTimeout:"}],"source_content_type":"text/x-python","patch_set":28,"id":"5f7c97a3_6b765842","side":"PARENT","line":221,"range":{"start_line":221,"start_character":13,"end_line":221,"end_character":29},"updated":"2018-06-19 06:53:19.000000000","message":"The way that you have changed this is an good indication.","commit_id":"992fed4b4a9fb0b78f96f8ba6759a41b6d903c51"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"4981fb8bc0ce9495865a8f9d2090ef9dc98486e5","unresolved":false,"context_lines":[{"line_number":241,"context_line":"                    \"%s\") % destination"},{"line_number":242,"context_line":"            raise exception.MigrationPreCheckError(msg)"},{"line_number":243,"context_line":""},{"line_number":244,"context_line":"        if not self.network_api.supports_port_binding_extension(self.context):"},{"line_number":245,"context_line":"            LOG.debug(\u0027Extended port binding is not available.\u0027)"},{"line_number":246,"context_line":"            # Neutron doesn\u0027t support the binding-extended API so we can\u0027t"},{"line_number":247,"context_line":"            # attempt port binding on the destination host."},{"line_number":248,"context_line":"            self.migrate_data \u003d data"},{"line_number":249,"context_line":"            return"},{"line_number":250,"context_line":""},{"line_number":251,"context_line":"        # Check to see that both the source and destination compute hosts"},{"line_number":252,"context_line":"        # are new enough to support the new port binding flow."},{"line_number":253,"context_line":"        if (supports_extended_port_binding(self.context, self.source) and"},{"line_number":254,"context_line":"                supports_extended_port_binding(self.context, destination)):"},{"line_number":255,"context_line":"            data.vifs \u003d self._bind_ports_on_destination(destination)"},{"line_number":256,"context_line":""},{"line_number":257,"context_line":"        self.migrate_data \u003d data"},{"line_number":258,"context_line":""}],"source_content_type":"text/x-python","patch_set":28,"id":"5f7c97a3_8c29c938","line":255,"range":{"start_line":244,"start_character":1,"end_line":255,"end_character":68},"updated":"2018-06-15 09:36:01.000000000","message":"All of this code should node reside here but in compute/manager.py","commit_id":"f8a65cd8a64c9732afbde38b1fa629b84dd0e76b"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"b2598bb6ebe17a7616f7d8d936f453aff64d653e","unresolved":false,"context_lines":[{"line_number":241,"context_line":"                    \"%s\") % destination"},{"line_number":242,"context_line":"            raise exception.MigrationPreCheckError(msg)"},{"line_number":243,"context_line":""},{"line_number":244,"context_line":"        if not self.network_api.supports_port_binding_extension(self.context):"},{"line_number":245,"context_line":"            LOG.debug(\u0027Extended port binding is not available.\u0027)"},{"line_number":246,"context_line":"            # Neutron doesn\u0027t support the binding-extended API so we can\u0027t"},{"line_number":247,"context_line":"            # attempt port binding on the destination host."},{"line_number":248,"context_line":"            self.migrate_data \u003d data"},{"line_number":249,"context_line":"            return"},{"line_number":250,"context_line":""},{"line_number":251,"context_line":"        # Check to see that both the source and destination compute hosts"},{"line_number":252,"context_line":"        # are new enough to support the new port binding flow."},{"line_number":253,"context_line":"        if (supports_extended_port_binding(self.context, self.source) and"},{"line_number":254,"context_line":"                supports_extended_port_binding(self.context, destination)):"},{"line_number":255,"context_line":"            data.vifs \u003d self._bind_ports_on_destination(destination)"},{"line_number":256,"context_line":""},{"line_number":257,"context_line":"        self.migrate_data \u003d data"},{"line_number":258,"context_line":""}],"source_content_type":"text/x-python","patch_set":28,"id":"5f7c97a3_f5dd4641","line":255,"range":{"start_line":244,"start_character":1,"end_line":255,"end_character":68},"in_reply_to":"5f7c97a3_4ac90caa","updated":"2018-06-20 10:48:05.000000000","message":"OK fair enough :)\n\nThe \"problem\" i see is when we bind ports on destination. I would have see that done from the destination host, We could have also to store the extra host configurations needed or XML (but that would have to be done by LibvirtMigrateData).\n\nI understand that VIFMigrateData is the general case but we are placing in several places of our code the same piece of work.\n\n  Destination is creating MigrateData\nConductor is creating VIFMigrateData\n    Destination(driver) is creating DriverMigrateData","commit_id":"f8a65cd8a64c9732afbde38b1fa629b84dd0e76b"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"a10ab69e407649a0b0f0e68ced36b378dee1c009","unresolved":false,"context_lines":[{"line_number":241,"context_line":"                    \"%s\") % destination"},{"line_number":242,"context_line":"            raise exception.MigrationPreCheckError(msg)"},{"line_number":243,"context_line":""},{"line_number":244,"context_line":"        if not self.network_api.supports_port_binding_extension(self.context):"},{"line_number":245,"context_line":"            LOG.debug(\u0027Extended port binding is not available.\u0027)"},{"line_number":246,"context_line":"            # Neutron doesn\u0027t support the binding-extended API so we can\u0027t"},{"line_number":247,"context_line":"            # attempt port binding on the destination host."},{"line_number":248,"context_line":"            self.migrate_data \u003d data"},{"line_number":249,"context_line":"            return"},{"line_number":250,"context_line":""},{"line_number":251,"context_line":"        # Check to see that both the source and destination compute hosts"},{"line_number":252,"context_line":"        # are new enough to support the new port binding flow."},{"line_number":253,"context_line":"        if (supports_extended_port_binding(self.context, self.source) and"},{"line_number":254,"context_line":"                supports_extended_port_binding(self.context, destination)):"},{"line_number":255,"context_line":"            data.vifs \u003d self._bind_ports_on_destination(destination)"},{"line_number":256,"context_line":""},{"line_number":257,"context_line":"        self.migrate_data \u003d data"},{"line_number":258,"context_line":""}],"source_content_type":"text/x-python","patch_set":28,"id":"5f7c97a3_abab1086","line":255,"range":{"start_line":244,"start_character":1,"end_line":255,"end_character":68},"in_reply_to":"5f7c97a3_4c437f12","updated":"2018-06-19 06:53:19.000000000","message":"Looks like check_can_live_migrate_destination is the exact method to use and we will not confuse anything. This will avoid creating an other instance of network API here. And we will keep coherence.","commit_id":"f8a65cd8a64c9732afbde38b1fa629b84dd0e76b"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"5638935b5a41ccb4b861b592e8d740566e139c6e","unresolved":false,"context_lines":[{"line_number":241,"context_line":"                    \"%s\") % destination"},{"line_number":242,"context_line":"            raise exception.MigrationPreCheckError(msg)"},{"line_number":243,"context_line":""},{"line_number":244,"context_line":"        if not self.network_api.supports_port_binding_extension(self.context):"},{"line_number":245,"context_line":"            LOG.debug(\u0027Extended port binding is not available.\u0027)"},{"line_number":246,"context_line":"            # Neutron doesn\u0027t support the binding-extended API so we can\u0027t"},{"line_number":247,"context_line":"            # attempt port binding on the destination host."},{"line_number":248,"context_line":"            self.migrate_data \u003d data"},{"line_number":249,"context_line":"            return"},{"line_number":250,"context_line":""},{"line_number":251,"context_line":"        # Check to see that both the source and destination compute hosts"},{"line_number":252,"context_line":"        # are new enough to support the new port binding flow."},{"line_number":253,"context_line":"        if (supports_extended_port_binding(self.context, self.source) and"},{"line_number":254,"context_line":"                supports_extended_port_binding(self.context, destination)):"},{"line_number":255,"context_line":"            data.vifs \u003d self._bind_ports_on_destination(destination)"},{"line_number":256,"context_line":""},{"line_number":257,"context_line":"        self.migrate_data \u003d data"},{"line_number":258,"context_line":""}],"source_content_type":"text/x-python","patch_set":28,"id":"5f7c97a3_4c437f12","line":255,"range":{"start_line":244,"start_character":1,"end_line":255,"end_character":68},"in_reply_to":"5f7c97a3_8c29c938","updated":"2018-06-18 21:04:04.000000000","message":"Why? We don\u0027t want to confuse talking to an old compute that doesn\u0027t have that code, that\u0027s why we\u0027re doing it on conductor.","commit_id":"f8a65cd8a64c9732afbde38b1fa629b84dd0e76b"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"3c9ef1d023df04c1730975aece52ddaa0ab69902","unresolved":false,"context_lines":[{"line_number":241,"context_line":"                    \"%s\") % destination"},{"line_number":242,"context_line":"            raise exception.MigrationPreCheckError(msg)"},{"line_number":243,"context_line":""},{"line_number":244,"context_line":"        if not self.network_api.supports_port_binding_extension(self.context):"},{"line_number":245,"context_line":"            LOG.debug(\u0027Extended port binding is not available.\u0027)"},{"line_number":246,"context_line":"            # Neutron doesn\u0027t support the binding-extended API so we can\u0027t"},{"line_number":247,"context_line":"            # attempt port binding on the destination host."},{"line_number":248,"context_line":"            self.migrate_data \u003d data"},{"line_number":249,"context_line":"            return"},{"line_number":250,"context_line":""},{"line_number":251,"context_line":"        # Check to see that both the source and destination compute hosts"},{"line_number":252,"context_line":"        # are new enough to support the new port binding flow."},{"line_number":253,"context_line":"        if (supports_extended_port_binding(self.context, self.source) and"},{"line_number":254,"context_line":"                supports_extended_port_binding(self.context, destination)):"},{"line_number":255,"context_line":"            data.vifs \u003d self._bind_ports_on_destination(destination)"},{"line_number":256,"context_line":""},{"line_number":257,"context_line":"        self.migrate_data \u003d data"},{"line_number":258,"context_line":""}],"source_content_type":"text/x-python","patch_set":28,"id":"5f7c97a3_d7c2a934","line":255,"range":{"start_line":244,"start_character":1,"end_line":255,"end_character":68},"in_reply_to":"5f7c97a3_abab1086","updated":"2018-06-19 13:57:14.000000000","message":"The issue is we need to determine if both the source and dest host are going to be doing the new style port binding for live migration, which is simple to check from conductor and does not run the risk of any rpc timeouts. I also have to think through the implications of doing the checks in the computes themselves, since there was a reason we wanted to do it this way (and it was laid out this way in the spec). The main thing is, we can live migrate between mixed version computes, so if we hit a Queens compute that doesn\u0027t have any of the port binding extended code, we could have issues if the other node is relying on those.\n\nThinking through scenarios:\n\n1. new dest, old source: the new dest compute could check the service version of the source compute and if it\u0027s old we just don\u0027t do the new style port binding - or we fail and live migration has to pick another host\n\n2. old dest, new source: if the old dest doesn\u0027t do port binding then migrate_data.vifs should be empty and the source host just won\u0027t do anything with it, like updating guest xml in the libvirt driver\n\n3. old dest, old source: migrate_data.vifs wouldn\u0027t be set so same as #2\n\n4. new dest, new source: the new dest compute could check the service version of the source compute, find that it\u0027s new, so the dest host would create the port bindings and populate migrate_data.vifs and send those back to the source (and back to conductor here)","commit_id":"f8a65cd8a64c9732afbde38b1fa629b84dd0e76b"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"fbc2830288eb1843edf789659f572fa9e897d662","unresolved":false,"context_lines":[{"line_number":241,"context_line":"                    \"%s\") % destination"},{"line_number":242,"context_line":"            raise exception.MigrationPreCheckError(msg)"},{"line_number":243,"context_line":""},{"line_number":244,"context_line":"        if not self.network_api.supports_port_binding_extension(self.context):"},{"line_number":245,"context_line":"            LOG.debug(\u0027Extended port binding is not available.\u0027)"},{"line_number":246,"context_line":"            # Neutron doesn\u0027t support the binding-extended API so we can\u0027t"},{"line_number":247,"context_line":"            # attempt port binding on the destination host."},{"line_number":248,"context_line":"            self.migrate_data \u003d data"},{"line_number":249,"context_line":"            return"},{"line_number":250,"context_line":""},{"line_number":251,"context_line":"        # Check to see that both the source and destination compute hosts"},{"line_number":252,"context_line":"        # are new enough to support the new port binding flow."},{"line_number":253,"context_line":"        if (supports_extended_port_binding(self.context, self.source) and"},{"line_number":254,"context_line":"                supports_extended_port_binding(self.context, destination)):"},{"line_number":255,"context_line":"            data.vifs \u003d self._bind_ports_on_destination(destination)"},{"line_number":256,"context_line":""},{"line_number":257,"context_line":"        self.migrate_data \u003d data"},{"line_number":258,"context_line":""}],"source_content_type":"text/x-python","patch_set":28,"id":"5f7c97a3_d7faa941","line":255,"range":{"start_line":244,"start_character":1,"end_line":255,"end_character":68},"in_reply_to":"5f7c97a3_d7c2a934","updated":"2018-06-19 14:01:10.000000000","message":"Also, rpc timeouts are historically a reason for avoiding doing more than we need in the compute methods during live migration, but dansmith\u0027s long_rpc_timeout / messaging heartbeat stuff should alleviate a lot of those issues.","commit_id":"f8a65cd8a64c9732afbde38b1fa629b84dd0e76b"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"86c45f6fb9e68bbc80f0a608080ed83b7dc0a846","unresolved":false,"context_lines":[{"line_number":241,"context_line":"                    \"%s\") % destination"},{"line_number":242,"context_line":"            raise exception.MigrationPreCheckError(msg)"},{"line_number":243,"context_line":""},{"line_number":244,"context_line":"        if not self.network_api.supports_port_binding_extension(self.context):"},{"line_number":245,"context_line":"            LOG.debug(\u0027Extended port binding is not available.\u0027)"},{"line_number":246,"context_line":"            # Neutron doesn\u0027t support the binding-extended API so we can\u0027t"},{"line_number":247,"context_line":"            # attempt port binding on the destination host."},{"line_number":248,"context_line":"            self.migrate_data \u003d data"},{"line_number":249,"context_line":"            return"},{"line_number":250,"context_line":""},{"line_number":251,"context_line":"        # Check to see that both the source and destination compute hosts"},{"line_number":252,"context_line":"        # are new enough to support the new port binding flow."},{"line_number":253,"context_line":"        if (supports_extended_port_binding(self.context, self.source) and"},{"line_number":254,"context_line":"                supports_extended_port_binding(self.context, destination)):"},{"line_number":255,"context_line":"            data.vifs \u003d self._bind_ports_on_destination(destination)"},{"line_number":256,"context_line":""},{"line_number":257,"context_line":"        self.migrate_data \u003d data"},{"line_number":258,"context_line":""}],"source_content_type":"text/x-python","patch_set":28,"id":"5f7c97a3_4ac90caa","line":255,"range":{"start_line":244,"start_character":1,"end_line":255,"end_character":68},"in_reply_to":"5f7c97a3_d7c2a934","updated":"2018-06-19 14:17:07.000000000","message":"I guess it makes more sense to me to do this from conductor. I don\u0027t really like the idea of computes having to check the service version of other computes, because it means *they* are responsible for managing the compatibility, which is kind of what conductor is for. I know we do it in a couple of places where it\u0027s not very convenient to do it elsewhere (like when it matters for the lower virt layer), but it\u0027s not ideal.\n\nFurther, in order to support cross-cell migrations, we\u0027re going to have to stop doing things like asking computes to know inner-most details of other computes, as they won\u0027t be able to find out this information for a compute in another cell.\n\nWe\u0027ve been talking about moving binding to conductor for a while, going back to John\u0027s series aimed at doing that exact thing a couple years ago, so I\u0027m not sure what reason for the pushback would be.","commit_id":"f8a65cd8a64c9732afbde38b1fa629b84dd0e76b"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"2f0413e17d1e70b6e08224d54c08a12f5df1ae23","unresolved":false,"context_lines":[{"line_number":241,"context_line":"                    \"%s\") % destination"},{"line_number":242,"context_line":"            raise exception.MigrationPreCheckError(msg)"},{"line_number":243,"context_line":""},{"line_number":244,"context_line":"        if not self.network_api.supports_port_binding_extension(self.context):"},{"line_number":245,"context_line":"            LOG.debug(\u0027Extended port binding is not available.\u0027)"},{"line_number":246,"context_line":"            # Neutron doesn\u0027t support the binding-extended API so we can\u0027t"},{"line_number":247,"context_line":"            # attempt port binding on the destination host."},{"line_number":248,"context_line":"            self.migrate_data \u003d data"},{"line_number":249,"context_line":"            return"},{"line_number":250,"context_line":""},{"line_number":251,"context_line":"        # Check to see that both the source and destination compute hosts"},{"line_number":252,"context_line":"        # are new enough to support the new port binding flow."},{"line_number":253,"context_line":"        if (supports_extended_port_binding(self.context, self.source) and"},{"line_number":254,"context_line":"                supports_extended_port_binding(self.context, destination)):"},{"line_number":255,"context_line":"            data.vifs \u003d self._bind_ports_on_destination(destination)"},{"line_number":256,"context_line":""},{"line_number":257,"context_line":"        self.migrate_data \u003d data"},{"line_number":258,"context_line":""}],"source_content_type":"text/x-python","patch_set":28,"id":"5f7c97a3_98ac47ef","line":255,"range":{"start_line":244,"start_character":1,"end_line":255,"end_character":68},"in_reply_to":"5f7c97a3_f5dd4641","updated":"2018-06-20 11:23:00.000000000","message":"Hum I said i mistake...\n\n  destination is creating MigrateData\nConductor is creating VIFmigrateDate\n  destination(driver) is setting the some driver fields\n\nAnyway my point was that we change its state from several places. But based on your comments that looks right.","commit_id":"f8a65cd8a64c9732afbde38b1fa629b84dd0e76b"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"b2598bb6ebe17a7616f7d8d936f453aff64d653e","unresolved":false,"context_lines":[{"line_number":233,"context_line":""},{"line_number":234,"context_line":"    def _call_livem_checks_on_host(self, destination):"},{"line_number":235,"context_line":"        try:"},{"line_number":236,"context_line":"            data \u003d self.compute_rpcapi.\\"},{"line_number":237,"context_line":"                check_can_live_migrate_destination(self.context, self.instance,"},{"line_number":238,"context_line":"                    destination, self.block_migration, self.disk_over_commit)"},{"line_number":239,"context_line":"        except messaging.MessagingTimeout:"}],"source_content_type":"text/x-python","patch_set":30,"id":"5f7c97a3_f541c60b","line":236,"updated":"2018-06-20 10:48:05.000000000","message":"looking at this again, you don\u0027t really have to change that.","commit_id":"ab05d404623d33cd2b3a551a4b30ee2d60b938bf"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"52b1b11904848801cb6fc81199608731f8320a5c","unresolved":false,"context_lines":[{"line_number":233,"context_line":""},{"line_number":234,"context_line":"    def _call_livem_checks_on_host(self, destination):"},{"line_number":235,"context_line":"        try:"},{"line_number":236,"context_line":"            data \u003d self.compute_rpcapi.\\"},{"line_number":237,"context_line":"                check_can_live_migrate_destination(self.context, self.instance,"},{"line_number":238,"context_line":"                    destination, self.block_migration, self.disk_over_commit)"},{"line_number":239,"context_line":"        except messaging.MessagingTimeout:"}],"source_content_type":"text/x-python","patch_set":30,"id":"5f7c97a3_786feb27","line":236,"in_reply_to":"5f7c97a3_f541c60b","updated":"2018-06-20 12:01:13.000000000","message":"Done","commit_id":"ab05d404623d33cd2b3a551a4b30ee2d60b938bf"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"b2598bb6ebe17a7616f7d8d936f453aff64d653e","unresolved":false,"context_lines":[{"line_number":245,"context_line":"            LOG.debug(\u0027Extended port binding is not available.\u0027)"},{"line_number":246,"context_line":"            # Neutron doesn\u0027t support the binding-extended API so we can\u0027t"},{"line_number":247,"context_line":"            # attempt port binding on the destination host."},{"line_number":248,"context_line":"            self.migrate_data \u003d data"},{"line_number":249,"context_line":"            return"},{"line_number":250,"context_line":""},{"line_number":251,"context_line":"        # Check to see that both the source and destination compute hosts"}],"source_content_type":"text/x-python","patch_set":30,"id":"5f7c97a3_b5434e11","line":248,"updated":"2018-06-20 10:48:05.000000000","message":"You can remove this line","commit_id":"ab05d404623d33cd2b3a551a4b30ee2d60b938bf"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"52b1b11904848801cb6fc81199608731f8320a5c","unresolved":false,"context_lines":[{"line_number":245,"context_line":"            LOG.debug(\u0027Extended port binding is not available.\u0027)"},{"line_number":246,"context_line":"            # Neutron doesn\u0027t support the binding-extended API so we can\u0027t"},{"line_number":247,"context_line":"            # attempt port binding on the destination host."},{"line_number":248,"context_line":"            self.migrate_data \u003d data"},{"line_number":249,"context_line":"            return"},{"line_number":250,"context_line":""},{"line_number":251,"context_line":"        # Check to see that both the source and destination compute hosts"}],"source_content_type":"text/x-python","patch_set":30,"id":"5f7c97a3_18603735","line":248,"in_reply_to":"5f7c97a3_b5434e11","updated":"2018-06-20 12:01:13.000000000","message":"Done","commit_id":"ab05d404623d33cd2b3a551a4b30ee2d60b938bf"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"b2598bb6ebe17a7616f7d8d936f453aff64d653e","unresolved":false,"context_lines":[{"line_number":252,"context_line":"        # are new enough to support the new port binding flow."},{"line_number":253,"context_line":"        if (supports_extended_port_binding(self.context, self.source) and"},{"line_number":254,"context_line":"                supports_extended_port_binding(self.context, destination)):"},{"line_number":255,"context_line":"            data.vifs \u003d self._bind_ports_on_destination(destination)"},{"line_number":256,"context_line":""},{"line_number":257,"context_line":"        self.migrate_data \u003d data"},{"line_number":258,"context_line":""}],"source_content_type":"text/x-python","patch_set":30,"id":"5f7c97a3_d557eac9","line":255,"updated":"2018-06-20 10:48:05.000000000","message":"At this point, you can use self.migrate_data.vifs \u003d","commit_id":"ab05d404623d33cd2b3a551a4b30ee2d60b938bf"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"52b1b11904848801cb6fc81199608731f8320a5c","unresolved":false,"context_lines":[{"line_number":252,"context_line":"        # are new enough to support the new port binding flow."},{"line_number":253,"context_line":"        if (supports_extended_port_binding(self.context, self.source) and"},{"line_number":254,"context_line":"                supports_extended_port_binding(self.context, destination)):"},{"line_number":255,"context_line":"            data.vifs \u003d self._bind_ports_on_destination(destination)"},{"line_number":256,"context_line":""},{"line_number":257,"context_line":"        self.migrate_data \u003d data"},{"line_number":258,"context_line":""}],"source_content_type":"text/x-python","patch_set":30,"id":"5f7c97a3_d8595f8e","line":255,"in_reply_to":"5f7c97a3_d557eac9","updated":"2018-06-20 12:01:13.000000000","message":"Done","commit_id":"ab05d404623d33cd2b3a551a4b30ee2d60b938bf"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"b2598bb6ebe17a7616f7d8d936f453aff64d653e","unresolved":false,"context_lines":[{"line_number":254,"context_line":"                supports_extended_port_binding(self.context, destination)):"},{"line_number":255,"context_line":"            data.vifs \u003d self._bind_ports_on_destination(destination)"},{"line_number":256,"context_line":""},{"line_number":257,"context_line":"        self.migrate_data \u003d data"},{"line_number":258,"context_line":""},{"line_number":259,"context_line":"    def _bind_ports_on_destination(self, destination):"},{"line_number":260,"context_line":"        LOG.debug(\u0027Start binding ports on destination host: %s\u0027, destination,"}],"source_content_type":"text/x-python","patch_set":30,"id":"5f7c97a3_9571727a","line":257,"updated":"2018-06-20 10:48:05.000000000","message":"So you can remove this line.","commit_id":"ab05d404623d33cd2b3a551a4b30ee2d60b938bf"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"52b1b11904848801cb6fc81199608731f8320a5c","unresolved":false,"context_lines":[{"line_number":254,"context_line":"                supports_extended_port_binding(self.context, destination)):"},{"line_number":255,"context_line":"            data.vifs \u003d self._bind_ports_on_destination(destination)"},{"line_number":256,"context_line":""},{"line_number":257,"context_line":"        self.migrate_data \u003d data"},{"line_number":258,"context_line":""},{"line_number":259,"context_line":"    def _bind_ports_on_destination(self, destination):"},{"line_number":260,"context_line":"        LOG.debug(\u0027Start binding ports on destination host: %s\u0027, destination,"}],"source_content_type":"text/x-python","patch_set":30,"id":"5f7c97a3_f85c5b7e","line":257,"in_reply_to":"5f7c97a3_9571727a","updated":"2018-06-20 12:01:13.000000000","message":"Done","commit_id":"ab05d404623d33cd2b3a551a4b30ee2d60b938bf"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"cb64e8d79899b58ed67dcfa97468e8ebc8f73e3a","unresolved":false,"context_lines":[{"line_number":242,"context_line":"            raise exception.MigrationPreCheckError(msg)"},{"line_number":243,"context_line":""},{"line_number":244,"context_line":"        if not self.network_api.supports_port_binding_extension(self.context):"},{"line_number":245,"context_line":"            LOG.debug(\u0027Extended port binding is not available.\u0027)"},{"line_number":246,"context_line":"            # Neutron doesn\u0027t support the binding-extended API so we can\u0027t"},{"line_number":247,"context_line":"            # attempt port binding on the destination host."},{"line_number":248,"context_line":"            return"}],"source_content_type":"text/x-python","patch_set":31,"id":"5f7c97a3_e484b20d","line":245,"updated":"2018-06-20 14:27:10.000000000","message":"I just noticed that: adding the extra arg instance\u003dself.instance could help to get context.","commit_id":"6ea9c0e4412010dca0b04612c89b5e2866d6c3e5"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"3ff2c5f72ea5b990dc42cc504314e976f08e2cdb","unresolved":false,"context_lines":[{"line_number":242,"context_line":"            raise exception.MigrationPreCheckError(msg)"},{"line_number":243,"context_line":""},{"line_number":244,"context_line":"        if not self.network_api.supports_port_binding_extension(self.context):"},{"line_number":245,"context_line":"            LOG.debug(\u0027Extended port binding is not available.\u0027)"},{"line_number":246,"context_line":"            # Neutron doesn\u0027t support the binding-extended API so we can\u0027t"},{"line_number":247,"context_line":"            # attempt port binding on the destination host."},{"line_number":248,"context_line":"            return"}],"source_content_type":"text/x-python","patch_set":31,"id":"5f7c97a3_47f3da73","line":245,"in_reply_to":"5f7c97a3_e484b20d","updated":"2018-06-25 13:53:47.000000000","message":"Done","commit_id":"6ea9c0e4412010dca0b04612c89b5e2866d6c3e5"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"1fdd2e325bd9059d381f67ae8832647fce049562","unresolved":false,"context_lines":[{"line_number":246,"context_line":"                      instance\u003dself.instance)"},{"line_number":247,"context_line":"            # Neutron doesn\u0027t support the binding-extended API so we can\u0027t"},{"line_number":248,"context_line":"            # attempt port binding on the destination host."},{"line_number":249,"context_line":"            return"},{"line_number":250,"context_line":""},{"line_number":251,"context_line":"        # Check to see that both the source and destination compute hosts"},{"line_number":252,"context_line":"        # are new enough to support the new port binding flow."}],"source_content_type":"text/x-python","patch_set":35,"id":"5f7c97a3_dfc9657a","line":249,"updated":"2018-07-25 15:39:34.000000000","message":"This is a nit, but this kinda looks like we\u0027re bailing for failure here, but we\u0027re not. I\u0027d rather collect the three required conditions for doing the new thing and if all true, do the new thing.","commit_id":"2d5c6fd8eb677e8e223251bc8cdb0427da0f33ba"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ffd8966773d16962403ddf182e5e146dc68484c4","unresolved":false,"context_lines":[{"line_number":246,"context_line":"                      instance\u003dself.instance)"},{"line_number":247,"context_line":"            # Neutron doesn\u0027t support the binding-extended API so we can\u0027t"},{"line_number":248,"context_line":"            # attempt port binding on the destination host."},{"line_number":249,"context_line":"            return"},{"line_number":250,"context_line":""},{"line_number":251,"context_line":"        # Check to see that both the source and destination compute hosts"},{"line_number":252,"context_line":"        # are new enough to support the new port binding flow."}],"source_content_type":"text/x-python","patch_set":35,"id":"5f7c97a3_e906cb1b","line":249,"in_reply_to":"5f7c97a3_74af137c","updated":"2018-07-26 18:14:27.000000000","message":"Done; although we\u0027ll lose the specific logging about why we didn\u0027t do the new thing.","commit_id":"2d5c6fd8eb677e8e223251bc8cdb0427da0f33ba"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"d5f9db9c7f8558abc7752e27131a47cfcb9f2b2d","unresolved":false,"context_lines":[{"line_number":246,"context_line":"                      instance\u003dself.instance)"},{"line_number":247,"context_line":"            # Neutron doesn\u0027t support the binding-extended API so we can\u0027t"},{"line_number":248,"context_line":"            # attempt port binding on the destination host."},{"line_number":249,"context_line":"            return"},{"line_number":250,"context_line":""},{"line_number":251,"context_line":"        # Check to see that both the source and destination compute hosts"},{"line_number":252,"context_line":"        # are new enough to support the new port binding flow."}],"source_content_type":"text/x-python","patch_set":35,"id":"5f7c97a3_74af137c","line":249,"in_reply_to":"5f7c97a3_dfc9657a","updated":"2018-07-25 18:46:34.000000000","message":"I short-circuited to avoid the service version lookups on the source and dest host. But I guess we can do:\n\nif (self.network_api.supports_port_binding_extension(self.context) and\n    supports_extended_port_binding(self.context, self.source) and\n    supports_extended_port_binding(self.context, destination)):\n   ....\n\n\nAnd that should avoid the DB calls if the first condition fails.\n\nI\u0027ll change it in the follow up patch at the end.","commit_id":"2d5c6fd8eb677e8e223251bc8cdb0427da0f33ba"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"83104dfd4f1314c6dc18be83c81174b0265827b6","unresolved":false,"context_lines":[{"line_number":276,"context_line":"        migrate_vifs \u003d []"},{"line_number":277,"context_line":"        for port_id, binding in bindings.items():"},{"line_number":278,"context_line":"            migrate_vif \u003d objects.VIFMigrateData("},{"line_number":279,"context_line":"                port_id\u003dport_id, **binding)"},{"line_number":280,"context_line":"            migrate_vif.source_vif \u003d source_vif_map[port_id]"},{"line_number":281,"context_line":"            migrate_vifs.append(migrate_vif)"},{"line_number":282,"context_line":"        return migrate_vifs"}],"source_content_type":"text/x-python","patch_set":35,"id":"5f7c97a3_afe1bcff","line":279,"range":{"start_line":279,"start_character":35,"end_line":279,"end_character":42},"updated":"2018-07-26 13:58:29.000000000","message":"This will try to set every key form the neutron response on the VIFMigrateData ovo. Based on the neutron spec there is a status key of the binding in the response but there is no such field in the VIFMigrateData ovo. I don\u0027t know what this can cause but I would do an explicit copy field by field instead as that will also work if later on neutron extends the binding response with new fields.","commit_id":"2d5c6fd8eb677e8e223251bc8cdb0427da0f33ba"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"e106f5fef274e308c7519b01610137c16dddfea8","unresolved":false,"context_lines":[{"line_number":276,"context_line":"        migrate_vifs \u003d []"},{"line_number":277,"context_line":"        for port_id, binding in bindings.items():"},{"line_number":278,"context_line":"            migrate_vif \u003d objects.VIFMigrateData("},{"line_number":279,"context_line":"                port_id\u003dport_id, **binding)"},{"line_number":280,"context_line":"            migrate_vif.source_vif \u003d source_vif_map[port_id]"},{"line_number":281,"context_line":"            migrate_vifs.append(migrate_vif)"},{"line_number":282,"context_line":"        return migrate_vifs"}],"source_content_type":"text/x-python","patch_set":35,"id":"5f7c97a3_cf62f841","line":279,"range":{"start_line":279,"start_character":35,"end_line":279,"end_character":42},"in_reply_to":"5f7c97a3_8f3e4024","updated":"2018-07-26 14:06:16.000000000","message":"Then I just consider it ugly as it creates a field that somebody can read _until_ the object is moved across the wire. But if this does not break anything right now then it is not a blocker for me right now.","commit_id":"2d5c6fd8eb677e8e223251bc8cdb0427da0f33ba"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"26fc6f0a00b82f7e1baf400862815343fe49194c","unresolved":false,"context_lines":[{"line_number":276,"context_line":"        migrate_vifs \u003d []"},{"line_number":277,"context_line":"        for port_id, binding in bindings.items():"},{"line_number":278,"context_line":"            migrate_vif \u003d objects.VIFMigrateData("},{"line_number":279,"context_line":"                port_id\u003dport_id, **binding)"},{"line_number":280,"context_line":"            migrate_vif.source_vif \u003d source_vif_map[port_id]"},{"line_number":281,"context_line":"            migrate_vifs.append(migrate_vif)"},{"line_number":282,"context_line":"        return migrate_vifs"}],"source_content_type":"text/x-python","patch_set":35,"id":"5f7c97a3_6f1c04c2","line":279,"range":{"start_line":279,"start_character":35,"end_line":279,"end_character":42},"in_reply_to":"5f7c97a3_8f3e4024","updated":"2018-07-26 14:03:39.000000000","message":"Yeah, this will not set things that aren\u0027t actual fields. It\u0027s kinda (very) messy and potentially (very) confusing, but technically it should be okay.","commit_id":"2d5c6fd8eb677e8e223251bc8cdb0427da0f33ba"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"23eaaba632de7787570b992bba79241b69572902","unresolved":false,"context_lines":[{"line_number":276,"context_line":"        migrate_vifs \u003d []"},{"line_number":277,"context_line":"        for port_id, binding in bindings.items():"},{"line_number":278,"context_line":"            migrate_vif \u003d objects.VIFMigrateData("},{"line_number":279,"context_line":"                port_id\u003dport_id, **binding)"},{"line_number":280,"context_line":"            migrate_vif.source_vif \u003d source_vif_map[port_id]"},{"line_number":281,"context_line":"            migrate_vifs.append(migrate_vif)"},{"line_number":282,"context_line":"        return migrate_vifs"}],"source_content_type":"text/x-python","patch_set":35,"id":"5f7c97a3_8f3e4024","line":279,"range":{"start_line":279,"start_character":35,"end_line":279,"end_character":42},"in_reply_to":"5f7c97a3_afe1bcff","updated":"2018-07-26 14:02:44.000000000","message":"It should just set an attribute on the object which isn\u0027t actually represented as a field, which is OK.","commit_id":"2d5c6fd8eb677e8e223251bc8cdb0427da0f33ba"}]}
