)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"eaf274db8467f42886be4115ac4de7abff5b7f80","unresolved":false,"context_lines":[{"line_number":15,"context_line":"It is not possible to use get_model for an instance booted from volume,"},{"line_number":16,"context_line":"but we can still use LocalBlockImage in it\u0027s case because it is"},{"line_number":17,"context_line":"simply exposed as a block device."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"Change-Id: I0f4456731c9d6f64affbf6924f4a7a4c34df4fd1"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"fa1b9901_e644e04a","line":18,"updated":"2015-08-20 21:59:21.000000000","message":"Did you have a bug for this?  I\u0027d think the bug is, you can\u0027t boot an lxc instance from volume using lvm without this.","commit_id":"e73e6a9df9b2e5803d4b55a0f23abbd948a39e65"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"8e052b0ab43893b235d87976bc70b23ea1531b1f","unresolved":false,"context_lines":[{"line_number":15,"context_line":"It is not possible to use get_model for an instance booted from volume,"},{"line_number":16,"context_line":"but we can still use LocalBlockImage in it\u0027s case because it is"},{"line_number":17,"context_line":"simply exposed as a block device."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"Change-Id: I0f4456731c9d6f64affbf6924f4a7a4c34df4fd1"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"fa1b9901_867ac486","line":18,"in_reply_to":"fa1b9901_e644e04a","updated":"2015-08-20 21:59:48.000000000","message":"Just do:\n\nPartial-Bug: #1287754","commit_id":"e73e6a9df9b2e5803d4b55a0f23abbd948a39e65"}],"nova/tests/unit/virt/libvirt/test_driver.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"aa6ef4bfb3ffb0f5cc118b9c0e6d8ca6e89a9039","unresolved":false,"context_lines":[{"line_number":7760,"context_line":"        instance_ref[\u0027image_ref\u0027] \u003d \u0027\u0027"},{"line_number":7761,"context_line":"        instance_ref[\u0027root_device_name\u0027] \u003d \u0027/dev/sda\u0027"},{"line_number":7762,"context_line":"        instance_ref[\u0027ephemeral_gb\u0027] \u003d 0"},{"line_number":7763,"context_line":"        instance_ref[\u0027uuid\u0027] \u003d uuidutils.generate_uuid()"},{"line_number":7764,"context_line":"        instance_ref[\u0027system_metadata\u0027][\u0027image_disk_format\u0027] \u003d \u0027qcow2\u0027"},{"line_number":7765,"context_line":"        inst_obj \u003d objects.Instance(**instance_ref)"},{"line_number":7766,"context_line":"        image_meta \u003d {}"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa1b9901_631be281","line":7763,"updated":"2015-08-20 21:58:17.000000000","message":"You could remove this since it\u0027s not used anymore and is a bit confusing if you assume lvm and get LocalBlockImage as the image model.","commit_id":"e73e6a9df9b2e5803d4b55a0f23abbd948a39e65"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"aa6ef4bfb3ffb0f5cc118b9c0e6d8ca6e89a9039","unresolved":false,"context_lines":[{"line_number":10561,"context_line":"            mock.patch.object(drvr.firewall_driver, \u0027prepare_instance_filter\u0027),"},{"line_number":10562,"context_line":"            mock.patch.object(drvr.firewall_driver, \u0027apply_instance_filter\u0027)):"},{"line_number":10563,"context_line":"            drvr._create_domain_and_network(self.context, \u0027xml\u0027,"},{"line_number":10564,"context_line":"                                            mock_instance, {}, None)"},{"line_number":10565,"context_line":""},{"line_number":10566,"context_line":"        self.assertEqual(\u0027/dev/nbd0\u0027, inst_sys_meta[\u0027rootfs_device_name\u0027])"},{"line_number":10567,"context_line":"        self.assertFalse(mock_instance.called)"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa1b9901_c300ae04","line":10564,"updated":"2015-08-20 21:58:17.000000000","message":"I think this is wrong - this is the network_info which is a list of vifs.  The None parameter is the disk_info, which I assume you were going to change here and I handled here:\n\nhttps://review.openstack.org/#/c/214927/","commit_id":"e73e6a9df9b2e5803d4b55a0f23abbd948a39e65"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"aa6ef4bfb3ffb0f5cc118b9c0e6d8ca6e89a9039","unresolved":false,"context_lines":[{"line_number":10625,"context_line":"            mock.patch.object(drvr.firewall_driver, \u0027prepare_instance_filter\u0027),"},{"line_number":10626,"context_line":"            mock.patch.object(drvr.firewall_driver, \u0027apply_instance_filter\u0027)):"},{"line_number":10627,"context_line":"            drvr._create_domain_and_network(self.context, \u0027xml\u0027,"},{"line_number":10628,"context_line":"                                            mock_instance, {}, None)"},{"line_number":10629,"context_line":""},{"line_number":10630,"context_line":"        self.assertEqual(\u0027/dev/nbd0\u0027, inst_sys_meta[\u0027rootfs_device_name\u0027])"},{"line_number":10631,"context_line":"        self.assertFalse(mock_instance.called)"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa1b9901_8605e411","line":10628,"updated":"2015-08-20 21:58:17.000000000","message":"ditto","commit_id":"e73e6a9df9b2e5803d4b55a0f23abbd948a39e65"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"aa6ef4bfb3ffb0f5cc118b9c0e6d8ca6e89a9039","unresolved":false,"context_lines":[{"line_number":10675,"context_line":"            mock.patch.object(drvr.firewall_driver, \u0027prepare_instance_filter\u0027),"},{"line_number":10676,"context_line":"            mock.patch.object(drvr.firewall_driver, \u0027apply_instance_filter\u0027)):"},{"line_number":10677,"context_line":"            drvr._create_domain_and_network(self.context, \u0027xml\u0027,"},{"line_number":10678,"context_line":"                                            mock_instance, {}, None)"},{"line_number":10679,"context_line":""},{"line_number":10680,"context_line":"        self.assertEqual(\u0027/dev/nbd0\u0027, inst_sys_meta[\u0027rootfs_device_name\u0027])"},{"line_number":10681,"context_line":"        self.assertFalse(mock_instance.called)"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa1b9901_460b4c24","line":10678,"updated":"2015-08-20 21:58:17.000000000","message":"ditto","commit_id":"e73e6a9df9b2e5803d4b55a0f23abbd948a39e65"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"93a2be492cd4a1b02e2b557bea5c06ebc9c78044","unresolved":false,"context_lines":[{"line_number":7762,"context_line":"        instance_ref[\u0027image_ref\u0027] \u003d \u0027\u0027"},{"line_number":7763,"context_line":"        instance_ref[\u0027root_device_name\u0027] \u003d \u0027/dev/sda\u0027"},{"line_number":7764,"context_line":"        instance_ref[\u0027ephemeral_gb\u0027] \u003d 0"},{"line_number":7765,"context_line":"        instance_ref[\u0027uuid\u0027] \u003d uuidutils.generate_uuid()"},{"line_number":7766,"context_line":"        instance_ref[\u0027system_metadata\u0027][\u0027image_disk_format\u0027] \u003d \u0027qcow2\u0027"},{"line_number":7767,"context_line":"        inst_obj \u003d objects.Instance(**instance_ref)"},{"line_number":7768,"context_line":"        image_meta \u003d {}"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa1b9901_83e6eb42","line":7765,"updated":"2015-08-22 13:24:21.000000000","message":"Remove this line since it\u0027s not used in the code anymore.","commit_id":"6b8b275656c9e3538f6b683756143ad1e4c12cc6"},{"author":{"_account_id":5387,"name":"Andrew Melton","email":"andrew.melton@rackspace.com","username":"andrew-melton"},"change_message_id":"84b4b9d395c958a79eb49625ddee6fcae638ae94","unresolved":false,"context_lines":[{"line_number":7762,"context_line":"        instance_ref[\u0027image_ref\u0027] \u003d \u0027\u0027"},{"line_number":7763,"context_line":"        instance_ref[\u0027root_device_name\u0027] \u003d \u0027/dev/sda\u0027"},{"line_number":7764,"context_line":"        instance_ref[\u0027ephemeral_gb\u0027] \u003d 0"},{"line_number":7765,"context_line":"        instance_ref[\u0027uuid\u0027] \u003d uuidutils.generate_uuid()"},{"line_number":7766,"context_line":"        instance_ref[\u0027system_metadata\u0027][\u0027image_disk_format\u0027] \u003d \u0027qcow2\u0027"},{"line_number":7767,"context_line":"        inst_obj \u003d objects.Instance(**instance_ref)"},{"line_number":7768,"context_line":"        image_meta \u003d {}"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa1b9901_d872627c","line":7765,"in_reply_to":"fa1b9901_83e6eb42","updated":"2015-08-24 15:54:20.000000000","message":"Done","commit_id":"6b8b275656c9e3538f6b683756143ad1e4c12cc6"}],"nova/virt/libvirt/driver.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"aa6ef4bfb3ffb0f5cc118b9c0e6d8ca6e89a9039","unresolved":false,"context_lines":[{"line_number":4439,"context_line":"            disk_info \u003d blockinfo.get_info_from_bdm("},{"line_number":4440,"context_line":"                instance, CONF.libvirt.virt_type, image_meta, root_disk)"},{"line_number":4441,"context_line":"            self._connect_volume(root_disk[\u0027connection_info\u0027], disk_info)"},{"line_number":4442,"context_line":"            image_model \u003d imgmodel.LocalBlockImage(disk_path)"},{"line_number":4443,"context_line":"        else:"},{"line_number":4444,"context_line":"            image \u003d self.image_backend.image(instance, \u0027disk\u0027)"},{"line_number":4445,"context_line":"            image_model \u003d image.get_model(self._conn)"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa1b9901_a3a9fa25","line":4442,"updated":"2015-08-20 21:58:17.000000000","message":"In the case of an lvm-backed instance, the imagebackend would give us LocalBlockImage.  However, why don\u0027t we use:\n\nimage \u003d self.image_backend.image(\n    instance, disk_path,\n    instance.system_metadata[\u0027image_disk_format\u0027])\n\nhere?  If instance.system_metadata[\u0027image_disk_format\u0027] is \u0027lvm\u0027 then we get the Lvm image backend back and calling image.get_model on that will give us the LocalBlockImage.\n\nThat seems more dynamic rather than just assuming it\u0027s going to be LVM only.  Maybe LVM is the only one that works and that should be documented?","commit_id":"e73e6a9df9b2e5803d4b55a0f23abbd948a39e65"},{"author":{"_account_id":5387,"name":"Andrew Melton","email":"andrew.melton@rackspace.com","username":"andrew-melton"},"change_message_id":"b39a0459402e98ea851f67b77ba9775538212835","unresolved":false,"context_lines":[{"line_number":4439,"context_line":"            disk_info \u003d blockinfo.get_info_from_bdm("},{"line_number":4440,"context_line":"                instance, CONF.libvirt.virt_type, image_meta, root_disk)"},{"line_number":4441,"context_line":"            self._connect_volume(root_disk[\u0027connection_info\u0027], disk_info)"},{"line_number":4442,"context_line":"            image_model \u003d imgmodel.LocalBlockImage(disk_path)"},{"line_number":4443,"context_line":"        else:"},{"line_number":4444,"context_line":"            image \u003d self.image_backend.image(instance, \u0027disk\u0027)"},{"line_number":4445,"context_line":"            image_model \u003d image.get_model(self._conn)"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa1b9901_c66f35c2","line":4442,"in_reply_to":"fa1b9901_a3a9fa25","updated":"2015-08-21 14:02:12.000000000","message":"LVM is a mode of Libvirt\u0027s image_backend, thus booting from an LVM backed image actually takes place in the \u0027else\u0027 branch of this \u0027if\u0027. This branch is for booting from a cinder volume.\n\nI don\u0027t think tying into Nova\u0027s image backend, or the image_disk_format makes sense for booting from a cinder volume. You\u0027d tie into the disk_format so Nova could understand what method it\u0027d need to use to link that image to a block device. But, cinder has already taken care of applying that image to it\u0027s volume, and it\u0027s already exposed to Nova as a block device by the self._connect_volume() call.\n\nUsing imgmodel.LocalBlockImage here is just a way to tell disk_setup_container() that it can skip linking, and go straight to mounting, since we already have a block device.","commit_id":"e73e6a9df9b2e5803d4b55a0f23abbd948a39e65"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"e8d7df9f0c2653fdae90d7b10873e06a3b68bdc9","unresolved":false,"context_lines":[{"line_number":4439,"context_line":"            disk_info \u003d blockinfo.get_info_from_bdm("},{"line_number":4440,"context_line":"                instance, CONF.libvirt.virt_type, image_meta, root_disk)"},{"line_number":4441,"context_line":"            self._connect_volume(root_disk[\u0027connection_info\u0027], disk_info)"},{"line_number":4442,"context_line":"            image_model \u003d imgmodel.LocalBlockImage(disk_path)"},{"line_number":4443,"context_line":"        else:"},{"line_number":4444,"context_line":"            image \u003d self.image_backend.image(instance, \u0027disk\u0027)"},{"line_number":4445,"context_line":"            image_model \u003d image.get_model(self._conn)"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa1b9901_79d92ef2","line":4442,"in_reply_to":"fa1b9901_c66f35c2","updated":"2015-08-21 14:14:28.000000000","message":"OK, yeah, I guess I was missing the bigger picture here, maybe you want to add a note in the code about why we\u0027re doing that there and how it will be used in setup_container.  Otherwise it looks like we\u0027re doing image-y things in the volume case.","commit_id":"e73e6a9df9b2e5803d4b55a0f23abbd948a39e65"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"aa6ef4bfb3ffb0f5cc118b9c0e6d8ca6e89a9039","unresolved":false,"context_lines":[{"line_number":4441,"context_line":"            self._connect_volume(root_disk[\u0027connection_info\u0027], disk_info)"},{"line_number":4442,"context_line":"            image_model \u003d imgmodel.LocalBlockImage(disk_path)"},{"line_number":4443,"context_line":"        else:"},{"line_number":4444,"context_line":"            image \u003d self.image_backend.image(instance, \u0027disk\u0027)"},{"line_number":4445,"context_line":"            image_model \u003d image.get_model(self._conn)"},{"line_number":4446,"context_line":""},{"line_number":4447,"context_line":"        container_dir \u003d os.path.join(inst_path, \u0027rootfs\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa1b9901_a3f1fa96","line":4444,"updated":"2015-08-20 21:58:17.000000000","message":"OK, so this defaults to Qcow2 because the libvirt.images_type defaults to \u0027default\u0027 which defaults to Qcow2 since CONF.use_cow_images defaults to True.","commit_id":"e73e6a9df9b2e5803d4b55a0f23abbd948a39e65"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"aa6ef4bfb3ffb0f5cc118b9c0e6d8ca6e89a9039","unresolved":false,"context_lines":[{"line_number":4442,"context_line":"            image_model \u003d imgmodel.LocalBlockImage(disk_path)"},{"line_number":4443,"context_line":"        else:"},{"line_number":4444,"context_line":"            image \u003d self.image_backend.image(instance, \u0027disk\u0027)"},{"line_number":4445,"context_line":"            image_model \u003d image.get_model(self._conn)"},{"line_number":4446,"context_line":""},{"line_number":4447,"context_line":"        container_dir \u003d os.path.join(inst_path, \u0027rootfs\u0027)"},{"line_number":4448,"context_line":"        fileutils.ensure_tree(container_dir)"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa1b9901_23596a8e","line":4445,"updated":"2015-08-20 21:58:17.000000000","message":"So by default we have Qcow2 and get_model is going to return a LocalFileImage and the path will be the instance path + /disk.\n\nThe self._conn passed in here isn\u0027t even used in this case, but we need to pass it in, so OK.  Looks like the only image backend that uses connection is Rbd and that\u0027s to lookup the Rbd secrets stored in the libvirt host module.\n\nSo far this all looks good.","commit_id":"e73e6a9df9b2e5803d4b55a0f23abbd948a39e65"},{"author":{"_account_id":5387,"name":"Andrew Melton","email":"andrew.melton@rackspace.com","username":"andrew-melton"},"change_message_id":"b39a0459402e98ea851f67b77ba9775538212835","unresolved":false,"context_lines":[{"line_number":4442,"context_line":"            image_model \u003d imgmodel.LocalBlockImage(disk_path)"},{"line_number":4443,"context_line":"        else:"},{"line_number":4444,"context_line":"            image \u003d self.image_backend.image(instance, \u0027disk\u0027)"},{"line_number":4445,"context_line":"            image_model \u003d image.get_model(self._conn)"},{"line_number":4446,"context_line":""},{"line_number":4447,"context_line":"        container_dir \u003d os.path.join(inst_path, \u0027rootfs\u0027)"},{"line_number":4448,"context_line":"        fileutils.ensure_tree(container_dir)"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa1b9901_e662793d","line":4445,"in_reply_to":"fa1b9901_23596a8e","updated":"2015-08-21 14:02:12.000000000","message":"These assumptions are correct. I just want to add that if images_type is \u0027lvm\u0027, the image here will be of the Lvm class, and thus will return a LocalBlockImage instead.","commit_id":"e73e6a9df9b2e5803d4b55a0f23abbd948a39e65"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"e8d7df9f0c2653fdae90d7b10873e06a3b68bdc9","unresolved":false,"context_lines":[{"line_number":4442,"context_line":"            image_model \u003d imgmodel.LocalBlockImage(disk_path)"},{"line_number":4443,"context_line":"        else:"},{"line_number":4444,"context_line":"            image \u003d self.image_backend.image(instance, \u0027disk\u0027)"},{"line_number":4445,"context_line":"            image_model \u003d image.get_model(self._conn)"},{"line_number":4446,"context_line":""},{"line_number":4447,"context_line":"        container_dir \u003d os.path.join(inst_path, \u0027rootfs\u0027)"},{"line_number":4448,"context_line":"        fileutils.ensure_tree(container_dir)"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa1b9901_b9b7c683","line":4445,"in_reply_to":"fa1b9901_e662793d","updated":"2015-08-21 14:14:28.000000000","message":"Which I guess it will be if you set NOVA_BACKEND\u003dLVM in devstack which is how I\u0027m trying to test this. :)","commit_id":"e73e6a9df9b2e5803d4b55a0f23abbd948a39e65"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"93a2be492cd4a1b02e2b557bea5c06ebc9c78044","unresolved":false,"context_lines":[{"line_number":4442,"context_line":""},{"line_number":4443,"context_line":"            # NOTE(apmelton) - Even though the instance is being booted from a"},{"line_number":4444,"context_line":"            # cinder volume, it is still presented as a local block device."},{"line_number":4445,"context_line":"            # LocalBlockImage is used here indicate that the instance\u0027s disk"},{"line_number":4446,"context_line":"            # is backed by a local block device."},{"line_number":4447,"context_line":"            image_model \u003d imgmodel.LocalBlockImage(disk_path)"},{"line_number":4448,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa1b9901_63edd724","line":4445,"updated":"2015-08-22 13:24:21.000000000","message":"s/used here/used here to/","commit_id":"6b8b275656c9e3538f6b683756143ad1e4c12cc6"},{"author":{"_account_id":5387,"name":"Andrew Melton","email":"andrew.melton@rackspace.com","username":"andrew-melton"},"change_message_id":"84b4b9d395c958a79eb49625ddee6fcae638ae94","unresolved":false,"context_lines":[{"line_number":4442,"context_line":""},{"line_number":4443,"context_line":"            # NOTE(apmelton) - Even though the instance is being booted from a"},{"line_number":4444,"context_line":"            # cinder volume, it is still presented as a local block device."},{"line_number":4445,"context_line":"            # LocalBlockImage is used here indicate that the instance\u0027s disk"},{"line_number":4446,"context_line":"            # is backed by a local block device."},{"line_number":4447,"context_line":"            image_model \u003d imgmodel.LocalBlockImage(disk_path)"},{"line_number":4448,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa1b9901_1858daf9","line":4445,"in_reply_to":"fa1b9901_63edd724","updated":"2015-08-24 15:54:20.000000000","message":"Done","commit_id":"6b8b275656c9e3538f6b683756143ad1e4c12cc6"}]}
