)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"e6e9c89f2f1545732f6eb106412ccbe29e4d2fac","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Mike Durnosvistov \u003cmdurnosvistov@mirantis.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2015-02-11 15:36:55 +0200"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Resize down an instance booted from a volume"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Resolution resize instance, when instance is booted from a volume."},{"line_number":10,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"da86d52c_7be4ebdf","line":7,"updated":"2015-02-11 14:55:47.000000000","message":"please prefix with libvirt:","commit_id":"7302e1861ca620a0ee206d28daa594973b74d723"},{"author":{"_account_id":8412,"name":"Mike Durnosvistov","email":"glacierr.dev@gmail.com","username":"mdurnosvistov"},"change_message_id":"970002700acd99da4685b984c51db0eaab0d4aa1","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Mike Durnosvistov \u003cmdurnosvistov@mirantis.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2015-02-11 15:36:55 +0200"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Resize down an instance booted from a volume"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Resolution resize instance, when instance is booted from a volume."},{"line_number":10,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"da86d52c_de922556","line":7,"in_reply_to":"da86d52c_7be4ebdf","updated":"2015-02-11 15:34:09.000000000","message":"Will do!","commit_id":"7302e1861ca620a0ee206d28daa594973b74d723"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"2df5b74b8a759c6b1f07ecb247f856f5791aada6","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"libvirt: Resize down an instance booted from a volume"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Resolution resize instance, when instance is booted from a volume."},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"Closes-Bug: #1416361"},{"line_number":12,"context_line":"Change-Id: I0f890de69d268218d44a6ab4117a5c69cf6fbf8f"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"da86d52c_0fff25ac","line":9,"updated":"2015-02-18 14:35:01.000000000","message":"could you please provide a bit more details here?","commit_id":"6dc51c6764156b28f11f539f7be32b258f4d4ce1"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"ffd1190ca767c2c551a149a17ec50ea8b566f98b","unresolved":false,"context_lines":[{"line_number":7,"context_line":"libvirt: Resize down an instance booted from a volume"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"When we boot instance from volume, it doesn\u0027t use root disk and"},{"line_number":10,"context_line":"we should provide posibility to resize down this instance."},{"line_number":11,"context_line":"This patch allows to change the size down of the instance"},{"line_number":12,"context_line":"booted from volume."},{"line_number":13,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"9a80dd14_75f1b869","line":10,"updated":"2015-03-11 17:28:54.000000000","message":"s/posibility/the possibility/","commit_id":"ef678df2d1bb892a8c5637b70873c57b9ee0533a"},{"author":{"_account_id":8412,"name":"Mike Durnosvistov","email":"glacierr.dev@gmail.com","username":"mdurnosvistov"},"change_message_id":"3a1a13bd39e7f16879283a4aa49a5ddef2f8cdf9","unresolved":false,"context_lines":[{"line_number":7,"context_line":"libvirt: Resize down an instance booted from a volume"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"When we boot instance from volume, it doesn\u0027t use root disk and"},{"line_number":10,"context_line":"we should provide posibility to resize down this instance."},{"line_number":11,"context_line":"This patch allows to change the size down of the instance"},{"line_number":12,"context_line":"booted from volume."},{"line_number":13,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"9a80dd14_dc222db8","line":10,"in_reply_to":"9a80dd14_75f1b869","updated":"2015-03-13 11:24:45.000000000","message":"Done","commit_id":"ef678df2d1bb892a8c5637b70873c57b9ee0533a"}],"nova/tests/unit/virt/libvirt/test_driver.py":[{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"2df5b74b8a759c6b1f07ecb247f856f5791aada6","unresolved":false,"context_lines":[{"line_number":12060,"context_line":"        self._test_migrate_disk_and_power_off(flavor_obj)"},{"line_number":12061,"context_line":""},{"line_number":12062,"context_line":"    @mock.patch(\u0027nova.virt.libvirt.driver.LibvirtDriver._disconnect_volume\u0027)"},{"line_number":12063,"context_line":"    def test_migrate_disk_and_power_off_boot_from_volume(self,"},{"line_number":12064,"context_line":"                                                         disconnect_volume):"},{"line_number":12065,"context_line":"        info \u003d ({\u0027block_device_mapping\u0027:"},{"line_number":12066,"context_line":"                [{\u0027guest_format\u0027: None,"}],"source_content_type":"text/x-python","patch_set":4,"id":"da86d52c_0f72c549","line":12063,"updated":"2015-02-18 14:35:01.000000000","message":"we also need a negative test here for the case, when an instance is booted from a volume, but nevertheless has an ephemeral partition (i.e. flavor with ephemeral_gb \u003e0) which we attempt to resize down","commit_id":"6dc51c6764156b28f11f539f7be32b258f4d4ce1"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"a87db22ec4766bd780196638f10942141aba2d9b","unresolved":false,"context_lines":[{"line_number":12202,"context_line":"            info[\u0027block_device_mapping\u0027][1][\u0027connection_info\u0027], \u0027vda\u0027)"},{"line_number":12203,"context_line":""},{"line_number":12204,"context_line":"    @mock.patch(\u0027nova.virt.libvirt.driver.LibvirtDriver._disconnect_volume\u0027)"},{"line_number":12205,"context_line":"    def test_migrate_disk_and_power_off_boot_from_volume_ephemeral_down("},{"line_number":12206,"context_line":"            self, disconnect_volume):"},{"line_number":12207,"context_line":"        ephemerals \u003d [{\u0027num\u0027: 0,"},{"line_number":12208,"context_line":"                       \u0027virtual_name\u0027: \u0027ephemeral0\u0027,"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba7be1f8_63cd0466","line":12205,"updated":"2015-02-25 15:51:16.000000000","message":"nit: looks like this may be a better fit for the patch this one depends on","commit_id":"087a890c3f13e94da21dc04c647cb4c7d5520c41"},{"author":{"_account_id":8412,"name":"Mike Durnosvistov","email":"glacierr.dev@gmail.com","username":"mdurnosvistov"},"change_message_id":"8163a3f5f0ac0029d1b6d129cfff044f6d2d0d0d","unresolved":false,"context_lines":[{"line_number":12202,"context_line":"            info[\u0027block_device_mapping\u0027][1][\u0027connection_info\u0027], \u0027vda\u0027)"},{"line_number":12203,"context_line":""},{"line_number":12204,"context_line":"    @mock.patch(\u0027nova.virt.libvirt.driver.LibvirtDriver._disconnect_volume\u0027)"},{"line_number":12205,"context_line":"    def test_migrate_disk_and_power_off_boot_from_volume_ephemeral_down("},{"line_number":12206,"context_line":"            self, disconnect_volume):"},{"line_number":12207,"context_line":"        ephemerals \u003d [{\u0027num\u0027: 0,"},{"line_number":12208,"context_line":"                       \u0027virtual_name\u0027: \u0027ephemeral0\u0027,"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba7be1f8_e05c7f1b","line":12205,"in_reply_to":"ba7be1f8_63cd0466","updated":"2015-02-25 18:55:57.000000000","message":"Agree with you!","commit_id":"087a890c3f13e94da21dc04c647cb4c7d5520c41"},{"author":{"_account_id":8213,"name":"Claudiu Belu","email":"cbelu@cloudbasesolutions.com","username":"claudiub"},"change_message_id":"551bc62ff0eedfe9bab6dd5ee95a196a62825c26","unresolved":false,"context_lines":[{"line_number":11754,"context_line":"                                **inst)"},{"line_number":11755,"context_line":""},{"line_number":11756,"context_line":"    def _get_block_device_info(self, ephemerals\u003dNone):"},{"line_number":11757,"context_line":"        info \u003d {\u0027block_device_mapping\u0027: ["},{"line_number":11758,"context_line":"            {\u0027guest_format\u0027: None,"},{"line_number":11759,"context_line":"             \u0027boot_index\u0027: None,"},{"line_number":11760,"context_line":"             \u0027mount_device\u0027: \u0027/dev/vdd\u0027,"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a80dd14_e2b999ea","line":11757,"updated":"2015-03-04 16:22:42.000000000","message":"question: why not use the nova.tests.unit.fake_block_device module? That way, if the block device mapping will modify in the future, this won\u0027t have to be updated. Plus, it will simplify the test a little bit and reduce the duplication even further. :)\n\nfor example: I\u0027m using it also: https://review.openstack.org/#/c/139797/16/nova/tests/unit/virt/hyperv/test_volumeops.py","commit_id":"ef678df2d1bb892a8c5637b70873c57b9ee0533a"},{"author":{"_account_id":8412,"name":"Mike Durnosvistov","email":"glacierr.dev@gmail.com","username":"mdurnosvistov"},"change_message_id":"3a1a13bd39e7f16879283a4aa49a5ddef2f8cdf9","unresolved":false,"context_lines":[{"line_number":11754,"context_line":"                                **inst)"},{"line_number":11755,"context_line":""},{"line_number":11756,"context_line":"    def _get_block_device_info(self, ephemerals\u003dNone):"},{"line_number":11757,"context_line":"        info \u003d {\u0027block_device_mapping\u0027: ["},{"line_number":11758,"context_line":"            {\u0027guest_format\u0027: None,"},{"line_number":11759,"context_line":"             \u0027boot_index\u0027: None,"},{"line_number":11760,"context_line":"             \u0027mount_device\u0027: \u0027/dev/vdd\u0027,"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a80dd14_bc2579c3","line":11757,"in_reply_to":"9a80dd14_0377663c","updated":"2015-03-13 11:24:45.000000000","message":"Done","commit_id":"ef678df2d1bb892a8c5637b70873c57b9ee0533a"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"ffd1190ca767c2c551a149a17ec50ea8b566f98b","unresolved":false,"context_lines":[{"line_number":11754,"context_line":"                                **inst)"},{"line_number":11755,"context_line":""},{"line_number":11756,"context_line":"    def _get_block_device_info(self, ephemerals\u003dNone):"},{"line_number":11757,"context_line":"        info \u003d {\u0027block_device_mapping\u0027: ["},{"line_number":11758,"context_line":"            {\u0027guest_format\u0027: None,"},{"line_number":11759,"context_line":"             \u0027boot_index\u0027: None,"},{"line_number":11760,"context_line":"             \u0027mount_device\u0027: \u0027/dev/vdd\u0027,"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a80dd14_0377663c","line":11757,"in_reply_to":"9a80dd14_28736cea","updated":"2015-03-11 17:28:54.000000000","message":"Mike, I agree with Claudiu on this. What you need to do is, like he says, utilize fake_block_device in these test methods and determine what fields are causing the InvalidBDMFormat error, and correct or insert those fields into the fake_block_device fixture.","commit_id":"ef678df2d1bb892a8c5637b70873c57b9ee0533a"},{"author":{"_account_id":8412,"name":"Mike Durnosvistov","email":"glacierr.dev@gmail.com","username":"mdurnosvistov"},"change_message_id":"b66df1bba250022f4b573391bf3c42865dafa989","unresolved":false,"context_lines":[{"line_number":11754,"context_line":"                                **inst)"},{"line_number":11755,"context_line":""},{"line_number":11756,"context_line":"    def _get_block_device_info(self, ephemerals\u003dNone):"},{"line_number":11757,"context_line":"        info \u003d {\u0027block_device_mapping\u0027: ["},{"line_number":11758,"context_line":"            {\u0027guest_format\u0027: None,"},{"line_number":11759,"context_line":"             \u0027boot_index\u0027: None,"},{"line_number":11760,"context_line":"             \u0027mount_device\u0027: \u0027/dev/vdd\u0027,"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a80dd14_28736cea","line":11757,"in_reply_to":"9a80dd14_e2b999ea","updated":"2015-03-05 09:08:14.000000000","message":"I\u0027ve tried use it, but test which use this fake_mapping failed with -\u003e\n InvalidBDMFormat: Block Device Mapping is Invalid: Some fields are invalid.","commit_id":"ef678df2d1bb892a8c5637b70873c57b9ee0533a"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"eefdbf50173010a6388569daf10bfd40918f1b62","unresolved":false,"context_lines":[{"line_number":11812,"context_line":"                                **inst)"},{"line_number":11813,"context_line":""},{"line_number":11814,"context_line":"    @staticmethod"},{"line_number":11815,"context_line":"    def _disk_info():"},{"line_number":11816,"context_line":"        # 10G root and 512M swap disk"},{"line_number":11817,"context_line":"        disk_info \u003d [{\u0027disk_size\u0027: 1, \u0027type\u0027: \u0027qcow2\u0027,"},{"line_number":11818,"context_line":"                      \u0027virt_disk_size\u0027: 10737418240, \u0027path\u0027: \u0027/test/disk\u0027,"}],"source_content_type":"text/x-python","patch_set":9,"id":"fa963961_ede575a8","line":11815,"updated":"2015-03-27 09:55:17.000000000","message":"(optional) nit: this could probably go to setUp()","commit_id":"8e1be7c05a4cbcc189c47b76d46024cbc7e9655e"}],"nova/virt/libvirt/driver.py":[{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"c0fe75da2600a448d3254f484689105f9b6d3233","unresolved":false,"context_lines":[{"line_number":5789,"context_line":""},{"line_number":5790,"context_line":"        boot_index \u003d None"},{"line_number":5791,"context_line":"        if block_device_info is not None:"},{"line_number":5792,"context_line":"            mapping \u003d block_device_info[\u0027block_device_mapping\u0027][0]"},{"line_number":5793,"context_line":"            boot_index \u003d mapping.get(\u0027boot_index\u0027)"},{"line_number":5794,"context_line":""},{"line_number":5795,"context_line":"        # Checks if the migration needs a disk resize down."}],"source_content_type":"text/x-python","patch_set":1,"id":"da86d52c_7bb4eb81","line":5792,"updated":"2015-02-04 16:27:37.000000000","message":"I\u0027m not sure if these entries are ordered, so we should probably not simply take the first one here.","commit_id":"8fa7058277d27a1c1e8f573bbdc6a016636b8b45"},{"author":{"_account_id":14358,"name":"Marian Horban","email":"m.horban@gmail.com","username":"mhorban"},"change_message_id":"eab7fceaedef7149252bdd4adfdea6efad5ffb5b","unresolved":false,"context_lines":[{"line_number":5795,"context_line":"        # Checks if the migration needs a disk resize down."},{"line_number":5796,"context_line":"        if (flavor[\u0027root_gb\u0027] \u003c instance.root_gb or"},{"line_number":5797,"context_line":"                flavor[\u0027ephemeral_gb\u0027] \u003c eph_size):"},{"line_number":5798,"context_line":"            if (boot_index is None) and (boot_index !\u003d 0):"},{"line_number":5799,"context_line":"                reason \u003d _(\"Unable to resize disk down.\")"},{"line_number":5800,"context_line":"                raise exception.InstanceFaultRollback("},{"line_number":5801,"context_line":"                    exception.ResizeError(reason\u003dreason))"}],"source_content_type":"text/x-python","patch_set":1,"id":"da86d52c_e12ca5ae","line":5798,"updated":"2015-02-04 18:55:08.000000000","message":"Looks like something wrong in condition.\nShould be \nif (boot_index is NOT None) and (boot_index !\u003d 0) \n?","commit_id":"8fa7058277d27a1c1e8f573bbdc6a016636b8b45"},{"author":{"_account_id":8412,"name":"Mike Durnosvistov","email":"glacierr.dev@gmail.com","username":"mdurnosvistov"},"change_message_id":"f5962747e432fc4fd06c09e5a3dc1dccb5c410a8","unresolved":false,"context_lines":[{"line_number":5795,"context_line":"        # Checks if the migration needs a disk resize down."},{"line_number":5796,"context_line":"        if (flavor[\u0027root_gb\u0027] \u003c instance.root_gb or"},{"line_number":5797,"context_line":"                flavor[\u0027ephemeral_gb\u0027] \u003c eph_size):"},{"line_number":5798,"context_line":"            if (boot_index is None) and (boot_index !\u003d 0):"},{"line_number":5799,"context_line":"                reason \u003d _(\"Unable to resize disk down.\")"},{"line_number":5800,"context_line":"                raise exception.InstanceFaultRollback("},{"line_number":5801,"context_line":"                    exception.ResizeError(reason\u003dreason))"}],"source_content_type":"text/x-python","patch_set":1,"id":"da86d52c_240cf493","line":5798,"in_reply_to":"da86d52c_769ce70f","updated":"2015-02-05 09:44:48.000000000","message":"Oops.. That is right! :)","commit_id":"8fa7058277d27a1c1e8f573bbdc6a016636b8b45"},{"author":{"_account_id":14358,"name":"Marian Horban","email":"m.horban@gmail.com","username":"mhorban"},"change_message_id":"5532d895dd6f60dc49dfed3ad6a2ae8e443e754b","unresolved":false,"context_lines":[{"line_number":5795,"context_line":"        # Checks if the migration needs a disk resize down."},{"line_number":5796,"context_line":"        if (flavor[\u0027root_gb\u0027] \u003c instance.root_gb or"},{"line_number":5797,"context_line":"                flavor[\u0027ephemeral_gb\u0027] \u003c eph_size):"},{"line_number":5798,"context_line":"            if (boot_index is None) and (boot_index !\u003d 0):"},{"line_number":5799,"context_line":"                reason \u003d _(\"Unable to resize disk down.\")"},{"line_number":5800,"context_line":"                raise exception.InstanceFaultRollback("},{"line_number":5801,"context_line":"                    exception.ResizeError(reason\u003dreason))"}],"source_content_type":"text/x-python","patch_set":1,"id":"da86d52c_769ce70f","line":5798,"in_reply_to":"da86d52c_7b321060","updated":"2015-02-05 07:59:54.000000000","message":"Regarding your comment I believe OR should be better(instead of AND)","commit_id":"8fa7058277d27a1c1e8f573bbdc6a016636b8b45"},{"author":{"_account_id":8412,"name":"Mike Durnosvistov","email":"glacierr.dev@gmail.com","username":"mdurnosvistov"},"change_message_id":"61c947683220ed8ba090f0e21c9c7f7e5498da1d","unresolved":false,"context_lines":[{"line_number":5795,"context_line":"        # Checks if the migration needs a disk resize down."},{"line_number":5796,"context_line":"        if (flavor[\u0027root_gb\u0027] \u003c instance.root_gb or"},{"line_number":5797,"context_line":"                flavor[\u0027ephemeral_gb\u0027] \u003c eph_size):"},{"line_number":5798,"context_line":"            if (boot_index is None) and (boot_index !\u003d 0):"},{"line_number":5799,"context_line":"                reason \u003d _(\"Unable to resize disk down.\")"},{"line_number":5800,"context_line":"                raise exception.InstanceFaultRollback("},{"line_number":5801,"context_line":"                    exception.ResizeError(reason\u003dreason))"}],"source_content_type":"text/x-python","patch_set":1,"id":"da86d52c_7b321060","line":5798,"in_reply_to":"da86d52c_e12ca5ae","updated":"2015-02-05 07:07:31.000000000","message":"No! :) We don\u0027t want to rise exception if boot_index is not None. \n\n    `boot_index is None` -\u003e if True then we don\u0027t check `boot_index !\u003d 0` \n    we already go to rise exception.\n    \n    `boot_index is None` -\u003e if False then we should check `boot_index !\u003d 0` \n    and if it is True then we already go to rise exception.","commit_id":"8fa7058277d27a1c1e8f573bbdc6a016636b8b45"},{"author":{"_account_id":8412,"name":"Mike Durnosvistov","email":"glacierr.dev@gmail.com","username":"mdurnosvistov"},"change_message_id":"ea7847ea3b41908d98ecb008963df94140b26c8f","unresolved":false,"context_lines":[{"line_number":5802,"context_line":"        return shared_storage"},{"line_number":5803,"context_line":""},{"line_number":5804,"context_line":"    def _is_bootable_volume(self, block_device_info):"},{"line_number":5805,"context_line":"        bdi \u003d block_device_info.get(\u0027block_device_mapping\u0027)"},{"line_number":5806,"context_line":"        if bdi:"},{"line_number":5807,"context_line":"            boot_indexes \u003d [info[\u0027boot_index\u0027] for info in bdi]"},{"line_number":5808,"context_line":"            for index in boot_indexes:"}],"source_content_type":"text/x-python","patch_set":2,"id":"da86d52c_b58d957e","line":5805,"range":{"start_line":5805,"start_character":8,"end_line":5805,"end_character":11},"updated":"2015-02-11 13:41:38.000000000","message":"I think it should be `bdm` but if it\u0027s necessary I\u0027ll change it next spin. If it\u0027s needed.","commit_id":"7302e1861ca620a0ee206d28daa594973b74d723"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"e6e9c89f2f1545732f6eb106412ccbe29e4d2fac","unresolved":false,"context_lines":[{"line_number":5822,"context_line":""},{"line_number":5823,"context_line":"        bootable_volume \u003d False"},{"line_number":5824,"context_line":""},{"line_number":5825,"context_line":"        if block_device_info:"},{"line_number":5826,"context_line":"            bootable_volume \u003d self._is_bootable_volume(block_device_info)"},{"line_number":5827,"context_line":""},{"line_number":5828,"context_line":"        # Checks if the migration needs a disk resize down."}],"source_content_type":"text/x-python","patch_set":2,"id":"da86d52c_9b5c3f7f","line":5825,"updated":"2015-02-11 14:55:47.000000000","message":"why not have this code in the if below? that will save a few cycles","commit_id":"7302e1861ca620a0ee206d28daa594973b74d723"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"e6e9c89f2f1545732f6eb106412ccbe29e4d2fac","unresolved":false,"context_lines":[{"line_number":5823,"context_line":"        bootable_volume \u003d False"},{"line_number":5824,"context_line":""},{"line_number":5825,"context_line":"        if block_device_info:"},{"line_number":5826,"context_line":"            bootable_volume \u003d self._is_bootable_volume(block_device_info)"},{"line_number":5827,"context_line":""},{"line_number":5828,"context_line":"        # Checks if the migration needs a disk resize down."},{"line_number":5829,"context_line":"        if (flavor[\u0027root_gb\u0027] \u003c instance.root_gb or"}],"source_content_type":"text/x-python","patch_set":2,"id":"da86d52c_3b643321","line":5826,"updated":"2015-02-11 14:55:47.000000000","message":"why not use get_root_bdm from nova/block_device.py?","commit_id":"7302e1861ca620a0ee206d28daa594973b74d723"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"ff8afcf7bc45cfc3cee41349c981ae2ce1597082","unresolved":false,"context_lines":[{"line_number":5819,"context_line":"                bdm \u003d block_device_info.get(\u0027block_device_mapping\u0027)"},{"line_number":5820,"context_line":"                if bdm:"},{"line_number":5821,"context_line":"                    bootable_volume \u003d block_device.get_root_bdm(bdm)"},{"line_number":5822,"context_line":"            if instance.image_ref or not bootable_volume:"},{"line_number":5823,"context_line":"                reason \u003d _(\"Unable to resize disk down.\")"},{"line_number":5824,"context_line":"                raise exception.InstanceFaultRollback("},{"line_number":5825,"context_line":"                    exception.ResizeError(reason\u003dreason))"}],"source_content_type":"text/x-python","patch_set":3,"id":"da86d52c_f27b3ebc","line":5822,"updated":"2015-02-13 10:06:56.000000000","message":"I did a quick search through Nova sources and it seems that bootable_volume check is actually redundant: looks like \"if instance.image_ref\" will be enough.\n\nCould you please check that?","commit_id":"4710b800fd66fefd1d54a5d2b7726eb96664d88e"},{"author":{"_account_id":8412,"name":"Mike Durnosvistov","email":"glacierr.dev@gmail.com","username":"mdurnosvistov"},"change_message_id":"35a8df668d875e298302741dfd6c4f9bba6c8ecf","unresolved":false,"context_lines":[{"line_number":5819,"context_line":"                bdm \u003d block_device_info.get(\u0027block_device_mapping\u0027)"},{"line_number":5820,"context_line":"                if bdm:"},{"line_number":5821,"context_line":"                    bootable_volume \u003d block_device.get_root_bdm(bdm)"},{"line_number":5822,"context_line":"            if instance.image_ref or not bootable_volume:"},{"line_number":5823,"context_line":"                reason \u003d _(\"Unable to resize disk down.\")"},{"line_number":5824,"context_line":"                raise exception.InstanceFaultRollback("},{"line_number":5825,"context_line":"                    exception.ResizeError(reason\u003dreason))"}],"source_content_type":"text/x-python","patch_set":3,"id":"da86d52c_c6cc78be","line":5822,"in_reply_to":"da86d52c_f27b3ebc","updated":"2015-02-16 12:23:52.000000000","message":"I\u0027ll check that.","commit_id":"4710b800fd66fefd1d54a5d2b7726eb96664d88e"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"2df5b74b8a759c6b1f07ecb247f856f5791aada6","unresolved":false,"context_lines":[{"line_number":5909,"context_line":"                flavor[\u0027ephemeral_gb\u0027] \u003c eph_size):"},{"line_number":5910,"context_line":"            if instance.image_ref:"},{"line_number":5911,"context_line":"                reason \u003d _(\"Unable to resize disk down.\")"},{"line_number":5912,"context_line":"                raise exception.InstanceFaultRollback("},{"line_number":5913,"context_line":"                    exception.ResizeError(reason\u003dreason))"},{"line_number":5914,"context_line":"        disk_info_text \u003d self.get_instance_disk_info(instance,"},{"line_number":5915,"context_line":"                block_device_info\u003dblock_device_info)"}],"source_content_type":"text/x-python","patch_set":4,"id":"da86d52c_2f5b0923","line":5912,"updated":"2015-02-18 14:35:01.000000000","message":"I believe, we still need to raise the exception, when someone attempts to resize down the ephemeral disk (even when the root disk is a volume).\n\nSo, IMO, this should become something like:\n\n  root_down \u003d flavor[\u0027root_gb\u0027] \u003c instance.root_gb\n  ephemeral_down \u003d flavor[\u0027ephemeral_gb\u0027] \u003c eph_size\n  booted_from_volume \u003d not instance.image_ref\n  \n   if (root_down and not booted_from_volume) or ephemeral_down:\n     raise ...\n\notherwise we\u0027d allow to resize down ephemeral partitions leading to FS corruptions.","commit_id":"6dc51c6764156b28f11f539f7be32b258f4d4ce1"},{"author":{"_account_id":8412,"name":"Mike Durnosvistov","email":"glacierr.dev@gmail.com","username":"mdurnosvistov"},"change_message_id":"8877090b1dbd05483465898ca7671d48dce6d593","unresolved":false,"context_lines":[{"line_number":5909,"context_line":"                flavor[\u0027ephemeral_gb\u0027] \u003c eph_size):"},{"line_number":5910,"context_line":"            if instance.image_ref:"},{"line_number":5911,"context_line":"                reason \u003d _(\"Unable to resize disk down.\")"},{"line_number":5912,"context_line":"                raise exception.InstanceFaultRollback("},{"line_number":5913,"context_line":"                    exception.ResizeError(reason\u003dreason))"},{"line_number":5914,"context_line":"        disk_info_text \u003d self.get_instance_disk_info(instance,"},{"line_number":5915,"context_line":"                block_device_info\u003dblock_device_info)"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba7be1f8_1de535a8","line":5912,"in_reply_to":"da86d52c_2f5b0923","updated":"2015-02-20 09:58:18.000000000","message":"Done","commit_id":"6dc51c6764156b28f11f539f7be32b258f4d4ce1"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"a87db22ec4766bd780196638f10942141aba2d9b","unresolved":false,"context_lines":[{"line_number":6131,"context_line":"            reason \u003d _(\"Unable to resize disk down.\")"},{"line_number":6132,"context_line":"            raise exception.InstanceFaultRollback("},{"line_number":6133,"context_line":"                exception.ResizeError(reason\u003dreason))"},{"line_number":6134,"context_line":""},{"line_number":6135,"context_line":"        disk_info_text \u003d self.get_instance_disk_info(instance,"},{"line_number":6136,"context_line":"                block_device_info\u003dblock_device_info)"},{"line_number":6137,"context_line":"        disk_info \u003d jsonutils.loads(disk_info_text)"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba7be1f8_171e45bb","side":"PARENT","line":6134,"updated":"2015-02-25 15:51:16.000000000","message":"nit: unrelated change","commit_id":"017f083614d4199aba876444f8de6670059da9a6"},{"author":{"_account_id":8412,"name":"Mike Durnosvistov","email":"glacierr.dev@gmail.com","username":"mdurnosvistov"},"change_message_id":"8163a3f5f0ac0029d1b6d129cfff044f6d2d0d0d","unresolved":false,"context_lines":[{"line_number":6131,"context_line":"            reason \u003d _(\"Unable to resize disk down.\")"},{"line_number":6132,"context_line":"            raise exception.InstanceFaultRollback("},{"line_number":6133,"context_line":"                exception.ResizeError(reason\u003dreason))"},{"line_number":6134,"context_line":""},{"line_number":6135,"context_line":"        disk_info_text \u003d self.get_instance_disk_info(instance,"},{"line_number":6136,"context_line":"                block_device_info\u003dblock_device_info)"},{"line_number":6137,"context_line":"        disk_info \u003d jsonutils.loads(disk_info_text)"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba7be1f8_c04a1b54","side":"PARENT","line":6134,"in_reply_to":"ba7be1f8_171e45bb","updated":"2015-02-25 18:55:57.000000000","message":"Done","commit_id":"017f083614d4199aba876444f8de6670059da9a6"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"a87db22ec4766bd780196638f10942141aba2d9b","unresolved":false,"context_lines":[{"line_number":6128,"context_line":"        # Checks if the migration needs a disk resize down."},{"line_number":6129,"context_line":"        root_down \u003d flavor[\u0027root_gb\u0027] \u003c instance.root_gb"},{"line_number":6130,"context_line":"        ephemeral_down \u003d flavor[\u0027ephemeral_gb\u0027] \u003c eph_size"},{"line_number":6131,"context_line":"        booted_from_volume \u003d not instance.image_ref"},{"line_number":6132,"context_line":"        if (root_down and not booted_from_volume) or ephemeral_down:"},{"line_number":6133,"context_line":"            reason \u003d _(\"Unable to resize disk down.\")"},{"line_number":6134,"context_line":"            raise exception.InstanceFaultRollback("}],"source_content_type":"text/x-python","patch_set":5,"id":"ba7be1f8_60989a78","line":6131,"updated":"2015-02-25 15:51:16.000000000","message":"nit: looks like we could reuse _is_booted_from_volume() from #2604 here","commit_id":"087a890c3f13e94da21dc04c647cb4c7d5520c41"},{"author":{"_account_id":8412,"name":"Mike Durnosvistov","email":"glacierr.dev@gmail.com","username":"mdurnosvistov"},"change_message_id":"8163a3f5f0ac0029d1b6d129cfff044f6d2d0d0d","unresolved":false,"context_lines":[{"line_number":6128,"context_line":"        # Checks if the migration needs a disk resize down."},{"line_number":6129,"context_line":"        root_down \u003d flavor[\u0027root_gb\u0027] \u003c instance.root_gb"},{"line_number":6130,"context_line":"        ephemeral_down \u003d flavor[\u0027ephemeral_gb\u0027] \u003c eph_size"},{"line_number":6131,"context_line":"        booted_from_volume \u003d not instance.image_ref"},{"line_number":6132,"context_line":"        if (root_down and not booted_from_volume) or ephemeral_down:"},{"line_number":6133,"context_line":"            reason \u003d _(\"Unable to resize disk down.\")"},{"line_number":6134,"context_line":"            raise exception.InstanceFaultRollback("}],"source_content_type":"text/x-python","patch_set":5,"id":"ba7be1f8_a03fe7b2","line":6131,"in_reply_to":"ba7be1f8_60989a78","updated":"2015-02-25 18:55:57.000000000","message":"Sure!","commit_id":"087a890c3f13e94da21dc04c647cb4c7d5520c41"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"da0afb46b83dd674a9c336c1ad99c2bb0b3f41d1","unresolved":false,"context_lines":[{"line_number":6165,"context_line":"        root_down \u003d flavor[\u0027root_gb\u0027] \u003c instance.root_gb"},{"line_number":6166,"context_line":"        ephemeral_down \u003d flavor[\u0027ephemeral_gb\u0027] \u003c eph_size"},{"line_number":6167,"context_line":"        disk_info_text \u003d self.get_instance_disk_info("},{"line_number":6168,"context_line":"            instance, block_device_info\u003dblock_device_info)"},{"line_number":6169,"context_line":"        if (root_down and not self._is_booted_from_volume("},{"line_number":6170,"context_line":"                instance, disk_info_text)) or ephemeral_down:"},{"line_number":6171,"context_line":"            reason \u003d _(\"Unable to resize disk down.\")"}],"source_content_type":"text/x-python","patch_set":6,"id":"ba7be1f8_352113b5","line":6168,"updated":"2015-02-27 16:13:22.000000000","message":"disk_info_text is a serialized JSON string. Can we deserialize it first? (i.e. move disk_info \u003d ... line above too) While this works too, it looks weird.","commit_id":"ca3ff51c5a1b1b3592cadb38cbb73ce6c918a01b"},{"author":{"_account_id":8412,"name":"Mike Durnosvistov","email":"glacierr.dev@gmail.com","username":"mdurnosvistov"},"change_message_id":"155f65e2b013f50280ff6dfe926ef7c1bc040bff","unresolved":false,"context_lines":[{"line_number":6165,"context_line":"        root_down \u003d flavor[\u0027root_gb\u0027] \u003c instance.root_gb"},{"line_number":6166,"context_line":"        ephemeral_down \u003d flavor[\u0027ephemeral_gb\u0027] \u003c eph_size"},{"line_number":6167,"context_line":"        disk_info_text \u003d self.get_instance_disk_info("},{"line_number":6168,"context_line":"            instance, block_device_info\u003dblock_device_info)"},{"line_number":6169,"context_line":"        if (root_down and not self._is_booted_from_volume("},{"line_number":6170,"context_line":"                instance, disk_info_text)) or ephemeral_down:"},{"line_number":6171,"context_line":"            reason \u003d _(\"Unable to resize disk down.\")"}],"source_content_type":"text/x-python","patch_set":6,"id":"ba7be1f8_393bcdec","line":6168,"in_reply_to":"ba7be1f8_352113b5","updated":"2015-02-27 16:57:21.000000000","message":"Sure, we can, but in 6179L used `disk_info_text`.","commit_id":"ca3ff51c5a1b1b3592cadb38cbb73ce6c918a01b"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"da0afb46b83dd674a9c336c1ad99c2bb0b3f41d1","unresolved":false,"context_lines":[{"line_number":6166,"context_line":"        ephemeral_down \u003d flavor[\u0027ephemeral_gb\u0027] \u003c eph_size"},{"line_number":6167,"context_line":"        disk_info_text \u003d self.get_instance_disk_info("},{"line_number":6168,"context_line":"            instance, block_device_info\u003dblock_device_info)"},{"line_number":6169,"context_line":"        if (root_down and not self._is_booted_from_volume("},{"line_number":6170,"context_line":"                instance, disk_info_text)) or ephemeral_down:"},{"line_number":6171,"context_line":"            reason \u003d _(\"Unable to resize disk down.\")"},{"line_number":6172,"context_line":"            raise exception.InstanceFaultRollback("}],"source_content_type":"text/x-python","patch_set":6,"id":"ba7be1f8_d511975e","line":6169,"updated":"2015-02-27 16:13:22.000000000","message":"can we make it:\n\n ...\n booted_from_volume \u003d self.get_instance_disk_info(instance, block_device_info\u003dblock_device_info)\n \n if (root_down and not booted_from_volume) or ephemeral_down:\n  ...\n\nto improve readability?","commit_id":"ca3ff51c5a1b1b3592cadb38cbb73ce6c918a01b"},{"author":{"_account_id":8412,"name":"Mike Durnosvistov","email":"glacierr.dev@gmail.com","username":"mdurnosvistov"},"change_message_id":"155f65e2b013f50280ff6dfe926ef7c1bc040bff","unresolved":false,"context_lines":[{"line_number":6166,"context_line":"        ephemeral_down \u003d flavor[\u0027ephemeral_gb\u0027] \u003c eph_size"},{"line_number":6167,"context_line":"        disk_info_text \u003d self.get_instance_disk_info("},{"line_number":6168,"context_line":"            instance, block_device_info\u003dblock_device_info)"},{"line_number":6169,"context_line":"        if (root_down and not self._is_booted_from_volume("},{"line_number":6170,"context_line":"                instance, disk_info_text)) or ephemeral_down:"},{"line_number":6171,"context_line":"            reason \u003d _(\"Unable to resize disk down.\")"},{"line_number":6172,"context_line":"            raise exception.InstanceFaultRollback("}],"source_content_type":"text/x-python","patch_set":6,"id":"ba7be1f8_998599af","line":6169,"in_reply_to":"ba7be1f8_d511975e","updated":"2015-02-27 16:57:21.000000000","message":"Yes, just did like in line below(6179L)\n    not self._is_booted_from_volume(instance, disk_info_text)","commit_id":"ca3ff51c5a1b1b3592cadb38cbb73ce6c918a01b"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"bc8445f596bf6d07eedfe8a1092dcce2ab48cc89","unresolved":false,"context_lines":[{"line_number":6174,"context_line":"        ephemeral_down \u003d flavor[\u0027ephemeral_gb\u0027] \u003c eph_size"},{"line_number":6175,"context_line":"        disk_info_text \u003d self.get_instance_disk_info("},{"line_number":6176,"context_line":"            instance, block_device_info\u003dblock_device_info)"},{"line_number":6177,"context_line":"        booted_from_volume \u003d self._is_booted_from_volume(instance,"},{"line_number":6178,"context_line":"                                                         disk_info_text)"},{"line_number":6179,"context_line":"        if (root_down and not booted_from_volume) or ephemeral_down:"},{"line_number":6180,"context_line":"            reason \u003d _(\"Unable to resize disk down.\")"}],"source_content_type":"text/x-python","patch_set":9,"id":"1a6ced46_150d9737","line":6177,"updated":"2015-03-25 15:12:45.000000000","message":"this is really bad way to check if the instance is booted from volume. actually looking at this code as is - I really don\u0027t see any reason why this is being checked on the compute node and not in the API. Seems like it would apply to all drivers really.\n\nHaving said that - it\u0027s probably not worth tho hold up this patch for something that can be done later.","commit_id":"8e1be7c05a4cbcc189c47b76d46024cbc7e9655e"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"eefdbf50173010a6388569daf10bfd40918f1b62","unresolved":false,"context_lines":[{"line_number":6174,"context_line":"        ephemeral_down \u003d flavor[\u0027ephemeral_gb\u0027] \u003c eph_size"},{"line_number":6175,"context_line":"        disk_info_text \u003d self.get_instance_disk_info("},{"line_number":6176,"context_line":"            instance, block_device_info\u003dblock_device_info)"},{"line_number":6177,"context_line":"        booted_from_volume \u003d self._is_booted_from_volume(instance,"},{"line_number":6178,"context_line":"                                                         disk_info_text)"},{"line_number":6179,"context_line":"        if (root_down and not booted_from_volume) or ephemeral_down:"},{"line_number":6180,"context_line":"            reason \u003d _(\"Unable to resize disk down.\")"}],"source_content_type":"text/x-python","patch_set":9,"id":"fa963961_cdf9914f","line":6177,"in_reply_to":"1a6ced46_150d9737","updated":"2015-03-27 09:55:17.000000000","message":"+1","commit_id":"8e1be7c05a4cbcc189c47b76d46024cbc7e9655e"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"d80246ab9fa44b4a8a21d35bbe095d94cd896ac8","unresolved":false,"context_lines":[{"line_number":6174,"context_line":"        ephemeral_down \u003d flavor[\u0027ephemeral_gb\u0027] \u003c eph_size"},{"line_number":6175,"context_line":"        disk_info_text \u003d self.get_instance_disk_info("},{"line_number":6176,"context_line":"            instance, block_device_info\u003dblock_device_info)"},{"line_number":6177,"context_line":"        booted_from_volume \u003d self._is_booted_from_volume(instance,"},{"line_number":6178,"context_line":"                                                         disk_info_text)"},{"line_number":6179,"context_line":"        if (root_down and not booted_from_volume) or ephemeral_down:"},{"line_number":6180,"context_line":"            reason \u003d _(\"Unable to resize disk down.\")"}],"source_content_type":"text/x-python","patch_set":9,"id":"fa963961_d4db551a","line":6177,"in_reply_to":"1a6ced46_150d9737","updated":"2015-03-27 14:03:30.000000000","message":"We should get a bug open for it though...or put a TODO in the code that we should pull this up out of the driver and move it into the compute manager or compute API.\n\nWe should probably also have a Tempest test for resizing a volume-backed instance.  As far as I know, we have one scenario test in Tempest for volume-backed instances (test_volume_boot_pattern) and that\u0027s been skipped for a long time due to the flaky lvm hang bug, so we\u0027re pretty exposed here on integration testing.","commit_id":"8e1be7c05a4cbcc189c47b76d46024cbc7e9655e"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ae376a2738cd3fa6313e731350b79fd04d43e300","unresolved":false,"context_lines":[{"line_number":6174,"context_line":"        ephemeral_down \u003d flavor[\u0027ephemeral_gb\u0027] \u003c eph_size"},{"line_number":6175,"context_line":"        disk_info_text \u003d self.get_instance_disk_info("},{"line_number":6176,"context_line":"            instance, block_device_info\u003dblock_device_info)"},{"line_number":6177,"context_line":"        booted_from_volume \u003d self._is_booted_from_volume(instance,"},{"line_number":6178,"context_line":"                                                         disk_info_text)"},{"line_number":6179,"context_line":"        if (root_down and not booted_from_volume) or ephemeral_down:"},{"line_number":6180,"context_line":"            reason \u003d _(\"Unable to resize disk down.\")"}],"source_content_type":"text/x-python","patch_set":9,"id":"fa963961_2ff8eae4","line":6177,"in_reply_to":"fa963961_d4db551a","updated":"2015-03-27 14:12:32.000000000","message":"Agree with Nikola though, resize is a cast and in the compute API we have the flavor and we can find out if it\u0027s a volume-backed instance, so we should fail fast and return the error to the user....although that might be considered an API change going from a successful return response (202) to an error (400)?  Right now you have to get the instance fault information to find out why the resize failed.","commit_id":"8e1be7c05a4cbcc189c47b76d46024cbc7e9655e"}]}
