)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"e7f22946677c6e0a8931c132b9a33a6b58d13bac","unresolved":false,"context_lines":[{"line_number":13,"context_line":"define them. Actually calling this method to retrieve domain XML of an"},{"line_number":14,"context_line":"instance is not good in every cases because the aim of that method is"},{"line_number":15,"context_line":"to define a domain XML not to return a domain XML, for that purpose we"},{"line_number":16,"context_line":"prefer to call XMLDesc(0)."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Closes-Bug: #1614019"},{"line_number":19,"context_line":"Change-Id: I230031bba3926171a80ae773a98280ac5c61058b"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"7a8ec9b2_a820824a","line":16,"updated":"2016-09-21 09:08:34.000000000","message":"I think this commit message needs updating to explain why we\u0027re deleting all the code related to libvirt.xml.","commit_id":"7032474a8f11765fd97a557c2590b9c80d9451ca"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"87e19b8f0b8371feff37716fffad2dac58aedd7e","unresolved":false,"context_lines":[{"line_number":15,"context_line":"to define a domain XML not to return a domain XML, for that purpose we"},{"line_number":16,"context_line":"prefer to call XMLDesc(0)."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Also that commit is removing the process to write into a file the"},{"line_number":19,"context_line":"domain XML which is not used anymore. libvirtd is storing the XML"},{"line_number":20,"context_line":"definition of domains by itself (see: guest.write_instance_config())"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"Closes-Bug: #1614019"},{"line_number":23,"context_line":"Change-Id: I230031bba3926171a80ae773a98280ac5c61058b"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"5a8bc5a2_458aa7c0","line":20,"range":{"start_line":18,"start_character":0,"end_line":20,"end_character":68},"updated":"2016-09-23 14:07:54.000000000","message":"This should really be done in a precursor commit. idk if that\u0027s possible or not?","commit_id":"dccaf9cb88705b2a635c5b54433c5e6187557849"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"ccafe9326a58beed446ba4b4347e06a05375f264","unresolved":false,"context_lines":[{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Also that commit is removing the process to write into a file the"},{"line_number":19,"context_line":"domain XML which is not used anymore. libvirtd is storing the XML"},{"line_number":20,"context_line":"definition of domains by itself (see: guest.write_instance_config())"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"Closes-Bug: #1614019"},{"line_number":23,"context_line":"Change-Id: I230031bba3926171a80ae773a98280ac5c61058b"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"fa6399be_675943fe","line":20,"in_reply_to":"1a95cdbc_6e3369f6","updated":"2016-10-13 07:57:19.000000000","message":"I would say no, if you look at the code, I\u0027m removing the method get_guest_xml which provides an option write_to_disk which creates a file libvirt.xml on the disk. So by removing the call of that method i\u0027m going to remove the creation of that file. Even if that file is not used I don\u0027t think we should half remove the process of creating the file libvirt.xml. Also that is going to create a dependent change to backport to fix that issue.\n\nPlease let me know if you still consider is something we should do, thanks.","commit_id":"dccaf9cb88705b2a635c5b54433c5e6187557849"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"11dd54b7230d89c596c6fa5795e4473209e0d329","unresolved":false,"context_lines":[{"line_number":15,"context_line":"to define a domain XML not to return a domain XML, for that purpose we"},{"line_number":16,"context_line":"prefer to call XMLDesc(0)."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Also that commit is removing the process to write into a file the"},{"line_number":19,"context_line":"domain XML which is not used anymore. libvirtd is storing the XML"},{"line_number":20,"context_line":"definition of domains by itself (see: guest.write_instance_config())"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"Closes-Bug: #1614019"},{"line_number":23,"context_line":"Change-Id: I230031bba3926171a80ae773a98280ac5c61058b"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"1a95cdbc_6e3369f6","line":20,"range":{"start_line":18,"start_character":0,"end_line":20,"end_character":68},"in_reply_to":"5a8bc5a2_458aa7c0","updated":"2016-10-10 18:50:29.000000000","message":"Agreed that it would be easier to consume if that was in a separate commit...","commit_id":"dccaf9cb88705b2a635c5b54433c5e6187557849"}],"nova/tests/unit/virt/libvirt/test_host.py":[{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"f8d65460fda4225fddd658232fb61597039eb27e","unresolved":false,"context_lines":[{"line_number":878,"context_line":"    def test_write_instance_config_to_disk(self, mock_write_to_file,"},{"line_number":879,"context_line":"                                   mock_get_instance_path):"},{"line_number":880,"context_line":"        xml \u003d \"\u003cx\u003e\u003cname\u003efoo\u003c/name\u003e\u003c/x\u003e\""},{"line_number":881,"context_line":"        mock_get_instance_path.return_value \u003d \"/path/instance\""},{"line_number":882,"context_line":"        self.host.write_instance_config_to_disk(mock.ANY, xml)"},{"line_number":883,"context_line":"        mock_write_to_file.assert_called_once_with("},{"line_number":884,"context_line":"            \"/path/instance/libvirt.xml\", xml)"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a89bdaa_34b698dc","line":881,"range":{"start_line":881,"start_character":46,"end_line":881,"end_character":62},"updated":"2016-09-12 12:00:49.000000000","message":"nit: it\u0027d be helpful to pull this out to a variable and use below","commit_id":"3f1355746167624fd9349b30d16449ccb7260018"}],"nova/virt/libvirt/driver.py":[{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"90902b63b9316b5ae9606bd25ca02008608ea3df","unresolved":false,"context_lines":[{"line_number":6658,"context_line":"        # libvirt.xml"},{"line_number":6659,"context_line":"        xml \u003d guest.get_xml_desc()"},{"line_number":6660,"context_line":"        self._host.write_instance_config_to_disk(instance, xml)"},{"line_number":6661,"context_line":"        self._host.write_instance_config(xml)"},{"line_number":6662,"context_line":""},{"line_number":6663,"context_line":"    def _get_instance_disk_info(self, instance_name, xml,"},{"line_number":6664,"context_line":"                                block_device_info\u003dNone):"}],"source_content_type":"text/x-python","patch_set":2,"id":"7a8ec9b2_f86a35ec","line":6661,"updated":"2016-09-16 09:10:26.000000000","message":"It seems the overall intent of this bit of code is that the current running guest XML gets persisted on the target host during live migration.\n\nAs such I can\u0027t help but think we should just be using \u0027VIR_MIGRATE_PERSIST_DEST\u0027 flag to the migrate() API call in the first place. That would ensure that persisted XML in libvirt would be correct.\n\nOf course the write_instance_config_to_disk() bit would still be required, but it\u0027d eliminate the write_instance_config() part.","commit_id":"3f1355746167624fd9349b30d16449ccb7260018"},{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"03d7d94979a1e0a2b6cdf8c98bdc9132fa6af752","unresolved":false,"context_lines":[{"line_number":6658,"context_line":"        # libvirt.xml"},{"line_number":6659,"context_line":"        xml \u003d guest.get_xml_desc()"},{"line_number":6660,"context_line":"        self._host.write_instance_config_to_disk(instance, xml)"},{"line_number":6661,"context_line":"        self._host.write_instance_config(xml)"},{"line_number":6662,"context_line":""},{"line_number":6663,"context_line":"    def _get_instance_disk_info(self, instance_name, xml,"},{"line_number":6664,"context_line":"                                block_device_info\u003dNone):"}],"source_content_type":"text/x-python","patch_set":2,"id":"7a8ec9b2_da395843","line":6661,"in_reply_to":"7a8ec9b2_7376e207","updated":"2016-09-20 09:59:58.000000000","message":"Actually I don\u0027t think rescue interferes here. The file we\u0027re writing here is \u0027libvirt.xml\u0027.\n\nWhen we run \u0027rescue\u0027, we write out \u0027unresuce.xml\u0027, and when we later do \u0027unrescue\u0027, we read \u0027rescue.xml\u0027 and use that to boot the guest.  We never actually read \u0027libvirt.xml\u0027 and then use it - only \u0027unrescue.xml\u0027 gets used AFAICT.","commit_id":"3f1355746167624fd9349b30d16449ccb7260018"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"ab5a35003583f663123d6cd5003b747f9d61034f","unresolved":false,"context_lines":[{"line_number":6658,"context_line":"        # libvirt.xml"},{"line_number":6659,"context_line":"        xml \u003d guest.get_xml_desc()"},{"line_number":6660,"context_line":"        self._host.write_instance_config_to_disk(instance, xml)"},{"line_number":6661,"context_line":"        self._host.write_instance_config(xml)"},{"line_number":6662,"context_line":""},{"line_number":6663,"context_line":"    def _get_instance_disk_info(self, instance_name, xml,"},{"line_number":6664,"context_line":"                                block_device_info\u003dNone):"}],"source_content_type":"text/x-python","patch_set":2,"id":"7a8ec9b2_7376e207","line":6661,"in_reply_to":"7a8ec9b2_7b745f35","updated":"2016-09-19 14:05:03.000000000","message":"Actually I can see a place when we use it, it\u0027s when we rescue an instance (method unrescue). It seems we use it to retrieve the original state of the XML after to have booted an instance as a rescue. We can probably make that part better but I guess that should be done on an other place.\n\n\nSo it\u0027s not really related to define or not the libvirt XML file to libvirt. Using VIR_MIGRATE_PERSIST_DEST  is not going to help.","commit_id":"3f1355746167624fd9349b30d16449ccb7260018"},{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"e724f95902cd90b9d2fb4aa73aa30cb63e070f65","unresolved":false,"context_lines":[{"line_number":6658,"context_line":"        # libvirt.xml"},{"line_number":6659,"context_line":"        xml \u003d guest.get_xml_desc()"},{"line_number":6660,"context_line":"        self._host.write_instance_config_to_disk(instance, xml)"},{"line_number":6661,"context_line":"        self._host.write_instance_config(xml)"},{"line_number":6662,"context_line":""},{"line_number":6663,"context_line":"    def _get_instance_disk_info(self, instance_name, xml,"},{"line_number":6664,"context_line":"                                block_device_info\u003dNone):"}],"source_content_type":"text/x-python","patch_set":2,"id":"7a8ec9b2_7b745f35","line":6661,"in_reply_to":"7a8ec9b2_f86a35ec","updated":"2016-09-16 09:15:23.000000000","message":"Looking at Nova code, I see 2 places where we write the $instances_dir/libvirt.xml file to disk, but AFAICT, there is *no code* anywhere in Nova which ever reads $instances_dir/libvirt.xml\n\nIOW, I think we can just delete the code that writes $instances_dir/libvirt.xml (and unrescue.xml), as a pre-requisite to this patch. This would then mean we can just use VIR_MIGRATE_PERSIST_DEST, and delete post_live_migration_at_destination entirely.","commit_id":"3f1355746167624fd9349b30d16449ccb7260018"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"11dd54b7230d89c596c6fa5795e4473209e0d329","unresolved":false,"context_lines":[{"line_number":6665,"context_line":""},{"line_number":6666,"context_line":"        # Make sure we define the migrated instance in libvirt"},{"line_number":6667,"context_line":"        xml \u003d guest.get_xml_desc()"},{"line_number":6668,"context_line":"        self._host.write_instance_config(xml)"},{"line_number":6669,"context_line":""},{"line_number":6670,"context_line":"    def _get_instance_disk_info(self, instance_name, xml,"},{"line_number":6671,"context_line":"                                block_device_info\u003dNone):"}],"source_content_type":"text/x-python","patch_set":5,"id":"1a95cdbc_4e494d30","line":6668,"updated":"2016-10-10 18:50:29.000000000","message":"Might be even cleaner to pass the Guest object instance into the Host.write_instance_config() method, that way the XML internals never leak out at all into the Driver class.","commit_id":"dccaf9cb88705b2a635c5b54433c5e6187557849"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"ccafe9326a58beed446ba4b4347e06a05375f264","unresolved":false,"context_lines":[{"line_number":6665,"context_line":""},{"line_number":6666,"context_line":"        # Make sure we define the migrated instance in libvirt"},{"line_number":6667,"context_line":"        xml \u003d guest.get_xml_desc()"},{"line_number":6668,"context_line":"        self._host.write_instance_config(xml)"},{"line_number":6669,"context_line":""},{"line_number":6670,"context_line":"    def _get_instance_disk_info(self, instance_name, xml,"},{"line_number":6671,"context_line":"                                block_device_info\u003dNone):"}],"source_content_type":"text/x-python","patch_set":5,"id":"fa6399be_c764cfe6","line":6668,"in_reply_to":"1a95cdbc_4e494d30","updated":"2016-10-13 07:57:19.000000000","message":"Yes That makes sense but that probably needs more work and we might want to have that change not dependent of such things to make it easily backportable.\n\nIf you look at attach_volume or live_snapshot, we usually save the domain xml, do some incantations on the guest object and if something wrong happens fallback to the saved xml to rewrite the instance config. I don\u0027t know without further investigations if it\u0027s possible to just re-pass the guest object when fallback.","commit_id":"dccaf9cb88705b2a635c5b54433c5e6187557849"}]}
