)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":8768,"name":"Chris Friesen","email":"chris.friesen@windriver.com","username":"cbf123"},"change_message_id":"0923338381f85badeb144e4dc1b247231727fe24","unresolved":false,"context_lines":[{"line_number":13,"context_line":"In live migrate case for libvirt, since there is no re-spawn, we need"},{"line_number":14,"context_line":"to update the instance XML before calling either migrateToURI2 or"},{"line_number":15,"context_line":"migrateToURI3. Previously this was not done, and the result was that"},{"line_number":16,"context_line":"live-migrating instance that has NUMA porperties would either work by"},{"line_number":17,"context_line":"accident but really break any policy that was set when the instance was"},{"line_number":18,"context_line":"spawned, or the instance would fail to start on the target host."},{"line_number":19,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"7af24918_339a5315","line":16,"range":{"start_line":16,"start_character":38,"end_line":16,"end_character":48},"updated":"2016-03-01 22:26:49.000000000","message":"s/porperties/properties","commit_id":"06c0eca8abf968fce2f43432e7c55040a675f3a7"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"242cdb2ab6701baa2c7ed8f285fbb7fc1e3c121c","unresolved":false,"context_lines":[{"line_number":13,"context_line":"In live migrate case for libvirt, since there is no re-spawn, we need"},{"line_number":14,"context_line":"to update the instance XML before calling either migrateToURI2 or"},{"line_number":15,"context_line":"migrateToURI3. Previously this was not done, and the result was that"},{"line_number":16,"context_line":"live-migrating instance that has NUMA porperties would either work by"},{"line_number":17,"context_line":"accident but really break any policy that was set when the instance was"},{"line_number":18,"context_line":"spawned, or the instance would fail to start on the target host."},{"line_number":19,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"7af24918_71e837b5","line":16,"range":{"start_line":16,"start_character":38,"end_line":16,"end_character":48},"in_reply_to":"7af24918_339a5315","updated":"2016-03-02 14:16:08.000000000","message":"Done","commit_id":"06c0eca8abf968fce2f43432e7c55040a675f3a7"},{"author":{"_account_id":17973,"name":"Ludovic Beliveau","email":"lbeliveau@gmail.com","username":"lbeliveau"},"change_message_id":"4960037824049bc8068496264eb6a1371f5518d9","unresolved":false,"context_lines":[{"line_number":17,"context_line":"accident but really break any policy that was set when the instance was"},{"line_number":18,"context_line":"spawned, or the instance would fail to start on the target host."},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"Since now we have porper claims for resources as part of the"},{"line_number":21,"context_line":"live-migration, it is possible to use the claimed data to update the"},{"line_number":22,"context_line":"running instances\u0027 XML and pass it on."},{"line_number":23,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"7af24918_712b3eec","line":20,"updated":"2016-03-01 19:28:54.000000000","message":"s/porper/proper/","commit_id":"06c0eca8abf968fce2f43432e7c55040a675f3a7"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"242cdb2ab6701baa2c7ed8f285fbb7fc1e3c121c","unresolved":false,"context_lines":[{"line_number":17,"context_line":"accident but really break any policy that was set when the instance was"},{"line_number":18,"context_line":"spawned, or the instance would fail to start on the target host."},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"Since now we have porper claims for resources as part of the"},{"line_number":21,"context_line":"live-migration, it is possible to use the claimed data to update the"},{"line_number":22,"context_line":"running instances\u0027 XML and pass it on."},{"line_number":23,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"7af24918_31050f7a","line":20,"in_reply_to":"7af24918_712b3eec","updated":"2016-03-02 14:16:08.000000000","message":"Done","commit_id":"06c0eca8abf968fce2f43432e7c55040a675f3a7"},{"author":{"_account_id":12712,"name":"Gleb Stepanov","email":"gstepanov@mirantis.com","username":"stgleb"},"change_message_id":"ac89446f7a5d81372f1c6d78f4d7ad63b92d2028","unresolved":false,"context_lines":[{"line_number":19,"context_line":""},{"line_number":20,"context_line":"Since now we have porper claims for resources as part of the"},{"line_number":21,"context_line":"live-migration, it is possible to use the claimed data to update the"},{"line_number":22,"context_line":"running instances\u0027 XML and pass it on."},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"Change-Id: Ibb2d8caf9898dd776c2b1d3f15a0d81cbf222363"},{"line_number":25,"context_line":"Closes-bug: 1417667"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"7af24918_35696926","line":22,"updated":"2016-03-02 14:23:54.000000000","message":"is this \u0027 needed here?","commit_id":"06c0eca8abf968fce2f43432e7c55040a675f3a7"},{"author":{"_account_id":8768,"name":"Chris Friesen","email":"chris.friesen@windriver.com","username":"cbf123"},"change_message_id":"f786784a9ff265d6de08459c2c3a2f7b9000d59a","unresolved":false,"context_lines":[{"line_number":19,"context_line":""},{"line_number":20,"context_line":"Since now we have porper claims for resources as part of the"},{"line_number":21,"context_line":"live-migration, it is possible to use the claimed data to update the"},{"line_number":22,"context_line":"running instances\u0027 XML and pass it on."},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"Change-Id: Ibb2d8caf9898dd776c2b1d3f15a0d81cbf222363"},{"line_number":25,"context_line":"Closes-bug: 1417667"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"7af24918_911f8e07","line":22,"in_reply_to":"7af24918_35696926","updated":"2016-03-02 21:57:40.000000000","message":"should be \"instance\u0027s\" I think.","commit_id":"06c0eca8abf968fce2f43432e7c55040a675f3a7"},{"author":{"_account_id":8768,"name":"Chris Friesen","email":"chris.friesen@windriver.com","username":"cbf123"},"change_message_id":"5e6ac7a6d10232ba5125ef62ace8210d42b8224c","unresolved":false,"context_lines":[{"line_number":23,"context_line":""},{"line_number":24,"context_line":"Change-Id: Ibb2d8caf9898dd776c2b1d3f15a0d81cbf222363"},{"line_number":25,"context_line":"Co-Authored-By: Sahid Ferdjaoui \u003csahid.ferdjaoui@redhat.com\u003e"},{"line_number":26,"context_line":"Closes-bug: #1417667"},{"line_number":27,"context_line":"Closes-bug: #1289064"},{"line_number":28,"context_line":"Closes-bug: #1496135"},{"line_number":29,"context_line":"Closes-bug: #1607996"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":24,"id":"fa6399be_ed3fdbb1","line":29,"range":{"start_line":26,"start_character":0,"end_line":29,"end_character":20},"updated":"2016-10-20 16:01:17.000000000","message":"Until we fix up the code to use the destination NUMA/CPU information, I don\u0027t think we should mark these all as closed.  (Maybe some of them could be, I\u0027m too lazy to look them all up.)","commit_id":"dfc83ab0a5404285ec9b9ac74af923234be85964"}],"nova/tests/unit/virt/libvirt/test_driver.py":[{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"2870c7a05ad06f8fe180f58ca4393e50add9bb73","unresolved":false,"context_lines":[{"line_number":7275,"context_line":"                                            mock_numa_support,"},{"line_number":7276,"context_line":"                                            mock_host_numa, mock_xml,"},{"line_number":7277,"context_line":"                                            mock_migrate, mock_image_meta):"},{"line_number":7278,"context_line":"        xml_old \u003d (\u0027\u003cdomain type\u003d\"kvm\"\u003e\u0027"},{"line_number":7279,"context_line":"    \u0027\u003cmemory unit\u003d\"KiB\"\u003e4194304\u003c/memory\u003e\u0027"},{"line_number":7280,"context_line":"    \u0027\u003cvcpu cpuset\u003d\"1-4\"\u003e4\u003c/vcpu\u003e\u0027"},{"line_number":7281,"context_line":"    \u0027\u003ccputune\u003e\u0027"}],"source_content_type":"text/x-python","patch_set":2,"id":"7af24918_d4635daf","line":7278,"range":{"start_line":7278,"start_character":37,"end_line":7278,"end_character":40},"updated":"2016-03-04 10:56:34.000000000","message":"Can you make this XML pretty printed with indent as it makes it so much easier to read. Use  \"\"\"\" so you don\u0027t need to add quotes for each line too.","commit_id":"88ee8fb72978fc789de82930ea685c4f50029225"},{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"3a9d0807ff2efafd81fe09864f60380ecf881185","unresolved":false,"context_lines":[{"line_number":7275,"context_line":"                                            mock_numa_support,"},{"line_number":7276,"context_line":"                                            mock_host_numa, mock_xml,"},{"line_number":7277,"context_line":"                                            mock_migrate, mock_image_meta):"},{"line_number":7278,"context_line":"        xml_old \u003d (\u0027\u003cdomain type\u003d\"kvm\"\u003e\u0027"},{"line_number":7279,"context_line":"    \u0027\u003cmemory unit\u003d\"KiB\"\u003e4194304\u003c/memory\u003e\u0027"},{"line_number":7280,"context_line":"    \u0027\u003cvcpu cpuset\u003d\"1-4\"\u003e4\u003c/vcpu\u003e\u0027"},{"line_number":7281,"context_line":"    \u0027\u003ccputune\u003e\u0027"}],"source_content_type":"text/x-python","patch_set":2,"id":"7af24918_ca30d458","line":7278,"range":{"start_line":7278,"start_character":37,"end_line":7278,"end_character":40},"in_reply_to":"7af24918_8766c5b8","updated":"2016-03-04 11:43:40.000000000","message":"You shouldn\u0027t compare XML documents with a plain string equality comparison. We have a matcher that does DOM level equality comparisons which are independant of whitespace\n\n        self.assertThat(actualXmlstr, matchers.XMLMatches(expectedXmlstr))","commit_id":"88ee8fb72978fc789de82930ea685c4f50029225"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"0d97cc3c3e63901a6c3d42523cd99a7c73f2a851","unresolved":false,"context_lines":[{"line_number":7275,"context_line":"                                            mock_numa_support,"},{"line_number":7276,"context_line":"                                            mock_host_numa, mock_xml,"},{"line_number":7277,"context_line":"                                            mock_migrate, mock_image_meta):"},{"line_number":7278,"context_line":"        xml_old \u003d (\u0027\u003cdomain type\u003d\"kvm\"\u003e\u0027"},{"line_number":7279,"context_line":"    \u0027\u003cmemory unit\u003d\"KiB\"\u003e4194304\u003c/memory\u003e\u0027"},{"line_number":7280,"context_line":"    \u0027\u003cvcpu cpuset\u003d\"1-4\"\u003e4\u003c/vcpu\u003e\u0027"},{"line_number":7281,"context_line":"    \u0027\u003ccputune\u003e\u0027"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa0719c6_bb360c50","line":7278,"range":{"start_line":7278,"start_character":37,"end_line":7278,"end_character":40},"in_reply_to":"7af24918_ca30d458","updated":"2016-03-29 16:32:25.000000000","message":"Actually that won\u0027t work if there is a mismatch with whitespace, and I don\u0027t feel like fixing it TBH","commit_id":"88ee8fb72978fc789de82930ea685c4f50029225"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"3a645f6099c8b9a34e9c17b4f760630a19d024ff","unresolved":false,"context_lines":[{"line_number":7275,"context_line":"                                            mock_numa_support,"},{"line_number":7276,"context_line":"                                            mock_host_numa, mock_xml,"},{"line_number":7277,"context_line":"                                            mock_migrate, mock_image_meta):"},{"line_number":7278,"context_line":"        xml_old \u003d (\u0027\u003cdomain type\u003d\"kvm\"\u003e\u0027"},{"line_number":7279,"context_line":"    \u0027\u003cmemory unit\u003d\"KiB\"\u003e4194304\u003c/memory\u003e\u0027"},{"line_number":7280,"context_line":"    \u0027\u003cvcpu cpuset\u003d\"1-4\"\u003e4\u003c/vcpu\u003e\u0027"},{"line_number":7281,"context_line":"    \u0027\u003ccputune\u003e\u0027"}],"source_content_type":"text/x-python","patch_set":2,"id":"7af24918_8766c5b8","line":7278,"range":{"start_line":7278,"start_character":37,"end_line":7278,"end_character":40},"in_reply_to":"7af24918_d4635daf","updated":"2016-03-04 11:16:42.000000000","message":"I could actually but for equality checking, would need to re-format them with the parser set to ignore whitespace, since lxml etree parser tries to be smart about it which makes it really difficult to compare strings","commit_id":"88ee8fb72978fc789de82930ea685c4f50029225"},{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"4defcd906a5944258c354996423c65a28bd5edf8","unresolved":false,"context_lines":[{"line_number":7275,"context_line":"                                            mock_numa_support,"},{"line_number":7276,"context_line":"                                            mock_host_numa, mock_xml,"},{"line_number":7277,"context_line":"                                            mock_migrate, mock_image_meta):"},{"line_number":7278,"context_line":"        xml_old \u003d (\u0027\u003cdomain type\u003d\"kvm\"\u003e\u0027"},{"line_number":7279,"context_line":"    \u0027\u003cmemory unit\u003d\"KiB\"\u003e4194304\u003c/memory\u003e\u0027"},{"line_number":7280,"context_line":"    \u0027\u003cvcpu cpuset\u003d\"1-4\"\u003e4\u003c/vcpu\u003e\u0027"},{"line_number":7281,"context_line":"    \u0027\u003ccputune\u003e\u0027"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba0121b8_e03aba97","line":7278,"range":{"start_line":7278,"start_character":37,"end_line":7278,"end_character":40},"in_reply_to":"fa0719c6_bb360c50","updated":"2016-03-29 16:44:52.000000000","message":"That doesn\u0027t make sense. The whole point of the matches.XMLMatches function is that it parses the DOM and compares DOM nodes, so changes in whitespace in the source XML docs should not cause match failures. That\u0027s why we use XMLMatches for XML comparisons elsewhere in libvirt unit tests.","commit_id":"88ee8fb72978fc789de82930ea685c4f50029225"},{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"2870c7a05ad06f8fe180f58ca4393e50add9bb73","unresolved":false,"context_lines":[{"line_number":7324,"context_line":"                ], siblings\u003d[], pinned_cpus\u003dset([]))])"},{"line_number":7325,"context_line":""},{"line_number":7326,"context_line":"        xml_new \u003d (\u0027\u003cdomain type\u003d\"kvm\"\u003e\u0027"},{"line_number":7327,"context_line":"    \u0027\u003cmemory unit\u003d\"KiB\"\u003e4194304\u003c/memory\u003e\u0027"},{"line_number":7328,"context_line":"    \u0027\u003cvcpu\u003e4\u003c/vcpu\u003e\u0027"},{"line_number":7329,"context_line":"    \u0027\u003ccputune\u003e\u0027"},{"line_number":7330,"context_line":"    \u0027\u003cemulatorpin cpuset\u003d\"4-7\"/\u003e\u0027"}],"source_content_type":"text/x-python","patch_set":2,"id":"7af24918_145ae5f1","line":7327,"range":{"start_line":7327,"start_character":39,"end_line":7327,"end_character":41},"updated":"2016-03-04 10:56:34.000000000","message":"Same comment here","commit_id":"88ee8fb72978fc789de82930ea685c4f50029225"},{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"3a9d0807ff2efafd81fe09864f60380ecf881185","unresolved":false,"context_lines":[{"line_number":7373,"context_line":"        drvr \u003d libvirt_driver.LibvirtDriver(fake.FakeVirtAPI(), False)"},{"line_number":7374,"context_line":"        drvr._live_migration_operation(self.context, instance, \u0027dest\u0027, False,"},{"line_number":7375,"context_line":"                                       migrate_data, dom, [])"},{"line_number":7376,"context_line":"        mock_migrate.assert_called_once_with(mock.ANY, None, xml_new, mock.ANY,"},{"line_number":7377,"context_line":"                                             None, mock.ANY)"},{"line_number":7378,"context_line":""},{"line_number":7379,"context_line":"    @mock.patch.object(fakelibvirt, \u0027VIR_DOMAIN_XML_MIGRATABLE\u0027, None,"}],"source_content_type":"text/x-python","patch_set":2,"id":"7af24918_4aae842e","line":7376,"range":{"start_line":7376,"start_character":78,"end_line":7376,"end_character":79},"updated":"2016-03-04 11:43:40.000000000","message":"Rather than passing in a literal xml_new string here, you can define an XML equality cheker\n\nMatchXML(object):\n\n  def __init__(thisxml):\n      self.thisxml \u003d thisxml\n\n  def __eq__(self, otherxml)\n     return matchers.XMLMatchers(self.thisxml).match(otherxml)\n\nAnd pass MatchXML(xml_new) into the assert_called_once_with method","commit_id":"88ee8fb72978fc789de82930ea685c4f50029225"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"ee5d5309e5912f0d11e2f67501bce4c351e62f99","unresolved":false,"context_lines":[{"line_number":8034,"context_line":"        mock_host_numa.return_value \u003d host_topology"},{"line_number":8035,"context_line":"        mock_image_meta.return_value \u003d image_meta"},{"line_number":8036,"context_line":""},{"line_number":8037,"context_line":"        def assertDomainXML(destination, dxml, flags, bandwidth):"},{"line_number":8038,"context_line":"            self.assertThat(xml_new, matchers.XMLMatches(dxml))"},{"line_number":8039,"context_line":""},{"line_number":8040,"context_line":"        mock_migrate.side_effect \u003d assertDomainXML"}],"source_content_type":"text/x-python","patch_set":15,"id":"1aa78d24_fdd8f354","line":8037,"updated":"2016-07-07 12:59:01.000000000","message":"I think we should be good now, I\u0027m going to fix the other tests.","commit_id":"dabe29f8dd2bcd35e5a47bc4e52a46acf83fe5e1"},{"author":{"_account_id":8768,"name":"Chris Friesen","email":"chris.friesen@windriver.com","username":"cbf123"},"change_message_id":"73999c4837373c1c77c90ece57a35c418283cdc1","unresolved":false,"context_lines":[{"line_number":7972,"context_line":"                objects.InstanceNUMACell("},{"line_number":7973,"context_line":"                    id\u003d1, cpuset\u003dset([0, 1, 2, 3]), memory\u003d4096,"},{"line_number":7974,"context_line":"                    cpu_policy\u003dfields.CPUAllocationPolicy.DEDICATED,"},{"line_number":7975,"context_line":"                    cpu_pinning\u003d{0: 4, 1: 5, 2: 6, 3: 7},"},{"line_number":7976,"context_line":"                    pagesize\u003d2048)])"},{"line_number":7977,"context_line":""},{"line_number":7978,"context_line":"        host_topology \u003d objects.NUMATopology("}],"source_content_type":"text/x-python","patch_set":17,"id":"dada55a8_f2efac1b","line":7975,"range":{"start_line":7975,"start_character":31,"end_line":7975,"end_character":33},"updated":"2016-07-20 22:20:55.000000000","message":"I don\u0027t think this is an accurate setup...I think that the instance is not assigned the new numa_topology from the migration context until post_live_migration_at_destination().  As such, the cpu_pinning field here should be that of the initial xml.","commit_id":"1a01dec0e47937fcab1773963ba9ccd6050b5623"},{"author":{"_account_id":8768,"name":"Chris Friesen","email":"chris.friesen@windriver.com","username":"cbf123"},"change_message_id":"265a6c984ecdd1b22cad038ea89bf62cc186b044","unresolved":false,"context_lines":[{"line_number":7972,"context_line":"                objects.InstanceNUMACell("},{"line_number":7973,"context_line":"                    id\u003d1, cpuset\u003dset([0, 1, 2, 3]), memory\u003d4096,"},{"line_number":7974,"context_line":"                    cpu_policy\u003dfields.CPUAllocationPolicy.DEDICATED,"},{"line_number":7975,"context_line":"                    cpu_pinning\u003d{0: 4, 1: 5, 2: 6, 3: 7},"},{"line_number":7976,"context_line":"                    pagesize\u003d2048)])"},{"line_number":7977,"context_line":""},{"line_number":7978,"context_line":"        host_topology \u003d objects.NUMATopology("}],"source_content_type":"text/x-python","patch_set":17,"id":"dada55a8_0998201b","line":7975,"in_reply_to":"dada55a8_c0ea7b73","updated":"2016-07-21 18:22:05.000000000","message":"Okay, if we\u0027re coming into here with the migration context already applied to the instance (from your latest change in the other patch) then we should be good.","commit_id":"1a01dec0e47937fcab1773963ba9ccd6050b5623"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"48ef61e6caa586c040402839954a0eb385448ae9","unresolved":false,"context_lines":[{"line_number":7972,"context_line":"                objects.InstanceNUMACell("},{"line_number":7973,"context_line":"                    id\u003d1, cpuset\u003dset([0, 1, 2, 3]), memory\u003d4096,"},{"line_number":7974,"context_line":"                    cpu_policy\u003dfields.CPUAllocationPolicy.DEDICATED,"},{"line_number":7975,"context_line":"                    cpu_pinning\u003d{0: 4, 1: 5, 2: 6, 3: 7},"},{"line_number":7976,"context_line":"                    pagesize\u003d2048)])"},{"line_number":7977,"context_line":""},{"line_number":7978,"context_line":"        host_topology \u003d objects.NUMATopology("}],"source_content_type":"text/x-python","patch_set":17,"id":"dada55a8_c0ea7b73","line":7975,"in_reply_to":"dada55a8_f2efac1b","updated":"2016-07-21 10:00:14.000000000","message":"No we are ok here, for that test, we want to verify that the domain xml has been well updated according an instance_topology. The test should not have relation with compute manger.","commit_id":"1a01dec0e47937fcab1773963ba9ccd6050b5623"}],"nova/virt/libvirt/driver.py":[{"author":{"_account_id":8768,"name":"Chris Friesen","email":"chris.friesen@windriver.com","username":"cbf123"},"change_message_id":"0923338381f85badeb144e4dc1b247231727fe24","unresolved":false,"context_lines":[{"line_number":5946,"context_line":"        # FIXME(ndipanov): This is not correct - we need to get the"},{"line_number":5947,"context_line":"        # vcpu_pin_set from the destination host, however in the (presumably"},{"line_number":5948,"context_line":"        # common) case when these are the same on both - this should be fine"},{"line_number":5949,"context_line":"        allowed_cpus \u003d hardware.get_vcpu_pin_set()"},{"line_number":5950,"context_line":"        numa_config \u003d self._get_guest_numa_config(instance.numa_topology,"},{"line_number":5951,"context_line":"                                                  instance.flavor,"},{"line_number":5952,"context_line":"                                                  allowed_cpus,"}],"source_content_type":"text/x-python","patch_set":1,"id":"7af24918_902b5a82","line":5949,"range":{"start_line":5949,"start_character":32,"end_line":5949,"end_character":48},"updated":"2016-03-01 22:26:49.000000000","message":"I think it\u0027s quite common for people to use different vintages of compute nodes, in which case they might have different vcpu_pin_set values.\n\nWould it make more sense to calculate the numa config on the destination and pass it back as part of the migration data?","commit_id":"06c0eca8abf968fce2f43432e7c55040a675f3a7"},{"author":{"_account_id":8768,"name":"Chris Friesen","email":"chris.friesen@windriver.com","username":"cbf123"},"change_message_id":"f786784a9ff265d6de08459c2c3a2f7b9000d59a","unresolved":false,"context_lines":[{"line_number":5946,"context_line":"        # FIXME(ndipanov): This is not correct - we need to get the"},{"line_number":5947,"context_line":"        # vcpu_pin_set from the destination host, however in the (presumably"},{"line_number":5948,"context_line":"        # common) case when these are the same on both - this should be fine"},{"line_number":5949,"context_line":"        allowed_cpus \u003d hardware.get_vcpu_pin_set()"},{"line_number":5950,"context_line":"        numa_config \u003d self._get_guest_numa_config(instance.numa_topology,"},{"line_number":5951,"context_line":"                                                  instance.flavor,"},{"line_number":5952,"context_line":"                                                  allowed_cpus,"}],"source_content_type":"text/x-python","patch_set":1,"id":"7af24918_11653eb4","line":5949,"range":{"start_line":5949,"start_character":32,"end_line":5949,"end_character":48},"in_reply_to":"7af24918_71de7740","updated":"2016-03-02 21:57:40.000000000","message":"As long as you\u0027ve thought about how you\u0027re going to handle it then I don\u0027t think we need to block this patch.  I just didn\u0027t want to merge this and then discover we have to do something completely different to handle the differing vcpu_pin_set values.\n\nI feel kind of bad, I haven\u0027t been able to be as involved in this work in Mitaka as I would have liked.","commit_id":"06c0eca8abf968fce2f43432e7c55040a675f3a7"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"242cdb2ab6701baa2c7ed8f285fbb7fc1e3c121c","unresolved":false,"context_lines":[{"line_number":5946,"context_line":"        # FIXME(ndipanov): This is not correct - we need to get the"},{"line_number":5947,"context_line":"        # vcpu_pin_set from the destination host, however in the (presumably"},{"line_number":5948,"context_line":"        # common) case when these are the same on both - this should be fine"},{"line_number":5949,"context_line":"        allowed_cpus \u003d hardware.get_vcpu_pin_set()"},{"line_number":5950,"context_line":"        numa_config \u003d self._get_guest_numa_config(instance.numa_topology,"},{"line_number":5951,"context_line":"                                                  instance.flavor,"},{"line_number":5952,"context_line":"                                                  allowed_cpus,"}],"source_content_type":"text/x-python","patch_set":1,"id":"7af24918_71de7740","line":5949,"range":{"start_line":5949,"start_character":32,"end_line":5949,"end_character":48},"in_reply_to":"7af24918_902b5a82","updated":"2016-03-02 14:16:08.000000000","message":"Yes I was going to do that in a follow-up patch, but it can be moved ahead.\n\nThanks for the review Chris - I know your team fixed this one cycle ago internally so any review from you is appreciated :)","commit_id":"06c0eca8abf968fce2f43432e7c55040a675f3a7"},{"author":{"_account_id":17973,"name":"Ludovic Beliveau","email":"lbeliveau@gmail.com","username":"lbeliveau"},"change_message_id":"4960037824049bc8068496264eb6a1371f5518d9","unresolved":false,"context_lines":[{"line_number":5977,"context_line":"                new_elem \u003d etree.fromstring(config.to_xml(pretty_print\u003dFalse))"},{"line_number":5978,"context_line":"            if elem is not None:"},{"line_number":5979,"context_line":"                xml_doc.remove(elem)"},{"line_number":5980,"context_line":"            if new_elem is not None:"},{"line_number":5981,"context_line":"                xml_doc.append(new_elem)"},{"line_number":5982,"context_line":""},{"line_number":5983,"context_line":"        replace \u003d [(\u0027cputune\u0027, numa_config.cputune),"}],"source_content_type":"text/x-python","patch_set":1,"id":"7af24918_fca3a59c","line":5980,"updated":"2016-03-01 19:28:54.000000000","message":"I think this is a bit confusing.  The flag \u0027new_elem\u0027 can be deduced from \u0027config\u0027.\n\nWhat about something like:\n\n\nelem \u003d xml_doc.find(\u0027./\u0027 + tag)\nif elem is not None:\n    xml_doc.remove(elem)\n\nif config:\n    new_elem \u003d etree.fromstring(config.to_xml(pretty_print\u003dFalse))\n    xml_doc.append(new_elem)?","commit_id":"06c0eca8abf968fce2f43432e7c55040a675f3a7"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"242cdb2ab6701baa2c7ed8f285fbb7fc1e3c121c","unresolved":false,"context_lines":[{"line_number":5977,"context_line":"                new_elem \u003d etree.fromstring(config.to_xml(pretty_print\u003dFalse))"},{"line_number":5978,"context_line":"            if elem is not None:"},{"line_number":5979,"context_line":"                xml_doc.remove(elem)"},{"line_number":5980,"context_line":"            if new_elem is not None:"},{"line_number":5981,"context_line":"                xml_doc.append(new_elem)"},{"line_number":5982,"context_line":""},{"line_number":5983,"context_line":"        replace \u003d [(\u0027cputune\u0027, numa_config.cputune),"}],"source_content_type":"text/x-python","patch_set":1,"id":"7af24918_71acb7a0","line":5980,"in_reply_to":"7af24918_fca3a59c","updated":"2016-03-02 14:16:08.000000000","message":"Ok it probably makes sense to it this way as config not being none means new_elem will exist too.","commit_id":"06c0eca8abf968fce2f43432e7c55040a675f3a7"},{"author":{"_account_id":17973,"name":"Ludovic Beliveau","email":"lbeliveau@gmail.com","username":"lbeliveau"},"change_message_id":"098d57a13255f3e2ff24f24f2ea4a5e46f5c8109","unresolved":false,"context_lines":[{"line_number":5967,"context_line":"        # NOTE(ndipanov): We need to treat cpuset slightly differently - it\u0027s"},{"line_number":5968,"context_line":"        # just an attribute on the vcpu element, which we expect is always"},{"line_number":5969,"context_line":"        # there"},{"line_number":5970,"context_line":"        vcpu \u003d xml_doc.find(\u0027./vcpu\u0027)"},{"line_number":5971,"context_line":"        new_vcpu \u003d etree.Element(\"vcpu\")"},{"line_number":5972,"context_line":"        new_vcpu.text \u003d six.text_type(instance.flavor.vcpus)"},{"line_number":5973,"context_line":"        if numa_config.cpuset:"}],"source_content_type":"text/x-python","patch_set":2,"id":"7af24918_062ae28f","line":5970,"updated":"2016-03-03 17:38:08.000000000","message":"Even if vcpu should always be present, I would still add a check just to make it more robust.\n\nMaybe something like:\n\nvcpu \u003d xml_doc.find(\u0027./vcpu\u0027)\nif vcpu:\n    xml_doc.remove(vcpu)\n\nBut please ignore my comment if you think it\u0027s not appropriate :)","commit_id":"88ee8fb72978fc789de82930ea685c4f50029225"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"3a645f6099c8b9a34e9c17b4f760630a19d024ff","unresolved":false,"context_lines":[{"line_number":5967,"context_line":"        # NOTE(ndipanov): We need to treat cpuset slightly differently - it\u0027s"},{"line_number":5968,"context_line":"        # just an attribute on the vcpu element, which we expect is always"},{"line_number":5969,"context_line":"        # there"},{"line_number":5970,"context_line":"        vcpu \u003d xml_doc.find(\u0027./vcpu\u0027)"},{"line_number":5971,"context_line":"        new_vcpu \u003d etree.Element(\"vcpu\")"},{"line_number":5972,"context_line":"        new_vcpu.text \u003d six.text_type(instance.flavor.vcpus)"},{"line_number":5973,"context_line":"        if numa_config.cpuset:"}],"source_content_type":"text/x-python","patch_set":2,"id":"7af24918_2461b2a9","line":5970,"in_reply_to":"7af24918_062ae28f","updated":"2016-03-04 11:16:42.000000000","message":"Yeah I thought about it when I was writing this and can\u0027t remember why I choses to do this. your idea makes more sense. will update.","commit_id":"88ee8fb72978fc789de82930ea685c4f50029225"},{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"2870c7a05ad06f8fe180f58ca4393e50add9bb73","unresolved":false,"context_lines":[{"line_number":5982,"context_line":"            if elem is not None:"},{"line_number":5983,"context_line":"                xml_doc.remove(elem)"},{"line_number":5984,"context_line":"            if config:"},{"line_number":5985,"context_line":"                new_elem \u003d etree.fromstring(config.to_xml(pretty_print\u003dFalse))"},{"line_number":5986,"context_line":"                xml_doc.append(new_elem)"},{"line_number":5987,"context_line":""},{"line_number":5988,"context_line":"        replace \u003d [(\u0027cputune\u0027, numa_config.cputune),"}],"source_content_type":"text/x-python","patch_set":2,"id":"7af24918_d4d87d55","line":5985,"range":{"start_line":5985,"start_character":76,"end_line":5985,"end_character":78},"updated":"2016-03-04 10:56:34.000000000","message":"Errr, why not just use   config.to_dom() which gives you the etree Element right away","commit_id":"88ee8fb72978fc789de82930ea685c4f50029225"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"3a645f6099c8b9a34e9c17b4f760630a19d024ff","unresolved":false,"context_lines":[{"line_number":5982,"context_line":"            if elem is not None:"},{"line_number":5983,"context_line":"                xml_doc.remove(elem)"},{"line_number":5984,"context_line":"            if config:"},{"line_number":5985,"context_line":"                new_elem \u003d etree.fromstring(config.to_xml(pretty_print\u003dFalse))"},{"line_number":5986,"context_line":"                xml_doc.append(new_elem)"},{"line_number":5987,"context_line":""},{"line_number":5988,"context_line":"        replace \u003d [(\u0027cputune\u0027, numa_config.cputune),"}],"source_content_type":"text/x-python","patch_set":2,"id":"7af24918_e784e95e","line":5985,"range":{"start_line":5985,"start_character":76,"end_line":5985,"end_character":78},"in_reply_to":"7af24918_d4d87d55","updated":"2016-03-04 11:16:42.000000000","message":"Missed that, but will need for it to be able to tell the parser not to remember the whitspace since that messes with the tests (and does not really impact the code)","commit_id":"88ee8fb72978fc789de82930ea685c4f50029225"},{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"41174fc50c00f8ad324930314940ab57ce952e1d","unresolved":false,"context_lines":[{"line_number":5943,"context_line":"            if elem is not None:"},{"line_number":5944,"context_line":"                xml_doc.remove(elem)"},{"line_number":5945,"context_line":"            if config:"},{"line_number":5946,"context_line":"                new_elem \u003d etree.fromstring(config.to_xml(pretty_print\u003dFalse))"},{"line_number":5947,"context_line":"                xml_doc.append(new_elem)"},{"line_number":5948,"context_line":""},{"line_number":5949,"context_line":"        replace \u003d [(\u0027cputune\u0027, numa_config.cputune),"}],"source_content_type":"text/x-python","patch_set":4,"id":"5aef4532_7edf1f0d","line":5946,"range":{"start_line":5946,"start_character":76,"end_line":5946,"end_character":78},"updated":"2016-03-09 13:41:10.000000000","message":"Same comment as before - you should be using config.to_dom() instead of using  fromstring(to_xml()) which is the slow way around","commit_id":"38121357cb55b2b2a81cfea1c5a0d62e4a6c6d98"}],"nova/virt/libvirt/migration.py":[{"author":{"_account_id":8768,"name":"Chris Friesen","email":"chris.friesen@windriver.com","username":"cbf123"},"change_message_id":"38bc1094197b2819b07c944fa8cb8e6d9e2eeec2","unresolved":false,"context_lines":[{"line_number":472,"context_line":"    # vcpu_pin_set from the destination host, however in the (presumably"},{"line_number":473,"context_line":"    # common) case when these are the same on both - this should be fine"},{"line_number":474,"context_line":"    allowed_cpus \u003d hardware.get_vcpu_pin_set()"},{"line_number":475,"context_line":"    numa_config \u003d driver_interface.get_guest_numa_config("},{"line_number":476,"context_line":"        instance.numa_topology, instance.flavor, allowed_cpus, image_meta)"},{"line_number":477,"context_line":"    if numa_config[1] is None:"},{"line_number":478,"context_line":"        # Quit early if the instance does not provide numa topology."}],"source_content_type":"text/x-python","patch_set":17,"id":"dada55a8_c8d47e21","line":475,"updated":"2016-07-20 19:38:23.000000000","message":"Don\u0027t we need to generate the new numa_config from instance.migration_context.new_numa_topology (or something like that) in order to ensure that the new xml represents the newly-claimed pinned CPUs on the destination?","commit_id":"1a01dec0e47937fcab1773963ba9ccd6050b5623"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"328b7805e46433f0f32ed0101d00fa3de109a17e","unresolved":false,"context_lines":[{"line_number":472,"context_line":"    # vcpu_pin_set from the destination host, however in the (presumably"},{"line_number":473,"context_line":"    # common) case when these are the same on both - this should be fine"},{"line_number":474,"context_line":"    allowed_cpus \u003d hardware.get_vcpu_pin_set()"},{"line_number":475,"context_line":"    numa_config \u003d driver_interface.get_guest_numa_config("},{"line_number":476,"context_line":"        instance.numa_topology, instance.flavor, allowed_cpus, image_meta)"},{"line_number":477,"context_line":"    if numa_config[1] is None:"},{"line_number":478,"context_line":"        # Quit early if the instance does not provide numa topology."}],"source_content_type":"text/x-python","patch_set":17,"id":"dada55a8_a0630741","line":475,"in_reply_to":"dada55a8_89e60713","updated":"2016-07-21 09:57:27.000000000","message":"Yes we have missed something here. Normally we should to apply_migration_context in compute manager. probably something like:\n\n  def instance.mutated_migration_context():\n    self.driver.live_migration(...)\n\nBecause in post_live_migration_at_destination() we well update the instance and save the new topology.","commit_id":"1a01dec0e47937fcab1773963ba9ccd6050b5623"},{"author":{"_account_id":8768,"name":"Chris Friesen","email":"chris.friesen@windriver.com","username":"cbf123"},"change_message_id":"265a6c984ecdd1b22cad038ea89bf62cc186b044","unresolved":false,"context_lines":[{"line_number":472,"context_line":"    # vcpu_pin_set from the destination host, however in the (presumably"},{"line_number":473,"context_line":"    # common) case when these are the same on both - this should be fine"},{"line_number":474,"context_line":"    allowed_cpus \u003d hardware.get_vcpu_pin_set()"},{"line_number":475,"context_line":"    numa_config \u003d driver_interface.get_guest_numa_config("},{"line_number":476,"context_line":"        instance.numa_topology, instance.flavor, allowed_cpus, image_meta)"},{"line_number":477,"context_line":"    if numa_config[1] is None:"},{"line_number":478,"context_line":"        # Quit early if the instance does not provide numa topology."}],"source_content_type":"text/x-python","patch_set":17,"id":"dada55a8_89b37097","line":475,"in_reply_to":"dada55a8_a0630741","updated":"2016-07-21 18:22:05.000000000","message":"Okay, that works.  I assume you\u0027ve verified that we don\u0027t call instance.save() with the mutated instance?","commit_id":"1a01dec0e47937fcab1773963ba9ccd6050b5623"},{"author":{"_account_id":8768,"name":"Chris Friesen","email":"chris.friesen@windriver.com","username":"cbf123"},"change_message_id":"74e457943c43f2c51f0c2c6b1b4ffbc2e00cd770","unresolved":false,"context_lines":[{"line_number":472,"context_line":"    # vcpu_pin_set from the destination host, however in the (presumably"},{"line_number":473,"context_line":"    # common) case when these are the same on both - this should be fine"},{"line_number":474,"context_line":"    allowed_cpus \u003d hardware.get_vcpu_pin_set()"},{"line_number":475,"context_line":"    numa_config \u003d driver_interface.get_guest_numa_config("},{"line_number":476,"context_line":"        instance.numa_topology, instance.flavor, allowed_cpus, image_meta)"},{"line_number":477,"context_line":"    if numa_config[1] is None:"},{"line_number":478,"context_line":"        # Quit early if the instance does not provide numa topology."}],"source_content_type":"text/x-python","patch_set":17,"id":"dada55a8_89e60713","line":475,"in_reply_to":"dada55a8_c8d47e21","updated":"2016-07-20 21:05:55.000000000","message":"And come to think of it, should we use instance.migration_context.new_numa_topology for the calls to driver_interface.get_guest_memory_backing_config() and driver_interface.get_guest_cpu_config() below as well?   A brief look at the code makes me think it might be okay as-is, but it\u0027d be confusing to use instance.migration_context.new_numa_topology for one and instance.numa_topology for the others.","commit_id":"1a01dec0e47937fcab1773963ba9ccd6050b5623"},{"author":{"_account_id":8768,"name":"Chris Friesen","email":"chris.friesen@windriver.com","username":"cbf123"},"change_message_id":"6cc2de3967651685d74abc7500e203a90a9c1bd6","unresolved":false,"context_lines":[{"line_number":472,"context_line":"    # vcpu_pin_set from the destination host, however in the (presumably"},{"line_number":473,"context_line":"    # common) case when these are the same on both - this should be fine"},{"line_number":474,"context_line":"    allowed_cpus \u003d hardware.get_vcpu_pin_set()"},{"line_number":475,"context_line":"    numa_config \u003d driver_interface.get_guest_numa_config("},{"line_number":476,"context_line":"        instance.numa_topology, instance.flavor, allowed_cpus, image_meta)"},{"line_number":477,"context_line":"    if numa_config[1] is None:"},{"line_number":478,"context_line":"        # Quit early if the instance does not provide numa topology."}],"source_content_type":"text/x-python","patch_set":23,"id":"5a8bc5a2_78ddae13","line":475,"updated":"2016-09-22 22:16:53.000000000","message":"This will call _get_guest_numa_config() which will perform logic based on the numa topology of the current host.\n\nIf the destination has more numa nodes than the source and the instance is being placed in one of the higher numa nodes, then this could cause problems due to the loop over topology.cells, where \"topology\" is for the source host.\n\nAlso, if the instance isn\u0027t using dedicated CPUs, then we could assign \"pin_cpuset.cpuset \u003d host_cell.cpuset\" based on the source host_cell, not the destination.","commit_id":"031afaf80f18c0e2563067b788b11747eab2db33"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"3583ed021515a68dcade3c8d3a1bc59bc2b36c01","unresolved":false,"context_lines":[{"line_number":472,"context_line":"    # vcpu_pin_set from the destination host, however in the (presumably"},{"line_number":473,"context_line":"    # common) case when these are the same on both - this should be fine"},{"line_number":474,"context_line":"    allowed_cpus \u003d hardware.get_vcpu_pin_set()"},{"line_number":475,"context_line":"    numa_config \u003d driver_interface.get_guest_numa_config("},{"line_number":476,"context_line":"        instance.numa_topology, instance.flavor, allowed_cpus, image_meta)"},{"line_number":477,"context_line":"    if numa_config[1] is None:"},{"line_number":478,"context_line":"        # Quit early if the instance does not provide numa topology."}],"source_content_type":"text/x-python","patch_set":23,"id":"fa6399be_f6bb350d","line":475,"in_reply_to":"5a8bc5a2_78ddae13","updated":"2016-10-20 13:03:42.000000000","message":"Your comment is clearly valid, that method is going to be executed to update the XML passed to libvirt.migrateToURI which is on the source node. More logic should be added to retrieve host topology of the destination during pre-live-migation.\n\nThat said we are doing a claim on the destination node so we are expecting that instance topology is going to fit on destination. As the FIXME of Nikola about vcpu_pin_set we try here to do the best effort first. That serie is already complicated to avoid adding more complexity so far.","commit_id":"031afaf80f18c0e2563067b788b11747eab2db33"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"4f9a70856d70de5c2c8693f2c36129e4af0b3302","unresolved":false,"context_lines":[{"line_number":470,"context_line":"    image_meta \u003d objects.ImageMeta.from_instance(instance)"},{"line_number":471,"context_line":"    # FIXME(ndipanov): This is not correct - we need to get the"},{"line_number":472,"context_line":"    # vcpu_pin_set from the destination host, however in the (presumably"},{"line_number":473,"context_line":"    # common) case when these are the same on both - this should be fine"},{"line_number":474,"context_line":"    allowed_cpus \u003d hardware.get_vcpu_pin_set()"},{"line_number":475,"context_line":"    numa_config \u003d driver_interface.get_guest_numa_config("},{"line_number":476,"context_line":"        instance.numa_topology, instance.flavor, allowed_cpus, image_meta)"}],"source_content_type":"text/x-python","patch_set":24,"id":"fa6399be_cc7dbd1d","line":473,"updated":"2016-10-20 14:57:24.000000000","message":"Pawel can you add TODO here to refer the last comment from Chris ?","commit_id":"dfc83ab0a5404285ec9b9ac74af923234be85964"},{"author":{"_account_id":8768,"name":"Chris Friesen","email":"chris.friesen@windriver.com","username":"cbf123"},"change_message_id":"5e6ac7a6d10232ba5125ef62ace8210d42b8224c","unresolved":false,"context_lines":[{"line_number":470,"context_line":"    image_meta \u003d objects.ImageMeta.from_instance(instance)"},{"line_number":471,"context_line":"    # FIXME(ndipanov): This is not correct - we need to get the"},{"line_number":472,"context_line":"    # vcpu_pin_set from the destination host, however in the (presumably"},{"line_number":473,"context_line":"    # common) case when these are the same on both - this should be fine"},{"line_number":474,"context_line":"    allowed_cpus \u003d hardware.get_vcpu_pin_set()"},{"line_number":475,"context_line":"    numa_config \u003d driver_interface.get_guest_numa_config("},{"line_number":476,"context_line":"        instance.numa_topology, instance.flavor, allowed_cpus, image_meta)"}],"source_content_type":"text/x-python","patch_set":24,"id":"fa6399be_4dd1a756","line":473,"in_reply_to":"fa6399be_cc7dbd1d","updated":"2016-10-20 16:01:17.000000000","message":"Please...and I don\u0027t think we should mark the bugs as fixed until we fix this up to use the destination information.  I\u0027ve seen this cause problems in practice, and it was annoying to track down.","commit_id":"dfc83ab0a5404285ec9b9ac74af923234be85964"},{"author":{"_account_id":8768,"name":"Chris Friesen","email":"chris.friesen@windriver.com","username":"cbf123"},"change_message_id":"098dcf163d18ca562848302e36585e042f75e50c","unresolved":false,"context_lines":[{"line_number":494,"context_line":"    if vcpu is not None:"},{"line_number":495,"context_line":"        xml_doc.remove(vcpu)"},{"line_number":496,"context_line":"    xml_doc.append(new_vcpu)"},{"line_number":497,"context_line":""},{"line_number":498,"context_line":"    def replace_from_config(tag, config):"},{"line_number":499,"context_line":"        \"\"\"Replace a top level node with xml generated by config \"\"\""},{"line_number":500,"context_line":"        elem \u003d xml_doc.find(\u0027./\u0027 + tag)"}],"source_content_type":"text/x-python","patch_set":24,"id":"3a71b18c_64eab675","line":497,"updated":"2016-12-06 21:49:30.000000000","message":"I think it\u0027s possible that the guest topology changes while migrating to a host that has a different physical host CPU topology (for e.g. HT to non-HT). Guest CPU topology isn\u0027t allowed to change during live migration.  For this reason, we always want to keep the guest CPU topology that is currently used in the running instance.  Something like this. (The topology stays the same but the cpu_tune still gets recalculated based on the InstanceNUMATopology that was\nclaimed on the destination.)\n\n+    old_cpu_xml \u003d xml_doc.find(\u0027./cpu\u0027)\n+    old_cpu \u003d vconfig.LibvirtConfigCPU()\n+    old_cpu.parse_dom(old_cpu_xml)\n+\n+    cpu.sockets \u003d old_cpu.sockets\n+    cpu.cores \u003d old_cpu.cores\n+    cpu.threads \u003d old_cpu.threads\n\nThe new topology will take effect when the instance stops/starts on the new host.","commit_id":"dfc83ab0a5404285ec9b9ac74af923234be85964"}]}
