)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"e9c85afd38e856eafd2803b30d3f322ea4f23816","unresolved":false,"context_lines":[{"line_number":10,"context_line":"destination host and update domain XML during migration to"},{"line_number":11,"context_line":"use the new reserved ports from destination."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"If the migration success we release ports on source hosts"},{"line_number":14,"context_line":"If the migration fails we release reserved ports on"},{"line_number":15,"context_line":"destination hosts."},{"line_number":16,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":11,"id":"dab17558_a91bc371","line":13,"updated":"2016-05-17 18:54:19.000000000","message":"s/success/succeeds/","commit_id":"c4a9a5435c4f6b20f1644b57254611e912cdfb01"},{"author":{"_account_id":12299,"name":"Paweł Koniszewski","email":"pawel.koniszewski@gmail.com","username":"pawel.koniszewski"},"change_message_id":"c144943ac395edf8a35ec0f80c62a30e874431b5","unresolved":false,"context_lines":[{"line_number":1,"context_line":"Parent:     d2b0e319 (libvirt: do not return serial address if disabled on destination)"},{"line_number":2,"context_line":"Author:     Sahid Orentino Ferdjaoui \u003csahid.ferdjaoui@redhat.com\u003e"},{"line_number":3,"context_line":"AuthorDate: 2016-11-14 10:47:34 -0500"},{"line_number":4,"context_line":"Commit:     Sahid Orentino Ferdjaoui \u003csahid.ferdjaoui@redhat.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2016-11-14 11:17:20 -0500"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":31,"id":"7a77a97e_95ac25ef","line":2,"updated":"2016-11-15 09:46:09.000000000","message":"Original author is missing","commit_id":"46cff60720fd515fb52ba9beba4b20a0063d95f5"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"00024b7ba7a3d775cadb98002a3484fedab97011","unresolved":false,"context_lines":[{"line_number":1,"context_line":"Parent:     d2b0e319 (libvirt: do not return serial address if disabled on destination)"},{"line_number":2,"context_line":"Author:     Sahid Orentino Ferdjaoui \u003csahid.ferdjaoui@redhat.com\u003e"},{"line_number":3,"context_line":"AuthorDate: 2016-11-14 10:47:34 -0500"},{"line_number":4,"context_line":"Commit:     Sahid Orentino Ferdjaoui \u003csahid.ferdjaoui@redhat.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2016-11-14 11:17:20 -0500"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":31,"id":"7a77a97e_34ab4c76","line":2,"in_reply_to":"7a77a97e_95ac25ef","updated":"2016-11-15 12:31:24.000000000","message":"Oh yes, nice to notice that to me I made some mistake during the rebase to incorporate the previous patch. I will fix that.","commit_id":"46cff60720fd515fb52ba9beba4b20a0063d95f5"}],"nova/tests/unit/virt/libvirt/test_driver.py":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"2b375d45a3348343825a53c85c5e956923da5f2a","unresolved":false,"context_lines":[{"line_number":7959,"context_line":"            target_connect_addr\u003dNone,"},{"line_number":7960,"context_line":"            bdms\u003d[],"},{"line_number":7961,"context_line":"            block_migration\u003dFalse,"},{"line_number":7962,"context_line":"            serial_listen_ports\u003d[10200, 1023])"},{"line_number":7963,"context_line":"        dom \u003d fakelibvirt.virDomain"},{"line_number":7964,"context_line":"        guest \u003d libvirt_guest.Guest(dom)"},{"line_number":7965,"context_line":"        drvr \u003d libvirt_driver.LibvirtDriver(fake.FakeVirtAPI(), False)"}],"source_content_type":"text/x-python","patch_set":17,"id":"bacf61ea_fe414264","line":7962,"updated":"2016-07-31 14:36:17.000000000","message":"any particular reason to use 1023 above? I don\u0027t see it used anywhere in assertions...","commit_id":"8cc0c300382d4b04eabd42796c9eea8da4e83c1f"},{"author":{"_account_id":11303,"name":"Markus Zoeller (markus_z)","email":"mzoeller@linux.vnet.ibm.com","username":"mzoeller"},"change_message_id":"36d5713695d77eb36516b16dcf48225c3ca09307","unresolved":false,"context_lines":[{"line_number":7959,"context_line":"            target_connect_addr\u003dNone,"},{"line_number":7960,"context_line":"            bdms\u003d[],"},{"line_number":7961,"context_line":"            block_migration\u003dFalse,"},{"line_number":7962,"context_line":"            serial_listen_ports\u003d[10200, 1023])"},{"line_number":7963,"context_line":"        dom \u003d fakelibvirt.virDomain"},{"line_number":7964,"context_line":"        guest \u003d libvirt_guest.Guest(dom)"},{"line_number":7965,"context_line":"        drvr \u003d libvirt_driver.LibvirtDriver(fake.FakeVirtAPI(), False)"}],"source_content_type":"text/x-python","patch_set":17,"id":"bacf61ea_a0d31c03","line":7962,"in_reply_to":"bacf61ea_fe414264","updated":"2016-08-01 08:18:01.000000000","message":"@Jay: No, there\u0027s no reason for the port \"1023\". As there is only one serial console for the guest, the second port number isn\u0027t used anyway. Must have been a typo. I\u0027m going to remove that for ps18.","commit_id":"8cc0c300382d4b04eabd42796c9eea8da4e83c1f"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"ada416695771b7041621d2be6c9fe279bb68c30f","unresolved":false,"context_lines":[{"line_number":3574,"context_line":"    @mock.patch(\u0027nova.virt.hardware.get_number_of_serial_ports\u0027,"},{"line_number":3575,"context_line":"                return_value\u003d1)"},{"line_number":3576,"context_line":"    @mock.patch.object(libvirt_driver.libvirt_utils, \u0027get_arch\u0027,)"},{"line_number":3577,"context_line":"    def test_create_serial_console_devices_based_on_arch(self, mock_get_arch,"},{"line_number":3578,"context_line":"                                           mock_get_port_number,"},{"line_number":3579,"context_line":"                                           mock_acquire_port,"},{"line_number":3580,"context_line":"                                           mock_guest, mock_ports):"},{"line_number":3581,"context_line":"        self.flags(enabled\u003dTrue, group\u003d\u0027serial_console\u0027)"},{"line_number":3582,"context_line":"        drvr \u003d libvirt_driver.LibvirtDriver(fake.FakeVirtAPI(), True)"},{"line_number":3583,"context_line":""}],"source_content_type":"text/x-python","patch_set":26,"id":"5a8bc5a2_368a33c0","line":3580,"range":{"start_line":3577,"start_character":0,"end_line":3580,"end_character":67},"updated":"2016-09-23 14:18:41.000000000","message":"nit: you could just rewrap this","commit_id":"9182e2c6fe066ae4c0726c0aa57408cb969f286b"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"ada416695771b7041621d2be6c9fe279bb68c30f","unresolved":false,"context_lines":[{"line_number":3577,"context_line":"    def test_create_serial_console_devices_based_on_arch(self, mock_get_arch,"},{"line_number":3578,"context_line":"                                           mock_get_port_number,"},{"line_number":3579,"context_line":"                                           mock_acquire_port,"},{"line_number":3580,"context_line":"                                           mock_guest, mock_ports):"},{"line_number":3581,"context_line":"        self.flags(enabled\u003dTrue, group\u003d\u0027serial_console\u0027)"},{"line_number":3582,"context_line":"        drvr \u003d libvirt_driver.LibvirtDriver(fake.FakeVirtAPI(), True)"},{"line_number":3583,"context_line":""}],"source_content_type":"text/x-python","patch_set":26,"id":"5a8bc5a2_b663a319","line":3580,"range":{"start_line":3580,"start_character":43,"end_line":3580,"end_character":65},"updated":"2016-09-23 14:18:41.000000000","message":"you\u0027ve put these names backwards?","commit_id":"9182e2c6fe066ae4c0726c0aa57408cb969f286b"},{"author":{"_account_id":11303,"name":"Markus Zoeller (markus_z)","email":"mzoeller@linux.vnet.ibm.com","username":"mzoeller"},"change_message_id":"1a699eb1075be1dfa6e218371adcc73283d9707b","unresolved":false,"context_lines":[{"line_number":3574,"context_line":"    @mock.patch(\u0027nova.virt.hardware.get_number_of_serial_ports\u0027,"},{"line_number":3575,"context_line":"                return_value\u003d1)"},{"line_number":3576,"context_line":"    @mock.patch.object(libvirt_driver.libvirt_utils, \u0027get_arch\u0027,)"},{"line_number":3577,"context_line":"    def test_create_serial_console_devices_based_on_arch(self, mock_get_arch,"},{"line_number":3578,"context_line":"                                           mock_get_port_number,"},{"line_number":3579,"context_line":"                                           mock_acquire_port,"},{"line_number":3580,"context_line":"                                           mock_guest, mock_ports):"},{"line_number":3581,"context_line":"        self.flags(enabled\u003dTrue, group\u003d\u0027serial_console\u0027)"},{"line_number":3582,"context_line":"        drvr \u003d libvirt_driver.LibvirtDriver(fake.FakeVirtAPI(), True)"},{"line_number":3583,"context_line":""}],"source_content_type":"text/x-python","patch_set":26,"id":"1a95cdbc_ea1a1b7c","line":3580,"range":{"start_line":3577,"start_character":0,"end_line":3580,"end_character":67},"in_reply_to":"5a8bc5a2_368a33c0","updated":"2016-10-10 11:40:56.000000000","message":"@Stephen: What do you mean with \"rewrap this\"?","commit_id":"9182e2c6fe066ae4c0726c0aa57408cb969f286b"},{"author":{"_account_id":11303,"name":"Markus Zoeller (markus_z)","email":"mzoeller@linux.vnet.ibm.com","username":"mzoeller"},"change_message_id":"1a699eb1075be1dfa6e218371adcc73283d9707b","unresolved":false,"context_lines":[{"line_number":3577,"context_line":"    def test_create_serial_console_devices_based_on_arch(self, mock_get_arch,"},{"line_number":3578,"context_line":"                                           mock_get_port_number,"},{"line_number":3579,"context_line":"                                           mock_acquire_port,"},{"line_number":3580,"context_line":"                                           mock_guest, mock_ports):"},{"line_number":3581,"context_line":"        self.flags(enabled\u003dTrue, group\u003d\u0027serial_console\u0027)"},{"line_number":3582,"context_line":"        drvr \u003d libvirt_driver.LibvirtDriver(fake.FakeVirtAPI(), True)"},{"line_number":3583,"context_line":""}],"source_content_type":"text/x-python","patch_set":26,"id":"1a95cdbc_8a2357bc","line":3580,"range":{"start_line":3580,"start_character":43,"end_line":3580,"end_character":65},"in_reply_to":"5a8bc5a2_b663a319","updated":"2016-10-10 11:40:56.000000000","message":"@Stephen: Yes, you\u0027re right, I\u0027ll fix the \"name swap\" for ps 27.","commit_id":"9182e2c6fe066ae4c0726c0aa57408cb969f286b"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"ada416695771b7041621d2be6c9fe279bb68c30f","unresolved":false,"context_lines":[{"line_number":3603,"context_line":"    @mock.patch.object(libvirt_driver.libvirt_utils, \u0027get_arch\u0027,"},{"line_number":3604,"context_line":"                       side_effect\u003d[arch.X86_64, arch.S390, arch.S390X])"},{"line_number":3605,"context_line":"    def test_create_serial_console_devices_with_limit_exceeded_based_on_arch("},{"line_number":3606,"context_line":"            self, mock_get_arch, mock_get_port_number, mock_guest, mock_ports):"},{"line_number":3607,"context_line":"        self.flags(enabled\u003dTrue, group\u003d\u0027serial_console\u0027)"},{"line_number":3608,"context_line":"        self.flags(virt_type\u003d\"qemu\", group\u003d\u0027libvirt\u0027)"},{"line_number":3609,"context_line":"        flavor \u003d \u0027fake_flavor\u0027"}],"source_content_type":"text/x-python","patch_set":26,"id":"5a8bc5a2_f109b52d","line":3606,"range":{"start_line":3606,"start_character":55,"end_line":3606,"end_character":77},"updated":"2016-09-23 14:18:41.000000000","message":"These are backwards, no?\n\n    @mock.patch(\u0027func_aaa\u0027)\n    @mock.patch(\u0027func_bbb\u0027)\n    def test_xxx(self, mock_func_bbb, mock_func_aaa)","commit_id":"9182e2c6fe066ae4c0726c0aa57408cb969f286b"},{"author":{"_account_id":11303,"name":"Markus Zoeller (markus_z)","email":"mzoeller@linux.vnet.ibm.com","username":"mzoeller"},"change_message_id":"1a699eb1075be1dfa6e218371adcc73283d9707b","unresolved":false,"context_lines":[{"line_number":3603,"context_line":"    @mock.patch.object(libvirt_driver.libvirt_utils, \u0027get_arch\u0027,"},{"line_number":3604,"context_line":"                       side_effect\u003d[arch.X86_64, arch.S390, arch.S390X])"},{"line_number":3605,"context_line":"    def test_create_serial_console_devices_with_limit_exceeded_based_on_arch("},{"line_number":3606,"context_line":"            self, mock_get_arch, mock_get_port_number, mock_guest, mock_ports):"},{"line_number":3607,"context_line":"        self.flags(enabled\u003dTrue, group\u003d\u0027serial_console\u0027)"},{"line_number":3608,"context_line":"        self.flags(virt_type\u003d\"qemu\", group\u003d\u0027libvirt\u0027)"},{"line_number":3609,"context_line":"        flavor \u003d \u0027fake_flavor\u0027"}],"source_content_type":"text/x-python","patch_set":26,"id":"1a95cdbc_4a14ef4b","line":3606,"range":{"start_line":3606,"start_character":55,"end_line":3606,"end_character":77},"in_reply_to":"5a8bc5a2_f109b52d","updated":"2016-10-10 11:40:56.000000000","message":"@Stephen: Yes, I\u0027ll fix the \"name swap\" with ps 27.","commit_id":"9182e2c6fe066ae4c0726c0aa57408cb969f286b"},{"author":{"_account_id":11303,"name":"Markus Zoeller (markus_z)","email":"mzoeller@linux.vnet.ibm.com","username":"mzoeller"},"change_message_id":"4023a5849c40136d57b5fc2b7353df416a16f29b","unresolved":false,"context_lines":[{"line_number":7217,"context_line":"        drvr.check_can_live_migrate_source(self.context, instance,"},{"line_number":7218,"context_line":"                                           dest_check_data)"},{"line_number":7219,"context_line":""},{"line_number":7220,"context_line":"    def test_check_can_live_migrate_source_not_serial_enabled(self):"},{"line_number":7221,"context_line":"        self.flags(enabled\u003dTrue, group\u003d\"serial_console\")"},{"line_number":7222,"context_line":"        instance, dest_check_data, drvr \u003d self._mock_can_live_migrate_source()"},{"line_number":7223,"context_line":"        dest_check_data.serial_listen_addr \u003d \u0027\u0027"}],"source_content_type":"text/x-python","patch_set":34,"id":"7a77a97e_4fd80780","line":7220,"updated":"2016-11-22 16:09:01.000000000","message":"This will be removed in ps35, as we concluded that the move of \"_verify_serial_console\" shouldn\u0027t be part of this change.","commit_id":"b433efeebac4f8cba87c3d228669747d48b56d94"}],"nova/tests/unit/virt/libvirt/test_migration.py":[{"author":{"_account_id":10618,"name":"Pavel Kholkin","email":"p.v.holkin@mail.ru","username":"pkholkin"},"change_message_id":"afe766a6dafd7a1f48a51cc9af76d9f6ecf73b13","unresolved":false,"context_lines":[{"line_number":114,"context_line":"\u003c/domain\u003e\"\"\""},{"line_number":115,"context_line":"        doc \u003d etree.fromstring(xml)"},{"line_number":116,"context_line":"        res \u003d etree.tostring(migration._update_serial_xml(doc, data))"},{"line_number":117,"context_line":"        new_xml \u003d xml.replace(\"127.0.0.1\", \"127.0.0.100\")\\"},{"line_number":118,"context_line":"            .replace(\"2000\", \"2001\")"},{"line_number":119,"context_line":"        self.assertThat(res, matchers.XMLMatches(new_xml))"},{"line_number":120,"context_line":""}],"source_content_type":"text/x-python","patch_set":27,"id":"1a95cdbc_dca4454c","line":117,"updated":"2016-10-10 13:21:23.000000000","message":"please try to avoid backslash \u0027\\\u0027, make a new line after brackets \u0027(\u0027","commit_id":"e347cad8b35d5b029f48d114a7968e16574b738b"},{"author":{"_account_id":11303,"name":"Markus Zoeller (markus_z)","email":"mzoeller@linux.vnet.ibm.com","username":"mzoeller"},"change_message_id":"f441bc73ba257c48193a9247efd491c26c740046","unresolved":false,"context_lines":[{"line_number":114,"context_line":"\u003c/domain\u003e\"\"\""},{"line_number":115,"context_line":"        doc \u003d etree.fromstring(xml)"},{"line_number":116,"context_line":"        res \u003d etree.tostring(migration._update_serial_xml(doc, data))"},{"line_number":117,"context_line":"        new_xml \u003d xml.replace(\"127.0.0.1\", \"127.0.0.100\")\\"},{"line_number":118,"context_line":"            .replace(\"2000\", \"2001\")"},{"line_number":119,"context_line":"        self.assertThat(res, matchers.XMLMatches(new_xml))"},{"line_number":120,"context_line":""}],"source_content_type":"text/x-python","patch_set":27,"id":"1a95cdbc_86198b24","line":117,"in_reply_to":"1a95cdbc_dca4454c","updated":"2016-10-10 14:04:48.000000000","message":"Done","commit_id":"e347cad8b35d5b029f48d114a7968e16574b738b"},{"author":{"_account_id":10618,"name":"Pavel Kholkin","email":"p.v.holkin@mail.ru","username":"pkholkin"},"change_message_id":"afe766a6dafd7a1f48a51cc9af76d9f6ecf73b13","unresolved":false,"context_lines":[{"line_number":136,"context_line":"\u003c/domain\u003e\"\"\""},{"line_number":137,"context_line":"        doc \u003d etree.fromstring(xml)"},{"line_number":138,"context_line":"        res \u003d etree.tostring(migration._update_serial_xml(doc, data))"},{"line_number":139,"context_line":"        new_xml \u003d xml.replace(\"127.0.0.1\", \"127.0.0.100\")\\"},{"line_number":140,"context_line":"            .replace(\"2001\", \"299\").replace(\"2002\", \"300\")"},{"line_number":141,"context_line":""},{"line_number":142,"context_line":"        self.assertThat(res, matchers.XMLMatches(new_xml))"}],"source_content_type":"text/x-python","patch_set":27,"id":"1a95cdbc_1c694df9","line":139,"updated":"2016-10-10 13:21:23.000000000","message":"the same","commit_id":"e347cad8b35d5b029f48d114a7968e16574b738b"},{"author":{"_account_id":11303,"name":"Markus Zoeller (markus_z)","email":"mzoeller@linux.vnet.ibm.com","username":"mzoeller"},"change_message_id":"f441bc73ba257c48193a9247efd491c26c740046","unresolved":false,"context_lines":[{"line_number":136,"context_line":"\u003c/domain\u003e\"\"\""},{"line_number":137,"context_line":"        doc \u003d etree.fromstring(xml)"},{"line_number":138,"context_line":"        res \u003d etree.tostring(migration._update_serial_xml(doc, data))"},{"line_number":139,"context_line":"        new_xml \u003d xml.replace(\"127.0.0.1\", \"127.0.0.100\")\\"},{"line_number":140,"context_line":"            .replace(\"2001\", \"299\").replace(\"2002\", \"300\")"},{"line_number":141,"context_line":""},{"line_number":142,"context_line":"        self.assertThat(res, matchers.XMLMatches(new_xml))"}],"source_content_type":"text/x-python","patch_set":27,"id":"1a95cdbc_c6d5531c","line":139,"in_reply_to":"1a95cdbc_1c694df9","updated":"2016-10-10 14:04:48.000000000","message":"Done","commit_id":"e347cad8b35d5b029f48d114a7968e16574b738b"}],"nova/virt/libvirt/driver.py":[{"author":{"_account_id":16366,"name":"Randall Nortman","email":"openstack@nortman.net","username":"rnortman"},"change_message_id":"b202f34043ee6732d22f300e468c909c0dacb167","unresolved":false,"context_lines":[{"line_number":6631,"context_line":"        for port in six.moves.range(num_ports):"},{"line_number":6632,"context_line":"            migrate_data.serial_listen_ports.append("},{"line_number":6633,"context_line":"                    serial_console.acquire_port("},{"line_number":6634,"context_line":"                        CONF.serial_console.proxyclient_address))"},{"line_number":6635,"context_line":""},{"line_number":6636,"context_line":"        for vol in block_device_mapping:"},{"line_number":6637,"context_line":"            connection_info \u003d vol[\u0027connection_info\u0027]"}],"source_content_type":"text/x-python","patch_set":6,"id":"dae33548_bdf21f04","line":6634,"updated":"2016-02-18 02:36:36.000000000","message":"DRY: Use migrate_data.serial_listen_addr here instead of CONF.serial_console.proxyclient_address, so that just in case the line above (6623) changes, there\u0027s no risk of the change not propagating here.","commit_id":"e621ac53e0e1e8ba3d922f03cc8e3f2b3add35de"},{"author":{"_account_id":13816,"name":"Marco Pavone","email":"marco.pavone@de.ibm.com","username":"pavone"},"change_message_id":"f894673eb2285d78d6e6b2b4e4e183ccc43646a8","unresolved":false,"context_lines":[{"line_number":6631,"context_line":"        for port in six.moves.range(num_ports):"},{"line_number":6632,"context_line":"            migrate_data.serial_listen_ports.append("},{"line_number":6633,"context_line":"                    serial_console.acquire_port("},{"line_number":6634,"context_line":"                        CONF.serial_console.proxyclient_address))"},{"line_number":6635,"context_line":""},{"line_number":6636,"context_line":"        for vol in block_device_mapping:"},{"line_number":6637,"context_line":"            connection_info \u003d vol[\u0027connection_info\u0027]"}],"source_content_type":"text/x-python","patch_set":6,"id":"bae84128_46da42e9","line":6634,"in_reply_to":"dae33548_bdf21f04","updated":"2016-02-23 13:09:38.000000000","message":"Done","commit_id":"e621ac53e0e1e8ba3d922f03cc8e3f2b3add35de"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"773ee89ee5b19961637a430bf95dafe0606e8c2c","unresolved":false,"context_lines":[{"line_number":6073,"context_line":"            # post_live_migration_at_source but no way to retrieve"},{"line_number":6074,"context_line":"            # ports acquire on the host for the guest at this step."},{"line_number":6075,"context_line":"            if CONF.serial_console.enabled:"},{"line_number":6076,"context_line":"                serials \u003d self._get_serial_ports_from_guest(guest)"},{"line_number":6077,"context_line":"                for hostname, port in serials:"},{"line_number":6078,"context_line":"                    serial_console.release_port(host\u003dhostname, port\u003dport)"},{"line_number":6079,"context_line":"        except Exception as e:"}],"source_content_type":"text/x-python","patch_set":10,"id":"dab17558_c05f9a73","line":6076,"updated":"2016-05-13 14:05:13.000000000","message":"That will not work the guest is already gone","commit_id":"f99edac2a7d13f592557b6b8b744032506cb9f16"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"773ee89ee5b19961637a430bf95dafe0606e8c2c","unresolved":false,"context_lines":[{"line_number":6904,"context_line":"            instance.flavor, instance.image_meta)"},{"line_number":6905,"context_line":"        for port in six.moves.range(num_ports):"},{"line_number":6906,"context_line":"            serial_console.release_port("},{"line_number":6907,"context_line":"                hostname\u003dCONF.serial_console.proxyclient_address,"},{"line_number":6908,"context_line":"                port\u003dport)"},{"line_number":6909,"context_line":""},{"line_number":6910,"context_line":"    def post_live_migration_at_destination(self, context,"}],"source_content_type":"text/x-python","patch_set":10,"id":"dab17558_008362cd","line":6907,"updated":"2016-05-13 14:05:13.000000000","message":"s/hostname/host","commit_id":"f99edac2a7d13f592557b6b8b744032506cb9f16"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"e9c85afd38e856eafd2803b30d3f322ea4f23816","unresolved":false,"context_lines":[{"line_number":3977,"context_line":"                    return"},{"line_number":3978,"context_line":"            except exception.NovaException:"},{"line_number":3979,"context_line":"                # During instance boot the domain might not been"},{"line_number":3980,"context_line":"                # created in libvirt."},{"line_number":3981,"context_line":"                pass"},{"line_number":3982,"context_line":"            num_ports \u003d hardware.get_number_of_serial_ports("},{"line_number":3983,"context_line":"                flavor, image_meta)"}],"source_content_type":"text/x-python","patch_set":11,"id":"dab17558_8916bf46","line":3980,"updated":"2016-05-17 18:54:19.000000000","message":"Probably a need for a DEBUG (at least) log message here. If we are ignoring any exception at all we should at least log what the exception is. Finally, if there are *specific* exceptions that we should ignore, for example a non-existing domain, then how about we catch those exceptions specifically and handle with a pass and LOG.error() any other exceptions?","commit_id":"c4a9a5435c4f6b20f1644b57254611e912cdfb01"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"f3d023ad5fe98446cab444b0ad955c854f16dea7","unresolved":false,"context_lines":[{"line_number":3977,"context_line":"                    return"},{"line_number":3978,"context_line":"            except exception.NovaException:"},{"line_number":3979,"context_line":"                # During instance boot the domain might not been"},{"line_number":3980,"context_line":"                # created in libvirt."},{"line_number":3981,"context_line":"                pass"},{"line_number":3982,"context_line":"            num_ports \u003d hardware.get_number_of_serial_ports("},{"line_number":3983,"context_line":"                flavor, image_meta)"}],"source_content_type":"text/x-python","patch_set":11,"id":"bab6814e_57da8c79","line":3980,"in_reply_to":"dab17558_8916bf46","updated":"2016-05-18 11:03:04.000000000","message":"NovaException is the exception returned by the method get_guest, we can\u0027t be more specific currently unfortunately.\n\nOk I will add a log.","commit_id":"c4a9a5435c4f6b20f1644b57254611e912cdfb01"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"e9c85afd38e856eafd2803b30d3f322ea4f23816","unresolved":false,"context_lines":[{"line_number":5763,"context_line":""},{"line_number":5764,"context_line":"            # TODO(sahid): This should be in"},{"line_number":5765,"context_line":"            # post_live_migration_at_source but no way to retrieve"},{"line_number":5766,"context_line":"            # ports acquire on the host for the guest at this step."},{"line_number":5767,"context_line":"            if old_serial_listen_ports:"},{"line_number":5768,"context_line":"                for hostname, port in old_serial_listen_ports:"},{"line_number":5769,"context_line":"                    serial_console.release_port(host\u003dhostname, port\u003dport)"}],"source_content_type":"text/x-python","patch_set":11,"id":"dab17558_e9278bb3","line":5766,"updated":"2016-05-17 18:54:19.000000000","message":"s/acquire/acquired/","commit_id":"c4a9a5435c4f6b20f1644b57254611e912cdfb01"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"2b375d45a3348343825a53c85c5e956923da5f2a","unresolved":false,"context_lines":[{"line_number":4091,"context_line":"                    # Serial port are already configured for instance that"},{"line_number":4092,"context_line":"                    # means we are in a context of migration."},{"line_number":4093,"context_line":"                    return"},{"line_number":4094,"context_line":"            except exception.NovaException:"},{"line_number":4095,"context_line":"                LOG.debug(\"Instance is not existing yet on libvirt, we can \""},{"line_number":4096,"context_line":"                          \"safely pass on looking for already defined serial \""},{"line_number":4097,"context_line":"                          \"ports in its domain XML\", instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":17,"id":"bacf61ea_deea7e73","line":4094,"updated":"2016-07-31 14:36:17.000000000","message":"Can we please put a specific exception class here instead of the NovaException catch-all?","commit_id":"8cc0c300382d4b04eabd42796c9eea8da4e83c1f"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"2342e561a58aeb726d7374a5819dd7a13333c085","unresolved":false,"context_lines":[{"line_number":4091,"context_line":"                    # Serial port are already configured for instance that"},{"line_number":4092,"context_line":"                    # means we are in a context of migration."},{"line_number":4093,"context_line":"                    return"},{"line_number":4094,"context_line":"            except exception.NovaException:"},{"line_number":4095,"context_line":"                LOG.debug(\"Instance is not existing yet on libvirt, we can \""},{"line_number":4096,"context_line":"                          \"safely pass on looking for already defined serial \""},{"line_number":4097,"context_line":"                          \"ports in its domain XML\", instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":17,"id":"9a89bdaa_df61a9d4","line":4094,"in_reply_to":"bacf61ea_808898c6","updated":"2016-09-08 07:22:29.000000000","message":"Yes it\u0027s something we can do, if an other exception than InstanceNoFound I guess we should stop the process.","commit_id":"8cc0c300382d4b04eabd42796c9eea8da4e83c1f"},{"author":{"_account_id":11303,"name":"Markus Zoeller (markus_z)","email":"mzoeller@linux.vnet.ibm.com","username":"mzoeller"},"change_message_id":"36d5713695d77eb36516b16dcf48225c3ca09307","unresolved":false,"context_lines":[{"line_number":4091,"context_line":"                    # Serial port are already configured for instance that"},{"line_number":4092,"context_line":"                    # means we are in a context of migration."},{"line_number":4093,"context_line":"                    return"},{"line_number":4094,"context_line":"            except exception.NovaException:"},{"line_number":4095,"context_line":"                LOG.debug(\"Instance is not existing yet on libvirt, we can \""},{"line_number":4096,"context_line":"                          \"safely pass on looking for already defined serial \""},{"line_number":4097,"context_line":"                          \"ports in its domain XML\", instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":17,"id":"bacf61ea_808898c6","line":4094,"in_reply_to":"bacf61ea_deea7e73","updated":"2016-08-01 08:18:01.000000000","message":"I\u0027m going to catch the \"InstanceNotFound\" exception raised at https://github.com/openstack/nova/blob/ef92e3f6fa0059fb19e1ce5af0b8c2ff7e113add/nova/virt/libvirt/host.py#L537-L537 in ps18.\nThat\u0027s more specific and tells a better story why we have a try-except block here.","commit_id":"8cc0c300382d4b04eabd42796c9eea8da4e83c1f"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"2b375d45a3348343825a53c85c5e956923da5f2a","unresolved":false,"context_lines":[{"line_number":4092,"context_line":"                    # means we are in a context of migration."},{"line_number":4093,"context_line":"                    return"},{"line_number":4094,"context_line":"            except exception.NovaException:"},{"line_number":4095,"context_line":"                LOG.debug(\"Instance is not existing yet on libvirt, we can \""},{"line_number":4096,"context_line":"                          \"safely pass on looking for already defined serial \""},{"line_number":4097,"context_line":"                          \"ports in its domain XML\", instance\u003dinstance)"},{"line_number":4098,"context_line":"                pass"}],"source_content_type":"text/x-python","patch_set":17,"id":"bacf61ea_3e047a48","line":4095,"updated":"2016-07-31 14:36:17.000000000","message":"s/is not existing yet/does not exist yet/","commit_id":"8cc0c300382d4b04eabd42796c9eea8da4e83c1f"},{"author":{"_account_id":11303,"name":"Markus Zoeller (markus_z)","email":"mzoeller@linux.vnet.ibm.com","username":"mzoeller"},"change_message_id":"36d5713695d77eb36516b16dcf48225c3ca09307","unresolved":false,"context_lines":[{"line_number":4092,"context_line":"                    # means we are in a context of migration."},{"line_number":4093,"context_line":"                    return"},{"line_number":4094,"context_line":"            except exception.NovaException:"},{"line_number":4095,"context_line":"                LOG.debug(\"Instance is not existing yet on libvirt, we can \""},{"line_number":4096,"context_line":"                          \"safely pass on looking for already defined serial \""},{"line_number":4097,"context_line":"                          \"ports in its domain XML\", instance\u003dinstance)"},{"line_number":4098,"context_line":"                pass"}],"source_content_type":"text/x-python","patch_set":17,"id":"bacf61ea_4086a0db","line":4095,"in_reply_to":"bacf61ea_3e047a48","updated":"2016-08-01 08:18:01.000000000","message":"Done","commit_id":"8cc0c300382d4b04eabd42796c9eea8da4e83c1f"},{"author":{"_account_id":12712,"name":"Gleb Stepanov","email":"gstepanov@mirantis.com","username":"stgleb"},"change_message_id":"d00f354e7b1e96b8a72ce3abf5e08e8a327c8e1f","unresolved":false,"context_lines":[{"line_number":4095,"context_line":"                LOG.debug(\"Instance is not existing yet on libvirt, we can \""},{"line_number":4096,"context_line":"                          \"safely pass on looking for already defined serial \""},{"line_number":4097,"context_line":"                          \"ports in its domain XML\", instance\u003dinstance)"},{"line_number":4098,"context_line":"                pass"},{"line_number":4099,"context_line":"            num_ports \u003d hardware.get_number_of_serial_ports("},{"line_number":4100,"context_line":"                flavor, image_meta)"},{"line_number":4101,"context_line":"            if guest_arch in (arch.S390, arch.S390X):"}],"source_content_type":"text/x-python","patch_set":17,"id":"bacf61ea_408cf97e","line":4098,"updated":"2016-07-30 11:05:27.000000000","message":"What does this pass statement means in this context?","commit_id":"8cc0c300382d4b04eabd42796c9eea8da4e83c1f"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"2b375d45a3348343825a53c85c5e956923da5f2a","unresolved":false,"context_lines":[{"line_number":4095,"context_line":"                LOG.debug(\"Instance is not existing yet on libvirt, we can \""},{"line_number":4096,"context_line":"                          \"safely pass on looking for already defined serial \""},{"line_number":4097,"context_line":"                          \"ports in its domain XML\", instance\u003dinstance)"},{"line_number":4098,"context_line":"                pass"},{"line_number":4099,"context_line":"            num_ports \u003d hardware.get_number_of_serial_ports("},{"line_number":4100,"context_line":"                flavor, image_meta)"},{"line_number":4101,"context_line":"            if guest_arch in (arch.S390, arch.S390X):"}],"source_content_type":"text/x-python","patch_set":17,"id":"bacf61ea_ded39ed3","line":4098,"in_reply_to":"bacf61ea_408cf97e","updated":"2016-07-31 14:36:17.000000000","message":"@gstepanov: It\u0027s just an explicit statement to not re-raise. It\u0027s not necessary but doesn\u0027t hurt anything either. :)","commit_id":"8cc0c300382d4b04eabd42796c9eea8da4e83c1f"},{"author":{"_account_id":11303,"name":"Markus Zoeller (markus_z)","email":"mzoeller@linux.vnet.ibm.com","username":"mzoeller"},"change_message_id":"36d5713695d77eb36516b16dcf48225c3ca09307","unresolved":false,"context_lines":[{"line_number":4095,"context_line":"                LOG.debug(\"Instance is not existing yet on libvirt, we can \""},{"line_number":4096,"context_line":"                          \"safely pass on looking for already defined serial \""},{"line_number":4097,"context_line":"                          \"ports in its domain XML\", instance\u003dinstance)"},{"line_number":4098,"context_line":"                pass"},{"line_number":4099,"context_line":"            num_ports \u003d hardware.get_number_of_serial_ports("},{"line_number":4100,"context_line":"                flavor, image_meta)"},{"line_number":4101,"context_line":"            if guest_arch in (arch.S390, arch.S390X):"}],"source_content_type":"text/x-python","patch_set":17,"id":"bacf61ea_a0279cc8","line":4098,"in_reply_to":"bacf61ea_ded39ed3","updated":"2016-08-01 08:18:01.000000000","message":"@Gleb+Jay: I\u0027m going to replace the \"pass\" with a simple comment in ps18. The pass could confuse others too.","commit_id":"8cc0c300382d4b04eabd42796c9eea8da4e83c1f"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"2b375d45a3348343825a53c85c5e956923da5f2a","unresolved":false,"context_lines":[{"line_number":5497,"context_line":""},{"line_number":5498,"context_line":"        serial_listen_addr \u003d libvirt_migrate.serial_listen_addr("},{"line_number":5499,"context_line":"            dest_check_data)"},{"line_number":5500,"context_line":"        if not migratable_flag or not serial_listen_addr[0]:"},{"line_number":5501,"context_line":"            self._verify_serial_console_is_disabled()"},{"line_number":5502,"context_line":""},{"line_number":5503,"context_line":"        # Checking shared storage connectivity"}],"source_content_type":"text/x-python","patch_set":17,"id":"bacf61ea_dea1de47","line":5500,"updated":"2016-07-31 14:36:17.000000000","message":"serial_listen_addr was changed to return a address, port tuple, therefore this change is OK. Initially I was worried about an IndexError....","commit_id":"8cc0c300382d4b04eabd42796c9eea8da4e83c1f"},{"author":{"_account_id":11303,"name":"Markus Zoeller (markus_z)","email":"mzoeller@linux.vnet.ibm.com","username":"mzoeller"},"change_message_id":"36d5713695d77eb36516b16dcf48225c3ca09307","unresolved":false,"context_lines":[{"line_number":5497,"context_line":""},{"line_number":5498,"context_line":"        serial_listen_addr \u003d libvirt_migrate.serial_listen_addr("},{"line_number":5499,"context_line":"            dest_check_data)"},{"line_number":5500,"context_line":"        if not migratable_flag or not serial_listen_addr[0]:"},{"line_number":5501,"context_line":"            self._verify_serial_console_is_disabled()"},{"line_number":5502,"context_line":""},{"line_number":5503,"context_line":"        # Checking shared storage connectivity"}],"source_content_type":"text/x-python","patch_set":17,"id":"bacf61ea_5ba9718f","line":5500,"in_reply_to":"bacf61ea_dea1de47","updated":"2016-08-01 08:18:01.000000000","message":"@Jay: I guess the confusion comes from having the method \"serial_listen_addr\" in module \"migration\" [1] AND having the attribute \"serial_listen_addr\" in object \"LibvirtLiveMigrateData\" [2]. If needed, I can prettify that in a follow-up patch to avoid the ambiguity,\n\n\n[1] https://github.com/openstack/nova/blob/8cc0c300382d4b04eabd42796c9eea8da4e83c1f/nova/virt/libvirt/migration.py#L50-L50\n[2] https://github.com/openstack/nova/blob/3b9e7c5dec88c56e55f31cd1909d48fc5b00f082/nova/objects/migrate_data.py#L127-L127","commit_id":"8cc0c300382d4b04eabd42796c9eea8da4e83c1f"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"a519c089a688b87dab2fc9f9bbfc24a8831830c5","unresolved":false,"context_lines":[{"line_number":4033,"context_line":"                          \"safely pass on looking for already defined serial \""},{"line_number":4034,"context_line":"                          \"ports in its domain XML\", instance\u003dinstance)"},{"line_number":4035,"context_line":"                # NOTE(markus_z): This method gets called in different"},{"line_number":4036,"context_line":"                # use-cases, namely \"spawn instance\" and \"migrate instance\"."},{"line_number":4037,"context_line":"                # The later case works on an existing instance, the former"},{"line_number":4038,"context_line":"                # one doesn\u0027t. That\u0027s the reason we have the try-except"},{"line_number":4039,"context_line":"                # block above."}],"source_content_type":"text/x-python","patch_set":24,"id":"9a89bdaa_42c06250","line":4036,"updated":"2016-09-08 07:49:09.000000000","message":"That method is called for more than live migration and spawn (please see method _destroy), your comment is interesting but we can do better than having a big block which explain several conditions, we should have several blocks of comments related to the conditions.\n\n- guest define with serial ports configured\n- guest defined without serial port configured\n- guest not defined\n\nPS: Perhaps you can remove the tag NOTE(markuz) it\u0027s basically a comment and I don\u0027t think you are the only one person who knows that part of code in the community ;)","commit_id":"4da88b6c2d11d1d6aadb562d3f4cbdad2f643c86"},{"author":{"_account_id":10618,"name":"Pavel Kholkin","email":"p.v.holkin@mail.ru","username":"pkholkin"},"change_message_id":"afe766a6dafd7a1f48a51cc9af76d9f6ecf73b13","unresolved":false,"context_lines":[{"line_number":4040,"context_line":"                    # means we are in a context of migration."},{"line_number":4041,"context_line":"                    return"},{"line_number":4042,"context_line":"            except exception.InstanceNotFound:"},{"line_number":4043,"context_line":"                LOG.debug(\"Instance does not exists yet on libvirt, we can \""},{"line_number":4044,"context_line":"                          \"safely pass on looking for already defined serial \""},{"line_number":4045,"context_line":"                          \"ports in its domain XML\", instance\u003dinstance)"},{"line_number":4046,"context_line":"                # NOTE(markus_z): This method gets called in different"}],"source_content_type":"text/x-python","patch_set":27,"id":"1a95cdbc_dc00c504","line":4043,"range":{"start_line":4043,"start_character":45,"end_line":4043,"end_character":51},"updated":"2016-10-10 13:21:23.000000000","message":"exist","commit_id":"e347cad8b35d5b029f48d114a7968e16574b738b"},{"author":{"_account_id":11303,"name":"Markus Zoeller (markus_z)","email":"mzoeller@linux.vnet.ibm.com","username":"mzoeller"},"change_message_id":"f441bc73ba257c48193a9247efd491c26c740046","unresolved":false,"context_lines":[{"line_number":4040,"context_line":"                    # means we are in a context of migration."},{"line_number":4041,"context_line":"                    return"},{"line_number":4042,"context_line":"            except exception.InstanceNotFound:"},{"line_number":4043,"context_line":"                LOG.debug(\"Instance does not exists yet on libvirt, we can \""},{"line_number":4044,"context_line":"                          \"safely pass on looking for already defined serial \""},{"line_number":4045,"context_line":"                          \"ports in its domain XML\", instance\u003dinstance)"},{"line_number":4046,"context_line":"                # NOTE(markus_z): This method gets called in different"}],"source_content_type":"text/x-python","patch_set":27,"id":"1a95cdbc_86e6eb41","line":4043,"range":{"start_line":4043,"start_character":45,"end_line":4043,"end_character":51},"in_reply_to":"1a95cdbc_dc00c504","updated":"2016-10-10 14:04:48.000000000","message":"Done","commit_id":"e347cad8b35d5b029f48d114a7968e16574b738b"},{"author":{"_account_id":11303,"name":"Markus Zoeller (markus_z)","email":"mzoeller@linux.vnet.ibm.com","username":"mzoeller"},"change_message_id":"f441bc73ba257c48193a9247efd491c26c740046","unresolved":false,"context_lines":[{"line_number":4043,"context_line":"                LOG.debug(\"Instance does not exists yet on libvirt, we can \""},{"line_number":4044,"context_line":"                          \"safely pass on looking for already defined serial \""},{"line_number":4045,"context_line":"                          \"ports in its domain XML\", instance\u003dinstance)"},{"line_number":4046,"context_line":"                # NOTE(markus_z): This method gets called in different"},{"line_number":4047,"context_line":"                # use-cases, namely \"spawn instance\" and \"migrate instance\"."},{"line_number":4048,"context_line":"                # The later case works on an existing instance, the former"},{"line_number":4049,"context_line":"                # one doesn\u0027t. That\u0027s the reason we have the try-except"},{"line_number":4050,"context_line":"                # block above."},{"line_number":4051,"context_line":"            num_ports \u003d hardware.get_number_of_serial_ports("},{"line_number":4052,"context_line":"                flavor, image_meta)"},{"line_number":4053,"context_line":""}],"source_content_type":"text/x-python","patch_set":27,"id":"1a95cdbc_26cc37ba","line":4050,"range":{"start_line":4046,"start_character":16,"end_line":4050,"end_character":30},"updated":"2016-10-10 14:04:48.000000000","message":"I\u0027ll remove that in ps28 too, sahid mentioned that in an earlier review.","commit_id":"e347cad8b35d5b029f48d114a7968e16574b738b"},{"author":{"_account_id":11303,"name":"Markus Zoeller (markus_z)","email":"mzoeller@linux.vnet.ibm.com","username":"mzoeller"},"change_message_id":"285d2c75a7b4c2ccb8eaed5a4d3b1ba6be44ea73","unresolved":false,"context_lines":[{"line_number":5887,"context_line":"            if (\u0027target_connect_addr\u0027 in migrate_data and"},{"line_number":5888,"context_line":"                    migrate_data.target_connect_addr is not None):"},{"line_number":5889,"context_line":"                dest \u003d migrate_data.target_connect_addr"},{"line_number":5890,"context_line":"            old_serial_listen_ports \u003d list(self._get_serial_ports_from_guest("},{"line_number":5891,"context_line":"                guest))"},{"line_number":5892,"context_line":""},{"line_number":5893,"context_line":"            new_xml_str \u003d None"},{"line_number":5894,"context_line":"            params \u003d None"}],"source_content_type":"text/x-python","patch_set":29,"id":"9a629dbe_5108aa2d","line":5891,"range":{"start_line":5890,"start_character":0,"end_line":5891,"end_character":23},"updated":"2016-11-08 18:02:42.000000000","message":"This needs to be in a conditional which checks if the serial console is enabled.","commit_id":"c3225a1e0f695de39642f8483d6b1837dad14e35"},{"author":{"_account_id":12299,"name":"Paweł Koniszewski","email":"pawel.koniszewski@gmail.com","username":"pawel.koniszewski"},"change_message_id":"34304479767f6ac9f17a2bdad8486c9128970df9","unresolved":false,"context_lines":[{"line_number":5898,"context_line":"                    # the method _get_volume_config and we should to find"},{"line_number":5899,"context_line":"                    # a way to avoid this in future."},{"line_number":5900,"context_line":"                    guest, migrate_data, self._get_volume_config)"},{"line_number":5901,"context_line":""},{"line_number":5902,"context_line":"            if self._host.has_min_version("},{"line_number":5903,"context_line":"                    MIN_LIBVIRT_BLOCK_LM_WITH_VOLUMES_VERSION):"},{"line_number":5904,"context_line":"                params \u003d {"}],"source_content_type":"text/x-python","patch_set":29,"id":"ba5da102_2e569f29","line":5901,"updated":"2016-10-27 13:36:48.000000000","message":"Please remove this line","commit_id":"c3225a1e0f695de39642f8483d6b1837dad14e35"},{"author":{"_account_id":11303,"name":"Markus Zoeller (markus_z)","email":"mzoeller@linux.vnet.ibm.com","username":"mzoeller"},"change_message_id":"285d2c75a7b4c2ccb8eaed5a4d3b1ba6be44ea73","unresolved":false,"context_lines":[{"line_number":5898,"context_line":"                    # the method _get_volume_config and we should to find"},{"line_number":5899,"context_line":"                    # a way to avoid this in future."},{"line_number":5900,"context_line":"                    guest, migrate_data, self._get_volume_config)"},{"line_number":5901,"context_line":""},{"line_number":5902,"context_line":"            if self._host.has_min_version("},{"line_number":5903,"context_line":"                    MIN_LIBVIRT_BLOCK_LM_WITH_VOLUMES_VERSION):"},{"line_number":5904,"context_line":"                params \u003d {"}],"source_content_type":"text/x-python","patch_set":29,"id":"9a629dbe_9fe6dbb2","line":5901,"in_reply_to":"ba5da102_2e569f29","updated":"2016-11-08 18:02:42.000000000","message":"Done in ps30","commit_id":"c3225a1e0f695de39642f8483d6b1837dad14e35"},{"author":{"_account_id":12299,"name":"Paweł Koniszewski","email":"pawel.koniszewski@gmail.com","username":"pawel.koniszewski"},"change_message_id":"34304479767f6ac9f17a2bdad8486c9128970df9","unresolved":false,"context_lines":[{"line_number":5927,"context_line":""},{"line_number":5928,"context_line":"            # TODO(sahid): This should be in"},{"line_number":5929,"context_line":"            # post_live_migration_at_source but no way to retrieve"},{"line_number":5930,"context_line":"            # ports acquired on the host for the guest at this step."},{"line_number":5931,"context_line":"            if old_serial_listen_ports:"},{"line_number":5932,"context_line":"                for hostname, port in old_serial_listen_ports:"},{"line_number":5933,"context_line":"                    serial_console.release_port(host\u003dhostname, port\u003dport)"}],"source_content_type":"text/x-python","patch_set":29,"id":"ba5da102_09bf15fc","line":5930,"updated":"2016-10-27 13:36:48.000000000","message":"I\u0027m not sure I understand it. Why is there no way to retrieve ports on the source? Nova undefines domain after calling post_live_migration_at_source. You can still retrieve guest from libvirt and dump its XML. Can you describe what\u0027s the problem there?","commit_id":"c3225a1e0f695de39642f8483d6b1837dad14e35"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"e305fcda24d97942bc7b359816777f50be718269","unresolved":false,"context_lines":[{"line_number":5927,"context_line":""},{"line_number":5928,"context_line":"            # TODO(sahid): This should be in"},{"line_number":5929,"context_line":"            # post_live_migration_at_source but no way to retrieve"},{"line_number":5930,"context_line":"            # ports acquired on the host for the guest at this step."},{"line_number":5931,"context_line":"            if old_serial_listen_ports:"},{"line_number":5932,"context_line":"                for hostname, port in old_serial_listen_ports:"},{"line_number":5933,"context_line":"                    serial_console.release_port(host\u003dhostname, port\u003dport)"}],"source_content_type":"text/x-python","patch_set":29,"id":"ba5da102_c9027d3e","line":5930,"in_reply_to":"ba5da102_09bf15fc","updated":"2016-10-27 13:55:26.000000000","message":"At this point the domain has been migrated to the destination node, it does not exist anymore on the source host in libvirtd. From what I know Nova does not have to undefine the domain by itself on source host, it\u0027s automatically done by libvirt to avoid two same domains running on two different hypervisors.","commit_id":"c3225a1e0f695de39642f8483d6b1837dad14e35"},{"author":{"_account_id":12299,"name":"Paweł Koniszewski","email":"pawel.koniszewski@gmail.com","username":"pawel.koniszewski"},"change_message_id":"9ddb480ab202c200965cf881b9b37f8a7bd3f5f2","unresolved":false,"context_lines":[{"line_number":5927,"context_line":""},{"line_number":5928,"context_line":"            # TODO(sahid): This should be in"},{"line_number":5929,"context_line":"            # post_live_migration_at_source but no way to retrieve"},{"line_number":5930,"context_line":"            # ports acquired on the host for the guest at this step."},{"line_number":5931,"context_line":"            if old_serial_listen_ports:"},{"line_number":5932,"context_line":"                for hostname, port in old_serial_listen_ports:"},{"line_number":5933,"context_line":"                    serial_console.release_port(host\u003dhostname, port\u003dport)"}],"source_content_type":"text/x-python","patch_set":29,"id":"ba5da102_9b960893","line":5930,"in_reply_to":"ba5da102_c9027d3e","updated":"2016-10-27 14:08:16.000000000","message":"Yeah, that\u0027s right. I was thinking about this piece of code https://github.com/openstack/nova/blob/a9c4baf33a77f99888b95a5d4864b80a3688883d/nova/virt/libvirt/driver.py#L972 but looks like at this point domain is already undefined. Tested it by putting pdb right before _undefine_instance.","commit_id":"c3225a1e0f695de39642f8483d6b1837dad14e35"},{"author":{"_account_id":11303,"name":"Markus Zoeller (markus_z)","email":"mzoeller@linux.vnet.ibm.com","username":"mzoeller"},"change_message_id":"9dc4e7a8f39f67128983dd36b608aa237a7ec3dd","unresolved":false,"context_lines":[{"line_number":6561,"context_line":"            CONF.libvirt.live_migration_inbound_addr"},{"line_number":6562,"context_line":"        migrate_data.supported_perf_events \u003d self._supported_perf_events"},{"line_number":6563,"context_line":""},{"line_number":6564,"context_line":"        migrate_data.serial_listen_ports \u003d []"},{"line_number":6565,"context_line":"        num_ports \u003d hardware.get_number_of_serial_ports("},{"line_number":6566,"context_line":"            instance.flavor, instance.image_meta)"},{"line_number":6567,"context_line":"        for port in six.moves.range(num_ports):"}],"source_content_type":"text/x-python","patch_set":29,"id":"ba5da102_63ffbb01","line":6564,"updated":"2016-10-28 09:11:32.000000000","message":"we need to verify if the host supports serial console before doing these lines here. That done in _verify_serial_console_enabled, but too late: https://github.com/openstack/nova/blob/c1b5a927f559c09b873520b8c945476c78c1c5ed/nova/virt/libvirt/driver.py#L5832-L5839\nThat move to an earlier point in time was once part of a change which got reverted and needs to be done again here.","commit_id":"c3225a1e0f695de39642f8483d6b1837dad14e35"},{"author":{"_account_id":12299,"name":"Paweł Koniszewski","email":"pawel.koniszewski@gmail.com","username":"pawel.koniszewski"},"change_message_id":"5af54fa60cfffe36dc6842be57fcd8e340ac9ba0","unresolved":false,"context_lines":[{"line_number":985,"context_line":""},{"line_number":986,"context_line":"        :param mode: Should be a value in (None, bind, connect)"},{"line_number":987,"context_line":"        \"\"\""},{"line_number":988,"context_line":"        xml \u003d guest.get_xml_desc()"},{"line_number":989,"context_line":"        tree \u003d etree.fromstring(xml)"},{"line_number":990,"context_line":""},{"line_number":991,"context_line":"        # The \u0027serial\u0027 device is the base for x86 platforms. Other platforms"}],"source_content_type":"text/x-python","patch_set":30,"id":"9a629dbe_dcc07d7f","line":988,"updated":"2016-11-14 15:17:29.000000000","message":"I\u0027m talking about this line in particular. We do have a reference to guest machine, but when we call to libvirt for XML description it will end up with LibvirtError. It unconditionally calls self._domain.XMLDesc which is a libvirt call and the first thing that it does is that it looks up for a domain.","commit_id":"f2190868e11b67b1f88483e1e1fcb3a42ae2f066"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"c3745f75730257ae374d546459947a4779b85997","unresolved":false,"context_lines":[{"line_number":985,"context_line":""},{"line_number":986,"context_line":"        :param mode: Should be a value in (None, bind, connect)"},{"line_number":987,"context_line":"        \"\"\""},{"line_number":988,"context_line":"        xml \u003d guest.get_xml_desc()"},{"line_number":989,"context_line":"        tree \u003d etree.fromstring(xml)"},{"line_number":990,"context_line":""},{"line_number":991,"context_line":"        # The \u0027serial\u0027 device is the base for x86 platforms. Other platforms"}],"source_content_type":"text/x-python","patch_set":30,"id":"9a629dbe_27bb2610","line":988,"in_reply_to":"9a629dbe_474c9a76","updated":"2016-11-14 15:36:12.000000000","message":"Hum so it\u0027s my mistake, that is probably an effect of https://review.openstack.org/#/c/394808/\n\nThanks Pawel","commit_id":"f2190868e11b67b1f88483e1e1fcb3a42ae2f066"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"59215ff751c7bf7e884a951ac1d88f2a11938081","unresolved":false,"context_lines":[{"line_number":985,"context_line":""},{"line_number":986,"context_line":"        :param mode: Should be a value in (None, bind, connect)"},{"line_number":987,"context_line":"        \"\"\""},{"line_number":988,"context_line":"        xml \u003d guest.get_xml_desc()"},{"line_number":989,"context_line":"        tree \u003d etree.fromstring(xml)"},{"line_number":990,"context_line":""},{"line_number":991,"context_line":"        # The \u0027serial\u0027 device is the base for x86 platforms. Other platforms"}],"source_content_type":"text/x-python","patch_set":30,"id":"9a629dbe_fc762105","line":988,"in_reply_to":"9a629dbe_dcc07d7f","updated":"2016-11-14 15:25:14.000000000","message":"We have the reference, the domain is undefined from libvirtd, that means the config xml does not exists anymore physically on the disk but the reference is still alive. For example you can call the method to (re)define the domain. I would say there is no problem here even if i can understand your point, we could backup the ports prior the call of migrateToURI3.","commit_id":"f2190868e11b67b1f88483e1e1fcb3a42ae2f066"},{"author":{"_account_id":12299,"name":"Paweł Koniszewski","email":"pawel.koniszewski@gmail.com","username":"pawel.koniszewski"},"change_message_id":"645216ebc8a512005231b76da81f27557a9d9b90","unresolved":false,"context_lines":[{"line_number":985,"context_line":""},{"line_number":986,"context_line":"        :param mode: Should be a value in (None, bind, connect)"},{"line_number":987,"context_line":"        \"\"\""},{"line_number":988,"context_line":"        xml \u003d guest.get_xml_desc()"},{"line_number":989,"context_line":"        tree \u003d etree.fromstring(xml)"},{"line_number":990,"context_line":""},{"line_number":991,"context_line":"        # The \u0027serial\u0027 device is the base for x86 platforms. Other platforms"}],"source_content_type":"text/x-python","patch_set":30,"id":"9a629dbe_474c9a76","line":988,"in_reply_to":"9a629dbe_fc762105","updated":"2016-11-14 15:31:01.000000000","message":"Just confirmed my concern, all migrations are resulting with traceback http://paste.openstack.org/show/589139/\nMy point is that XML might still exist, but libvirt firstly validates whether domain still exists and then looks up for an XML.","commit_id":"f2190868e11b67b1f88483e1e1fcb3a42ae2f066"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"ce0cf61f91de4a29f29f8bd8a534ba8f2d14eefb","unresolved":false,"context_lines":[{"line_number":4085,"context_line":"            try:"},{"line_number":4086,"context_line":"                # TODO(sahid): the guest param of this method should"},{"line_number":4087,"context_line":"                # be renamed as guest_cfg then guest_obj to guest."},{"line_number":4088,"context_line":"                guest_obj \u003d self._host.get_guest(instance)"},{"line_number":4089,"context_line":"                if list(self._get_serial_ports_from_guest(guest_obj)):"},{"line_number":4090,"context_line":"                    # Serial port are already configured for instance that"},{"line_number":4091,"context_line":"                    # means we are in a context of migration."}],"source_content_type":"text/x-python","patch_set":30,"id":"9a629dbe_230b517e","line":4088,"updated":"2016-11-11 19:54:21.000000000","message":"Agreed. In a followup patch, might be better to objectify this code so it looks similar to:\n\n if guest.get_serial_ports():\n     ...","commit_id":"f2190868e11b67b1f88483e1e1fcb3a42ae2f066"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"ce0cf61f91de4a29f29f8bd8a534ba8f2d14eefb","unresolved":false,"context_lines":[{"line_number":5443,"context_line":"        data.graphics_listen_addr_vnc \u003d CONF.vnc.vncserver_listen"},{"line_number":5444,"context_line":"        data.graphics_listen_addr_spice \u003d CONF.spice.server_listen"},{"line_number":5445,"context_line":""},{"line_number":5446,"context_line":"        if CONF.serial_console.enabled:"},{"line_number":5447,"context_line":"            data.serial_listen_addr \u003d CONF.serial_console.proxyclient_address"},{"line_number":5448,"context_line":"        else:"},{"line_number":5449,"context_line":"            data.serial_listen_addr \u003d \u0027\u0027"}],"source_content_type":"text/x-python","patch_set":30,"id":"9a629dbe_435cc57c","line":5446,"updated":"2016-11-11 19:54:21.000000000","message":"This new conditional isn\u0027t technically related to the purpose of this patch so really should be in a separate patch... if you respin, might be nice to separate it out to a patch that just addresses the scenario of \"Do not set up console ports when destination host does not have serial_console_enabled set to True\".","commit_id":"f2190868e11b67b1f88483e1e1fcb3a42ae2f066"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"3f4b30d712545819e82b44cced83419927724ce0","unresolved":false,"context_lines":[{"line_number":5443,"context_line":"        data.graphics_listen_addr_vnc \u003d CONF.vnc.vncserver_listen"},{"line_number":5444,"context_line":"        data.graphics_listen_addr_spice \u003d CONF.spice.server_listen"},{"line_number":5445,"context_line":""},{"line_number":5446,"context_line":"        if CONF.serial_console.enabled:"},{"line_number":5447,"context_line":"            data.serial_listen_addr \u003d CONF.serial_console.proxyclient_address"},{"line_number":5448,"context_line":"        else:"},{"line_number":5449,"context_line":"            data.serial_listen_addr \u003d \u0027\u0027"}],"source_content_type":"text/x-python","patch_set":30,"id":"9a629dbe_ad8715d6","line":5446,"in_reply_to":"9a629dbe_435cc57c","updated":"2016-11-14 16:21:21.000000000","message":"Done","commit_id":"f2190868e11b67b1f88483e1e1fcb3a42ae2f066"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"ce0cf61f91de4a29f29f8bd8a534ba8f2d14eefb","unresolved":false,"context_lines":[{"line_number":5503,"context_line":"                                                         disk_info_text)"},{"line_number":5504,"context_line":"        has_local_disk \u003d self._has_local_disk(instance, disk_info_text)"},{"line_number":5505,"context_line":"        if (\u0027serial_listen_addr\u0027 not in dest_check_data or"},{"line_number":5506,"context_line":"                not dest_check_data.serial_listen_addr):"},{"line_number":5507,"context_line":"            self._verify_serial_console_is_disabled()"},{"line_number":5508,"context_line":""},{"line_number":5509,"context_line":"        if \u0027block_migration\u0027 not in dest_check_data:"}],"source_content_type":"text/x-python","patch_set":30,"id":"9a629dbe_03f48d58","line":5506,"updated":"2016-11-11 19:54:21.000000000","message":"nit: might be nicer to be more explicit:\n\n or dest_check_data.serial_listen_addr \u003d\u003d \u0027\u0027):\n\ninstead of the \"not dest_check_data.serial_listen_addr\" phrase.\n\nThat way readers may not mistakenly think that dest_check_data.serial_listen_addr can be None.","commit_id":"f2190868e11b67b1f88483e1e1fcb3a42ae2f066"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"3f4b30d712545819e82b44cced83419927724ce0","unresolved":false,"context_lines":[{"line_number":5503,"context_line":"                                                         disk_info_text)"},{"line_number":5504,"context_line":"        has_local_disk \u003d self._has_local_disk(instance, disk_info_text)"},{"line_number":5505,"context_line":"        if (\u0027serial_listen_addr\u0027 not in dest_check_data or"},{"line_number":5506,"context_line":"                not dest_check_data.serial_listen_addr):"},{"line_number":5507,"context_line":"            self._verify_serial_console_is_disabled()"},{"line_number":5508,"context_line":""},{"line_number":5509,"context_line":"        if \u0027block_migration\u0027 not in dest_check_data:"}],"source_content_type":"text/x-python","patch_set":30,"id":"9a629dbe_2d74e5fb","line":5506,"in_reply_to":"9a629dbe_03f48d58","updated":"2016-11-14 16:21:21.000000000","message":"Addressed here: https://review.openstack.org/#/c/397276/1","commit_id":"f2190868e11b67b1f88483e1e1fcb3a42ae2f066"},{"author":{"_account_id":12299,"name":"Paweł Koniszewski","email":"pawel.koniszewski@gmail.com","username":"pawel.koniszewski"},"change_message_id":"2de4e07ce8450119d1269f3d7132ee5e832d3bf7","unresolved":false,"context_lines":[{"line_number":5963,"context_line":"            # post_live_migration_at_source but no way to retrieve"},{"line_number":5964,"context_line":"            # ports acquired on the host for the guest at this step."},{"line_number":5965,"context_line":"            if CONF.serial_console.enabled:"},{"line_number":5966,"context_line":"                old_ports \u003d list(self._get_serial_ports_from_guest(guest))"},{"line_number":5967,"context_line":"                for hostname, port in old_ports:"},{"line_number":5968,"context_line":"                    serial_console.release_port(host\u003dhostname, port\u003dport)"},{"line_number":5969,"context_line":"        except Exception as e:"}],"source_content_type":"text/x-python","patch_set":30,"id":"9a629dbe_1973e74e","line":5966,"updated":"2016-11-14 15:09:10.000000000","message":"I didn\u0027t catch this in previous patch set when Sahid commented back on my question, but if at this point the domain is already undefined and at least migrateToURI3 is a synchronous call, this will raise an exception. Basically nova is waiting on guest.migrate for migration to finish. Once migration finishes domain is already undefined, but the _get_serial_ports_from_guest method will make call to libvirt trying to retrieve domain that no longer exists on source node resulting in an exception. We need to list serial ports before we call guest.migrate and then we will be able to release serial console ports.","commit_id":"f2190868e11b67b1f88483e1e1fcb3a42ae2f066"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"0da9612309f70db13045b8a1d5821a15b2011ba3","unresolved":false,"context_lines":[{"line_number":5963,"context_line":"            # post_live_migration_at_source but no way to retrieve"},{"line_number":5964,"context_line":"            # ports acquired on the host for the guest at this step."},{"line_number":5965,"context_line":"            if CONF.serial_console.enabled:"},{"line_number":5966,"context_line":"                old_ports \u003d list(self._get_serial_ports_from_guest(guest))"},{"line_number":5967,"context_line":"                for hostname, port in old_ports:"},{"line_number":5968,"context_line":"                    serial_console.release_port(host\u003dhostname, port\u003dport)"},{"line_number":5969,"context_line":"        except Exception as e:"}],"source_content_type":"text/x-python","patch_set":30,"id":"9a629dbe_dcab1dd5","line":5966,"in_reply_to":"9a629dbe_1973e74e","updated":"2016-11-14 15:14:30.000000000","message":"No because we already have the reference of the domain, we do not have to call libvirtd to retrieve the XML.","commit_id":"f2190868e11b67b1f88483e1e1fcb3a42ae2f066"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"ce0cf61f91de4a29f29f8bd8a534ba8f2d14eefb","unresolved":false,"context_lines":[{"line_number":6537,"context_line":"                    context, instance, instance_dir, disk_info,"},{"line_number":6538,"context_line":"                    fallback_from_host\u003dinstance.host)"},{"line_number":6539,"context_line":"                if (configdrive.required_by(instance) and"},{"line_number":6540,"context_line":"                            CONF.config_drive_format \u003d\u003d \u0027iso9660\u0027):"},{"line_number":6541,"context_line":"                    # NOTE(pkoniszewski): Due to a bug in libvirt iso config"},{"line_number":6542,"context_line":"                    # drive needs to be copied to destination prior to"},{"line_number":6543,"context_line":"                    # migration when instance path is not shared and block"}],"source_content_type":"text/x-python","patch_set":30,"id":"9a629dbe_436f65fb","line":6540,"updated":"2016-11-11 19:54:21.000000000","message":"unrelated change here... if you respin, please set back to its original form.","commit_id":"f2190868e11b67b1f88483e1e1fcb3a42ae2f066"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"3f4b30d712545819e82b44cced83419927724ce0","unresolved":false,"context_lines":[{"line_number":6537,"context_line":"                    context, instance, instance_dir, disk_info,"},{"line_number":6538,"context_line":"                    fallback_from_host\u003dinstance.host)"},{"line_number":6539,"context_line":"                if (configdrive.required_by(instance) and"},{"line_number":6540,"context_line":"                            CONF.config_drive_format \u003d\u003d \u0027iso9660\u0027):"},{"line_number":6541,"context_line":"                    # NOTE(pkoniszewski): Due to a bug in libvirt iso config"},{"line_number":6542,"context_line":"                    # drive needs to be copied to destination prior to"},{"line_number":6543,"context_line":"                    # migration when instance path is not shared and block"}],"source_content_type":"text/x-python","patch_set":30,"id":"9a629dbe_8d597191","line":6540,"in_reply_to":"9a629dbe_436f65fb","updated":"2016-11-14 16:21:21.000000000","message":"Done","commit_id":"f2190868e11b67b1f88483e1e1fcb3a42ae2f066"},{"author":{"_account_id":12299,"name":"Paweł Koniszewski","email":"pawel.koniszewski@gmail.com","username":"pawel.koniszewski"},"change_message_id":"802391b841a312eac83c98b23f59a00ad32280ca","unresolved":false,"context_lines":[{"line_number":5517,"context_line":"        booted_from_volume \u003d self._is_booted_from_volume(instance,"},{"line_number":5518,"context_line":"                                                         disk_info_text)"},{"line_number":5519,"context_line":"        has_local_disk \u003d self._has_local_disk(instance, disk_info_text)"},{"line_number":5520,"context_line":"        if (\u0027serial_listen_addr\u0027 not in dest_check_data"},{"line_number":5521,"context_line":"            or dest_check_data.serial_listen_addr \u003d\u003d \u0027\u0027):"},{"line_number":5522,"context_line":"            self._verify_serial_console_is_disabled()"},{"line_number":5523,"context_line":""}],"source_content_type":"text/x-python","patch_set":33,"id":"7a77a97e_f1b446d2","line":5520,"updated":"2016-11-16 14:58:50.000000000","message":"I\u0027m sorry, I didn\u0027t spot it last time. This isn\u0027t backward compatible. Newton does not populate serial_listen_addr during check_can_live_migrate_destination, so every time when live migrating from Ocata to Newton this will be unset and nova will every time check whether serial console is disabled.\n\ncheck_can_live_migrate_destination in stable/newton:\n\nhttps://github.com/openstack/nova/blob/d4272b140cc3840ea33a461c714f1a08fe256468/nova/virt/libvirt/driver.py#L5363\n\nand nova populates serial_listen_addr in pre_live_migration step while running Newton:\n\nhttps://github.com/openstack/nova/blob/d4272b140cc3840ea33a461c714f1a08fe256468/nova/virt/libvirt/driver.py#L6520","commit_id":"abdc5f9c3f56da1ac6b12a2199526f6943f87b20"},{"author":{"_account_id":11303,"name":"Markus Zoeller (markus_z)","email":"mzoeller@linux.vnet.ibm.com","username":"mzoeller"},"change_message_id":"9b95ec94e70d2136c7ef4e901617f4aaf7d42acf","unresolved":false,"context_lines":[{"line_number":5517,"context_line":"        booted_from_volume \u003d self._is_booted_from_volume(instance,"},{"line_number":5518,"context_line":"                                                         disk_info_text)"},{"line_number":5519,"context_line":"        has_local_disk \u003d self._has_local_disk(instance, disk_info_text)"},{"line_number":5520,"context_line":"        if (\u0027serial_listen_addr\u0027 not in dest_check_data"},{"line_number":5521,"context_line":"            or dest_check_data.serial_listen_addr \u003d\u003d \u0027\u0027):"},{"line_number":5522,"context_line":"            self._verify_serial_console_is_disabled()"},{"line_number":5523,"context_line":""}],"source_content_type":"text/x-python","patch_set":33,"id":"7a77a97e_2216c355","line":5520,"in_reply_to":"7a77a97e_07347948","updated":"2016-11-21 13:03:44.000000000","message":"As Pawel said in a comment above, the check \"_verify_serial_console_is_disabled()\" is a no-op in the master code right now. Strictly speaking, moving that check is another \"thing\" in a change which should *enable/fix* live-migration with serial-console. IOW, I wouldn\u0027t be too sad if we wait until Pike to move that check.","commit_id":"abdc5f9c3f56da1ac6b12a2199526f6943f87b20"},{"author":{"_account_id":12299,"name":"Paweł Koniszewski","email":"pawel.koniszewski@gmail.com","username":"pawel.koniszewski"},"change_message_id":"5d78e123f268c53ca370553849ff6c23a7e3aff9","unresolved":false,"context_lines":[{"line_number":5517,"context_line":"        booted_from_volume \u003d self._is_booted_from_volume(instance,"},{"line_number":5518,"context_line":"                                                         disk_info_text)"},{"line_number":5519,"context_line":"        has_local_disk \u003d self._has_local_disk(instance, disk_info_text)"},{"line_number":5520,"context_line":"        if (\u0027serial_listen_addr\u0027 not in dest_check_data"},{"line_number":5521,"context_line":"            or dest_check_data.serial_listen_addr \u003d\u003d \u0027\u0027):"},{"line_number":5522,"context_line":"            self._verify_serial_console_is_disabled()"},{"line_number":5523,"context_line":""}],"source_content_type":"text/x-python","patch_set":33,"id":"7a77a97e_6d2d7da7","line":5520,"in_reply_to":"7a77a97e_0da2494b","updated":"2016-11-17 15:24:10.000000000","message":"We are breaking all live migrations from Ocata to Newton with enabled serial console","commit_id":"abdc5f9c3f56da1ac6b12a2199526f6943f87b20"},{"author":{"_account_id":12299,"name":"Paweł Koniszewski","email":"pawel.koniszewski@gmail.com","username":"pawel.koniszewski"},"change_message_id":"2b3badc28808b57499348e02c6f5b8acab918469","unresolved":false,"context_lines":[{"line_number":5517,"context_line":"        booted_from_volume \u003d self._is_booted_from_volume(instance,"},{"line_number":5518,"context_line":"                                                         disk_info_text)"},{"line_number":5519,"context_line":"        has_local_disk \u003d self._has_local_disk(instance, disk_info_text)"},{"line_number":5520,"context_line":"        if (\u0027serial_listen_addr\u0027 not in dest_check_data"},{"line_number":5521,"context_line":"            or dest_check_data.serial_listen_addr \u003d\u003d \u0027\u0027):"},{"line_number":5522,"context_line":"            self._verify_serial_console_is_disabled()"},{"line_number":5523,"context_line":""}],"source_content_type":"text/x-python","patch_set":33,"id":"7a77a97e_b6169d56","line":5520,"in_reply_to":"7a77a97e_20cec3b4","updated":"2016-11-21 11:35:21.000000000","message":"My preference is to not move this check in Ocata and wait until Pike development is open. It does not make any sense to move this check in Ocata. Basically because when live migrating from Ocata to Newton the condition\n\n\u0027serial_listen_addr\u0027 not in dest_check_data\n\nalways evaluates to True. Therefore live migration from Ocata to Newton will work only when serial console is *disabled* on source node. That makes no sense to make any assumptions here and break all live migration from Ocata to Newton with enabled serial console. Rescheduling does not matter because it is all about source node configuration here, not destination.","commit_id":"abdc5f9c3f56da1ac6b12a2199526f6943f87b20"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"c146fa0645b233a3170a561becf507a18dbd886a","unresolved":false,"context_lines":[{"line_number":5517,"context_line":"        booted_from_volume \u003d self._is_booted_from_volume(instance,"},{"line_number":5518,"context_line":"                                                         disk_info_text)"},{"line_number":5519,"context_line":"        has_local_disk \u003d self._has_local_disk(instance, disk_info_text)"},{"line_number":5520,"context_line":"        if (\u0027serial_listen_addr\u0027 not in dest_check_data"},{"line_number":5521,"context_line":"            or dest_check_data.serial_listen_addr \u003d\u003d \u0027\u0027):"},{"line_number":5522,"context_line":"            self._verify_serial_console_is_disabled()"},{"line_number":5523,"context_line":""}],"source_content_type":"text/x-python","patch_set":33,"id":"7a77a97e_0da2494b","line":5520,"in_reply_to":"7a77a97e_3cf695d7","updated":"2016-11-17 15:22:50.000000000","message":"So your preference is to continue with something broken because that is going to make the scheduler doing a retry if we are trying to migrate from Ocata to Newton during an upgrade ?\n\nNot sure that is reasonable, we are breaking nothing here, and the change of doing a migrate from Ocata to Newton during upgrade is here but it\u0027s handled by the scheduler.","commit_id":"abdc5f9c3f56da1ac6b12a2199526f6943f87b20"},{"author":{"_account_id":12299,"name":"Paweł Koniszewski","email":"pawel.koniszewski@gmail.com","username":"pawel.koniszewski"},"change_message_id":"29b9a9e3a5e91a27c60145684d4b175b93a6fbe6","unresolved":false,"context_lines":[{"line_number":5517,"context_line":"        booted_from_volume \u003d self._is_booted_from_volume(instance,"},{"line_number":5518,"context_line":"                                                         disk_info_text)"},{"line_number":5519,"context_line":"        has_local_disk \u003d self._has_local_disk(instance, disk_info_text)"},{"line_number":5520,"context_line":"        if (\u0027serial_listen_addr\u0027 not in dest_check_data"},{"line_number":5521,"context_line":"            or dest_check_data.serial_listen_addr \u003d\u003d \u0027\u0027):"},{"line_number":5522,"context_line":"            self._verify_serial_console_is_disabled()"},{"line_number":5523,"context_line":""}],"source_content_type":"text/x-python","patch_set":33,"id":"7a77a97e_07347948","line":5520,"in_reply_to":"7a77a97e_47ae71e8","updated":"2016-11-21 12:32:04.000000000","message":"Also I see no reason why this can\u0027t wait until Pike so it won\u0027t cause any regressions and such move will be safe.","commit_id":"abdc5f9c3f56da1ac6b12a2199526f6943f87b20"},{"author":{"_account_id":12299,"name":"Paweł Koniszewski","email":"pawel.koniszewski@gmail.com","username":"pawel.koniszewski"},"change_message_id":"d8bede840bbad42ed905855600ce29100939dfc4","unresolved":false,"context_lines":[{"line_number":5517,"context_line":"        booted_from_volume \u003d self._is_booted_from_volume(instance,"},{"line_number":5518,"context_line":"                                                         disk_info_text)"},{"line_number":5519,"context_line":"        has_local_disk \u003d self._has_local_disk(instance, disk_info_text)"},{"line_number":5520,"context_line":"        if (\u0027serial_listen_addr\u0027 not in dest_check_data"},{"line_number":5521,"context_line":"            or dest_check_data.serial_listen_addr \u003d\u003d \u0027\u0027):"},{"line_number":5522,"context_line":"            self._verify_serial_console_is_disabled()"},{"line_number":5523,"context_line":""}],"source_content_type":"text/x-python","patch_set":33,"id":"7a77a97e_47ae71e8","line":5520,"in_reply_to":"7a77a97e_4cae98e8","updated":"2016-11-21 12:28:17.000000000","message":"So my point is that someone for some reason might want to move VM back to Newton and by adding such code we are taking such possibility away (of course only when serial console is enabled on source node). We already merged very similar change once:\n\nhttps://review.openstack.org/#/c/254709\n\nand then reverted it due to regression:\n\nhttps://review.openstack.org/#/c/368732\n\nThis introduces almost the same regression, but here you just move serial console verification, above change also moved VNC/SPICE check, so all of them were broken.\n\nI\u0027m against introducing a regression that will affect unknown number of operators, because unknown number of operators will be able to take advantage of.","commit_id":"abdc5f9c3f56da1ac6b12a2199526f6943f87b20"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"c87dc251db1f57410cae048b03628053c134d86c","unresolved":false,"context_lines":[{"line_number":5517,"context_line":"        booted_from_volume \u003d self._is_booted_from_volume(instance,"},{"line_number":5518,"context_line":"                                                         disk_info_text)"},{"line_number":5519,"context_line":"        has_local_disk \u003d self._has_local_disk(instance, disk_info_text)"},{"line_number":5520,"context_line":"        if (\u0027serial_listen_addr\u0027 not in dest_check_data"},{"line_number":5521,"context_line":"            or dest_check_data.serial_listen_addr \u003d\u003d \u0027\u0027):"},{"line_number":5522,"context_line":"            self._verify_serial_console_is_disabled()"},{"line_number":5523,"context_line":""}],"source_content_type":"text/x-python","patch_set":33,"id":"7a77a97e_20cec3b4","line":5520,"in_reply_to":"7a77a97e_6d2d7da7","updated":"2016-11-21 11:19:59.000000000","message":"Not really as I said the scheduler will to other attemps and we can expect to finally find a host with Newton.\n\nYour preference would be to verify if serial_listen_addr is defined AND set to \u0027\u0027 to do that check ? That means wi have to add a note to explain that we need to update that code for next release","commit_id":"abdc5f9c3f56da1ac6b12a2199526f6943f87b20"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"9a2fe1eb9b20d24404d7d12d2988572e19507788","unresolved":false,"context_lines":[{"line_number":5517,"context_line":"        booted_from_volume \u003d self._is_booted_from_volume(instance,"},{"line_number":5518,"context_line":"                                                         disk_info_text)"},{"line_number":5519,"context_line":"        has_local_disk \u003d self._has_local_disk(instance, disk_info_text)"},{"line_number":5520,"context_line":"        if (\u0027serial_listen_addr\u0027 not in dest_check_data"},{"line_number":5521,"context_line":"            or dest_check_data.serial_listen_addr \u003d\u003d \u0027\u0027):"},{"line_number":5522,"context_line":"            self._verify_serial_console_is_disabled()"},{"line_number":5523,"context_line":""}],"source_content_type":"text/x-python","patch_set":33,"id":"7a77a97e_4cae98e8","line":5520,"in_reply_to":"7a77a97e_b6169d56","updated":"2016-11-21 12:01:49.000000000","message":"Pawel, yes, I think I have understand your point, you are repeating it in every of your comments, *that is going to \u0027break\u0027 live-migration from Ocata to Newton in case serial console is enable on source*.\n\nI would expect now you try to understand mine...\n\n - it\u0027s a relatively small subset of cases which that could happen\n - if that happens, that code is going to be executed by condutor/live_migrate to verify if the host is able to accept the instance, so if a MigrationError is raised we should try an other host.\n\nThat is my point, based on my understanding and why I would say it\u0027s not a big deal.\n\nNow, we can also avoid that check during this step, and so during the live_migration_operation we do it anyway BUT at this step if the check is failing the migration is aborted without an other attempt.","commit_id":"abdc5f9c3f56da1ac6b12a2199526f6943f87b20"},{"author":{"_account_id":12299,"name":"Paweł Koniszewski","email":"pawel.koniszewski@gmail.com","username":"pawel.koniszewski"},"change_message_id":"6f6f2facce8716dbdfecad013cdaea9594cf7264","unresolved":false,"context_lines":[{"line_number":5517,"context_line":"        booted_from_volume \u003d self._is_booted_from_volume(instance,"},{"line_number":5518,"context_line":"                                                         disk_info_text)"},{"line_number":5519,"context_line":"        has_local_disk \u003d self._has_local_disk(instance, disk_info_text)"},{"line_number":5520,"context_line":"        if (\u0027serial_listen_addr\u0027 not in dest_check_data"},{"line_number":5521,"context_line":"            or dest_check_data.serial_listen_addr \u003d\u003d \u0027\u0027):"},{"line_number":5522,"context_line":"            self._verify_serial_console_is_disabled()"},{"line_number":5523,"context_line":""}],"source_content_type":"text/x-python","patch_set":33,"id":"7a77a97e_3cf695d7","line":5520,"in_reply_to":"7a77a97e_f1b446d2","updated":"2016-11-16 15:10:48.000000000","message":"We need to wait with moving the check till Ocata release, I think. Can\u0027t see any other solution (apart from backporting something to Newton)","commit_id":"abdc5f9c3f56da1ac6b12a2199526f6943f87b20"},{"author":{"_account_id":12299,"name":"Paweł Koniszewski","email":"pawel.koniszewski@gmail.com","username":"pawel.koniszewski"},"change_message_id":"b5cf8d96527b2881012e3da76bd8cadd8b92eb71","unresolved":false,"context_lines":[{"line_number":5531,"context_line":"        booted_from_volume \u003d self._is_booted_from_volume(instance,"},{"line_number":5532,"context_line":"                                                         disk_info_text)"},{"line_number":5533,"context_line":"        has_local_disk \u003d self._has_local_disk(instance, disk_info_text)"},{"line_number":5534,"context_line":"        if (\u0027serial_listen_addr\u0027 in dest_check_data"},{"line_number":5535,"context_line":"            # TODO(sahid): For Pike serial_listen_addr is going to be"},{"line_number":5536,"context_line":"            # always defined so we will want that check in all"},{"line_number":5537,"context_line":"            # scenarios"}],"source_content_type":"text/x-python","patch_set":34,"id":"7a77a97e_d8725fb0","line":5534,"updated":"2016-11-21 14:30:55.000000000","message":"I\u0027m still not happy about this move, because:\n\n* It is unrelated to the real issue this patch is trying to fix. Git blame will say that it was needed to fix acquiring ports for serial consoles. However, it wasn\u0027t\n* It isn\u0027t described in the commit message, it should be as it is separate change IMHO.\n* Once console refactor is merged https://review.openstack.org/#/c/373264/ it would disallow live migrations to older node with serial console disabled as the migrate_data is always populated with serial listen address when executing live_migration_operation. By moving this check we will still allow such (serial console breaking) migrations to older release, because the data will not be populated by older node.","commit_id":"b433efeebac4f8cba87c3d228669747d48b56d94"},{"author":{"_account_id":11303,"name":"Markus Zoeller (markus_z)","email":"mzoeller@linux.vnet.ibm.com","username":"mzoeller"},"change_message_id":"4023a5849c40136d57b5fc2b7353df416a16f29b","unresolved":false,"context_lines":[{"line_number":5531,"context_line":"        booted_from_volume \u003d self._is_booted_from_volume(instance,"},{"line_number":5532,"context_line":"                                                         disk_info_text)"},{"line_number":5533,"context_line":"        has_local_disk \u003d self._has_local_disk(instance, disk_info_text)"},{"line_number":5534,"context_line":"        if (\u0027serial_listen_addr\u0027 in dest_check_data"},{"line_number":5535,"context_line":"            # TODO(sahid): For Pike serial_listen_addr is going to be"},{"line_number":5536,"context_line":"            # always defined so we will want that check in all"},{"line_number":5537,"context_line":"            # scenarios"}],"source_content_type":"text/x-python","patch_set":34,"id":"7a77a97e_2c6839ba","line":5534,"in_reply_to":"7a77a97e_d8725fb0","updated":"2016-11-22 16:09:01.000000000","message":"Yep, the move of \"_verify_serial_console\" will be reverted in ps35.","commit_id":"b433efeebac4f8cba87c3d228669747d48b56d94"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"b4319061ecce51e85bfc44b9d7aa158997130b51","unresolved":false,"context_lines":[{"line_number":4336,"context_line":""},{"line_number":4337,"context_line":"    def _create_consoles(self, virt_type, guest, instance, flavor, image_meta,"},{"line_number":4338,"context_line":"                         caps):"},{"line_number":4339,"context_line":"        log_path \u003d self._get_console_log_path(instance)"},{"line_number":4340,"context_line":"        if virt_type in (\"qemu\", \"kvm\"):"},{"line_number":4341,"context_line":"            # Create the serial console char devices"},{"line_number":4342,"context_line":"            guest_arch \u003d libvirt_utils.get_arch(image_meta)"}],"source_content_type":"text/x-python","patch_set":36,"id":"5a74a57a_62d3a460","line":4339,"updated":"2016-11-28 16:11:16.000000000","message":"Why that change ?","commit_id":"587540ad24cd91751a68274673e97269661ada15"},{"author":{"_account_id":11303,"name":"Markus Zoeller (markus_z)","email":"mzoeller@linux.vnet.ibm.com","username":"mzoeller"},"change_message_id":"4fde270b2c01e0d729f03edc1c1d62ba4a45c05f","unresolved":false,"context_lines":[{"line_number":4336,"context_line":""},{"line_number":4337,"context_line":"    def _create_consoles(self, virt_type, guest, instance, flavor, image_meta,"},{"line_number":4338,"context_line":"                         caps):"},{"line_number":4339,"context_line":"        log_path \u003d self._get_console_log_path(instance)"},{"line_number":4340,"context_line":"        if virt_type in (\"qemu\", \"kvm\"):"},{"line_number":4341,"context_line":"            # Create the serial console char devices"},{"line_number":4342,"context_line":"            guest_arch \u003d libvirt_utils.get_arch(image_meta)"}],"source_content_type":"text/x-python","patch_set":36,"id":"5a74a57a_82bc40bc","line":4339,"in_reply_to":"5a74a57a_62d3a460","updated":"2016-11-28 16:14:59.000000000","message":"The log_path is later needed in line 4388. Alternatively I could have added \"instance\" as a new parameter to this method and keep \"log_path\", but I thought it having one parameter less could make more sense.","commit_id":"587540ad24cd91751a68274673e97269661ada15"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"0a9b5318622cc29ef95593b9fdf054d7b486c6b5","unresolved":false,"context_lines":[{"line_number":6765,"context_line":"        \"\"\""},{"line_number":6766,"context_line":"        self.unplug_vifs(instance, network_info)"},{"line_number":6767,"context_line":""},{"line_number":6768,"context_line":"        # Release serial ports on source host."},{"line_number":6769,"context_line":"        num_ports \u003d hardware.get_number_of_serial_ports("},{"line_number":6770,"context_line":"            instance.flavor, instance.image_meta)"},{"line_number":6771,"context_line":"        for port in six.moves.range(num_ports):"}],"source_content_type":"text/x-python","patch_set":36,"id":"5a74a57a_361ad117","line":6768,"updated":"2016-11-28 16:30:47.000000000","message":"This block is not needed, we already release ports on source after migration. line 5960","commit_id":"587540ad24cd91751a68274673e97269661ada15"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"e91cb3fe5d8a938a9893d92723a68eaf8e3918a8","unresolved":false,"context_lines":[{"line_number":5944,"context_line":"            # post_live_migration_at_source but no way to retrieve"},{"line_number":5945,"context_line":"            # ports acquired on the host for the guest at this"},{"line_number":5946,"context_line":"            # step. Since the domain is going to be removed from"},{"line_number":5947,"context_line":"            # libvird on source host after migration, we backup the"},{"line_number":5948,"context_line":"            # serial ports to release them if all went well."},{"line_number":5949,"context_line":"            serial_ports \u003d []"},{"line_number":5950,"context_line":"            if CONF.serial_console.enabled:"}],"source_content_type":"text/x-python","patch_set":37,"id":"5a74a57a_3b8e312e","line":5947,"updated":"2016-11-28 19:25:43.000000000","message":"s/libvird/libvirt/","commit_id":"898bb13304b68f33a130281d5acf425a1b23d171"}],"nova/virt/libvirt/migration.py":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"ce0cf61f91de4a29f29f8bd8a534ba8f2d14eefb","unresolved":false,"context_lines":[{"line_number":93,"context_line":"        if source.get(\u0027host\u0027) is not None:"},{"line_number":94,"context_line":"            source.set(\u0027host\u0027, listen_addr)"},{"line_number":95,"context_line":"        device \u003d source.getparent()"},{"line_number":96,"context_line":"        target \u003d device.find(\"target\")"},{"line_number":97,"context_line":"        if target is not None and source.get(\u0027service\u0027) is not None:"},{"line_number":98,"context_line":"            port \u003d target.get(\u0027port\u0027)"},{"line_number":99,"context_line":"            source.set(\u0027service\u0027, str(serial_listen_ports[int(port)]))"}],"source_content_type":"text/x-python","patch_set":30,"id":"9a629dbe_9ee63042","line":96,"updated":"2016-11-11 19:54:21.000000000","message":"If you respin, would be good to add a code comment here that points to the libvirt XML documentation for this element:\n\nhttps://libvirt.org/formatdomain.html#elementsCharTCP","commit_id":"f2190868e11b67b1f88483e1e1fcb3a42ae2f066"},{"author":{"_account_id":11303,"name":"Markus Zoeller (markus_z)","email":"mzoeller@linux.vnet.ibm.com","username":"mzoeller"},"change_message_id":"4023a5849c40136d57b5fc2b7353df416a16f29b","unresolved":false,"context_lines":[{"line_number":48,"context_line":""},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"# TODO(sahid): remove me for Q*"},{"line_number":51,"context_line":"def serial_listen_ports(migrate_data):"},{"line_number":52,"context_line":"    \"\"\"Returns ports serial from a LibvirtLiveMigrateData\"\"\""},{"line_number":53,"context_line":"    ports \u003d []"},{"line_number":54,"context_line":"    if migrate_data.obj_attr_is_set(\u0027serial_listen_ports\u0027):"}],"source_content_type":"text/x-python","patch_set":34,"id":"7a77a97e_000c1c3a","line":51,"updated":"2016-11-22 16:09:01.000000000","message":"I\u0027ll move that (and the other domain XML update parts) to another change *before* this one to make that easier to review.","commit_id":"b433efeebac4f8cba87c3d228669747d48b56d94"}]}
