)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"569440006ae61b46e412fadcbc1eebe9f07eb043","unresolved":false,"context_lines":[{"line_number":10,"context_line":"and network devices (such as rbd) to be decrypted natively by QEMU. This"},{"line_number":11,"context_line":"change enables the use of this feature within Nova when the appropriate"},{"line_number":12,"context_line":"versions of QEMU and Libvirt are installed and the encryption provider"},{"line_number":13,"context_line":"for the volume is of type \u0027luks\u0027."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"When these conditions are met a Libvirt secret is created when"},{"line_number":16,"context_line":"connecting encrypted volumes to a compute host to hold the LUKS"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":17,"id":"7f96bb07_070231b5","line":13,"updated":"2018-01-23 02:53:47.000000000","message":"It\u0027s probably supposed to be obvious but in case it helps others, use of native LUKS decryption means not going through os-brick for encryption.","commit_id":"b840dfe6f20d98f6200cb37a0a30f3891aff046e"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"569440006ae61b46e412fadcbc1eebe9f07eb043","unresolved":false,"context_lines":[{"line_number":14,"context_line":""},{"line_number":15,"context_line":"When these conditions are met a Libvirt secret is created when"},{"line_number":16,"context_line":"connecting encrypted volumes to a compute host to hold the LUKS"},{"line_number":17,"context_line":"passphrase used to unlock the volume. The presences of this Libvirt"},{"line_number":18,"context_line":"secret is then used by the volume driver to generate the required"},{"line_number":19,"context_line":"encryption XML for the disk."},{"line_number":20,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":17,"id":"7f96bb07_87cba1a3","line":17,"range":{"start_line":17,"start_character":42,"end_line":17,"end_character":51},"updated":"2018-01-23 02:53:47.000000000","message":"presence?","commit_id":"b840dfe6f20d98f6200cb37a0a30f3891aff046e"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"569440006ae61b46e412fadcbc1eebe9f07eb043","unresolved":false,"context_lines":[{"line_number":25,"context_line":"this change to still be detached correctly."},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"Attempts to swap between volumes while using native QEMU decryption will"},{"line_number":28,"context_line":"be blocked in the same manor as they are when using volumes that do not"},{"line_number":29,"context_line":"provide a local block device. Both use cases still requiring additional"},{"line_number":30,"context_line":"implementation work in Libvirt before being allowed within Nova."},{"line_number":31,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":17,"id":"7f96bb07_47dcb973","line":28,"range":{"start_line":28,"start_character":23,"end_line":28,"end_character":28},"updated":"2018-01-23 02:53:47.000000000","message":"manner","commit_id":"b840dfe6f20d98f6200cb37a0a30f3891aff046e"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"412c4ba7ce721026a9099a84e6890f69abb7418a","unresolved":false,"context_lines":[{"line_number":25,"context_line":"this change to still be detached correctly."},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"Attempts to swap between volumes while using native QEMU decryption will"},{"line_number":28,"context_line":"be blocked in the same manor as they are when using volumes that do not"},{"line_number":29,"context_line":"provide a local block device. Both use cases still requiring additional"},{"line_number":30,"context_line":"implementation work in Libvirt before being allowed within Nova."},{"line_number":31,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":17,"id":"7f96bb07_ce90da98","line":28,"range":{"start_line":28,"start_character":23,"end_line":28,"end_character":28},"in_reply_to":"7f96bb07_47dcb973","updated":"2018-01-23 10:06:02.000000000","message":"Heh, I like Lee\u0027s version better :)","commit_id":"b840dfe6f20d98f6200cb37a0a30f3891aff046e"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"569440006ae61b46e412fadcbc1eebe9f07eb043","unresolved":false,"context_lines":[{"line_number":26,"context_line":""},{"line_number":27,"context_line":"Attempts to swap between volumes while using native QEMU decryption will"},{"line_number":28,"context_line":"be blocked in the same manor as they are when using volumes that do not"},{"line_number":29,"context_line":"provide a local block device. Both use cases still requiring additional"},{"line_number":30,"context_line":"implementation work in Libvirt before being allowed within Nova."},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"LibvirtLiveMigrateData and LibvirtLiveMigrateBDMInfo are both extended"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":17,"id":"7f96bb07_a72a5d29","line":29,"range":{"start_line":29,"start_character":51,"end_line":29,"end_character":60},"updated":"2018-01-23 02:53:47.000000000","message":"require","commit_id":"b840dfe6f20d98f6200cb37a0a30f3891aff046e"}],"nova/conf/libvirt.py":[{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"b7a45498ffab36cf8ed6fe249e0da05f4c510eef","unresolved":false,"context_lines":[{"line_number":784,"context_line":"Volumes can be connected in the LibVirt as multipath devices. This will"},{"line_number":785,"context_line":"provide high availability and fault tolerance."},{"line_number":786,"context_line":"\"\"\"),"},{"line_number":787,"context_line":"    cfg.BoolOpt(\u0027volume_use_native_luks\u0027,"},{"line_number":788,"context_line":"                default\u003dTrue,"},{"line_number":789,"context_line":"                help\u003d\"\"\""},{"line_number":790,"context_line":"Configure Libvirt and QEMU to natively decrypt LUKS volumes."},{"line_number":791,"context_line":""},{"line_number":792,"context_line":"When attached, encrypted LUKS volumes will be decrypted natively by QEMU"},{"line_number":793,"context_line":"without the use of dm-crypt. Also requires QEMU \u003e\u003d 2.6 and Libvirt \u003e\u003d 2.2.0 on"},{"line_number":794,"context_line":"the compute host."},{"line_number":795,"context_line":"\"\"\"),"},{"line_number":796,"context_line":"    cfg.IntOpt(\u0027num_volume_scan_tries\u0027,"},{"line_number":797,"context_line":"               deprecated_name\u003d\u0027num_iscsi_scan_tries\u0027,"},{"line_number":798,"context_line":"               default\u003d5,"}],"source_content_type":"text/x-python","patch_set":11,"id":"7f96bb07_0682e900","line":795,"range":{"start_line":787,"start_character":0,"end_line":795,"end_character":5},"updated":"2018-01-16 16:30:24.000000000","message":"As discussed on IRC, I think we should remove this. I don\u0027t see why we\u0027d ever turn it off, so best not to add to our proliferation of tuning knobs.","commit_id":"452ba083836fb973e751996870a427e7ec3529ba"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"655b1c2235ff00bef38ad13d0d9b016701b9f163","unresolved":false,"context_lines":[{"line_number":784,"context_line":"Volumes can be connected in the LibVirt as multipath devices. This will"},{"line_number":785,"context_line":"provide high availability and fault tolerance."},{"line_number":786,"context_line":"\"\"\"),"},{"line_number":787,"context_line":"    cfg.BoolOpt(\u0027volume_use_native_luks\u0027,"},{"line_number":788,"context_line":"                default\u003dTrue,"},{"line_number":789,"context_line":"                help\u003d\"\"\""},{"line_number":790,"context_line":"Configure Libvirt and QEMU to natively decrypt LUKS volumes."},{"line_number":791,"context_line":""},{"line_number":792,"context_line":"When attached, encrypted LUKS volumes will be decrypted natively by QEMU"},{"line_number":793,"context_line":"without the use of dm-crypt. Also requires QEMU \u003e\u003d 2.6 and Libvirt \u003e\u003d 2.2.0 on"},{"line_number":794,"context_line":"the compute host."},{"line_number":795,"context_line":"\"\"\"),"},{"line_number":796,"context_line":"    cfg.IntOpt(\u0027num_volume_scan_tries\u0027,"},{"line_number":797,"context_line":"               deprecated_name\u003d\u0027num_iscsi_scan_tries\u0027,"},{"line_number":798,"context_line":"               default\u003d5,"}],"source_content_type":"text/x-python","patch_set":11,"id":"7f96bb07_b90f9a35","line":795,"range":{"start_line":787,"start_character":0,"end_line":795,"end_character":5},"in_reply_to":"7f96bb07_0682e900","updated":"2018-01-17 10:30:06.000000000","message":"Done","commit_id":"452ba083836fb973e751996870a427e7ec3529ba"}],"nova/objects/migrate_data.py":[{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"569440006ae61b46e412fadcbc1eebe9f07eb043","unresolved":false,"context_lines":[{"line_number":90,"context_line":"            primitive, target_version)"},{"line_number":91,"context_line":"        target_version \u003d versionutils.convert_version_to_tuple(target_version)"},{"line_number":92,"context_line":"        if target_version \u003c (1, 1) and \u0027encryption_secret_uuid\u0027 in primitive:"},{"line_number":93,"context_line":"            del primitive[\u0027encryption_secret_uuid\u0027]"},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"    # NOTE(danms): We don\u0027t have a connection_info object right"},{"line_number":96,"context_line":"    # now, and instead mostly store/pass it as JSON that we\u0027re"}],"source_content_type":"text/x-python","patch_set":17,"id":"7f96bb07_278c0d7e","line":93,"updated":"2018-01-23 02:53:47.000000000","message":"This isn\u0027t tested anywhere.","commit_id":"b840dfe6f20d98f6200cb37a0a30f3891aff046e"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"569440006ae61b46e412fadcbc1eebe9f07eb043","unresolved":false,"context_lines":[{"line_number":155,"context_line":"        target_version \u003d versionutils.convert_version_to_tuple(target_version)"},{"line_number":156,"context_line":"        if target_version \u003c (1, 5):"},{"line_number":157,"context_line":"            if \u0027src_supports_native_luks\u0027 in primitive:"},{"line_number":158,"context_line":"                del primitive[\u0027src_supports_native_luks\u0027]"},{"line_number":159,"context_line":"        if target_version \u003c (1, 4):"},{"line_number":160,"context_line":"            if \u0027old_vol_attachment_ids\u0027 in primitive:"},{"line_number":161,"context_line":"                del primitive[\u0027old_vol_attachment_ids\u0027]"}],"source_content_type":"text/x-python","patch_set":17,"id":"7f96bb07_c7e8c917","line":158,"updated":"2018-01-23 02:53:47.000000000","message":"This isn\u0027t tested anywhere.","commit_id":"b840dfe6f20d98f6200cb37a0a30f3891aff046e"}],"nova/tests/unit/objects/test_migrate_data.py":[{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"cfeecb8c2ab20c616d116ee8bdc85e2a7aea71ac","unresolved":false,"context_lines":[{"line_number":236,"context_line":"        self.assertNotIn(\u0027supported_perf_events\u0027, primitive)"},{"line_number":237,"context_line":"        self.assertNotIn(\u0027old_vol_attachment_ids\u0027, primitive)"},{"line_number":238,"context_line":"        self.assertNotIn(\u0027src_supports_native_luks\u0027, primitive)"},{"line_number":239,"context_line":"        primitive \u003d obj.obj_to_primitive(target_version\u003d\u00271.1\u0027)"},{"line_number":240,"context_line":"        self.assertNotIn(\u0027serial_listen_addr\u003d\u0027, primitive)"},{"line_number":241,"context_line":"        primitive \u003d obj.obj_to_primitive(target_version\u003d\u00271.2\u0027)"},{"line_number":242,"context_line":"        self.assertNotIn(\u0027supported_perf_events\u0027, primitive)"}],"source_content_type":"text/x-python","patch_set":18,"id":"7f96bb07_ef3b45c5","line":239,"range":{"start_line":239,"start_character":0,"end_line":239,"end_character":62},"updated":"2018-01-23 16:55:39.000000000","message":"nit: A newline before this (and other calls to the function) would delineate this and make it easier to read","commit_id":"f8e24c33f8ee27e6e4a289bd705f3e12cacbcc20"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"b2fdd112d9fa9bdde0cc01c7deb8b07ff2f2be34","unresolved":false,"context_lines":[{"line_number":243,"context_line":"        primitive \u003d obj.obj_to_primitive(target_version\u003d\u00271.3\u0027)"},{"line_number":244,"context_line":"        self.assertNotIn(\u0027old_vol_attachment_ids\u0027, primitive)"},{"line_number":245,"context_line":"        primitive \u003d obj.obj_to_primitive(target_version\u003d\u00271.4\u0027)"},{"line_number":246,"context_line":"        self.assertNotIn(\u0027src_supports_native_luks\u0027, primitive)"},{"line_number":247,"context_line":""},{"line_number":248,"context_line":"    def test_bdm_obj_make_compatible(self):"},{"line_number":249,"context_line":"        obj \u003d migrate_data.LibvirtLiveMigrateBDMInfo("}],"source_content_type":"text/x-python","patch_set":18,"id":"7f96bb07_9f075eca","line":246,"updated":"2018-01-23 13:25:20.000000000","message":"That\u0027s been neglected! Thanks for the backfill.","commit_id":"f8e24c33f8ee27e6e4a289bd705f3e12cacbcc20"}],"nova/tests/unit/virt/libvirt/test_driver.py":[{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"e986b53e7e261ca8df8911ec6016789818356d47","unresolved":false,"context_lines":[{"line_number":3516,"context_line":""},{"line_number":3517,"context_line":"        instance_ref \u003d objects.Instance(**self.test_instance)"},{"line_number":3518,"context_line":"        image_meta \u003d objects.ImageMeta.from_dict(self.test_image_meta)"},{"line_number":3519,"context_line":"        conn_info \u003d {\u0027driver_volume_type\u0027: \u0027fake\u0027, \u0027data\u0027: {}}"},{"line_number":3520,"context_line":"        bdms \u003d block_device_obj.block_device_make_list_from_dicts("},{"line_number":3521,"context_line":"            self.context, ["},{"line_number":3522,"context_line":"              fake_block_device.FakeDbBlockDeviceDict("}],"source_content_type":"text/x-python","patch_set":11,"id":"7f96bb07_fcce702b","line":3519,"updated":"2018-01-16 18:15:35.000000000","message":"Grr, this is going to conflict with change Ia6210a6c","commit_id":"452ba083836fb973e751996870a427e7ec3529ba"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"e986b53e7e261ca8df8911ec6016789818356d47","unresolved":false,"context_lines":[{"line_number":6601,"context_line":"    @mock.patch.object(libvirt_driver.LibvirtDriver, \u0027_get_volume_encryption\u0027)"},{"line_number":6602,"context_line":"    @mock.patch.object(libvirt_driver.LibvirtDriver, \u0027_use_native_luks\u0027)"},{"line_number":6603,"context_line":"    @mock.patch.object(libvirt_driver.LibvirtDriver, \u0027_get_volume_encryptor\u0027)"},{"line_number":6604,"context_line":"    @mock.patch(\u0027nova.virt.libvirt.host.Host\u0027)"},{"line_number":6605,"context_line":"    @mock.patch(\u0027os_brick.encryptors.luks.is_luks\u0027)"},{"line_number":6606,"context_line":"    def test_connect_volume_native_luks(self, mock_is_luks, mock_host,"},{"line_number":6607,"context_line":"            mock_get_volume_encryptor, mock_use_native_luks,"}],"source_content_type":"text/x-python","patch_set":11,"id":"7f96bb07_57d97d7c","line":6604,"updated":"2018-01-16 18:15:35.000000000","message":"nit: autospec?","commit_id":"452ba083836fb973e751996870a427e7ec3529ba"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"e986b53e7e261ca8df8911ec6016789818356d47","unresolved":false,"context_lines":[{"line_number":6659,"context_line":"        drvr._connect_volume(self.context, connection_info, instance,"},{"line_number":6660,"context_line":"                             encryption\u003dencryption)"},{"line_number":6661,"context_line":"        mock_encryptor._format_volume.assert_called_once_with(key,"},{"line_number":6662,"context_line":"                                                              **encryption)"},{"line_number":6663,"context_line":""},{"line_number":6664,"context_line":"    @mock.patch.object(libvirt_driver.LibvirtDriver, \u0027_get_volume_encryptor\u0027)"},{"line_number":6665,"context_line":"    def test_disconect_volume_native_luks(self, mock_get_volume_encryptor):"}],"source_content_type":"text/x-python","patch_set":11,"id":"7f96bb07_775279e0","line":6662,"updated":"2018-01-16 18:15:35.000000000","message":"How about testing that we don\u0027t try to format RBD?","commit_id":"452ba083836fb973e751996870a427e7ec3529ba"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"dc1fbecaeffff10099c011b2f2def35a4c9cf13d","unresolved":false,"context_lines":[{"line_number":10493,"context_line":"            return"},{"line_number":10494,"context_line":""},{"line_number":10495,"context_line":"        self.stubs.Set(drvr, \u0027_create_images_and_backing\u0027, fake_none)"},{"line_number":10496,"context_line":"        self.stubs.Set(drvr, \u0027_is_native_luks_available\u0027,"},{"line_number":10497,"context_line":"                        lambda: dest_supports_native_luks)"},{"line_number":10498,"context_line":""},{"line_number":10499,"context_line":"        instance \u003d objects.Instance(**self.test_instance)"}],"source_content_type":"text/x-python","patch_set":15,"id":"7f96bb07_f31f1207","line":10496,"range":{"start_line":10496,"start_character":8,"end_line":10496,"end_character":22},"updated":"2018-01-19 13:24:04.000000000","message":"nit: should probably use a mock for this instead, given it\u0027s new. I have a funny feeling others may have stronger opinions on this than me, so you may want to treat it accordingly.","commit_id":"8820f33c7f663a555d3e4fb91de5021aff444b57"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"dc1fbecaeffff10099c011b2f2def35a4c9cf13d","unresolved":false,"context_lines":[{"line_number":10523,"context_line":"        )"},{"line_number":10524,"context_line":""},{"line_number":10525,"context_line":"        if src_supports_native_luks:"},{"line_number":10526,"context_line":"            migrate_data.src_supports_native_luks \u003d True"},{"line_number":10527,"context_line":""},{"line_number":10528,"context_line":"        result \u003d drvr.pre_live_migration("},{"line_number":10529,"context_line":"            c, instance, vol, nw_info, None,"}],"source_content_type":"text/x-python","patch_set":15,"id":"7f96bb07_33cfba2a","line":10526,"updated":"2018-01-19 13:24:04.000000000","message":"This sets it to True. Other possible values are False (upgraded source doesn\u0027t support it), and None (source is not upgraded), but we\u0027re only testing None.\n\nMay I suggest you unconditionally set:\n\n  migrate_data.src_supports_native_luks \u003d src_supports_native_luks\n\nwhich is probably better done in the block above. Then you can have separate tests for None and False.\n\nI wouldn\u0027t block on this, btw, but it would be better imho.","commit_id":"8820f33c7f663a555d3e4fb91de5021aff444b57"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"dd689c9064c80cf189e23c78e2195a6d0cee1071","unresolved":false,"context_lines":[{"line_number":10523,"context_line":"        )"},{"line_number":10524,"context_line":""},{"line_number":10525,"context_line":"        if src_supports_native_luks:"},{"line_number":10526,"context_line":"            migrate_data.src_supports_native_luks \u003d True"},{"line_number":10527,"context_line":""},{"line_number":10528,"context_line":"        result \u003d drvr.pre_live_migration("},{"line_number":10529,"context_line":"            c, instance, vol, nw_info, None,"}],"source_content_type":"text/x-python","patch_set":15,"id":"7f96bb07_c8d82020","line":10526,"in_reply_to":"7f96bb07_33cfba2a","updated":"2018-01-19 13:40:15.000000000","message":"https://review.openstack.org/#/c/523958/15/nova/virt/libvirt/driver.py@6253 \n\nAs discussed, this currently defaults to True for \u003e\u003d Q src computes and it wouldn\u0027t be populated for P computes. Both tested above this.","commit_id":"8820f33c7f663a555d3e4fb91de5021aff444b57"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"2949d546aa3c50fe0405b9f1d86d41e341e324f5","unresolved":false,"context_lines":[{"line_number":10523,"context_line":"        )"},{"line_number":10524,"context_line":""},{"line_number":10525,"context_line":"        if src_supports_native_luks:"},{"line_number":10526,"context_line":"            migrate_data.src_supports_native_luks \u003d True"},{"line_number":10527,"context_line":""},{"line_number":10528,"context_line":"        result \u003d drvr.pre_live_migration("},{"line_number":10529,"context_line":"            c, instance, vol, nw_info, None,"}],"source_content_type":"text/x-python","patch_set":15,"id":"7f96bb07_a8c114e7","line":10526,"in_reply_to":"7f96bb07_c8d82020","updated":"2018-01-19 13:47:04.000000000","message":"I was remembering PS12, which in fairness was only 2 days ago :P\n\nYes, you\u0027re absolutely right.","commit_id":"8820f33c7f663a555d3e4fb91de5021aff444b57"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"569440006ae61b46e412fadcbc1eebe9f07eb043","unresolved":false,"context_lines":[{"line_number":6671,"context_line":"                                                             **encryption)"},{"line_number":6672,"context_line":""},{"line_number":6673,"context_line":"    @mock.patch.object(libvirt_driver.LibvirtDriver, \u0027_get_volume_encryptor\u0027)"},{"line_number":6674,"context_line":"    def test_disconect_volume_native_luks(self, mock_get_volume_encryptor):"},{"line_number":6675,"context_line":"        drvr \u003d libvirt_driver.LibvirtDriver(fake.FakeVirtAPI(), False)"},{"line_number":6676,"context_line":"        drvr._host \u003d mock.Mock()"},{"line_number":6677,"context_line":"        drvr._host.find_secret.return_value \u003d mock.Mock()"}],"source_content_type":"text/x-python","patch_set":17,"id":"7f96bb07_07da3116","line":6674,"range":{"start_line":6674,"start_character":13,"end_line":6674,"end_character":22},"updated":"2018-01-23 02:53:47.000000000","message":"disconnect","commit_id":"b840dfe6f20d98f6200cb37a0a30f3891aff046e"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"fb754dce8bdd1423ee4f73cbdb032b6be57c63b6","unresolved":false,"context_lines":[{"line_number":6671,"context_line":"                                                             **encryption)"},{"line_number":6672,"context_line":""},{"line_number":6673,"context_line":"    @mock.patch.object(libvirt_driver.LibvirtDriver, \u0027_get_volume_encryptor\u0027)"},{"line_number":6674,"context_line":"    def test_disconect_volume_native_luks(self, mock_get_volume_encryptor):"},{"line_number":6675,"context_line":"        drvr \u003d libvirt_driver.LibvirtDriver(fake.FakeVirtAPI(), False)"},{"line_number":6676,"context_line":"        drvr._host \u003d mock.Mock()"},{"line_number":6677,"context_line":"        drvr._host.find_secret.return_value \u003d mock.Mock()"}],"source_content_type":"text/x-python","patch_set":17,"id":"7f96bb07_ee2fd685","line":6674,"range":{"start_line":6674,"start_character":13,"end_line":6674,"end_character":22},"in_reply_to":"7f96bb07_07da3116","updated":"2018-01-23 10:53:46.000000000","message":"Done","commit_id":"b840dfe6f20d98f6200cb37a0a30f3891aff046e"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"569440006ae61b46e412fadcbc1eebe9f07eb043","unresolved":false,"context_lines":[{"line_number":7223,"context_line":"    @mock.patch.object(host.Host, \"has_min_version\")"},{"line_number":7224,"context_line":"    def test_use_native_luks(self, mock_has_min_version):"},{"line_number":7225,"context_line":"        drvr \u003d libvirt_driver.LibvirtDriver(fake.FakeVirtAPI(), False)"},{"line_number":7226,"context_line":"        # True only when the required QEMU and Libvirt versions are avialable"},{"line_number":7227,"context_line":"        # on the host and a valid LUKS provider is present within the"},{"line_number":7228,"context_line":"        # encryption metadata dict."},{"line_number":7229,"context_line":"        mock_has_min_version.return_value \u003d True"}],"source_content_type":"text/x-python","patch_set":17,"id":"7f96bb07_c705297c","line":7226,"range":{"start_line":7226,"start_character":68,"end_line":7226,"end_character":77},"updated":"2018-01-23 02:53:47.000000000","message":"available","commit_id":"b840dfe6f20d98f6200cb37a0a30f3891aff046e"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"fb754dce8bdd1423ee4f73cbdb032b6be57c63b6","unresolved":false,"context_lines":[{"line_number":7223,"context_line":"    @mock.patch.object(host.Host, \"has_min_version\")"},{"line_number":7224,"context_line":"    def test_use_native_luks(self, mock_has_min_version):"},{"line_number":7225,"context_line":"        drvr \u003d libvirt_driver.LibvirtDriver(fake.FakeVirtAPI(), False)"},{"line_number":7226,"context_line":"        # True only when the required QEMU and Libvirt versions are avialable"},{"line_number":7227,"context_line":"        # on the host and a valid LUKS provider is present within the"},{"line_number":7228,"context_line":"        # encryption metadata dict."},{"line_number":7229,"context_line":"        mock_has_min_version.return_value \u003d True"}],"source_content_type":"text/x-python","patch_set":17,"id":"7f96bb07_8e4c1277","line":7226,"range":{"start_line":7226,"start_character":68,"end_line":7226,"end_character":77},"in_reply_to":"7f96bb07_c705297c","updated":"2018-01-23 10:53:46.000000000","message":"Done","commit_id":"b840dfe6f20d98f6200cb37a0a30f3891aff046e"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"569440006ae61b46e412fadcbc1eebe9f07eb043","unresolved":false,"context_lines":[{"line_number":7243,"context_line":"            \u0027provider\u0027: encryptors.LUKS}))"},{"line_number":7244,"context_line":""},{"line_number":7245,"context_line":"        # Always False when the required QEMU and Libvirt versions are not"},{"line_number":7246,"context_line":"        # avilable on the host."},{"line_number":7247,"context_line":"        mock_has_min_version.return_value \u003d False"},{"line_number":7248,"context_line":"        self.assertFalse(drvr._use_native_luks({}))"},{"line_number":7249,"context_line":"        self.assertFalse(drvr._use_native_luks({"}],"source_content_type":"text/x-python","patch_set":17,"id":"7f96bb07_87ff2166","line":7246,"range":{"start_line":7246,"start_character":10,"end_line":7246,"end_character":18},"updated":"2018-01-23 02:53:47.000000000","message":"available","commit_id":"b840dfe6f20d98f6200cb37a0a30f3891aff046e"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"fb754dce8bdd1423ee4f73cbdb032b6be57c63b6","unresolved":false,"context_lines":[{"line_number":7243,"context_line":"            \u0027provider\u0027: encryptors.LUKS}))"},{"line_number":7244,"context_line":""},{"line_number":7245,"context_line":"        # Always False when the required QEMU and Libvirt versions are not"},{"line_number":7246,"context_line":"        # avilable on the host."},{"line_number":7247,"context_line":"        mock_has_min_version.return_value \u003d False"},{"line_number":7248,"context_line":"        self.assertFalse(drvr._use_native_luks({}))"},{"line_number":7249,"context_line":"        self.assertFalse(drvr._use_native_luks({"}],"source_content_type":"text/x-python","patch_set":17,"id":"7f96bb07_ae4f8e68","line":7246,"range":{"start_line":7246,"start_character":10,"end_line":7246,"end_character":18},"in_reply_to":"7f96bb07_87ff2166","updated":"2018-01-23 10:53:46.000000000","message":"Done","commit_id":"b840dfe6f20d98f6200cb37a0a30f3891aff046e"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"cfeecb8c2ab20c616d116ee8bdc85e2a7aea71ac","unresolved":false,"context_lines":[{"line_number":13,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":14,"context_line":"#    under the License."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"import binascii"},{"line_number":17,"context_line":"from collections import deque"},{"line_number":18,"context_line":"from collections import OrderedDict"},{"line_number":19,"context_line":"import contextlib"}],"source_content_type":"text/x-python","patch_set":18,"id":"7f96bb07_2f736db3","line":16,"range":{"start_line":16,"start_character":0,"end_line":16,"end_character":15},"updated":"2018-01-23 16:55:39.000000000","message":"I get the Python3 sweats each time I see this...","commit_id":"f8e24c33f8ee27e6e4a289bd705f3e12cacbcc20"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"b7dc0dd41411ddcae518f1edf6f52d468797c5de","unresolved":false,"context_lines":[{"line_number":13,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":14,"context_line":"#    under the License."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"import binascii"},{"line_number":17,"context_line":"from collections import deque"},{"line_number":18,"context_line":"from collections import OrderedDict"},{"line_number":19,"context_line":"import contextlib"}],"source_content_type":"text/x-python","patch_set":18,"id":"7f96bb07_f79b1b63","line":16,"range":{"start_line":16,"start_character":0,"end_line":16,"end_character":15},"in_reply_to":"7f96bb07_2f736db3","updated":"2018-01-23 18:22:27.000000000","message":"Heh.","commit_id":"f8e24c33f8ee27e6e4a289bd705f3e12cacbcc20"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"cfeecb8c2ab20c616d116ee8bdc85e2a7aea71ac","unresolved":false,"context_lines":[{"line_number":6603,"context_line":"    @mock.patch.object(libvirt_driver.LibvirtDriver, \u0027_get_volume_encryptor\u0027)"},{"line_number":6604,"context_line":"    @mock.patch(\u0027nova.virt.libvirt.host.Host\u0027)"},{"line_number":6605,"context_line":"    @mock.patch(\u0027os_brick.encryptors.luks.is_luks\u0027)"},{"line_number":6606,"context_line":"    def test_connect_volume_native_luks(self, mock_is_luks, mock_host,"},{"line_number":6607,"context_line":"            mock_get_volume_encryptor, mock_use_native_luks,"},{"line_number":6608,"context_line":"            mock_get_volume_encryption, mock_get_key_mgr):"},{"line_number":6609,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"7f96bb07_6f873563","line":6606,"range":{"start_line":6606,"start_character":8,"end_line":6606,"end_character":39},"updated":"2018-01-23 16:55:39.000000000","message":"Odd. We have no other tests for \u0027_connect_volume\u0027","commit_id":"f8e24c33f8ee27e6e4a289bd705f3e12cacbcc20"}],"nova/tests/unit/virt/libvirt/test_migration.py":[{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"dc1fbecaeffff10099c011b2f2def35a4c9cf13d","unresolved":false,"context_lines":[{"line_number":381,"context_line":"        doc \u003d etree.fromstring(xml)"},{"line_number":382,"context_line":"        res \u003d etree.tostring(migration._update_volume_xml("},{"line_number":383,"context_line":"            doc, data, get_volume_config), encoding\u003d\u0027unicode\u0027)"},{"line_number":384,"context_line":"        new_xml \u003d xml.replace(\u0027sdb\u0027,"},{"line_number":385,"context_line":"                              \u0027sdc\u0027)"},{"line_number":386,"context_line":"        self.assertThat(res, matchers.XMLMatches(new_xml))"},{"line_number":387,"context_line":""},{"line_number":388,"context_line":"    def test_update_perf_events_xml(self):"}],"source_content_type":"text/x-python","patch_set":15,"id":"7f96bb07_e543c5ae","line":385,"range":{"start_line":384,"start_character":0,"end_line":385,"end_character":36},"updated":"2018-01-19 13:24:04.000000000","message":"That\u0027s not right. This isn\u0027t something we would want to actually happen.\n\nI think this test wants to be asserting that we generated a new secret_uuid here, right? That is, xml above should contain secret_uuid_old, and migrate_data should contain secret_uuid_new. We should be asserting that after the transformation, secret_uuid_old has become secret_uuid_new.","commit_id":"8820f33c7f663a555d3e4fb91de5021aff444b57"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"dd689c9064c80cf189e23c78e2195a6d0cee1071","unresolved":false,"context_lines":[{"line_number":381,"context_line":"        doc \u003d etree.fromstring(xml)"},{"line_number":382,"context_line":"        res \u003d etree.tostring(migration._update_volume_xml("},{"line_number":383,"context_line":"            doc, data, get_volume_config), encoding\u003d\u0027unicode\u0027)"},{"line_number":384,"context_line":"        new_xml \u003d xml.replace(\u0027sdb\u0027,"},{"line_number":385,"context_line":"                              \u0027sdc\u0027)"},{"line_number":386,"context_line":"        self.assertThat(res, matchers.XMLMatches(new_xml))"},{"line_number":387,"context_line":""},{"line_number":388,"context_line":"    def test_update_perf_events_xml(self):"}],"source_content_type":"text/x-python","patch_set":15,"id":"7f96bb07_4897303c","line":385,"range":{"start_line":384,"start_character":0,"end_line":385,"end_character":36},"in_reply_to":"7f96bb07_e543c5ae","updated":"2018-01-19 13:40:15.000000000","message":"ACK, thanks, updated in the next PS.","commit_id":"8820f33c7f663a555d3e4fb91de5021aff444b57"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"15d171dd0f33867fd398ec0d961ceed53be6e42f","unresolved":false,"context_lines":[{"line_number":376,"context_line":"      \u003ctarget dev\u003d\u0027sdb\u0027 bus\u003d\u0027scsi\u0027/\u003e"},{"line_number":377,"context_line":"      \u003cserial\u003ed299a078-f0db-4993-bf03-f10fe44fd192\u003c/serial\u003e"},{"line_number":378,"context_line":"      \u003calias name\u003d\u0027scsi0-0-0-1\u0027/\u003e"},{"line_number":379,"context_line":"      \u003cencryption format\u003d\u0027luks\u0027\u003e"},{"line_number":380,"context_line":"        \u003csecret type\u003d\u0027passphrase\u0027 uuid\u003d\u0027%(encryption_secret_uuid)s\u0027/\u003e"},{"line_number":381,"context_line":"      \u003c/encryption\u003e"},{"line_number":382,"context_line":"      \u003caddress type\u003d\u0027drive\u0027 controller\u003d\u00270\u0027 bus\u003d\u00270\u0027 target\u003d\u00270\u0027 unit\u003d\u00271\u0027/\u003e"},{"line_number":383,"context_line":"    \u003c/disk\u003e"},{"line_number":384,"context_line":" \u003c/devices\u003e"}],"source_content_type":"text/x-python","patch_set":17,"id":"7f96bb07_cc8d8d32","line":381,"range":{"start_line":379,"start_character":0,"end_line":381,"end_character":19},"updated":"2018-01-19 17:42:23.000000000","message":"This is kinda hard to read. The difference between xml and new_xml is the addition of this text, but that\u0027s pretty hard to see.\n\nIf you respin this for any reason, could you at least add a comment pointing that out? Preferably compose the string obviously, e.g.:\n\ntemplate \u003d \"\"\"\n...\n    \u003calias name\u003d\u0027scsi0-0-0-1\u0027/\u003e%(encryption)s\n...\n\"\"\"\nxml \u003d template % {\u0027encryption\u0027: \u0027\u0027}\nnew_xml \u003d template  % {\u0027encryption\u0027: \"\"\"\n   \u003cencryption\u003e...\n\"\"\"\n\nOr whatever. Something which avoids playing spot the difference between 2 walls of text.","commit_id":"b840dfe6f20d98f6200cb37a0a30f3891aff046e"}],"nova/tests/unit/virt/libvirt/volume/test_volume.py":[{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"e986b53e7e261ca8df8911ec6016789818356d47","unresolved":false,"context_lines":[{"line_number":326,"context_line":"        self.assertEqual(\u0027passphrase\u0027, secret.attrib[\u0027type\u0027])"},{"line_number":327,"context_line":"        self.assertEqual(SECRET_UUID, secret.attrib[\u0027uuid\u0027])"},{"line_number":328,"context_line":""},{"line_number":329,"context_line":"        fake_host.find_secret.return_value \u003d None"},{"line_number":330,"context_line":"        conf \u003d libvirt_driver.get_config(connection_info, self.disk_info)"},{"line_number":331,"context_line":"        tree \u003d conf.format_dom()"},{"line_number":332,"context_line":"        self.assertIsNone(tree.find(\"encryption\"))"}],"source_content_type":"text/x-python","patch_set":11,"id":"7f96bb07_fc0c30ed","line":329,"updated":"2018-01-16 18:15:35.000000000","message":"nit: This is really a separate tests.","commit_id":"452ba083836fb973e751996870a427e7ec3529ba"}],"nova/virt/images.py":[{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"1cf7088db5dbf3afd35607b9b5853d05db6bd133","unresolved":false,"context_lines":[{"line_number":198,"context_line":"    \"\"\"Decode a dm-crypt style cipher specification string provided by Cinder"},{"line_number":199,"context_line":"    into a dict with values usable by QEMU."},{"line_number":200,"context_line":""},{"line_number":201,"context_line":"    The assumed format being cipher[:keycount]-chainmode-ivmode[:ivopts] as"},{"line_number":202,"context_line":"    documented under linux/Documentation/device-mapper/dm-crypt.txt in the"},{"line_number":203,"context_line":"    kernel source tree."},{"line_number":204,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"7f96bb07_a2f59acd","line":201,"range":{"start_line":201,"start_character":37,"end_line":201,"end_character":45},"updated":"2018-01-11 17:23:00.000000000","message":"keysize?","commit_id":"2321a86f43f7ea8765d9363c747f7252e68405d4"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"1cf7088db5dbf3afd35607b9b5853d05db6bd133","unresolved":false,"context_lines":[{"line_number":207,"context_line":"    `qemu-img create -f luks -o ?` will list all of the available options."},{"line_number":208,"context_line":"    \"\"\""},{"line_number":209,"context_line":"    cipher_alg, cipher_mode, ivgen_alg \u003d cipher_spec.split(\u0027-\u0027)"},{"line_number":210,"context_line":"    cipher_alg \u003d cipher_alg + \u0027-\u0027 + str(key_size)"},{"line_number":211,"context_line":""},{"line_number":212,"context_line":"    return {\u0027cipher_alg\u0027: cipher_alg,"},{"line_number":213,"context_line":"            \u0027cipher_mode\u0027: cipher_mode,"}],"source_content_type":"text/x-python","patch_set":6,"id":"7f96bb07_e2eba2ad","line":210,"updated":"2018-01-11 17:23:00.000000000","message":"How thorough does this need to be? Are you intentionally passing through optional \u0027keycount\u0027 and \u0027ivopts\u0027, for eg?","commit_id":"2321a86f43f7ea8765d9363c747f7252e68405d4"}],"nova/virt/libvirt/driver.py":[{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"1cf7088db5dbf3afd35607b9b5853d05db6bd133","unresolved":false,"context_lines":[{"line_number":1205,"context_line":"        # NOTE(lyarwood): Copy the current os-brick encryptor behaviour,"},{"line_number":1206,"context_line":"        # checking if a block device is already encrypted and format using the"},{"line_number":1207,"context_line":"        # original os-brick utility code if it is not."},{"line_number":1208,"context_line":"        if \u0027device_path\u0027 in connection_info[\u0027data\u0027]:"},{"line_number":1209,"context_line":"            root_helper \u003d utils.get_root_helper()"},{"line_number":1210,"context_line":"            if not luks_encryptor.is_luks(root_helper,"},{"line_number":1211,"context_line":"                    connection_info[\u0027data\u0027][\u0027device_path\u0027]):"}],"source_content_type":"text/x-python","patch_set":6,"id":"7f96bb07_e27162e2","line":1208,"updated":"2018-01-11 17:23:00.000000000","message":"Eww.","commit_id":"2321a86f43f7ea8765d9363c747f7252e68405d4"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"a8b70c3282f0c3b98d530c370d396fcd337a8fd1","unresolved":false,"context_lines":[{"line_number":1205,"context_line":"        # NOTE(lyarwood): Copy the current os-brick encryptor behaviour,"},{"line_number":1206,"context_line":"        # checking if a block device is already encrypted and format using the"},{"line_number":1207,"context_line":"        # original os-brick utility code if it is not."},{"line_number":1208,"context_line":"        if \u0027device_path\u0027 in connection_info[\u0027data\u0027]:"},{"line_number":1209,"context_line":"            root_helper \u003d utils.get_root_helper()"},{"line_number":1210,"context_line":"            if not luks_encryptor.is_luks(root_helper,"},{"line_number":1211,"context_line":"                    connection_info[\u0027data\u0027][\u0027device_path\u0027]):"}],"source_content_type":"text/x-python","patch_set":6,"id":"7f96bb07_abf6d58e","line":1208,"in_reply_to":"7f96bb07_e27162e2","updated":"2018-01-11 19:07:55.000000000","message":"Ewww but I\u0027m not sure I would add this to the bdm if that\u0027s what you are thinking.","commit_id":"2321a86f43f7ea8765d9363c747f7252e68405d4"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"1cf7088db5dbf3afd35607b9b5853d05db6bd133","unresolved":false,"context_lines":[{"line_number":1215,"context_line":"                                         cipher\u003dencryption[\u0027cipher\u0027],"},{"line_number":1216,"context_line":"                                         key_size\u003dencryption[\u0027key_size\u0027])"},{"line_number":1217,"context_line":""},{"line_number":1218,"context_line":"        if connection_info[\u0027driver_volume_type\u0027] \u003d\u003d \u0027rbd\u0027:"},{"line_number":1219,"context_line":"            # FIXME(lyarwood): pool and image should be provided by c-api/c-vol"},{"line_number":1220,"context_line":"            # within connection_info and not through splitting strings"},{"line_number":1221,"context_line":"            rbd_image_path \u003d connection_info[\u0027data\u0027][\u0027name\u0027]"}],"source_content_type":"text/x-python","patch_set":6,"id":"7f96bb07_a2211ab7","line":1218,"updated":"2018-01-11 17:23:00.000000000","message":"Eww.","commit_id":"2321a86f43f7ea8765d9363c747f7252e68405d4"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"1cf7088db5dbf3afd35607b9b5853d05db6bd133","unresolved":false,"context_lines":[{"line_number":1218,"context_line":"        if connection_info[\u0027driver_volume_type\u0027] \u003d\u003d \u0027rbd\u0027:"},{"line_number":1219,"context_line":"            # FIXME(lyarwood): pool and image should be provided by c-api/c-vol"},{"line_number":1220,"context_line":"            # within connection_info and not through splitting strings"},{"line_number":1221,"context_line":"            rbd_image_path \u003d connection_info[\u0027data\u0027][\u0027name\u0027]"},{"line_number":1222,"context_line":"            rbd_pool_name, rbd_image_name \u003d rbd_image_path.split(\u0027/\u0027)"},{"line_number":1223,"context_line":""},{"line_number":1224,"context_line":"            qemu_image_path \u003d \u0027rbd:\u0027 + rbd_image_path + \\"}],"source_content_type":"text/x-python","patch_set":6,"id":"7f96bb07_6256b22c","line":1221,"updated":"2018-01-11 17:23:00.000000000","message":"Eww","commit_id":"2321a86f43f7ea8765d9363c747f7252e68405d4"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"1cf7088db5dbf3afd35607b9b5853d05db6bd133","unresolved":false,"context_lines":[{"line_number":1232,"context_line":"                # supplied."},{"line_number":1233,"context_line":"                rbd \u003d rbd_utils.RBDDriver(rbd_pool_name, \u0027\u0027,"},{"line_number":1234,"context_line":"                                          CONF.libvirt.rbd_user)"},{"line_number":1235,"context_line":"                rbd.destroy_volume(rbd_image_name, rbd_pool_name)"},{"line_number":1236,"context_line":""},{"line_number":1237,"context_line":"                # NOTE(lyarwood): qemu-img doesn\u0027t understand the dm-crypt"},{"line_number":1238,"context_line":"                # style cipher specification string provided by Cinder so we"}],"source_content_type":"text/x-python","patch_set":6,"id":"7f96bb07_c521d0a1","line":1235,"updated":"2018-01-11 17:23:00.000000000","message":"Are we sure that cinder is cool with this? We\u0027re literally deleting and recreating a cinder volume without telling cinder about it.","commit_id":"2321a86f43f7ea8765d9363c747f7252e68405d4"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"a8b70c3282f0c3b98d530c370d396fcd337a8fd1","unresolved":false,"context_lines":[{"line_number":1232,"context_line":"                # supplied."},{"line_number":1233,"context_line":"                rbd \u003d rbd_utils.RBDDriver(rbd_pool_name, \u0027\u0027,"},{"line_number":1234,"context_line":"                                          CONF.libvirt.rbd_user)"},{"line_number":1235,"context_line":"                rbd.destroy_volume(rbd_image_name, rbd_pool_name)"},{"line_number":1236,"context_line":""},{"line_number":1237,"context_line":"                # NOTE(lyarwood): qemu-img doesn\u0027t understand the dm-crypt"},{"line_number":1238,"context_line":"                # style cipher specification string provided by Cinder so we"}],"source_content_type":"text/x-python","patch_set":6,"id":"7f96bb07_85f8a8c4","line":1235,"in_reply_to":"7f96bb07_c521d0a1","updated":"2018-01-11 19:07:55.000000000","message":"I really didn\u0027t want to do this in n-cpu but the cinder folks pushed back in the following bug on doing this in c-vol: https://bugs.launchpad.net/cinder/+bug/1739442\n\nI\u0027m going to remove this anyway and at least try to do this in c-vol as I\u0027ve already done for volume creation from images in I404070e2428cdf404b576d1d9da5b917f9be11d1","commit_id":"2321a86f43f7ea8765d9363c747f7252e68405d4"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"1cf7088db5dbf3afd35607b9b5853d05db6bd133","unresolved":false,"context_lines":[{"line_number":1249,"context_line":"                        f.write(passphrase)"},{"line_number":1250,"context_line":""},{"line_number":1251,"context_line":"                    nova.privsep.libvirt.qemu_img_create_luks(qemu_image_path,"},{"line_number":1252,"context_line":"                        qemu_info.virtual_size, passphrase_file, cipher_spec)"},{"line_number":1253,"context_line":""},{"line_number":1254,"context_line":"    def _get_volume_config(self, context, connection_info, disk_info,"},{"line_number":1255,"context_line":"                           encryption\u003dNone):"}],"source_content_type":"text/x-python","patch_set":6,"id":"7f96bb07_a53da4bc","line":1252,"updated":"2018-01-11 17:23:00.000000000","message":"If bad things happen at any point up to here we deleted a cinder volume and *didn\u0027t* recreate it, and didn\u0027t tell cinder about it.","commit_id":"2321a86f43f7ea8765d9363c747f7252e68405d4"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"a8b70c3282f0c3b98d530c370d396fcd337a8fd1","unresolved":false,"context_lines":[{"line_number":1249,"context_line":"                        f.write(passphrase)"},{"line_number":1250,"context_line":""},{"line_number":1251,"context_line":"                    nova.privsep.libvirt.qemu_img_create_luks(qemu_image_path,"},{"line_number":1252,"context_line":"                        qemu_info.virtual_size, passphrase_file, cipher_spec)"},{"line_number":1253,"context_line":""},{"line_number":1254,"context_line":"    def _get_volume_config(self, context, connection_info, disk_info,"},{"line_number":1255,"context_line":"                           encryption\u003dNone):"}],"source_content_type":"text/x-python","patch_set":6,"id":"7f96bb07_8b275913","line":1252,"in_reply_to":"7f96bb07_a53da4bc","updated":"2018-01-11 19:07:55.000000000","message":"Done","commit_id":"2321a86f43f7ea8765d9363c747f7252e68405d4"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"1cf7088db5dbf3afd35607b9b5853d05db6bd133","unresolved":false,"context_lines":[{"line_number":1270,"context_line":"            secret \u003d self._host.create_secret(\u0027volume\u0027,"},{"line_number":1271,"context_line":"                            connection_info[\u0027data\u0027][\u0027volume_id\u0027],"},{"line_number":1272,"context_line":"                            password\u003dpassphrase)"},{"line_number":1273,"context_line":"            connection_info[\u0027data\u0027][\u0027luks_secret_uuid\u0027] \u003d secret.UUIDString()"},{"line_number":1274,"context_line":""},{"line_number":1275,"context_line":"        conf \u003d vol_driver.get_config(connection_info, disk_info)"},{"line_number":1276,"context_line":"        self._set_cache_mode(conf)"}],"source_content_type":"text/x-python","patch_set":6,"id":"7f96bb07_628f92cc","line":1273,"updated":"2018-01-11 17:23:00.000000000","message":"...sigh.\n\nThis is becoming a pattern.","commit_id":"2321a86f43f7ea8765d9363c747f7252e68405d4"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"eb6b79d25a8f936e76df992801efa9525edd3648","unresolved":false,"context_lines":[{"line_number":1270,"context_line":"            secret \u003d self._host.create_secret(\u0027volume\u0027,"},{"line_number":1271,"context_line":"                            connection_info[\u0027data\u0027][\u0027volume_id\u0027],"},{"line_number":1272,"context_line":"                            password\u003dpassphrase)"},{"line_number":1273,"context_line":"            connection_info[\u0027data\u0027][\u0027luks_secret_uuid\u0027] \u003d secret.UUIDString()"},{"line_number":1274,"context_line":""},{"line_number":1275,"context_line":"        conf \u003d vol_driver.get_config(connection_info, disk_info)"},{"line_number":1276,"context_line":"        self._set_cache_mode(conf)"}],"source_content_type":"text/x-python","patch_set":6,"id":"7f96bb07_175fd9e2","line":1273,"in_reply_to":"7f96bb07_628f92cc","updated":"2018-01-12 09:28:52.000000000","message":"In at least swap_volume, it looks like we\u0027d end up writing this to the db. It\u0027s just the uuid of the secret though, so I guess it\u0027s not a big deal.","commit_id":"2321a86f43f7ea8765d9363c747f7252e68405d4"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"1cf7088db5dbf3afd35607b9b5853d05db6bd133","unresolved":false,"context_lines":[{"line_number":1302,"context_line":"        \"\"\""},{"line_number":1303,"context_line":"        if encryption is None:"},{"line_number":1304,"context_line":"            encryption \u003d self._get_volume_encryption(context, connection_info)"},{"line_number":1305,"context_line":"        if encryption and not self._use_native_luks(encryption):"},{"line_number":1306,"context_line":"            encryptor \u003d self._get_volume_encryptor(connection_info,"},{"line_number":1307,"context_line":"                                                   encryption)"},{"line_number":1308,"context_line":"            encryptor.attach_volume(context, **encryption)"}],"source_content_type":"text/x-python","patch_set":6,"id":"7f96bb07_a2003a36","line":1305,"updated":"2018-01-11 17:23:00.000000000","message":"nit: if you stuck this guard at the top you might save us a call to _get_volume_encryption().","commit_id":"2321a86f43f7ea8765d9363c747f7252e68405d4"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"1cf7088db5dbf3afd35607b9b5853d05db6bd133","unresolved":false,"context_lines":[{"line_number":1320,"context_line":"        # older instances to have their encryptors detached safely while new"},{"line_number":1321,"context_line":"        # instances using the new native encryption approach skip any attempt"},{"line_number":1322,"context_line":"        # to detach the older encryptors."},{"line_number":1323,"context_line":"        if connection_info.get(\u0027data\u0027, {}).get(\u0027volume_id\u0027):"},{"line_number":1324,"context_line":"            volume_id \u003d connection_info[\u0027data\u0027][\u0027volume_id\u0027]"},{"line_number":1325,"context_line":"            if self._host.find_secret(\u0027volume\u0027, volume_id):"},{"line_number":1326,"context_line":"                return self._host.delete_secret(\u0027volume\u0027, volume_id)"},{"line_number":1327,"context_line":""},{"line_number":1328,"context_line":"        if encryption is None:"}],"source_content_type":"text/x-python","patch_set":6,"id":"7f96bb07_02c7ae14","line":1325,"range":{"start_line":1323,"start_character":1,"end_line":1325,"end_character":1},"updated":"2018-01-11 17:23:00.000000000","message":"nit:\n\nvolume_id \u003d connection_info.get(\u0027data\u0027, {}).get(\u0027volume_id\u0027)\nif volume_id is not None and self._host.find_secret(\u0027volume\u0027, volume_id):\n  ...","commit_id":"2321a86f43f7ea8765d9363c747f7252e68405d4"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"1cf7088db5dbf3afd35607b9b5853d05db6bd133","unresolved":false,"context_lines":[{"line_number":1323,"context_line":"        if connection_info.get(\u0027data\u0027, {}).get(\u0027volume_id\u0027):"},{"line_number":1324,"context_line":"            volume_id \u003d connection_info[\u0027data\u0027][\u0027volume_id\u0027]"},{"line_number":1325,"context_line":"            if self._host.find_secret(\u0027volume\u0027, volume_id):"},{"line_number":1326,"context_line":"                return self._host.delete_secret(\u0027volume\u0027, volume_id)"},{"line_number":1327,"context_line":""},{"line_number":1328,"context_line":"        if encryption is None:"},{"line_number":1329,"context_line":"            encryption \u003d self._get_volume_encryption(context, connection_info)"}],"source_content_type":"text/x-python","patch_set":6,"id":"7f96bb07_e2d5e2ba","line":1326,"range":{"start_line":1326,"start_character":16,"end_line":1326,"end_character":22},"updated":"2018-01-11 17:23:00.000000000","message":"nit: Don\u0027t know what delete_secret returns, but we don\u0027t return any value in the other code path. Best not to return one here either, deliberately or otherwise.","commit_id":"2321a86f43f7ea8765d9363c747f7252e68405d4"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"1cf7088db5dbf3afd35607b9b5853d05db6bd133","unresolved":false,"context_lines":[{"line_number":1493,"context_line":"        # LibvirtConfigGuestDisk object it returns. We do not explicitly save"},{"line_number":1494,"context_line":"        # this to the BDM here as the upper compute swap_volume method will"},{"line_number":1495,"context_line":"        # eventually do this for us."},{"line_number":1496,"context_line":"        self._connect_volume(context, new_connection_info, instance)"},{"line_number":1497,"context_line":"        conf \u003d self._get_volume_config(new_connection_info, disk_info)"},{"line_number":1498,"context_line":"        if not conf.source_path:"},{"line_number":1499,"context_line":"            self._disconnect_volume(context, new_connection_info, instance)"}],"source_content_type":"text/x-python","patch_set":6,"id":"7f96bb07_82273e13","line":1496,"updated":"2018-01-11 17:23:00.000000000","message":"You could pass encryption in here and throughout given that you\u0027ve fetched it now.","commit_id":"2321a86f43f7ea8765d9363c747f7252e68405d4"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"28fc1e1b0147025f39f49b62e610239ef1f105fb","unresolved":false,"context_lines":[{"line_number":1261,"context_line":"        to determine if an attempt to detach the encryptor should be made."},{"line_number":1262,"context_line":"        \"\"\""},{"line_number":1263,"context_line":"        # NOTE(lyarwood): Only attempt to detach an encryptor if no volume"},{"line_number":1264,"context_line":"        # sercret is stored locally on the compute host indicating that the"},{"line_number":1265,"context_line":"        # volume has not been nativly decrypted by QEMU. This will allow any"},{"line_number":1266,"context_line":"        # older instances to have their encryptors detached safely while new"},{"line_number":1267,"context_line":"        # instances using the new native encryption approach skip any attempt"}],"source_content_type":"text/x-python","patch_set":8,"id":"7f96bb07_f7982d6b","line":1264,"range":{"start_line":1264,"start_character":10,"end_line":1264,"end_character":17},"updated":"2018-01-12 12:03:14.000000000","message":"secret","commit_id":"d9d3666456da2621e864182305985d8b031f97ae"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"28fc1e1b0147025f39f49b62e610239ef1f105fb","unresolved":false,"context_lines":[{"line_number":1262,"context_line":"        \"\"\""},{"line_number":1263,"context_line":"        # NOTE(lyarwood): Only attempt to detach an encryptor if no volume"},{"line_number":1264,"context_line":"        # sercret is stored locally on the compute host indicating that the"},{"line_number":1265,"context_line":"        # volume has not been nativly decrypted by QEMU. This will allow any"},{"line_number":1266,"context_line":"        # older instances to have their encryptors detached safely while new"},{"line_number":1267,"context_line":"        # instances using the new native encryption approach skip any attempt"},{"line_number":1268,"context_line":"        # to detach the older encryptors."}],"source_content_type":"text/x-python","patch_set":8,"id":"7f96bb07_37b8d5c6","line":1265,"range":{"start_line":1265,"start_character":30,"end_line":1265,"end_character":37},"updated":"2018-01-12 12:03:14.000000000","message":"natively","commit_id":"d9d3666456da2621e864182305985d8b031f97ae"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"28fc1e1b0147025f39f49b62e610239ef1f105fb","unresolved":false,"context_lines":[{"line_number":1414,"context_line":"                    new_connection_info, instance, mountpoint, resize_to):"},{"line_number":1415,"context_line":""},{"line_number":1416,"context_line":"        # NOTE(lyarwood): Native LUKS does not support blockdev operations."},{"line_number":1417,"context_line":"        # https://bugzilla.redhat.com/show_bug.cgi?id\u003d760547"},{"line_number":1418,"context_line":"        encryption \u003d self._get_volume_encryption(context, old_connection_info)"},{"line_number":1419,"context_line":"        if encryption and self._use_native_luks(encryption):"},{"line_number":1420,"context_line":"            raise NotImplementedError(_(\"Swap volume is not supported for\""}],"source_content_type":"text/x-python","patch_set":8,"id":"7f96bb07_f7134d65","line":1417,"range":{"start_line":1417,"start_character":10,"end_line":1417,"end_character":60},"updated":"2018-01-12 12:03:14.000000000","message":"Incidentally, this bug is almost entirely private. Having read it, can\u0027t see why.\n\nAlso, are you sure it\u0027s the right bug? Seems like it\u0027s about specifying a full blockdev chain. Is it maybe a catch-all for the -blockdev feature?","commit_id":"d9d3666456da2621e864182305985d8b031f97ae"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"b7a45498ffab36cf8ed6fe249e0da05f4c510eef","unresolved":false,"context_lines":[{"line_number":594,"context_line":"        return self._host.has_min_version(MIN_LIBVIRT_VIRTLOGD,"},{"line_number":595,"context_line":"                                          MIN_QEMU_VIRTLOGD)"},{"line_number":596,"context_line":""},{"line_number":597,"context_line":"    def _is_native_luks_available(self):"},{"line_number":598,"context_line":"        return self._host.has_min_version(MIN_LIBVIRT_LUKS_VERSION,"},{"line_number":599,"context_line":"                                          MIN_QEMU_LUKS_VERSION)"},{"line_number":600,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"7f96bb07_66ce4d2f","line":597,"updated":"2018-01-16 16:30:24.000000000","message":"Aside: Don\u0027t change anything in this patch because it would be inconsistent, but I understand these version checks result in a local rpc call from the libvirt library to the libvirt daemon. If so, that seems a touch heavyweight for something we potentially do quite a lot.\n\nNot for this patch, though... The code below is entirely appropriate currently regardless.","commit_id":"452ba083836fb973e751996870a427e7ec3529ba"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"655b1c2235ff00bef38ad13d0d9b016701b9f163","unresolved":false,"context_lines":[{"line_number":594,"context_line":"        return self._host.has_min_version(MIN_LIBVIRT_VIRTLOGD,"},{"line_number":595,"context_line":"                                          MIN_QEMU_VIRTLOGD)"},{"line_number":596,"context_line":""},{"line_number":597,"context_line":"    def _is_native_luks_available(self):"},{"line_number":598,"context_line":"        return self._host.has_min_version(MIN_LIBVIRT_LUKS_VERSION,"},{"line_number":599,"context_line":"                                          MIN_QEMU_LUKS_VERSION)"},{"line_number":600,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"7f96bb07_fc06701c","line":597,"in_reply_to":"7f96bb07_66ce4d2f","updated":"2018-01-17 10:30:06.000000000","message":"Agreed but given libvirtd is local to n-cpu here would caching really make any noticeable difference?","commit_id":"452ba083836fb973e751996870a427e7ec3529ba"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"4f9ba339def39307de7eb2b49450fb84d2a6c493","unresolved":false,"context_lines":[{"line_number":594,"context_line":"        return self._host.has_min_version(MIN_LIBVIRT_VIRTLOGD,"},{"line_number":595,"context_line":"                                          MIN_QEMU_VIRTLOGD)"},{"line_number":596,"context_line":""},{"line_number":597,"context_line":"    def _is_native_luks_available(self):"},{"line_number":598,"context_line":"        return self._host.has_min_version(MIN_LIBVIRT_LUKS_VERSION,"},{"line_number":599,"context_line":"                                          MIN_QEMU_LUKS_VERSION)"},{"line_number":600,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"7f96bb07_aa15da9d","line":597,"in_reply_to":"7f96bb07_fc06701c","updated":"2018-01-17 12:57:25.000000000","message":"Agreed, Amdahl\u0027s law would make this a very low priority for optimisation ;)","commit_id":"452ba083836fb973e751996870a427e7ec3529ba"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"b7a45498ffab36cf8ed6fe249e0da05f4c510eef","unresolved":false,"context_lines":[{"line_number":1253,"context_line":"            # FIXME(lyarwood): Remove this once c-vol correctly formats"},{"line_number":1254,"context_line":"            # encrypted volumes during their initial creation:"},{"line_number":1255,"context_line":"            # https://bugs.launchpad.net/cinder/+bug/1739442"},{"line_number":1256,"context_line":"            device_path \u003d connection_info.get(\u0027data\u0027, {}).get(\u0027device_path\u0027)"},{"line_number":1257,"context_line":"            if device_path:"},{"line_number":1258,"context_line":"                root_helper \u003d utils.get_root_helper()"},{"line_number":1259,"context_line":"                if not luks_encryptor.is_luks(root_helper, device_path):"}],"source_content_type":"text/x-python","patch_set":11,"id":"7f96bb07_66064d20","line":1256,"updated":"2018-01-16 16:30:24.000000000","message":"It\u0027s obvious to you and me, at least while we have the context cached, but I wonder if it\u0027s worth pointing out explicitly that this won\u0027t touch RBD volumes, and we\u0027re relying on c-vol to do that.","commit_id":"452ba083836fb973e751996870a427e7ec3529ba"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"655b1c2235ff00bef38ad13d0d9b016701b9f163","unresolved":false,"context_lines":[{"line_number":1253,"context_line":"            # FIXME(lyarwood): Remove this once c-vol correctly formats"},{"line_number":1254,"context_line":"            # encrypted volumes during their initial creation:"},{"line_number":1255,"context_line":"            # https://bugs.launchpad.net/cinder/+bug/1739442"},{"line_number":1256,"context_line":"            device_path \u003d connection_info.get(\u0027data\u0027, {}).get(\u0027device_path\u0027)"},{"line_number":1257,"context_line":"            if device_path:"},{"line_number":1258,"context_line":"                root_helper \u003d utils.get_root_helper()"},{"line_number":1259,"context_line":"                if not luks_encryptor.is_luks(root_helper, device_path):"}],"source_content_type":"text/x-python","patch_set":11,"id":"7f96bb07_bc146845","line":1256,"in_reply_to":"7f96bb07_66064d20","updated":"2018-01-17 10:30:06.000000000","message":"ACK, I\u0027ll spell this out more in the respin.","commit_id":"452ba083836fb973e751996870a427e7ec3529ba"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"b7a45498ffab36cf8ed6fe249e0da05f4c510eef","unresolved":false,"context_lines":[{"line_number":1281,"context_line":"        If native LUKS decryption is enabled then delete previously created"},{"line_number":1282,"context_line":"        Libvirt volume secret from the host."},{"line_number":1283,"context_line":"        \"\"\""},{"line_number":1284,"context_line":"        volume_id \u003d connection_info.get(\u0027data\u0027, {}).get(\u0027volume_id\u0027)"},{"line_number":1285,"context_line":"        if volume_id and self._host.find_secret(\u0027volume\u0027, volume_id):"},{"line_number":1286,"context_line":"            return self._host.delete_secret(\u0027volume\u0027, volume_id)"},{"line_number":1287,"context_line":"        if encryption is None:"}],"source_content_type":"text/x-python","patch_set":11,"id":"7f96bb07_f9da0249","line":1284,"updated":"2018-01-16 16:30:24.000000000","message":"TODO: If we passed volume_id in, which we can because we always know volume_id when connecting a volume, we wouldn\u0027t have to look in connection_info.","commit_id":"452ba083836fb973e751996870a427e7ec3529ba"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"1e53badd36beaff34a4035d507a2f99e278eaedd","unresolved":false,"context_lines":[{"line_number":1237,"context_line":"            encryption \u003d self._get_volume_encryption(context, connection_info)"},{"line_number":1238,"context_line":""},{"line_number":1239,"context_line":"        if encryption and \\"},{"line_number":1240,"context_line":"            (allow_native_luks and self._use_native_luks(encryption)):"},{"line_number":1241,"context_line":"            # NOTE(lyarwood): Fetch the associated key for the volume and"},{"line_number":1242,"context_line":"            # decode the passphrase from the key."},{"line_number":1243,"context_line":"            # FIXME(lyarwood): c-vol currently creates symmetric keys for use"}],"source_content_type":"text/x-python","patch_set":12,"id":"7f96bb07_8048fd86","line":1240,"range":{"start_line":1240,"start_character":12,"end_line":1240,"end_character":69},"updated":"2018-01-17 14:21:51.000000000","message":"You can lose a pair of parens here.","commit_id":"cdd0ae0fe2a6107a62a904624dd61f10879ea45e"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"1e53badd36beaff34a4035d507a2f99e278eaedd","unresolved":false,"context_lines":[{"line_number":7120,"context_line":"            # where an instance has encrypted volumes attached using the"},{"line_number":7121,"context_line":"            # os-brick encryptors. Do not attempt to attach the encrypted"},{"line_number":7122,"context_line":"            # volume using native LUKS decryption on the destionation."},{"line_number":7123,"context_line":"            if migrate_data.is_native_luks_available is None:"},{"line_number":7124,"context_line":"                self._connect_volume(context, connection_info, instance,"},{"line_number":7125,"context_line":"                    allow_native_luks\u003dFalse)"},{"line_number":7126,"context_line":"            else:"},{"line_number":7127,"context_line":"                self._connect_volume(context, connection_info, instance)"},{"line_number":7128,"context_line":""},{"line_number":7129,"context_line":"        # We call plug_vifs before the compute manager calls"},{"line_number":7130,"context_line":"        # ensure_filtering_rules_for_instance, to ensure bridge is set up"}],"source_content_type":"text/x-python","patch_set":12,"id":"7f96bb07_7bb806e4","line":7127,"range":{"start_line":7123,"start_character":0,"end_line":7127,"end_character":72},"updated":"2018-01-17 14:21:51.000000000","message":"Suggestion:\n\nallow_native_luks \u003d migrate_data.is_native_luks_available or False\nself._connect_volume(context, connection_info, instance, allow_native_luks\u003dallow_native_luks)\n\nSuggestion 2:\n\nAppreciate it\u0027s what the code does already, but it seems weird to iterate over block_device_mapping twice in the same function. You could reasonably move this into the other loop if you felt so inclined.","commit_id":"cdd0ae0fe2a6107a62a904624dd61f10879ea45e"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"1e53badd36beaff34a4035d507a2f99e278eaedd","unresolved":false,"context_lines":[{"line_number":7125,"context_line":"                    allow_native_luks\u003dFalse)"},{"line_number":7126,"context_line":"            else:"},{"line_number":7127,"context_line":"                self._connect_volume(context, connection_info, instance)"},{"line_number":7128,"context_line":""},{"line_number":7129,"context_line":"        # We call plug_vifs before the compute manager calls"},{"line_number":7130,"context_line":"        # ensure_filtering_rules_for_instance, to ensure bridge is set up"},{"line_number":7131,"context_line":"        # Retry operation is necessary because continuously request comes,"}],"source_content_type":"text/x-python","patch_set":12,"id":"7f96bb07_d6600fd2","line":7128,"updated":"2018-01-17 14:21:51.000000000","message":"Reviewers note:\n\nThis executes on the destination, which means the destination has been upgraded. allow_native_luks was set on the source if the source has been upgraded.\n\ni.e. We\u0027re only configuring native encryption if both the source and destination support it.","commit_id":"cdd0ae0fe2a6107a62a904624dd61f10879ea45e"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"1e53badd36beaff34a4035d507a2f99e278eaedd","unresolved":false,"context_lines":[{"line_number":7184,"context_line":"                volume_id \u003d connection_info.get(\u0027volume_id\u0027)"},{"line_number":7185,"context_line":"                volume_secret \u003d self._host.find_secret(\u0027volume\u0027, volume_id)"},{"line_number":7186,"context_line":"                if volume_secret:"},{"line_number":7187,"context_line":"                    bdmi.secret_uuid \u003d volume_secret.UUIDString()"},{"line_number":7188,"context_line":""},{"line_number":7189,"context_line":"                migrate_data.bdms.append(bdmi)"},{"line_number":7190,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"7f96bb07_7b024671","line":7187,"updated":"2018-01-17 14:21:51.000000000","message":"Nice.\n\nAside: I wonder why we don\u0027t just generate new XML here and send it back, doing no further processing on the source.","commit_id":"cdd0ae0fe2a6107a62a904624dd61f10879ea45e"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"b89700d7fa6b28a3e819df02b85522e13c3615ad","unresolved":false,"context_lines":[{"line_number":1266,"context_line":"            encryption \u003d self._get_volume_encryption(context, connection_info)"},{"line_number":1267,"context_line":""},{"line_number":1268,"context_line":"        if encryption and allow_native_luks and \\"},{"line_number":1269,"context_line":"                self._use_native_luks(encryption):"},{"line_number":1270,"context_line":"            # NOTE(lyarwood): Fetch the associated key for the volume and"},{"line_number":1271,"context_line":"            # decode the passphrase from the key."},{"line_number":1272,"context_line":"            # FIXME(lyarwood): c-vol currently creates symmetric keys for use"}],"source_content_type":"text/x-python","patch_set":15,"id":"7f96bb07_c8190023","line":1269,"updated":"2018-01-19 13:44:09.000000000","message":"nit: You could add some parens here :D","commit_id":"8820f33c7f663a555d3e4fb91de5021aff444b57"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"b89700d7fa6b28a3e819df02b85522e13c3615ad","unresolved":false,"context_lines":[{"line_number":6138,"context_line":"        if disk_over_commit is not None:"},{"line_number":6139,"context_line":"            data.disk_over_commit \u003d disk_over_commit"},{"line_number":6140,"context_line":"        data.disk_available_mb \u003d disk_available_mb"},{"line_number":6141,"context_line":""},{"line_number":6142,"context_line":"        return data"},{"line_number":6143,"context_line":""},{"line_number":6144,"context_line":"    def cleanup_live_migration_destination_check(self, context,"}],"source_content_type":"text/x-python","patch_set":15,"id":"7f96bb07_88ee9889","line":6141,"updated":"2018-01-19 13:44:09.000000000","message":"nit: unrelated whitespace damage","commit_id":"8820f33c7f663a555d3e4fb91de5021aff444b57"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"c15e5c2c4e17435a0b216f70f5cf631f6f2c5432","unresolved":false,"context_lines":[{"line_number":7153,"context_line":"            # os-brick encryptors. Do not attempt to attach the encrypted"},{"line_number":7154,"context_line":"            # volume using native LUKS decryption on the destionation."},{"line_number":7155,"context_line":"            src_native_luks \u003d False"},{"line_number":7156,"context_line":"            if hasattr(migrate_data, \u0027src_supports_native_luks\u0027):"},{"line_number":7157,"context_line":"                src_native_luks \u003d migrate_data.src_supports_native_luks"},{"line_number":7158,"context_line":"            dest_native_luks \u003d self._is_native_luks_available()"},{"line_number":7159,"context_line":"            allow_native_luks \u003d src_native_luks and dest_native_luks"},{"line_number":7160,"context_line":"            self._connect_volume(context, connection_info, instance,"},{"line_number":7161,"context_line":"                                 allow_native_luks\u003dallow_native_luks)"}],"source_content_type":"text/x-python","patch_set":16,"id":"7f96bb07_6c3f9987","line":7158,"range":{"start_line":7156,"start_character":0,"end_line":7158,"end_character":1},"updated":"2018-01-19 17:25:07.000000000","message":"As discussed on IRC, this how I fixed this:\n\n# Stepping around an OVO bug with python 3:\n# https://bugs.launchpad.net/oslo.versionedobjects/+bug/1552927\nif migrate_data.obj_attr_is_set(\u0027src_supports_native_luks\u0027):\n    src_native_luks \u003d migrate_data.src_supports_native_luks","commit_id":"6bc9a39b9ee0b929316861a1f8ce25fcc00b3185"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"569440006ae61b46e412fadcbc1eebe9f07eb043","unresolved":false,"context_lines":[{"line_number":1312,"context_line":"        Libvirt volume secret from the host."},{"line_number":1313,"context_line":"        \"\"\""},{"line_number":1314,"context_line":"        volume_id \u003d connection_info.get(\u0027data\u0027, {}).get(\u0027volume_id\u0027)"},{"line_number":1315,"context_line":"        if volume_id and self._host.find_secret(\u0027volume\u0027, volume_id):"},{"line_number":1316,"context_line":"            return self._host.delete_secret(\u0027volume\u0027, volume_id)"},{"line_number":1317,"context_line":"        if encryption is None:"},{"line_number":1318,"context_line":"            encryption \u003d self._get_volume_encryption(context, connection_info)"}],"source_content_type":"text/x-python","patch_set":17,"id":"7f96bb07_a79b3d64","line":1315,"range":{"start_line":1315,"start_character":58,"end_line":1315,"end_character":67},"updated":"2018-01-23 02:53:47.000000000","message":"Do we want to call find_secret at all if volume_id is None from L1314?","commit_id":"b840dfe6f20d98f6200cb37a0a30f3891aff046e"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"412c4ba7ce721026a9099a84e6890f69abb7418a","unresolved":false,"context_lines":[{"line_number":1312,"context_line":"        Libvirt volume secret from the host."},{"line_number":1313,"context_line":"        \"\"\""},{"line_number":1314,"context_line":"        volume_id \u003d connection_info.get(\u0027data\u0027, {}).get(\u0027volume_id\u0027)"},{"line_number":1315,"context_line":"        if volume_id and self._host.find_secret(\u0027volume\u0027, volume_id):"},{"line_number":1316,"context_line":"            return self._host.delete_secret(\u0027volume\u0027, volume_id)"},{"line_number":1317,"context_line":"        if encryption is None:"},{"line_number":1318,"context_line":"            encryption \u003d self._get_volume_encryption(context, connection_info)"}],"source_content_type":"text/x-python","patch_set":17,"id":"7f96bb07_ab9780eb","line":1315,"range":{"start_line":1315,"start_character":58,"end_line":1315,"end_character":67},"in_reply_to":"7f96bb07_a79b3d64","updated":"2018-01-23 10:06:02.000000000","message":"We\u0027re checking that at the beginning of the test.\n\nAside: I\u0027ve mentioned this before, but it would be really nice to pass volume_id in from the caller context rather than pulling it out of connection_info. Another patch, though.","commit_id":"b840dfe6f20d98f6200cb37a0a30f3891aff046e"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"15d171dd0f33867fd398ec0d961ceed53be6e42f","unresolved":false,"context_lines":[{"line_number":1456,"context_line":"    def swap_volume(self, context, old_connection_info,"},{"line_number":1457,"context_line":"                    new_connection_info, instance, mountpoint, resize_to):"},{"line_number":1458,"context_line":""},{"line_number":1459,"context_line":"        # NOTE(lyarwood): https://bugzilla.redhat.com/show_bug.cgi?id\u003d760547"},{"line_number":1460,"context_line":"        encryption \u003d self._get_volume_encryption(context, old_connection_info)"},{"line_number":1461,"context_line":"        if encryption and self._use_native_luks(encryption):"},{"line_number":1462,"context_line":"            raise NotImplementedError(_(\"Swap volume is not supported for\""}],"source_content_type":"text/x-python","patch_set":17,"id":"7f96bb07_0c44d5b6","line":1459,"updated":"2018-01-19 17:42:23.000000000","message":"Thanks! It\u0027s still over-private, but that\u0027s not our fault and a link is better than no link.","commit_id":"b840dfe6f20d98f6200cb37a0a30f3891aff046e"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"569440006ae61b46e412fadcbc1eebe9f07eb043","unresolved":false,"context_lines":[{"line_number":7215,"context_line":"                bdmi.format \u003d disk_info.get(\u0027format\u0027)"},{"line_number":7216,"context_line":"                bdmi.boot_index \u003d disk_info.get(\u0027boot_index\u0027)"},{"line_number":7217,"context_line":"                volume_id \u003d connection_info.get(\u0027volume_id\u0027)"},{"line_number":7218,"context_line":"                volume_secret \u003d self._host.find_secret(\u0027volume\u0027, volume_id)"},{"line_number":7219,"context_line":"                if volume_secret:"},{"line_number":7220,"context_line":"                    bdmi.encryption_secret_uuid \u003d volume_secret.UUIDString()"},{"line_number":7221,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"7f96bb07_87b161e4","line":7218,"range":{"start_line":7218,"start_character":65,"end_line":7218,"end_character":74},"updated":"2018-01-23 02:53:47.000000000","message":"Same here, do we want to call find_secret if volume_id is None from L7217?","commit_id":"b840dfe6f20d98f6200cb37a0a30f3891aff046e"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"fb754dce8bdd1423ee4f73cbdb032b6be57c63b6","unresolved":false,"context_lines":[{"line_number":7215,"context_line":"                bdmi.format \u003d disk_info.get(\u0027format\u0027)"},{"line_number":7216,"context_line":"                bdmi.boot_index \u003d disk_info.get(\u0027boot_index\u0027)"},{"line_number":7217,"context_line":"                volume_id \u003d connection_info.get(\u0027volume_id\u0027)"},{"line_number":7218,"context_line":"                volume_secret \u003d self._host.find_secret(\u0027volume\u0027, volume_id)"},{"line_number":7219,"context_line":"                if volume_secret:"},{"line_number":7220,"context_line":"                    bdmi.encryption_secret_uuid \u003d volume_secret.UUIDString()"},{"line_number":7221,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"7f96bb07_ee16f649","line":7218,"range":{"start_line":7218,"start_character":65,"end_line":7218,"end_character":74},"in_reply_to":"7f96bb07_87b161e4","updated":"2018-01-23 10:53:46.000000000","message":"Done","commit_id":"b840dfe6f20d98f6200cb37a0a30f3891aff046e"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"412c4ba7ce721026a9099a84e6890f69abb7418a","unresolved":false,"context_lines":[{"line_number":7215,"context_line":"                bdmi.format \u003d disk_info.get(\u0027format\u0027)"},{"line_number":7216,"context_line":"                bdmi.boot_index \u003d disk_info.get(\u0027boot_index\u0027)"},{"line_number":7217,"context_line":"                volume_id \u003d connection_info.get(\u0027volume_id\u0027)"},{"line_number":7218,"context_line":"                volume_secret \u003d self._host.find_secret(\u0027volume\u0027, volume_id)"},{"line_number":7219,"context_line":"                if volume_secret:"},{"line_number":7220,"context_line":"                    bdmi.encryption_secret_uuid \u003d volume_secret.UUIDString()"},{"line_number":7221,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"7f96bb07_8e9ad2c2","line":7218,"range":{"start_line":7218,"start_character":65,"end_line":7218,"end_character":74},"in_reply_to":"7f96bb07_87b161e4","updated":"2018-01-23 10:06:02.000000000","message":"It\u0027s never going to be None unless we\u0027ve made bad assumptions about connection_info, which would bite us elsewhere. As mentioned above, we should be looking to avoid inspecting connection_info wherever possible.\n\nHowever, it would be better here to pull volume_id out of the bdm instead, as we\u0027re in that loop.\n\nAside: I really need to rename \u0027block_device_info_get_mapping\u0027 to \u0027block_device_info_get_volumes\u0027, as the former continues to be confusing as hell, even though I know it\u0027s misnamed.","commit_id":"b840dfe6f20d98f6200cb37a0a30f3891aff046e"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"569440006ae61b46e412fadcbc1eebe9f07eb043","unresolved":false,"context_lines":[{"line_number":7221,"context_line":""},{"line_number":7222,"context_line":"                migrate_data.bdms.append(bdmi)"},{"line_number":7223,"context_line":""},{"line_number":7224,"context_line":"        return migrate_data"},{"line_number":7225,"context_line":""},{"line_number":7226,"context_line":"    def _try_fetch_image_cache(self, image, fetch_func, context, filename,"},{"line_number":7227,"context_line":"                               image_id, instance, size,"}],"source_content_type":"text/x-python","patch_set":17,"id":"7f96bb07_87b5e1f0","line":7224,"updated":"2018-01-23 02:53:47.000000000","message":"Aside: this function is crazy long and could probably benefit from some refactoring into smaller helper functions.","commit_id":"b840dfe6f20d98f6200cb37a0a30f3891aff046e"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"fb754dce8bdd1423ee4f73cbdb032b6be57c63b6","unresolved":false,"context_lines":[{"line_number":7221,"context_line":""},{"line_number":7222,"context_line":"                migrate_data.bdms.append(bdmi)"},{"line_number":7223,"context_line":""},{"line_number":7224,"context_line":"        return migrate_data"},{"line_number":7225,"context_line":""},{"line_number":7226,"context_line":"    def _try_fetch_image_cache(self, image, fetch_func, context, filename,"},{"line_number":7227,"context_line":"                               image_id, instance, size,"}],"source_content_type":"text/x-python","patch_set":17,"id":"7f96bb07_0e3b22d1","line":7224,"in_reply_to":"7f96bb07_87b5e1f0","updated":"2018-01-23 10:53:46.000000000","message":"Agreed, I\u0027ll make a note to revisit during R.","commit_id":"b840dfe6f20d98f6200cb37a0a30f3891aff046e"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"e141a072b9ee375ca43b91782aac99a4765f7568","unresolved":false,"context_lines":[{"line_number":7390,"context_line":"                bdmi.boot_index \u003d disk_info.get(\u0027boot_index\u0027)"},{"line_number":7391,"context_line":"                volume_id \u003d connection_info.get(\u0027volume_id\u0027)"},{"line_number":7392,"context_line":"                volume_secret \u003d None"},{"line_number":7393,"context_line":"                if volume_id:"},{"line_number":7394,"context_line":"                    volume_secret \u003d self._host.find_secret(\u0027volume\u0027, volume_id)"},{"line_number":7395,"context_line":"                if volume_secret:"},{"line_number":7396,"context_line":"                    bdmi.encryption_secret_uuid \u003d volume_secret.UUIDString()"},{"line_number":7397,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"5f93b717_d7e9bae2","line":7394,"range":{"start_line":7393,"start_character":16,"end_line":7394,"end_character":79},"updated":"2018-02-02 14:27:43.000000000","message":"There is no test for this.","commit_id":"f8e24c33f8ee27e6e4a289bd705f3e12cacbcc20"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"b2fdd112d9fa9bdde0cc01c7deb8b07ff2f2be34","unresolved":false,"context_lines":[{"line_number":7392,"context_line":"                volume_secret \u003d None"},{"line_number":7393,"context_line":"                if volume_id:"},{"line_number":7394,"context_line":"                    volume_secret \u003d self._host.find_secret(\u0027volume\u0027, volume_id)"},{"line_number":7395,"context_line":"                if volume_secret:"},{"line_number":7396,"context_line":"                    bdmi.encryption_secret_uuid \u003d volume_secret.UUIDString()"},{"line_number":7397,"context_line":""},{"line_number":7398,"context_line":"                migrate_data.bdms.append(bdmi)"},{"line_number":7399,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"7f96bb07_ba902897","line":7396,"range":{"start_line":7395,"start_character":0,"end_line":7396,"end_character":76},"updated":"2018-01-23 13:25:20.000000000","message":"nit: This could be indented to join the block above.","commit_id":"f8e24c33f8ee27e6e4a289bd705f3e12cacbcc20"}],"nova/virt/libvirt/migration.py":[{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"1e53badd36beaff34a4035d507a2f99e278eaedd","unresolved":false,"context_lines":[{"line_number":150,"context_line":"        conf \u003d get_volume_config("},{"line_number":151,"context_line":"            bdm_info.connection_info, bdm_info.as_disk_info())"},{"line_number":152,"context_line":""},{"line_number":153,"context_line":"        if bdm_info.secret_uuid:"},{"line_number":154,"context_line":"            conf.encryption \u003d vconfig.LibvirtConfigGuestDiskEncryption()"},{"line_number":155,"context_line":"            conf.encryption.format \u003d \u0027luks\u0027"},{"line_number":156,"context_line":"            secret \u003d vconfig.LibvirtConfigGuestDiskEncryptionSecret()"}],"source_content_type":"text/x-python","patch_set":12,"id":"7f96bb07_db56fa2a","line":153,"updated":"2018-01-17 14:21:51.000000000","message":"Reviewers note:\n\nThis generates the destination xml, but it executes on the source, which means the source is upgraded. bdm_info.secret_uuid is set by the destination, but only if it has been upgraded.\n\ni.e. We\u0027re only adding native encryption to the destination xml if both the source and destination support it.","commit_id":"cdd0ae0fe2a6107a62a904624dd61f10879ea45e"}],"nova/virt/libvirt/volume/volume.py":[{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"1cf7088db5dbf3afd35607b9b5853d05db6bd133","unresolved":false,"context_lines":[{"line_number":104,"context_line":"                # specified."},{"line_number":105,"context_line":"                conf.device_addr.unit \u003d disk_info[\u0027unit\u0027]"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"        if \u0027luks_secret_uuid\u0027 in connection_info[\u0027data\u0027]:"},{"line_number":108,"context_line":"            conf.encryption \u003d vconfig.LibvirtConfigGuestDiskEncryption()"},{"line_number":109,"context_line":"            secret \u003d vconfig.LibvirtConfigGuestDiskEncryptionSecret()"},{"line_number":110,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"7f96bb07_0206ce87","line":107,"updated":"2018-01-11 17:23:00.000000000","message":"Not necessarily today, but could we have something in os-brick which fetches this for us?","commit_id":"2321a86f43f7ea8765d9363c747f7252e68405d4"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"28fc1e1b0147025f39f49b62e610239ef1f105fb","unresolved":false,"context_lines":[{"line_number":104,"context_line":"                # specified."},{"line_number":105,"context_line":"                conf.device_addr.unit \u003d disk_info[\u0027unit\u0027]"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"        volume_id \u003d connection_info.get(\u0027data\u0027, {}).get(\u0027volume_id\u0027, None)"},{"line_number":108,"context_line":"        libvirt_secret \u003d self.host.find_secret(\u0027volume\u0027, volume_id)"},{"line_number":109,"context_line":"        if libvirt_secret:"},{"line_number":110,"context_line":"            conf.encryption \u003d vconfig.LibvirtConfigGuestDiskEncryption()"}],"source_content_type":"text/x-python","patch_set":8,"id":"7f96bb07_17bb59e2","line":107,"range":{"start_line":107,"start_character":67,"end_line":107,"end_character":73},"updated":"2018-01-12 12:03:14.000000000","message":"super-nit: None is the default, usually omitted.","commit_id":"d9d3666456da2621e864182305985d8b031f97ae"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"569440006ae61b46e412fadcbc1eebe9f07eb043","unresolved":false,"context_lines":[{"line_number":110,"context_line":"            conf.shareable \u003d True"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"        volume_id \u003d connection_info.get(\u0027data\u0027, {}).get(\u0027volume_id\u0027, None)"},{"line_number":113,"context_line":"        libvirt_secret \u003d self.host.find_secret(\u0027volume\u0027, volume_id)"},{"line_number":114,"context_line":"        if libvirt_secret:"},{"line_number":115,"context_line":"            conf.encryption \u003d vconfig.LibvirtConfigGuestDiskEncryption()"},{"line_number":116,"context_line":"            secret \u003d vconfig.LibvirtConfigGuestDiskEncryptionSecret()"}],"source_content_type":"text/x-python","patch_set":17,"id":"7f96bb07_0777913c","line":113,"range":{"start_line":113,"start_character":57,"end_line":113,"end_character":66},"updated":"2018-01-23 02:53:47.000000000","message":"Do we really want to call find_secret at all if volume_id is None from L112?","commit_id":"b840dfe6f20d98f6200cb37a0a30f3891aff046e"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"fb754dce8bdd1423ee4f73cbdb032b6be57c63b6","unresolved":false,"context_lines":[{"line_number":110,"context_line":"            conf.shareable \u003d True"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"        volume_id \u003d connection_info.get(\u0027data\u0027, {}).get(\u0027volume_id\u0027, None)"},{"line_number":113,"context_line":"        libvirt_secret \u003d self.host.find_secret(\u0027volume\u0027, volume_id)"},{"line_number":114,"context_line":"        if libvirt_secret:"},{"line_number":115,"context_line":"            conf.encryption \u003d vconfig.LibvirtConfigGuestDiskEncryption()"},{"line_number":116,"context_line":"            secret \u003d vconfig.LibvirtConfigGuestDiskEncryptionSecret()"}],"source_content_type":"text/x-python","patch_set":17,"id":"7f96bb07_ce1bfa70","line":113,"range":{"start_line":113,"start_character":57,"end_line":113,"end_character":66},"in_reply_to":"7f96bb07_0777913c","updated":"2018-01-23 10:53:46.000000000","message":"Done","commit_id":"b840dfe6f20d98f6200cb37a0a30f3891aff046e"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"412c4ba7ce721026a9099a84e6890f69abb7418a","unresolved":false,"context_lines":[{"line_number":110,"context_line":"            conf.shareable \u003d True"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"        volume_id \u003d connection_info.get(\u0027data\u0027, {}).get(\u0027volume_id\u0027, None)"},{"line_number":113,"context_line":"        libvirt_secret \u003d self.host.find_secret(\u0027volume\u0027, volume_id)"},{"line_number":114,"context_line":"        if libvirt_secret:"},{"line_number":115,"context_line":"            conf.encryption \u003d vconfig.LibvirtConfigGuestDiskEncryption()"},{"line_number":116,"context_line":"            secret \u003d vconfig.LibvirtConfigGuestDiskEncryptionSecret()"}],"source_content_type":"text/x-python","patch_set":17,"id":"7f96bb07_6e2ae62c","line":113,"range":{"start_line":113,"start_character":57,"end_line":113,"end_character":66},"in_reply_to":"7f96bb07_0777913c","updated":"2018-01-23 10:06:02.000000000","message":"It won\u0027t be, and if it were it isn\u0027t really recoverable.\n\nAs mentioned elsewhere, my preference would be to pass volume_id from the caller rather than peek inside connection_info, but that patch would be noisy and can come later.","commit_id":"b840dfe6f20d98f6200cb37a0a30f3891aff046e"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"569440006ae61b46e412fadcbc1eebe9f07eb043","unresolved":false,"context_lines":[{"line_number":112,"context_line":"        volume_id \u003d connection_info.get(\u0027data\u0027, {}).get(\u0027volume_id\u0027, None)"},{"line_number":113,"context_line":"        libvirt_secret \u003d self.host.find_secret(\u0027volume\u0027, volume_id)"},{"line_number":114,"context_line":"        if libvirt_secret:"},{"line_number":115,"context_line":"            conf.encryption \u003d vconfig.LibvirtConfigGuestDiskEncryption()"},{"line_number":116,"context_line":"            secret \u003d vconfig.LibvirtConfigGuestDiskEncryptionSecret()"},{"line_number":117,"context_line":"            secret.type \u003d \u0027passphrase\u0027"},{"line_number":118,"context_line":"            secret.uuid \u003d libvirt_secret.UUIDString()"},{"line_number":119,"context_line":"            conf.encryption.format \u003d \u0027luks\u0027"},{"line_number":120,"context_line":"            conf.encryption.secret \u003d secret"},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"        return conf"},{"line_number":123,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"7f96bb07_e74f0568","line":120,"range":{"start_line":115,"start_character":12,"end_line":120,"end_character":43},"updated":"2018-01-23 02:53:47.000000000","message":"Can this code be commonized somewhere? I notice the exact same thing in nova/virt/libvirt/migration.py","commit_id":"b840dfe6f20d98f6200cb37a0a30f3891aff046e"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"fb754dce8bdd1423ee4f73cbdb032b6be57c63b6","unresolved":false,"context_lines":[{"line_number":112,"context_line":"        volume_id \u003d connection_info.get(\u0027data\u0027, {}).get(\u0027volume_id\u0027, None)"},{"line_number":113,"context_line":"        libvirt_secret \u003d self.host.find_secret(\u0027volume\u0027, volume_id)"},{"line_number":114,"context_line":"        if libvirt_secret:"},{"line_number":115,"context_line":"            conf.encryption \u003d vconfig.LibvirtConfigGuestDiskEncryption()"},{"line_number":116,"context_line":"            secret \u003d vconfig.LibvirtConfigGuestDiskEncryptionSecret()"},{"line_number":117,"context_line":"            secret.type \u003d \u0027passphrase\u0027"},{"line_number":118,"context_line":"            secret.uuid \u003d libvirt_secret.UUIDString()"},{"line_number":119,"context_line":"            conf.encryption.format \u003d \u0027luks\u0027"},{"line_number":120,"context_line":"            conf.encryption.secret \u003d secret"},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"        return conf"},{"line_number":123,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"7f96bb07_c490b998","line":120,"range":{"start_line":115,"start_character":12,"end_line":120,"end_character":43},"in_reply_to":"7f96bb07_2e6e1e96","updated":"2018-01-23 10:53:46.000000000","message":"Yup, I agree with Matt here, I did look into doing this originally but it\u0027s not consistent with our use of vconfig.","commit_id":"b840dfe6f20d98f6200cb37a0a30f3891aff046e"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"412c4ba7ce721026a9099a84e6890f69abb7418a","unresolved":false,"context_lines":[{"line_number":112,"context_line":"        volume_id \u003d connection_info.get(\u0027data\u0027, {}).get(\u0027volume_id\u0027, None)"},{"line_number":113,"context_line":"        libvirt_secret \u003d self.host.find_secret(\u0027volume\u0027, volume_id)"},{"line_number":114,"context_line":"        if libvirt_secret:"},{"line_number":115,"context_line":"            conf.encryption \u003d vconfig.LibvirtConfigGuestDiskEncryption()"},{"line_number":116,"context_line":"            secret \u003d vconfig.LibvirtConfigGuestDiskEncryptionSecret()"},{"line_number":117,"context_line":"            secret.type \u003d \u0027passphrase\u0027"},{"line_number":118,"context_line":"            secret.uuid \u003d libvirt_secret.UUIDString()"},{"line_number":119,"context_line":"            conf.encryption.format \u003d \u0027luks\u0027"},{"line_number":120,"context_line":"            conf.encryption.secret \u003d secret"},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"        return conf"},{"line_number":123,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"7f96bb07_2e6e1e96","line":120,"range":{"start_line":115,"start_character":12,"end_line":120,"end_character":43},"in_reply_to":"7f96bb07_e74f0568","updated":"2018-01-23 10:06:02.000000000","message":"Meh, it\u0027s already in a library: LibvirtConfigGuestDiskEncryption. I\u0027d call this boilerplate. Wrapping it up further wouldn\u0027t be consistent with how we use the config classes.","commit_id":"b840dfe6f20d98f6200cb37a0a30f3891aff046e"}]}
