)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":7677,"name":"Solly Ross","email":"sross@redhat.com","username":"sross"},"change_message_id":"a17fb344b3da75a8556928b1c8d774d4d1db91eb","unresolved":false,"context_lines":[{"line_number":11,"context_line":"disk is neither copied to the destination nor deleted on the"},{"line_number":12,"context_line":"origin node. The problem is addressed by raising a NotImplementedError."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Closes-Bug #1270305"},{"line_number":15,"context_line":"Change-Id: I8010230b1aa5ddc322d0c93dd916b7700c25ab81"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"AAAAUX%2F%2FVQI%3D","line":14,"updated":"2014-02-13 22:21:57.000000000","message":"Should read:\n\"Closes: bug #1270305\"","commit_id":"4914dd810ef78ecca79fa33dc720ad4ff494caea"},{"author":{"_account_id":7746,"name":"Dan Genin","email":"daniel.genin@jhuapl.edu","username":"DiG"},"change_message_id":"eebb5ec4569a17c9ab07736a869fee3177813a9d","unresolved":false,"context_lines":[{"line_number":11,"context_line":"disk is neither copied to the destination nor deleted on the"},{"line_number":12,"context_line":"origin node. The problem is addressed by raising a NotImplementedError."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Closes-Bug #1270305"},{"line_number":15,"context_line":"Change-Id: I8010230b1aa5ddc322d0c93dd916b7700c25ab81"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"AAAAUX%2F%2FQUk%3D","line":14,"in_reply_to":"AAAAUX%2F%2FVHg%3D","updated":"2014-02-14 14:06:04.000000000","message":"Done","commit_id":"4914dd810ef78ecca79fa33dc720ad4ff494caea"},{"author":{"_account_id":7677,"name":"Solly Ross","email":"sross@redhat.com","username":"sross"},"change_message_id":"41f6dbf02893d1341099f74707c7e1647421ec7c","unresolved":false,"context_lines":[{"line_number":11,"context_line":"disk is neither copied to the destination nor deleted on the"},{"line_number":12,"context_line":"origin node. The problem is addressed by raising a NotImplementedError."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Closes-Bug #1270305"},{"line_number":15,"context_line":"Change-Id: I8010230b1aa5ddc322d0c93dd916b7700c25ab81"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"AAAAUX%2F%2FVHg%3D","line":14,"in_reply_to":"AAAAUX%2F%2FVQI%3D","updated":"2014-02-13 22:35:47.000000000","message":"or Closes-Bug: #1270305 (really it just needs a colon)","commit_id":"4914dd810ef78ecca79fa33dc720ad4ff494caea"}],"nova/compute/manager.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"aecdd57fdd4292bf4930cd454bcad26135ac2f29","unresolved":false,"context_lines":[{"line_number":3429,"context_line":"        with rt.resize_claim(context, instance, instance_type,"},{"line_number":3430,"context_line":"                             limits\u003dlimits) as claim:"},{"line_number":3431,"context_line":"            LOG.audit(_(\u0027Migrating\u0027), context\u003dcontext, instance\u003dinstance)"},{"line_number":3432,"context_line":"            self.compute_rpcapi.resize_instance("},{"line_number":3433,"context_line":"                    context, instance, claim.migration, image,"},{"line_number":3434,"context_line":"                    instance_type, quotas.reservations)"},{"line_number":3435,"context_line":""},{"line_number":3436,"context_line":"    @wrap_exception()"},{"line_number":3437,"context_line":"    @reverts_task_state"}],"source_content_type":"text/x-python","patch_set":13,"id":"7f287b81_3a68aff3","line":3434,"range":{"start_line":3432,"start_character":12,"end_line":3434,"end_character":55},"updated":"2017-08-23 19:50:28.000000000","message":"resize_instance is what calls driver.migrate_disk_and_power_off, but _prep_resize is on the destination host and it\u0027s doing an RPC cast to resize_instance on the source host, so how is that MigrationPreCheckError expected to come back to the destination host? Once we\u0027ve cast to resize_instance we\u0027ve lost control haven\u0027t we?","commit_id":"e24f333cd5d3667a15c36ac502304bfb5a0e21df"}],"nova/tests/virt/libvirt/test_driver.py":[{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"eff65d090852d2e935bbff7c8710b7de53648d93","unresolved":false,"context_lines":[{"line_number":8386,"context_line":"        return db.instance_create(self.context, inst)"},{"line_number":8387,"context_line":""},{"line_number":8388,"context_line":"    def test_migrate_disk_and_power_off_exception(self):"},{"line_number":8389,"context_line":"        \"\"\"Test for nova.virt.libvirt.libvirt_driver.LibvirtConnection"},{"line_number":8390,"context_line":"        .migrate_disk_and_power_off."},{"line_number":8391,"context_line":"        \"\"\""},{"line_number":8392,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"1ae5cdf2_e5e1d79b","line":8389,"updated":"2014-06-22 13:43:15.000000000","message":"not really related to this patch set","commit_id":"94b56cd991fc0133c7a955d364db313d326cc7a8"},{"author":{"_account_id":7746,"name":"Dan Genin","email":"daniel.genin@jhuapl.edu","username":"DiG"},"change_message_id":"168cd3c20541364a6225a17bdf29c46be7ad7c93","unresolved":false,"context_lines":[{"line_number":8386,"context_line":"        return db.instance_create(self.context, inst)"},{"line_number":8387,"context_line":""},{"line_number":8388,"context_line":"    def test_migrate_disk_and_power_off_exception(self):"},{"line_number":8389,"context_line":"        \"\"\"Test for nova.virt.libvirt.libvirt_driver.LibvirtConnection"},{"line_number":8390,"context_line":"        .migrate_disk_and_power_off."},{"line_number":8391,"context_line":"        \"\"\""},{"line_number":8392,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"1ae5cdf2_40f9754d","line":8389,"in_reply_to":"1ae5cdf2_e5e1d79b","updated":"2014-06-23 19:55:01.000000000","message":"Done","commit_id":"94b56cd991fc0133c7a955d364db313d326cc7a8"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"eff65d090852d2e935bbff7c8710b7de53648d93","unresolved":false,"context_lines":[{"line_number":8433,"context_line":"                          None, ins_ref, \u002710.0.0.2\u0027, flavor, None)"},{"line_number":8434,"context_line":""},{"line_number":8435,"context_line":"    def test_migrate_disk_and_power_off(self):"},{"line_number":8436,"context_line":"        \"\"\"Test for nova.virt.libvirt.libvirt_driver.LibvirtConnection"},{"line_number":8437,"context_line":"        .migrate_disk_and_power_off."},{"line_number":8438,"context_line":"        \"\"\""},{"line_number":8439,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"1ae5cdf2_05dde3dc","line":8436,"updated":"2014-06-22 13:43:15.000000000","message":"ditto","commit_id":"94b56cd991fc0133c7a955d364db313d326cc7a8"},{"author":{"_account_id":7746,"name":"Dan Genin","email":"daniel.genin@jhuapl.edu","username":"DiG"},"change_message_id":"168cd3c20541364a6225a17bdf29c46be7ad7c93","unresolved":false,"context_lines":[{"line_number":8433,"context_line":"                          None, ins_ref, \u002710.0.0.2\u0027, flavor, None)"},{"line_number":8434,"context_line":""},{"line_number":8435,"context_line":"    def test_migrate_disk_and_power_off(self):"},{"line_number":8436,"context_line":"        \"\"\"Test for nova.virt.libvirt.libvirt_driver.LibvirtConnection"},{"line_number":8437,"context_line":"        .migrate_disk_and_power_off."},{"line_number":8438,"context_line":"        \"\"\""},{"line_number":8439,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"1ae5cdf2_00ff6d36","line":8436,"in_reply_to":"1ae5cdf2_05dde3dc","updated":"2014-06-23 19:55:01.000000000","message":"Done","commit_id":"94b56cd991fc0133c7a955d364db313d326cc7a8"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"eff65d090852d2e935bbff7c8710b7de53648d93","unresolved":false,"context_lines":[{"line_number":8544,"context_line":"        \"\"\"Test for nova.virt.libvirt.libvirt_driver.LibvirtConnection"},{"line_number":8545,"context_line":"        .migrate_disk_and_power_off."},{"line_number":8546,"context_line":"        \"\"\""},{"line_number":8547,"context_line":" "},{"line_number":8548,"context_line":"        self.flags(images_type\u003d\u0027lvm\u0027, group\u003d\u0027libvirt\u0027)"},{"line_number":8549,"context_line":"        disk_info \u003d [{\u0027type\u0027: \u0027raw\u0027, \u0027path\u0027: \u0027/dev/vg/disk\u0027,"},{"line_number":8550,"context_line":"                      \u0027disk_size\u0027: \u002783886080\u0027},"}],"source_content_type":"text/x-python","patch_set":8,"id":"1ae5cdf2_c5d69bc2","line":8547,"updated":"2014-06-22 13:43:15.000000000","message":"whitespace","commit_id":"94b56cd991fc0133c7a955d364db313d326cc7a8"},{"author":{"_account_id":7746,"name":"Dan Genin","email":"daniel.genin@jhuapl.edu","username":"DiG"},"change_message_id":"168cd3c20541364a6225a17bdf29c46be7ad7c93","unresolved":false,"context_lines":[{"line_number":8544,"context_line":"        \"\"\"Test for nova.virt.libvirt.libvirt_driver.LibvirtConnection"},{"line_number":8545,"context_line":"        .migrate_disk_and_power_off."},{"line_number":8546,"context_line":"        \"\"\""},{"line_number":8547,"context_line":" "},{"line_number":8548,"context_line":"        self.flags(images_type\u003d\u0027lvm\u0027, group\u003d\u0027libvirt\u0027)"},{"line_number":8549,"context_line":"        disk_info \u003d [{\u0027type\u0027: \u0027raw\u0027, \u0027path\u0027: \u0027/dev/vg/disk\u0027,"},{"line_number":8550,"context_line":"                      \u0027disk_size\u0027: \u002783886080\u0027},"}],"source_content_type":"text/x-python","patch_set":8,"id":"1ae5cdf2_e0ea8173","line":8547,"in_reply_to":"1ae5cdf2_c5d69bc2","updated":"2014-06-23 19:55:01.000000000","message":"Done","commit_id":"94b56cd991fc0133c7a955d364db313d326cc7a8"},{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"144405086bfe7d4ff58f2ded51bd8a0f0831ca9a","unresolved":false,"context_lines":[{"line_number":8570,"context_line":"        self.stubs.Set(self.libvirtconnection, \u0027_destroy\u0027, fake_destroy)"},{"line_number":8571,"context_line":"        self.stubs.Set(self.libvirtconnection, \u0027get_host_ip_addr\u0027,"},{"line_number":8572,"context_line":"                       fake_get_host_ip_addr)"},{"line_number":8573,"context_line":"        self.stubs.Set(utils, \u0027execute\u0027, fake_execute)"},{"line_number":8574,"context_line":""},{"line_number":8575,"context_line":"        ins_ref \u003d self._create_instance()"},{"line_number":8576,"context_line":"        flavor \u003d {\u0027root_gb\u0027: 10, \u0027ephemeral_gb\u0027: 20}"}],"source_content_type":"text/x-python","patch_set":8,"id":"1ae5cdf2_c7e13b9c","line":8573,"updated":"2014-06-23 04:08:29.000000000","message":"new cases might need mock instead of stub","commit_id":"94b56cd991fc0133c7a955d364db313d326cc7a8"},{"author":{"_account_id":7746,"name":"Dan Genin","email":"daniel.genin@jhuapl.edu","username":"DiG"},"change_message_id":"168cd3c20541364a6225a17bdf29c46be7ad7c93","unresolved":false,"context_lines":[{"line_number":8570,"context_line":"        self.stubs.Set(self.libvirtconnection, \u0027_destroy\u0027, fake_destroy)"},{"line_number":8571,"context_line":"        self.stubs.Set(self.libvirtconnection, \u0027get_host_ip_addr\u0027,"},{"line_number":8572,"context_line":"                       fake_get_host_ip_addr)"},{"line_number":8573,"context_line":"        self.stubs.Set(utils, \u0027execute\u0027, fake_execute)"},{"line_number":8574,"context_line":""},{"line_number":8575,"context_line":"        ins_ref \u003d self._create_instance()"},{"line_number":8576,"context_line":"        flavor \u003d {\u0027root_gb\u0027: 10, \u0027ephemeral_gb\u0027: 20}"}],"source_content_type":"text/x-python","patch_set":8,"id":"1ae5cdf2_c0e585a5","line":8573,"in_reply_to":"1ae5cdf2_c7e13b9c","updated":"2014-06-23 19:55:01.000000000","message":"My understanding was that only changes to a large number of unit tests required converting to mock. It seems that a hodgepodge of mock and stub tests will be harder to maintain.","commit_id":"94b56cd991fc0133c7a955d364db313d326cc7a8"}],"nova/virt/driver.py":[{"author":{"_account_id":6802,"name":"Joel Coffman","email":"jmc7tp@gmail.com","username":"joel-coffman"},"change_message_id":"e414e9b74722f0ee1ecb58e7d2a5d6596d3d8af2","unresolved":false,"context_lines":[{"line_number":662,"context_line":""},{"line_number":663,"context_line":"        :param instance: instance object for instance to be resized"},{"line_number":664,"context_line":"        \"\"\""},{"line_number":665,"context_line":"        pass"},{"line_number":666,"context_line":""},{"line_number":667,"context_line":"    def check_can_live_migrate_destination(self, ctxt, instance_ref,"},{"line_number":668,"context_line":"                                           src_compute_info, dst_compute_info,"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUX%2F%2B0cM%3D","line":665,"updated":"2014-02-18 20:18:49.000000000","message":"What happens when this method is not overridden by subclasses? Constructs of the form\n\u003e if self.check_can_resize(instance):\nwon\u0027t work correctly since None evaluates to False.","commit_id":"730f92251bd3587ecf3d06578c0e8c5732800f08"},{"author":{"_account_id":7746,"name":"Dan Genin","email":"daniel.genin@jhuapl.edu","username":"DiG"},"change_message_id":"c9291970a7b72f056f54a9f1e81d807447dacc5d","unresolved":false,"context_lines":[{"line_number":662,"context_line":""},{"line_number":663,"context_line":"        :param instance: instance object for instance to be resized"},{"line_number":664,"context_line":"        \"\"\""},{"line_number":665,"context_line":"        pass"},{"line_number":666,"context_line":""},{"line_number":667,"context_line":"    def check_can_live_migrate_destination(self, ctxt, instance_ref,"},{"line_number":668,"context_line":"                                           src_compute_info, dst_compute_info,"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUX%2F%2BtxU%3D","line":665,"in_reply_to":"AAAAUX%2F%2B0cM%3D","updated":"2014-02-19 16:19:15.000000000","message":"OK, will change to return True by default.","commit_id":"730f92251bd3587ecf3d06578c0e8c5732800f08"},{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"61745e32a5e8e863d84bf8b736d3ebd8b72d522e","unresolved":false,"context_lines":[{"line_number":662,"context_line":""},{"line_number":663,"context_line":"        :param instance: instance object for instance to be resized"},{"line_number":664,"context_line":"        \"\"\""},{"line_number":665,"context_line":"        return True"},{"line_number":666,"context_line":""},{"line_number":667,"context_line":"    def check_can_live_migrate_destination(self, ctxt, instance_ref,"},{"line_number":668,"context_line":"                                           src_compute_info, dst_compute_info,"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAVX%2F%2F6oM%3D","line":665,"updated":"2014-02-27 12:04:00.000000000","message":"Why are you adding a public virt driver API method for this ?  Nothing outside the libvirt driver is using this, so making it a public API is pointless and just pollutes the namespace.","commit_id":"d071c20cd1cd0fe07957241bb09627ad98a60354"},{"author":{"_account_id":7746,"name":"Dan Genin","email":"daniel.genin@jhuapl.edu","username":"DiG"},"change_message_id":"d89e10660cbc79600365d7f1fdfe0e977f2bc113","unresolved":false,"context_lines":[{"line_number":662,"context_line":""},{"line_number":663,"context_line":"        :param instance: instance object for instance to be resized"},{"line_number":664,"context_line":"        \"\"\""},{"line_number":665,"context_line":"        return True"},{"line_number":666,"context_line":""},{"line_number":667,"context_line":"    def check_can_live_migrate_destination(self, ctxt, instance_ref,"},{"line_number":668,"context_line":"                                           src_compute_info, dst_compute_info,"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAVX%2F%2FvZg%3D","line":665,"in_reply_to":"AAAAVX%2F%2F6oM%3D","updated":"2014-02-28 16:38:50.000000000","message":"Done","commit_id":"d071c20cd1cd0fe07957241bb09627ad98a60354"},{"author":{"_account_id":7746,"name":"Dan Genin","email":"daniel.genin@jhuapl.edu","username":"DiG"},"change_message_id":"d120c3550f68f3124736e91e97d875a6930bd977","unresolved":false,"context_lines":[{"line_number":662,"context_line":""},{"line_number":663,"context_line":"        :param instance: instance object for instance to be resized"},{"line_number":664,"context_line":"        \"\"\""},{"line_number":665,"context_line":"        return True"},{"line_number":666,"context_line":""},{"line_number":667,"context_line":"    def check_can_live_migrate_destination(self, ctxt, instance_ref,"},{"line_number":668,"context_line":"                                           src_compute_info, dst_compute_info,"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAVX%2F%2F6aE%3D","line":665,"in_reply_to":"AAAAVX%2F%2F6oM%3D","updated":"2014-02-27 12:34:45.000000000","message":"This was actually suggested by another reviewer but it seems like a good idea to me also. Other hypervisors existing or future may want to perform this check.","commit_id":"d071c20cd1cd0fe07957241bb09627ad98a60354"}],"nova/virt/libvirt/driver.py":[{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"f814352698747fb60d735802ec74def097d3e4c9","unresolved":false,"context_lines":[{"line_number":4684,"context_line":"                                   block_device_info\u003dNone):"},{"line_number":4685,"context_line":"        if CONF.libvirt.images_type \u003d\u003d \"lvm\":"},{"line_number":4686,"context_line":"            raise NotImplementedError(_(\"Migration is not supported for\""},{"line_number":4687,"context_line":"                \" LVM backed instances\"))"},{"line_number":4688,"context_line":"        LOG.debug(_(\"Starting migrate_disk_and_power_off\"),"},{"line_number":4689,"context_line":"                   instance\u003dinstance)"},{"line_number":4690,"context_line":"        disk_info_text \u003d self.get_instance_disk_info(instance[\u0027name\u0027],"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUX%2F%2FSaw%3D","line":4687,"updated":"2014-02-14 07:37:17.000000000","message":"instead of doing this here\nI think a virt check like \n\ncheck_can_resize may be defined, generally it will return pass\nfor libvirt, it can do the check you added \nit will make the logic more clear","commit_id":"4914dd810ef78ecca79fa33dc720ad4ff494caea"},{"author":{"_account_id":7746,"name":"Dan Genin","email":"daniel.genin@jhuapl.edu","username":"DiG"},"change_message_id":"2c10743f9b7f0f8780abc381f664cb184885a772","unresolved":false,"context_lines":[{"line_number":4684,"context_line":"                                   block_device_info\u003dNone):"},{"line_number":4685,"context_line":"        if CONF.libvirt.images_type \u003d\u003d \"lvm\":"},{"line_number":4686,"context_line":"            raise NotImplementedError(_(\"Migration is not supported for\""},{"line_number":4687,"context_line":"                \" LVM backed instances\"))"},{"line_number":4688,"context_line":"        LOG.debug(_(\"Starting migrate_disk_and_power_off\"),"},{"line_number":4689,"context_line":"                   instance\u003dinstance)"},{"line_number":4690,"context_line":"        disk_info_text \u003d self.get_instance_disk_info(instance[\u0027name\u0027],"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUX%2F%2FQD0%3D","line":4687,"in_reply_to":"AAAAUX%2F%2FQII%3D","updated":"2014-02-14 14:38:59.000000000","message":"ah, yes, that makes sense. thanks!","commit_id":"4914dd810ef78ecca79fa33dc720ad4ff494caea"},{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"cdde43a731958b7dc65dbf53af11873e00f98e4a","unresolved":false,"context_lines":[{"line_number":4684,"context_line":"                                   block_device_info\u003dNone):"},{"line_number":4685,"context_line":"        if CONF.libvirt.images_type \u003d\u003d \"lvm\":"},{"line_number":4686,"context_line":"            raise NotImplementedError(_(\"Migration is not supported for\""},{"line_number":4687,"context_line":"                \" LVM backed instances\"))"},{"line_number":4688,"context_line":"        LOG.debug(_(\"Starting migrate_disk_and_power_off\"),"},{"line_number":4689,"context_line":"                   instance\u003dinstance)"},{"line_number":4690,"context_line":"        disk_info_text \u003d self.get_instance_disk_info(instance[\u0027name\u0027],"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUX%2F%2FQII%3D","line":4687,"in_reply_to":"AAAAUX%2F%2FQUo%3D","updated":"2014-02-14 14:27:18.000000000","message":"yes nova/virt/driver, I understand other hypervisor drivers might support LVM\nso the check in nova/virt/driver can pass\n\nlibvirt inherit that function and do you check , raise exception if it\u0027s needed \n\nother hypervisors may inherit or not  inherit the function ,up to them to decide whether it\u0027s supported or not","commit_id":"4914dd810ef78ecca79fa33dc720ad4ff494caea"},{"author":{"_account_id":7746,"name":"Dan Genin","email":"daniel.genin@jhuapl.edu","username":"DiG"},"change_message_id":"eebb5ec4569a17c9ab07736a869fee3177813a9d","unresolved":false,"context_lines":[{"line_number":4684,"context_line":"                                   block_device_info\u003dNone):"},{"line_number":4685,"context_line":"        if CONF.libvirt.images_type \u003d\u003d \"lvm\":"},{"line_number":4686,"context_line":"            raise NotImplementedError(_(\"Migration is not supported for\""},{"line_number":4687,"context_line":"                \" LVM backed instances\"))"},{"line_number":4688,"context_line":"        LOG.debug(_(\"Starting migrate_disk_and_power_off\"),"},{"line_number":4689,"context_line":"                   instance\u003dinstance)"},{"line_number":4690,"context_line":"        disk_info_text \u003d self.get_instance_disk_info(instance[\u0027name\u0027],"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUX%2F%2FQUo%3D","line":4687,"in_reply_to":"AAAAUX%2F%2FSaw%3D","updated":"2014-02-14 14:06:04.000000000","message":"Sorry, could you please clarify. When you say virt check, do you mean nova/virt/driver? Other virtualization drivers may support LVM migration so this does not seem right.","commit_id":"4914dd810ef78ecca79fa33dc720ad4ff494caea"},{"author":{"_account_id":6802,"name":"Joel Coffman","email":"jmc7tp@gmail.com","username":"joel-coffman"},"change_message_id":"e414e9b74722f0ee1ecb58e7d2a5d6596d3d8af2","unresolved":false,"context_lines":[{"line_number":3980,"context_line":"        fileutils.delete_if_exists(data[\"filename\"])"},{"line_number":3981,"context_line":""},{"line_number":3982,"context_line":"    def check_can_resize(self, instance):"},{"line_number":3983,"context_line":"        return CONF.libvirt.images_type !\u003d \"lvm\""},{"line_number":3984,"context_line":""},{"line_number":3985,"context_line":"    def check_can_live_migrate_destination(self, context, instance,"},{"line_number":3986,"context_line":"                                           src_compute_info, dst_compute_info,"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUX%2F%2B0bo%3D","line":3983,"updated":"2014-02-18 20:18:49.000000000","message":"Seems like this condition is inverted -- check_can_resize should be true for everything except LVM.","commit_id":"730f92251bd3587ecf3d06578c0e8c5732800f08"},{"author":{"_account_id":7746,"name":"Dan Genin","email":"daniel.genin@jhuapl.edu","username":"DiG"},"change_message_id":"c9291970a7b72f056f54a9f1e81d807447dacc5d","unresolved":false,"context_lines":[{"line_number":3980,"context_line":"        fileutils.delete_if_exists(data[\"filename\"])"},{"line_number":3981,"context_line":""},{"line_number":3982,"context_line":"    def check_can_resize(self, instance):"},{"line_number":3983,"context_line":"        return CONF.libvirt.images_type !\u003d \"lvm\""},{"line_number":3984,"context_line":""},{"line_number":3985,"context_line":"    def check_can_live_migrate_destination(self, context, instance,"},{"line_number":3986,"context_line":"                                           src_compute_info, dst_compute_info,"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUX%2F%2Btwc%3D","line":3983,"in_reply_to":"AAAAUX%2F%2B0bo%3D","updated":"2014-02-19 16:19:15.000000000","message":"That\u0027s what it does:)","commit_id":"730f92251bd3587ecf3d06578c0e8c5732800f08"},{"author":{"_account_id":6802,"name":"Joel Coffman","email":"jmc7tp@gmail.com","username":"joel-coffman"},"change_message_id":"e414e9b74722f0ee1ecb58e7d2a5d6596d3d8af2","unresolved":false,"context_lines":[{"line_number":4687,"context_line":"                                   block_device_info\u003dNone):"},{"line_number":4688,"context_line":"        if not self.check_can_resize(instance):"},{"line_number":4689,"context_line":"            raise NotImplementedError(_(\"Migration is not supported for\""},{"line_number":4690,"context_line":"                \" LVM backed instances\"))"},{"line_number":4691,"context_line":"        LOG.debug(_(\"Starting migrate_disk_and_power_off\"),"},{"line_number":4692,"context_line":"                   instance\u003dinstance)"},{"line_number":4693,"context_line":"        disk_info_text \u003d self.get_instance_disk_info(instance[\u0027name\u0027],"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUX%2F%2B0dw%3D","line":4690,"updated":"2014-02-18 20:18:49.000000000","message":"Should not refer to LVM directly but use CONF.libvirt.images_type in case other types are also not supported.","commit_id":"730f92251bd3587ecf3d06578c0e8c5732800f08"},{"author":{"_account_id":7746,"name":"Dan Genin","email":"daniel.genin@jhuapl.edu","username":"DiG"},"change_message_id":"c9291970a7b72f056f54a9f1e81d807447dacc5d","unresolved":false,"context_lines":[{"line_number":4687,"context_line":"                                   block_device_info\u003dNone):"},{"line_number":4688,"context_line":"        if not self.check_can_resize(instance):"},{"line_number":4689,"context_line":"            raise NotImplementedError(_(\"Migration is not supported for\""},{"line_number":4690,"context_line":"                \" LVM backed instances\"))"},{"line_number":4691,"context_line":"        LOG.debug(_(\"Starting migrate_disk_and_power_off\"),"},{"line_number":4692,"context_line":"                   instance\u003dinstance)"},{"line_number":4693,"context_line":"        disk_info_text \u003d self.get_instance_disk_info(instance[\u0027name\u0027],"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUX%2F%2Btsk%3D","line":4690,"in_reply_to":"AAAAUX%2F%2B0dw%3D","updated":"2014-02-19 16:19:15.000000000","message":"Done","commit_id":"730f92251bd3587ecf3d06578c0e8c5732800f08"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"6a83427d5a2e4ff8c77a2bf9aa4d04c8989c41e3","unresolved":false,"context_lines":[{"line_number":3980,"context_line":"        fileutils.delete_if_exists(data[\"filename\"])"},{"line_number":3981,"context_line":""},{"line_number":3982,"context_line":"    def check_can_resize(self, instance):"},{"line_number":3983,"context_line":"        return CONF.libvirt.images_type !\u003d \"lvm\""},{"line_number":3984,"context_line":""},{"line_number":3985,"context_line":"    def check_can_live_migrate_destination(self, context, instance,"},{"line_number":3986,"context_line":"                                           src_compute_info, dst_compute_info,"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAU3%2F%2F2Xw%3D","line":3983,"updated":"2014-02-24 14:19:39.000000000","message":"actually there are other cases that the disk cannot be resized.","commit_id":"d071c20cd1cd0fe07957241bb09627ad98a60354"},{"author":{"_account_id":7746,"name":"Dan Genin","email":"daniel.genin@jhuapl.edu","username":"DiG"},"change_message_id":"a67c8e079c44a42c43d6a0959923e1002b0b25ab","unresolved":false,"context_lines":[{"line_number":3980,"context_line":"        fileutils.delete_if_exists(data[\"filename\"])"},{"line_number":3981,"context_line":""},{"line_number":3982,"context_line":"    def check_can_resize(self, instance):"},{"line_number":3983,"context_line":"        return CONF.libvirt.images_type !\u003d \"lvm\""},{"line_number":3984,"context_line":""},{"line_number":3985,"context_line":"    def check_can_live_migrate_destination(self, context, instance,"},{"line_number":3986,"context_line":"                                           src_compute_info, dst_compute_info,"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAU3%2F%2Fwo8%3D","line":3983,"in_reply_to":"AAAAU3%2F%2F2Xw%3D","updated":"2014-02-25 15:53:30.000000000","message":"Yes, I see from your patch that resizing down also does not work. However, this is exactly why this architecture was introduced. All of the conditions preventing resizing can be collected here and each hypervisor can provide its own check, keeping migrate_disk_and_power_off() logic clean.","commit_id":"d071c20cd1cd0fe07957241bb09627ad98a60354"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"03e0a8aa93338c2925df44b3c268eb097e485970","unresolved":false,"context_lines":[{"line_number":4686,"context_line":"                                   flavor, network_info,"},{"line_number":4687,"context_line":"                                   block_device_info\u003dNone):"},{"line_number":4688,"context_line":"        if not self.check_can_resize(instance):"},{"line_number":4689,"context_line":"            raise NotImplementedError(_(\"%s backend does not support \""},{"line_number":4690,"context_line":"                \"migration.\") % CONF.libvirt.images_type)"},{"line_number":4691,"context_line":"        LOG.debug(_(\"Starting migrate_disk_and_power_off\"),"},{"line_number":4692,"context_line":"                   instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAU3%2F%2Fm0A%3D","line":4689,"updated":"2014-02-25 17:46:49.000000000","message":"Actually other drivers (cf: xenapi) uses the exception ResizeError, don\u0027t you think this one could be better?","commit_id":"d071c20cd1cd0fe07957241bb09627ad98a60354"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"6a83427d5a2e4ff8c77a2bf9aa4d04c8989c41e3","unresolved":false,"context_lines":[{"line_number":4686,"context_line":"                                   flavor, network_info,"},{"line_number":4687,"context_line":"                                   block_device_info\u003dNone):"},{"line_number":4688,"context_line":"        if not self.check_can_resize(instance):"},{"line_number":4689,"context_line":"            raise NotImplementedError(_(\"%s backend does not support \""},{"line_number":4690,"context_line":"                \"migration.\") % CONF.libvirt.images_type)"},{"line_number":4691,"context_line":"        LOG.debug(_(\"Starting migrate_disk_and_power_off\"),"},{"line_number":4692,"context_line":"                   instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAU3%2F%2F2Xk%3D","line":4689,"updated":"2014-02-24 14:19:39.000000000","message":"Not sure is good to rease a not implmented error. the instance will be in error.","commit_id":"d071c20cd1cd0fe07957241bb09627ad98a60354"},{"author":{"_account_id":7746,"name":"Dan Genin","email":"daniel.genin@jhuapl.edu","username":"DiG"},"change_message_id":"a67c8e079c44a42c43d6a0959923e1002b0b25ab","unresolved":false,"context_lines":[{"line_number":4686,"context_line":"                                   flavor, network_info,"},{"line_number":4687,"context_line":"                                   block_device_info\u003dNone):"},{"line_number":4688,"context_line":"        if not self.check_can_resize(instance):"},{"line_number":4689,"context_line":"            raise NotImplementedError(_(\"%s backend does not support \""},{"line_number":4690,"context_line":"                \"migration.\") % CONF.libvirt.images_type)"},{"line_number":4691,"context_line":"        LOG.debug(_(\"Starting migrate_disk_and_power_off\"),"},{"line_number":4692,"context_line":"                   instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAU3%2F%2Fn%2FM%3D","line":4689,"in_reply_to":"AAAAU3%2F%2F2Xk%3D","updated":"2014-02-25 15:53:30.000000000","message":"Just retested to be sure -- the instance continues to run normally.","commit_id":"d071c20cd1cd0fe07957241bb09627ad98a60354"},{"author":{"_account_id":7746,"name":"Dan Genin","email":"daniel.genin@jhuapl.edu","username":"DiG"},"change_message_id":"05a89ca99c920b1b2448681b44f1e931a23b30bf","unresolved":false,"context_lines":[{"line_number":4686,"context_line":"                                   flavor, network_info,"},{"line_number":4687,"context_line":"                                   block_device_info\u003dNone):"},{"line_number":4688,"context_line":"        if not self.check_can_resize(instance):"},{"line_number":4689,"context_line":"            raise NotImplementedError(_(\"%s backend does not support \""},{"line_number":4690,"context_line":"                \"migration.\") % CONF.libvirt.images_type)"},{"line_number":4691,"context_line":"        LOG.debug(_(\"Starting migrate_disk_and_power_off\"),"},{"line_number":4692,"context_line":"                   instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAU3%2F%2FlqA%3D","line":4689,"in_reply_to":"AAAAU3%2F%2Fm0A%3D","updated":"2014-02-25 19:28:01.000000000","message":"Yes, good point. Will change.","commit_id":"d071c20cd1cd0fe07957241bb09627ad98a60354"},{"author":{"_account_id":7746,"name":"Dan Genin","email":"daniel.genin@jhuapl.edu","username":"DiG"},"change_message_id":"c941860324d103ca58b31868373b6469cd3b281e","unresolved":false,"context_lines":[{"line_number":4686,"context_line":"                                   flavor, network_info,"},{"line_number":4687,"context_line":"                                   block_device_info\u003dNone):"},{"line_number":4688,"context_line":"        if not self.check_can_resize(instance):"},{"line_number":4689,"context_line":"            raise NotImplementedError(_(\"%s backend does not support \""},{"line_number":4690,"context_line":"                \"migration.\") % CONF.libvirt.images_type)"},{"line_number":4691,"context_line":"        LOG.debug(_(\"Starting migrate_disk_and_power_off\"),"},{"line_number":4692,"context_line":"                   instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAU3%2F%2FlHk%3D","line":4689,"in_reply_to":"AAAAU3%2F%2Fm0A%3D","updated":"2014-02-25 20:29:36.000000000","message":"exception.ResizeError causes instance to go to Error status, which, I think, is not what we want.","commit_id":"d071c20cd1cd0fe07957241bb09627ad98a60354"},{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"61745e32a5e8e863d84bf8b736d3ebd8b72d522e","unresolved":false,"context_lines":[{"line_number":4687,"context_line":"                                   block_device_info\u003dNone):"},{"line_number":4688,"context_line":"        if not self.check_can_resize(instance):"},{"line_number":4689,"context_line":"            raise NotImplementedError(_(\"%s backend does not support \""},{"line_number":4690,"context_line":"                \"migration.\") % CONF.libvirt.images_type)"},{"line_number":4691,"context_line":"        LOG.debug(_(\"Starting migrate_disk_and_power_off\"),"},{"line_number":4692,"context_line":"                   instance\u003dinstance)"},{"line_number":4693,"context_line":"        disk_info_text \u003d self.get_instance_disk_info(instance[\u0027name\u0027],"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAVX%2F%2F6ng%3D","line":4690,"updated":"2014-02-27 12:04:00.000000000","message":"This is bad design - you\u0027re oisolating logic about what can \u0026 can\u0027t by resized in a helper method, but then this exception method you\u0027re raising is making assumptions that check_can_resize is only considering CONF.libvirt.images_type. Since the helper method is merely 1 single line, just inline it here.","commit_id":"d071c20cd1cd0fe07957241bb09627ad98a60354"},{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"7ec42a349516fb88becd7daeb6d0bf723e02c0ea","unresolved":false,"context_lines":[{"line_number":4687,"context_line":"                                   block_device_info\u003dNone):"},{"line_number":4688,"context_line":"        if not self.check_can_resize(instance):"},{"line_number":4689,"context_line":"            raise NotImplementedError(_(\"%s backend does not support \""},{"line_number":4690,"context_line":"                \"migration.\") % CONF.libvirt.images_type)"},{"line_number":4691,"context_line":"        LOG.debug(_(\"Starting migrate_disk_and_power_off\"),"},{"line_number":4692,"context_line":"                   instance\u003dinstance)"},{"line_number":4693,"context_line":"        disk_info_text \u003d self.get_instance_disk_info(instance[\u0027name\u0027],"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAU3%2F%2F54g%3D","line":4690,"updated":"2014-02-24 06:26:27.000000000","message":"code looks good to me , my opinion is to keep this kind of check in compute layer... maybe another expert can give more accurate and different opinion... look forward to see","commit_id":"d071c20cd1cd0fe07957241bb09627ad98a60354"},{"author":{"_account_id":7746,"name":"Dan Genin","email":"daniel.genin@jhuapl.edu","username":"DiG"},"change_message_id":"a67c8e079c44a42c43d6a0959923e1002b0b25ab","unresolved":false,"context_lines":[{"line_number":4687,"context_line":"                                   block_device_info\u003dNone):"},{"line_number":4688,"context_line":"        if not self.check_can_resize(instance):"},{"line_number":4689,"context_line":"            raise NotImplementedError(_(\"%s backend does not support \""},{"line_number":4690,"context_line":"                \"migration.\") % CONF.libvirt.images_type)"},{"line_number":4691,"context_line":"        LOG.debug(_(\"Starting migrate_disk_and_power_off\"),"},{"line_number":4692,"context_line":"                   instance\u003dinstance)"},{"line_number":4693,"context_line":"        disk_info_text \u003d self.get_instance_disk_info(instance[\u0027name\u0027],"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAU3%2F%2Fn8Y%3D","line":4690,"in_reply_to":"AAAAU3%2F%2F54g%3D","updated":"2014-02-25 15:53:30.000000000","message":"I think, sahid may be right about this not being possible while other drivers support the operation but, yeah, it would be nice if someone with more experience weighed in on this.","commit_id":"d071c20cd1cd0fe07957241bb09627ad98a60354"},{"author":{"_account_id":7746,"name":"Dan Genin","email":"daniel.genin@jhuapl.edu","username":"DiG"},"change_message_id":"d120c3550f68f3124736e91e97d875a6930bd977","unresolved":false,"context_lines":[{"line_number":4687,"context_line":"                                   block_device_info\u003dNone):"},{"line_number":4688,"context_line":"        if not self.check_can_resize(instance):"},{"line_number":4689,"context_line":"            raise NotImplementedError(_(\"%s backend does not support \""},{"line_number":4690,"context_line":"                \"migration.\") % CONF.libvirt.images_type)"},{"line_number":4691,"context_line":"        LOG.debug(_(\"Starting migrate_disk_and_power_off\"),"},{"line_number":4692,"context_line":"                   instance\u003dinstance)"},{"line_number":4693,"context_line":"        disk_info_text \u003d self.get_instance_disk_info(instance[\u0027name\u0027],"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAVX%2F%2F6Ws%3D","line":4690,"in_reply_to":"AAAAVX%2F%2F6ng%3D","updated":"2014-02-27 12:34:45.000000000","message":"Actually, there are other conditions that may prevent the instance from being resized, e.g., downsizing the disk. But, you have a point about the error message. Perhaps can_resize should return reason for failure?","commit_id":"d071c20cd1cd0fe07957241bb09627ad98a60354"},{"author":{"_account_id":7746,"name":"Dan Genin","email":"daniel.genin@jhuapl.edu","username":"DiG"},"change_message_id":"d89e10660cbc79600365d7f1fdfe0e977f2bc113","unresolved":false,"context_lines":[{"line_number":4687,"context_line":"                                   block_device_info\u003dNone):"},{"line_number":4688,"context_line":"        if not self.check_can_resize(instance):"},{"line_number":4689,"context_line":"            raise NotImplementedError(_(\"%s backend does not support \""},{"line_number":4690,"context_line":"                \"migration.\") % CONF.libvirt.images_type)"},{"line_number":4691,"context_line":"        LOG.debug(_(\"Starting migrate_disk_and_power_off\"),"},{"line_number":4692,"context_line":"                   instance\u003dinstance)"},{"line_number":4693,"context_line":"        disk_info_text \u003d self.get_instance_disk_info(instance[\u0027name\u0027],"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAVX%2F%2FvZw%3D","line":4690,"in_reply_to":"AAAAVX%2F%2F6ng%3D","updated":"2014-02-28 16:38:50.000000000","message":"Sorry, I didn\u0027t get your point the first time. I am reverting the implementation to a single in-line check.","commit_id":"d071c20cd1cd0fe07957241bb09627ad98a60354"},{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"cf509dbb46c5092b3f84d0d0e6676981b0b380b1","unresolved":false,"context_lines":[{"line_number":4712,"context_line":"                                   block_device_info\u003dNone):"},{"line_number":4713,"context_line":"        if CONF.libvirt.images_type \u003d\u003d \"lvm\":"},{"line_number":4714,"context_line":"            raise NotImplementedError(_(\"Migration is not supported\""},{"line_number":4715,"context_line":"                                        \" for LVM instances.\"))"},{"line_number":4716,"context_line":"        LOG.debug(_(\"Starting migrate_disk_and_power_off\"),"},{"line_number":4717,"context_line":"                   instance\u003dinstance)"},{"line_number":4718,"context_line":"        disk_info_text \u003d self.get_instance_disk_info(instance[\u0027name\u0027],"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAVn%2F%2Fsgk%3D","line":4715,"updated":"2014-03-04 16:22:24.000000000","message":"I believe it is possible to boot a guest with does not use any glance image - ie exclusively uses cinder for disks. In such a case this check would be incorrect.","commit_id":"b577c8e124264c084a90837567e0e940409fac32"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"06c05687f01968c71060cec75eaeef4509b64a9d","unresolved":false,"context_lines":[{"line_number":4712,"context_line":"                                   block_device_info\u003dNone):"},{"line_number":4713,"context_line":"        if CONF.libvirt.images_type \u003d\u003d \"lvm\":"},{"line_number":4714,"context_line":"            raise NotImplementedError(_(\"Migration is not supported\""},{"line_number":4715,"context_line":"                                        \" for LVM instances.\"))"},{"line_number":4716,"context_line":"        LOG.debug(_(\"Starting migrate_disk_and_power_off\"),"},{"line_number":4717,"context_line":"                   instance\u003dinstance)"},{"line_number":4718,"context_line":"        disk_info_text \u003d self.get_instance_disk_info(instance[\u0027name\u0027],"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAWH%2F%2B2rA%3D","line":4715,"in_reply_to":"AAAAVn%2F%2Fsgk%3D","updated":"2014-03-22 23:18:47.000000000","message":"So booting from volume?  Is there a way to check if booting from image or booting from volume?","commit_id":"b577c8e124264c084a90837567e0e940409fac32"},{"author":{"_account_id":7746,"name":"Dan Genin","email":"daniel.genin@jhuapl.edu","username":"DiG"},"change_message_id":"6a8c323deaf13ba11e872d5f59becc6b2addd952","unresolved":false,"context_lines":[{"line_number":4712,"context_line":"                                   block_device_info\u003dNone):"},{"line_number":4713,"context_line":"        if CONF.libvirt.images_type \u003d\u003d \"lvm\":"},{"line_number":4714,"context_line":"            raise NotImplementedError(_(\"Migration is not supported\""},{"line_number":4715,"context_line":"                                        \" for LVM instances.\"))"},{"line_number":4716,"context_line":"        LOG.debug(_(\"Starting migrate_disk_and_power_off\"),"},{"line_number":4717,"context_line":"                   instance\u003dinstance)"},{"line_number":4718,"context_line":"        disk_info_text \u003d self.get_instance_disk_info(instance[\u0027name\u0027],"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAWH%2F%2Btrk%3D","line":4715,"in_reply_to":"AAAAWH%2F%2B2rA%3D","updated":"2014-03-24 21:54:50.000000000","message":"Good question. Working now on figuring it out.","commit_id":"b577c8e124264c084a90837567e0e940409fac32"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"06c05687f01968c71060cec75eaeef4509b64a9d","unresolved":false,"context_lines":[{"line_number":4768,"context_line":"                        libvirt_utils.copy_image(tmp_path, img_path, host\u003ddest)"},{"line_number":4769,"context_line":"                        utils.execute(\u0027rm\u0027, \u0027-f\u0027, tmp_path)"},{"line_number":4770,"context_line":""},{"line_number":4771,"context_line":"                else:  # raw or qcow2 with no backing file"},{"line_number":4772,"context_line":"                    libvirt_utils.copy_image(from_path, img_path, host\u003ddest)"},{"line_number":4773,"context_line":"        except Exception:"},{"line_number":4774,"context_line":"            with excutils.save_and_reraise_exception():"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAWH%2F%2B2q4%3D","line":4771,"updated":"2014-03-22 23:18:47.000000000","message":"Is this where you want the lvm check?","commit_id":"b577c8e124264c084a90837567e0e940409fac32"},{"author":{"_account_id":7746,"name":"Dan Genin","email":"daniel.genin@jhuapl.edu","username":"DiG"},"change_message_id":"6a8c323deaf13ba11e872d5f59becc6b2addd952","unresolved":false,"context_lines":[{"line_number":4768,"context_line":"                        libvirt_utils.copy_image(tmp_path, img_path, host\u003ddest)"},{"line_number":4769,"context_line":"                        utils.execute(\u0027rm\u0027, \u0027-f\u0027, tmp_path)"},{"line_number":4770,"context_line":""},{"line_number":4771,"context_line":"                else:  # raw or qcow2 with no backing file"},{"line_number":4772,"context_line":"                    libvirt_utils.copy_image(from_path, img_path, host\u003ddest)"},{"line_number":4773,"context_line":"        except Exception:"},{"line_number":4774,"context_line":"            with excutils.save_and_reraise_exception():"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAWH%2F%2BtpE%3D","line":4771,"in_reply_to":"AAAAWH%2F%2B2q4%3D","updated":"2014-03-24 21:54:50.000000000","message":"I think it\u0027s safer to have it at the very start. At this point there are already directories, ssh connections, etc. to clean up. Best not to get involved at all if we know we can\u0027t finish this operation.","commit_id":"b577c8e124264c084a90837567e0e940409fac32"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"0d17bc02622601ab07c54f73b0a706df5e2d23c0","unresolved":false,"context_lines":[{"line_number":4768,"context_line":"                        libvirt_utils.copy_image(tmp_path, img_path, host\u003ddest)"},{"line_number":4769,"context_line":"                        utils.execute(\u0027rm\u0027, \u0027-f\u0027, tmp_path)"},{"line_number":4770,"context_line":""},{"line_number":4771,"context_line":"                else:  # raw or qcow2 with no backing file"},{"line_number":4772,"context_line":"                    libvirt_utils.copy_image(from_path, img_path, host\u003ddest)"},{"line_number":4773,"context_line":"        except Exception:"},{"line_number":4774,"context_line":"            with excutils.save_and_reraise_exception():"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAWH%2F%2BsOo%3D","line":4771,"in_reply_to":"AAAAWH%2F%2BtpE%3D","updated":"2014-03-25 02:06:27.000000000","message":"Yeah, totally agree there, just not sure how you figure it out at the start is all.","commit_id":"b577c8e124264c084a90837567e0e940409fac32"},{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"2907f742bec42c335c69594da588d580814ec8b7","unresolved":false,"context_lines":[{"line_number":4802,"context_line":"            if disk_type \u003d\u003d \u0027file\u0027:"},{"line_number":4803,"context_line":"                dk_size \u003d int(os.path.getsize(path))"},{"line_number":4804,"context_line":"            else:"},{"line_number":4805,"context_line":"                dk_size \u003d libvirt_utils.logical_volume_size(path)"},{"line_number":4806,"context_line":""},{"line_number":4807,"context_line":"            disk_type \u003d driver_nodes[cnt].get(\u0027type\u0027)"},{"line_number":4808,"context_line":"            if disk_type \u003d\u003d \"qcow2\":"}],"source_content_type":"text/x-python","patch_set":6,"id":"1ae5cdf2_1b958586","line":4805,"updated":"2014-06-04 16:16:39.000000000","message":"This is not right. There are more than two possible disk_types allowed by libvirt - you have file, block, network and volume. Also even if type\u003dblock, this does not imply that it is an LVM logical  volume path - it could be a iSCSI device path.","commit_id":"01a67ba7272f1440fe612ab619f10c4523d85775"},{"author":{"_account_id":7746,"name":"Dan Genin","email":"daniel.genin@jhuapl.edu","username":"DiG"},"change_message_id":"c3226fcfa2a27cc555eb49f4562561645f3cb5d6","unresolved":false,"context_lines":[{"line_number":4802,"context_line":"            if disk_type \u003d\u003d \u0027file\u0027:"},{"line_number":4803,"context_line":"                dk_size \u003d int(os.path.getsize(path))"},{"line_number":4804,"context_line":"            else:"},{"line_number":4805,"context_line":"                dk_size \u003d libvirt_utils.logical_volume_size(path)"},{"line_number":4806,"context_line":""},{"line_number":4807,"context_line":"            disk_type \u003d driver_nodes[cnt].get(\u0027type\u0027)"},{"line_number":4808,"context_line":"            if disk_type \u003d\u003d \"qcow2\":"}],"source_content_type":"text/x-python","patch_set":6,"id":"1ae5cdf2_9910b85a","line":4805,"in_reply_to":"1ae5cdf2_1b958586","updated":"2014-06-04 20:37:01.000000000","message":"In devstack, at least, blockdev --getsize64 \u003ciscsi path\u003e returns the correct volume size.","commit_id":"01a67ba7272f1440fe612ab619f10c4523d85775"},{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"2907f742bec42c335c69594da588d580814ec8b7","unresolved":false,"context_lines":[{"line_number":4940,"context_line":"            for disk in disk_info:"},{"line_number":4941,"context_line":"                if disk[\u0027path\u0027].startswith(\u0027/dev/\u0027):"},{"line_number":4942,"context_line":"                    raise NotImplementedError(_(\"Migration is not supported\""},{"line_number":4943,"context_line":"                                                \" for LVM instances.\"))"},{"line_number":4944,"context_line":""},{"line_number":4945,"context_line":"        # copy disks to destination"},{"line_number":4946,"context_line":"        # rename instance dir to +_resize at first for using"}],"source_content_type":"text/x-python","patch_set":6,"id":"1ae5cdf2_3bbc0106","line":4943,"updated":"2014-06-04 16:16:39.000000000","message":"This seems like it would break migration when the image backend is lvm, but the instance has been booted from cinder with no local LVM images used, because \"/dev\" prefix is going to match the cinder iSCSI volume paths.","commit_id":"01a67ba7272f1440fe612ab619f10c4523d85775"},{"author":{"_account_id":7746,"name":"Dan Genin","email":"daniel.genin@jhuapl.edu","username":"DiG"},"change_message_id":"c3226fcfa2a27cc555eb49f4562561645f3cb5d6","unresolved":false,"context_lines":[{"line_number":4940,"context_line":"            for disk in disk_info:"},{"line_number":4941,"context_line":"                if disk[\u0027path\u0027].startswith(\u0027/dev/\u0027):"},{"line_number":4942,"context_line":"                    raise NotImplementedError(_(\"Migration is not supported\""},{"line_number":4943,"context_line":"                                                \" for LVM instances.\"))"},{"line_number":4944,"context_line":""},{"line_number":4945,"context_line":"        # copy disks to destination"},{"line_number":4946,"context_line":"        # rename instance dir to +_resize at first for using"}],"source_content_type":"text/x-python","patch_set":6,"id":"1ae5cdf2_14e54f37","line":4943,"in_reply_to":"1ae5cdf2_3bbc0106","updated":"2014-06-04 20:37:01.000000000","message":"I believe, get_instance_disk_info() should be filtering volumes out using block_device_mapping (lines 4795-4798).\n\nBut this is all kind of moot because I just found an existing _is_booted_from_volume() method in LibvirtDriver, which is what should be used here.","commit_id":"01a67ba7272f1440fe612ab619f10c4523d85775"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"eff65d090852d2e935bbff7c8710b7de53648d93","unresolved":false,"context_lines":[{"line_number":4904,"context_line":""},{"line_number":4905,"context_line":"        if (CONF.libvirt.images_type \u003d\u003d \u0027lvm\u0027 and"},{"line_number":4906,"context_line":"            not self._is_booted_from_volume(instance, disk_info_text)):"},{"line_number":4907,"context_line":"            raise NotImplementedError(\"Migration is not supported\""},{"line_number":4908,"context_line":"                                      \" for LVM instances.\")"},{"line_number":4909,"context_line":""},{"line_number":4910,"context_line":"        # copy disks to destination"}],"source_content_type":"text/x-python","patch_set":8,"id":"1ae5cdf2_25ef3f88","line":4907,"updated":"2014-06-22 13:43:15.000000000","message":"missing translation\nshould be _(\"Migration is not supported ...\")","commit_id":"94b56cd991fc0133c7a955d364db313d326cc7a8"},{"author":{"_account_id":7746,"name":"Dan Genin","email":"daniel.genin@jhuapl.edu","username":"DiG"},"change_message_id":"168cd3c20541364a6225a17bdf29c46be7ad7c93","unresolved":false,"context_lines":[{"line_number":4904,"context_line":""},{"line_number":4905,"context_line":"        if (CONF.libvirt.images_type \u003d\u003d \u0027lvm\u0027 and"},{"line_number":4906,"context_line":"            not self._is_booted_from_volume(instance, disk_info_text)):"},{"line_number":4907,"context_line":"            raise NotImplementedError(\"Migration is not supported\""},{"line_number":4908,"context_line":"                                      \" for LVM instances.\")"},{"line_number":4909,"context_line":""},{"line_number":4910,"context_line":"        # copy disks to destination"}],"source_content_type":"text/x-python","patch_set":8,"id":"1ae5cdf2_005bed55","line":4907,"in_reply_to":"1ae5cdf2_25ef3f88","updated":"2014-06-23 19:55:01.000000000","message":"Done","commit_id":"94b56cd991fc0133c7a955d364db313d326cc7a8"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"1e1468d94be36f751702fd4b728aa629c9ea311f","unresolved":false,"context_lines":[{"line_number":4884,"context_line":"            except Exception:"},{"line_number":4885,"context_line":"                pass"},{"line_number":4886,"context_line":"        return shared_storage"},{"line_number":4887,"context_line":""},{"line_number":4888,"context_line":"    def migrate_disk_and_power_off(self, context, instance, dest,"},{"line_number":4889,"context_line":"                                   flavor, network_info,"},{"line_number":4890,"context_line":"                                   block_device_info\u003dNone):"}],"source_content_type":"text/x-python","patch_set":10,"id":"baada198_4fe4ce0c","line":4887,"updated":"2014-07-18 11:31:52.000000000","message":"So if this throws - it will eventually bubble up in the prep_resize method of the old compute host, which will in turn trigger a reschedule - which makes no sense, and is not what we want.\n\nWe might want to add a check step (similar but more lightweight than what we do for live mig), but assuming that we want to implement this kind of stuff for lvm backed instances - maybe a workaround like this is better (it is my understanding that lvm backend is currently purely a workaround for an ext4 performance bug so not sure how fully featured we want it to be).\n\nStill - we don\u0027t want to reschedule (it will just do the same thing 3 times) so we might want to make sure that will not happen in the compute.manager with a specific exception that will block that from happening.","commit_id":"9b2b16ea867841154264db276814d09a3a3b8a99"},{"author":{"_account_id":7746,"name":"Dan Genin","email":"daniel.genin@jhuapl.edu","username":"DiG"},"change_message_id":"38e3482f2b7af83df8171c5d748773808f436afc","unresolved":false,"context_lines":[{"line_number":4884,"context_line":"            except Exception:"},{"line_number":4885,"context_line":"                pass"},{"line_number":4886,"context_line":"        return shared_storage"},{"line_number":4887,"context_line":""},{"line_number":4888,"context_line":"    def migrate_disk_and_power_off(self, context, instance, dest,"},{"line_number":4889,"context_line":"                                   flavor, network_info,"},{"line_number":4890,"context_line":"                                   block_device_info\u003dNone):"}],"source_content_type":"text/x-python","patch_set":10,"id":"baada198_5fcc5834","line":4887,"in_reply_to":"baada198_4fe4ce0c","updated":"2014-07-25 14:08:06.000000000","message":"Do you think adding driver.can_migrate_instance() would work?","commit_id":"9b2b16ea867841154264db276814d09a3a3b8a99"},{"author":{"_account_id":7746,"name":"Dan Genin","email":"daniel.genin@jhuapl.edu","username":"DiG"},"change_message_id":"22e0153b5cdd93230586bbc458a21805fd85f5f8","unresolved":false,"context_lines":[{"line_number":4884,"context_line":"            except Exception:"},{"line_number":4885,"context_line":"                pass"},{"line_number":4886,"context_line":"        return shared_storage"},{"line_number":4887,"context_line":""},{"line_number":4888,"context_line":"    def migrate_disk_and_power_off(self, context, instance, dest,"},{"line_number":4889,"context_line":"                                   flavor, network_info,"},{"line_number":4890,"context_line":"                                   block_device_info\u003dNone):"}],"source_content_type":"text/x-python","patch_set":10,"id":"baada198_fd3c7195","line":4887,"in_reply_to":"baada198_4fe4ce0c","updated":"2014-07-18 15:31:54.000000000","message":"I certainly do not have a solid grasp on the path this exception takes but in my experiments with devstack the behavior I observe is that the original instance remains in an active state and is not rescheduled following the exception. The migration target host never performs any actions with regard to migration at all. You can see the output of n-cpu here http://paste.openstack.org/","commit_id":"9b2b16ea867841154264db276814d09a3a3b8a99"},{"author":{"_account_id":7746,"name":"Dan Genin","email":"daniel.genin@jhuapl.edu","username":"DiG"},"change_message_id":"b679f70726ca695ecd8ef893377dc4cf33f51d31","unresolved":false,"context_lines":[{"line_number":4884,"context_line":"            except Exception:"},{"line_number":4885,"context_line":"                pass"},{"line_number":4886,"context_line":"        return shared_storage"},{"line_number":4887,"context_line":""},{"line_number":4888,"context_line":"    def migrate_disk_and_power_off(self, context, instance, dest,"},{"line_number":4889,"context_line":"                                   flavor, network_info,"},{"line_number":4890,"context_line":"                                   block_device_info\u003dNone):"}],"source_content_type":"text/x-python","patch_set":10,"id":"baada198_ff59ac29","line":4887,"in_reply_to":"baada198_4fe4ce0c","updated":"2014-07-25 13:55:25.000000000","message":"So I am trying to figure out how the check can be moved to compute.manager and am running into the abstraction barrier. Namely, it seems well nigh impossible to check whether an instance is being booted from volume in compute.manager, and even checking CONF.libvirt.images_type\u003d\u003d\u0027lvm\u0027 seems inappropriate since compute.manager should be virt driver agnostic. Do you have any suggestions on tackling these issues?","commit_id":"9b2b16ea867841154264db276814d09a3a3b8a99"},{"author":{"_account_id":4912,"name":"Michael H Wilson","email":"geekinutah@gmail.com","username":"geekinutah"},"change_message_id":"5537a0d157dffd60d1c14a112b86ac8f0a989316","unresolved":false,"context_lines":[{"line_number":4884,"context_line":"            except Exception:"},{"line_number":4885,"context_line":"                pass"},{"line_number":4886,"context_line":"        return shared_storage"},{"line_number":4887,"context_line":""},{"line_number":4888,"context_line":"    def migrate_disk_and_power_off(self, context, instance, dest,"},{"line_number":4889,"context_line":"                                   flavor, network_info,"},{"line_number":4890,"context_line":"                                   block_device_info\u003dNone):"}],"source_content_type":"text/x-python","patch_set":10,"id":"baada198_939ea004","line":4887,"in_reply_to":"baada198_5fcc5834","updated":"2014-07-28 21:27:34.000000000","message":"That makes sense, but is not going to keep the scheduler from trying 3 times. This needs to be bubbled up to the scheduler somehow, no?","commit_id":"9b2b16ea867841154264db276814d09a3a3b8a99"},{"author":{"_account_id":7746,"name":"Dan Genin","email":"daniel.genin@jhuapl.edu","username":"DiG"},"change_message_id":"4c060f9de2979a5e0e9edff3d39c17201ecc496a","unresolved":false,"context_lines":[{"line_number":4884,"context_line":"            except Exception:"},{"line_number":4885,"context_line":"                pass"},{"line_number":4886,"context_line":"        return shared_storage"},{"line_number":4887,"context_line":""},{"line_number":4888,"context_line":"    def migrate_disk_and_power_off(self, context, instance, dest,"},{"line_number":4889,"context_line":"                                   flavor, network_info,"},{"line_number":4890,"context_line":"                                   block_device_info\u003dNone):"}],"source_content_type":"text/x-python","patch_set":10,"id":"baada198_c8c4e642","line":4887,"in_reply_to":"baada198_939ea004","updated":"2014-07-29 23:17:28.000000000","message":"Hashed out a solution with Nikola that simply throws a specific exception that is caught in compute.manager.prep_resize(). Not optimal but it\u0027s a temporary fix until migration for LVM is implemented.","commit_id":"9b2b16ea867841154264db276814d09a3a3b8a99"},{"author":{"_account_id":7746,"name":"Dan Genin","email":"daniel.genin@jhuapl.edu","username":"DiG"},"change_message_id":"1183c0a02f2407dcdff75fe9f74b3007e79bd17a","unresolved":false,"context_lines":[{"line_number":4884,"context_line":"            except Exception:"},{"line_number":4885,"context_line":"                pass"},{"line_number":4886,"context_line":"        return shared_storage"},{"line_number":4887,"context_line":""},{"line_number":4888,"context_line":"    def migrate_disk_and_power_off(self, context, instance, dest,"},{"line_number":4889,"context_line":"                                   flavor, network_info,"},{"line_number":4890,"context_line":"                                   block_device_info\u003dNone):"}],"source_content_type":"text/x-python","patch_set":10,"id":"baada198_e0304809","line":4887,"in_reply_to":"baada198_fd3c7195","updated":"2014-07-24 21:33:53.000000000","message":"OK, I see your point. Working on a new patch.","commit_id":"9b2b16ea867841154264db276814d09a3a3b8a99"}]}
