)]}'
{"whitebox_tempest_plugin/api/compute/test_volume_encryption.py":[{"author":{"_account_id":27478,"name":"Archit Modi","email":"amodi@redhat.com","username":"amodi"},"change_message_id":"60150ffb2339a0d2b448023bcf57326722b48f2e","unresolved":true,"context_lines":[{"line_number":19,"context_line":"CONF \u003d config.CONF"},{"line_number":20,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"class TestQEMUVolumeEncrption(base.BaseVolumeAdminTest):"},{"line_number":23,"context_line":"    \u0027\u0027\u0027Test which validates encryption. It assumes an"},{"line_number":24,"context_line":"    LVM based block storage server. The test performs the following:"},{"line_number":25,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"a4614bf4_247f82e7","line":22,"range":{"start_line":22,"start_character":20,"end_line":22,"end_character":29},"updated":"2021-01-18 22:34:27.000000000","message":"Encryption","commit_id":"00c9f63b15815934dd9362027ce7a1c21133de6a"},{"author":{"_account_id":27478,"name":"Archit Modi","email":"amodi@redhat.com","username":"amodi"},"change_message_id":"aea7f188ec7973748ff14707a5afa5ce79f9c78a","unresolved":true,"context_lines":[{"line_number":60,"context_line":"            server\u003dserver, servers_client\u003dself.servers_client)"},{"line_number":61,"context_line":"        unencrypted_string \u003d \"Hello, world (unencrypted /dev/vdb)\""},{"line_number":62,"context_line":"        cmd \u003d \"\"\"sudo su -c \u0027echo \"{}\" \u003e\u003e /dev/vdb;"},{"line_number":63,"context_line":"            echo \"Hello, world (encrypted /dev/vdc)\" \u003e\u003e /dev/vdc; "},{"line_number":64,"context_line":"            sync \u0026\u0026 sleep 2; sync \u0026\u0026 sleep 2\u0027"},{"line_number":65,"context_line":"            \"\"\".format(unencrypted_string)"},{"line_number":66,"context_line":"        linux_client.exec_command(cmd)"}],"source_content_type":"text/x-python","patch_set":4,"id":"94ecdede_f6bc7b34","line":63,"range":{"start_line":63,"start_character":65,"end_line":63,"end_character":66},"updated":"2021-01-22 22:25:39.000000000","message":"will remove","commit_id":"4fb6ef3afff83feca290573be8571d4c0a213ff8"},{"author":{"_account_id":27478,"name":"Archit Modi","email":"amodi@redhat.com","username":"amodi"},"change_message_id":"aea7f188ec7973748ff14707a5afa5ce79f9c78a","unresolved":true,"context_lines":[{"line_number":64,"context_line":"            sync \u0026\u0026 sleep 2; sync \u0026\u0026 sleep 2\u0027"},{"line_number":65,"context_line":"            \"\"\".format(unencrypted_string)"},{"line_number":66,"context_line":"        linux_client.exec_command(cmd)"},{"line_number":67,"context_line":"        controller_ip \u003d CONF.whitebox_database.host"},{"line_number":68,"context_line":"        ssh_client \u003d SSHClient(controller_ip)"},{"line_number":69,"context_line":"        cmd \u003d (\"sudo su -c \u0027strings /dev/cinder-volumes/volume-{} \" +"},{"line_number":70,"context_line":"               \"/dev/cinder-volumes/volume-{} | grep Hello\u0027\""}],"source_content_type":"text/x-python","patch_set":4,"id":"6558bc87_7debca87","line":67,"range":{"start_line":67,"start_character":24,"end_line":67,"end_character":51},"updated":"2021-01-22 22:25:39.000000000","message":"used this as controller_ip but can add a new CONF option or anything goes based on what we decide here","commit_id":"4fb6ef3afff83feca290573be8571d4c0a213ff8"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"c35d4e13e841b624543aafce048ba98b9334e64e","unresolved":true,"context_lines":[{"line_number":52,"context_line":"            cls.os_admin.encryption_types_v2_client"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"    def test_qemu_volume_encryption(self):"},{"line_number":55,"context_line":"        validation_resources \u003d \\"},{"line_number":56,"context_line":"            self.get_test_validation_resources(self.os_primary)"},{"line_number":57,"context_line":"        server \u003d self.create_test_server("},{"line_number":58,"context_line":"            validatable\u003dTrue,"},{"line_number":59,"context_line":"            validation_resources\u003dvalidation_resources"},{"line_number":60,"context_line":"        )"},{"line_number":61,"context_line":"        unencrypted_vol \u003d self.create_volume()"},{"line_number":62,"context_line":"        encrypted_vol \u003d self.create_encrypted_volume(\u0027luks\u0027,"},{"line_number":63,"context_line":"                                                     volume_type\u003d\u0027luks\u0027)"}],"source_content_type":"text/x-python","patch_set":6,"id":"1388dd6c_8a876f63","line":60,"range":{"start_line":55,"start_character":0,"end_line":60,"end_character":9},"updated":"2021-02-02 15:37:20.000000000","message":"You have to record a clean up for the server before the validation resources can be cleaned up, remember cleanups are LIFO:\n\n    self.addCleanup(self.delete_server, server[\u0027id\u0027])\n\nThis doesn\u0027t appear present in whitebox_tempest_plugin/api/compute/base.py at the moment but it should be easy to add it.\n\nFor example:\n\nhttps://github.com/openstack/tempest/blob/ccf56b5ca278fd083946137a5c36cdd8ba2f230d/tempest/api/compute/volumes/test_attach_volume.py#L45-L58","commit_id":"aea8cfc6814e09869b081fded83ed38edf7ddc74"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"ad4aec1b76c58a6ccb6895f977aa42fc3cf6f9f3","unresolved":true,"context_lines":[{"line_number":52,"context_line":"            cls.os_admin.encryption_types_v2_client"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"    def test_qemu_volume_encryption(self):"},{"line_number":55,"context_line":"        validation_resources \u003d \\"},{"line_number":56,"context_line":"            self.get_test_validation_resources(self.os_primary)"},{"line_number":57,"context_line":"        server \u003d self.create_test_server("},{"line_number":58,"context_line":"            validatable\u003dTrue,"},{"line_number":59,"context_line":"            validation_resources\u003dvalidation_resources"},{"line_number":60,"context_line":"        )"},{"line_number":61,"context_line":"        unencrypted_vol \u003d self.create_volume()"},{"line_number":62,"context_line":"        encrypted_vol \u003d self.create_encrypted_volume(\u0027luks\u0027,"},{"line_number":63,"context_line":"                                                     volume_type\u003d\u0027luks\u0027)"}],"source_content_type":"text/x-python","patch_set":6,"id":"cd5bba54_da317865","line":60,"range":{"start_line":55,"start_character":0,"end_line":60,"end_character":9},"in_reply_to":"1388dd6c_8a876f63","updated":"2021-02-02 15:46:19.000000000","message":"ya im really not a fan of create methods auto registering cleanups\n\nthe    self.delete_server(server[\u0027id\u0027]) was added after or converation in the team meeting but it should be done via a cleanup here.","commit_id":"aea8cfc6814e09869b081fded83ed38edf7ddc74"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"c35d4e13e841b624543aafce048ba98b9334e64e","unresolved":true,"context_lines":[{"line_number":68,"context_line":"            self.image_ssh_user, self.image_ssh_password,"},{"line_number":69,"context_line":"            validation_resources[\u0027keypair\u0027][\u0027private_key\u0027],"},{"line_number":70,"context_line":"            server\u003dserver, servers_client\u003dself.servers_client)"},{"line_number":71,"context_line":"        unencrypted_string \u003d \"Hello, world (unencrypted /dev/vdb)\""},{"line_number":72,"context_line":"        cmd \u003d \"\"\"sudo su -c \u0027echo \"{}\" \u003e\u003e /dev/vdb;"},{"line_number":73,"context_line":"            echo \"Hello, world (encrypted /dev/vdc)\" \u003e\u003e /dev/vdc;"},{"line_number":74,"context_line":"            sync \u0026\u0026 sleep 2; sync \u0026\u0026 sleep 2\u0027"},{"line_number":75,"context_line":"            \"\"\".format(unencrypted_string)"},{"line_number":76,"context_line":"        linux_client.exec_command(cmd)"},{"line_number":77,"context_line":"        controller_ip \u003d CONF.whitebox_database.host"},{"line_number":78,"context_line":"        ssh_client \u003d SSHClient(controller_ip)"},{"line_number":79,"context_line":"        cmd \u003d (\"sudo su -c \u0027strings /dev/cinder-volumes/volume-{} \" +"},{"line_number":80,"context_line":"               \"/dev/cinder-volumes/volume-{} | grep Hello\u0027\""},{"line_number":81,"context_line":"               ).format(unencrypted_vol[\u0027id\u0027], encrypted_vol[\u0027id\u0027])"},{"line_number":82,"context_line":"        strings \u003d ssh_client.execute(cmd)"},{"line_number":83,"context_line":"        self.assertEqual(strings.strip(), unencrypted_string,"},{"line_number":84,"context_line":"                         \u0027Encryption failed\u0027)"},{"line_number":85,"context_line":"        self.delete_server(server[\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":6,"id":"1a6f312a_76050f01","line":85,"range":{"start_line":71,"start_character":8,"end_line":85,"end_character":40},"updated":"2021-02-02 15:37:20.000000000","message":"I get what we are trying to check here but it might be just as easy to SSH into the compute and validate the format of the disks, libvirt secrets etc?","commit_id":"aea8cfc6814e09869b081fded83ed38edf7ddc74"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"6965262455c7190c05d19baa398bbf43ed2e28c4","unresolved":true,"context_lines":[{"line_number":82,"context_line":"        strings \u003d ssh_client.execute(cmd)"},{"line_number":83,"context_line":"        self.assertEqual(strings.strip(), unencrypted_string,"},{"line_number":84,"context_line":"                         \u0027Encryption failed\u0027)"},{"line_number":85,"context_line":"        self.delete_server(server[\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":6,"id":"3d4f3adc_c27faaaa","line":85,"range":{"start_line":85,"start_character":8,"end_line":85,"end_character":40},"updated":"2021-02-02 15:40:25.000000000","message":"Ops missed this, let me check the logs.","commit_id":"aea8cfc6814e09869b081fded83ed38edf7ddc74"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"ad4aec1b76c58a6ccb6895f977aa42fc3cf6f9f3","unresolved":true,"context_lines":[{"line_number":68,"context_line":"            self.image_ssh_user, self.image_ssh_password,"},{"line_number":69,"context_line":"            validation_resources[\u0027keypair\u0027][\u0027private_key\u0027],"},{"line_number":70,"context_line":"            server\u003dserver, servers_client\u003dself.servers_client)"},{"line_number":71,"context_line":"        unencrypted_string \u003d \"Hello, world (unencrypted /dev/vdb)\""},{"line_number":72,"context_line":"        cmd \u003d \"\"\"sudo su -c \u0027echo \"{}\" \u003e\u003e /dev/vdb;"},{"line_number":73,"context_line":"            echo \"Hello, world (encrypted /dev/vdc)\" \u003e\u003e /dev/vdc;"},{"line_number":74,"context_line":"            sync \u0026\u0026 sleep 2; sync \u0026\u0026 sleep 2\u0027"},{"line_number":75,"context_line":"            \"\"\".format(unencrypted_string)"},{"line_number":76,"context_line":"        linux_client.exec_command(cmd)"},{"line_number":77,"context_line":"        controller_ip \u003d CONF.whitebox_database.host"},{"line_number":78,"context_line":"        ssh_client \u003d SSHClient(controller_ip)"},{"line_number":79,"context_line":"        cmd \u003d (\"sudo su -c \u0027strings /dev/cinder-volumes/volume-{} \" +"},{"line_number":80,"context_line":"               \"/dev/cinder-volumes/volume-{} | grep Hello\u0027\""},{"line_number":81,"context_line":"               ).format(unencrypted_vol[\u0027id\u0027], encrypted_vol[\u0027id\u0027])"},{"line_number":82,"context_line":"        strings \u003d ssh_client.execute(cmd)"},{"line_number":83,"context_line":"        self.assertEqual(strings.strip(), unencrypted_string,"},{"line_number":84,"context_line":"                         \u0027Encryption failed\u0027)"},{"line_number":85,"context_line":"        self.delete_server(server[\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":6,"id":"6cdfffe6_8cbafd84","line":85,"range":{"start_line":71,"start_character":8,"end_line":85,"end_character":40},"in_reply_to":"1a6f312a_76050f01","updated":"2021-02-02 15:46:19.000000000","message":"i dont think we shoudl test it this way.\n\ni woudl much rather check for luks or whatever format was requested.\n\nthis feels much too fragile as this test shoudl work with ceph or lvm eqally so im not really a fan of assuming this is even host mounted.","commit_id":"aea8cfc6814e09869b081fded83ed38edf7ddc74"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"42a95954f84b02dd2bdd0bf0acb8b40b1f3b07e2","unresolved":true,"context_lines":[{"line_number":82,"context_line":"        strings \u003d ssh_client.execute(cmd)"},{"line_number":83,"context_line":"        self.assertEqual(strings.strip(), unencrypted_string,"},{"line_number":84,"context_line":"                         \u0027Encryption failed\u0027)"},{"line_number":85,"context_line":"        self.delete_server(server[\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":6,"id":"ff6ab4c4_aff5790f","line":85,"range":{"start_line":85,"start_character":8,"end_line":85,"end_character":40},"in_reply_to":"3d4f3adc_c27faaaa","updated":"2021-02-02 15:51:59.000000000","message":"So I don\u0027t see any evidence of this being called in the tempest logs:\n\nhttps://d9a9e082673d34182c00-c0d18af44c28b0cdd7922ca0faa25a3e.ssl.cf2.rackcdn.com/771283/6/check/whitebox-multinode-devstack/954edb4/testr_results.html\n\nI see the attachments, volume, volume type and keypair before the security group delete error is raised.","commit_id":"aea8cfc6814e09869b081fded83ed38edf7ddc74"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"95756ac886ba37b6885d91b3e691901d5f1a0a91","unresolved":true,"context_lines":[{"line_number":65,"context_line":"                                                     volume_type\u003d\u0027luks\u0027)"},{"line_number":66,"context_line":"        self.attach_volume(server, unencrypted_vol, device\u003d\u0027/dev/vdb\u0027)"},{"line_number":67,"context_line":"        self.attach_volume(server, encrypted_vol, device\u003d\u0027/dev/vdc\u0027)"},{"line_number":68,"context_line":"        linux_client \u003d remote_client.RemoteClient("},{"line_number":69,"context_line":"            self.get_server_ip(server, validation_resources),"},{"line_number":70,"context_line":"            self.image_ssh_user, self.image_ssh_password,"},{"line_number":71,"context_line":"            validation_resources[\u0027keypair\u0027][\u0027private_key\u0027],"}],"source_content_type":"text/x-python","patch_set":7,"id":"0d161798_b1914d48","line":68,"updated":"2021-02-02 17:01:39.000000000","message":"assuming this works im still -1 on the rest of this test case.\n\nwe shoudl assert that the xml was updated after the attachment \nand likely that the libvirt secret for the key was cretaed? i think we do that correct?\n\nbut we shoudl not try to read or write data to the volumn and look at it form the host\nas that would only work for a subset of cinder drivers that host mount volumns.","commit_id":"9aaa68213ae9d467bdd57a7f6537b9d9f466baea"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"5ea96bf8cee3c63977c1627c3adfb6654e95f204","unresolved":true,"context_lines":[{"line_number":65,"context_line":"                                                     volume_type\u003d\u0027luks\u0027)"},{"line_number":66,"context_line":"        self.attach_volume(server, unencrypted_vol, device\u003d\u0027/dev/vdb\u0027)"},{"line_number":67,"context_line":"        self.attach_volume(server, encrypted_vol, device\u003d\u0027/dev/vdc\u0027)"},{"line_number":68,"context_line":"        linux_client \u003d remote_client.RemoteClient("},{"line_number":69,"context_line":"            self.get_server_ip(server, validation_resources),"},{"line_number":70,"context_line":"            self.image_ssh_user, self.image_ssh_password,"},{"line_number":71,"context_line":"            validation_resources[\u0027keypair\u0027][\u0027private_key\u0027],"}],"source_content_type":"text/x-python","patch_set":7,"id":"ebb3ea95_b4aaf0b4","line":68,"in_reply_to":"0d161798_b1914d48","updated":"2021-02-02 18:43:50.000000000","message":"We should be able to codify the following into a test:\n\n  $ virsh secret-list\n\n  [..] Ensure a secret is present for the encrypted volume\n\n  $ virsh domblklist $instance\n\n  [..] Ensure the encrypted volume is attached to the instance\n\n  $ qemu-img info --force-share $path\n\n  [..] Ensure the encrypted volume has a disk format of LUKS\n\n$path in the file command can be a normal block device or filesystem path *or* a rbd URI in the format rbd:$volume:id\u003d$user. We should be able to detect what\u0027s being used in the output of domblklist and build that URI if required. We might end up needing a configurable for the $user part but I\u0027ll check to see if there\u0027s another way of digging that out of the domain without needing that.","commit_id":"9aaa68213ae9d467bdd57a7f6537b9d9f466baea"},{"author":{"_account_id":27478,"name":"Archit Modi","email":"amodi@redhat.com","username":"amodi"},"change_message_id":"edc2a9aa4c8997656c8a246c059a9d0475fedc0c","unresolved":false,"context_lines":[{"line_number":65,"context_line":"                                                     volume_type\u003d\u0027luks\u0027)"},{"line_number":66,"context_line":"        self.attach_volume(server, unencrypted_vol, device\u003d\u0027/dev/vdb\u0027)"},{"line_number":67,"context_line":"        self.attach_volume(server, encrypted_vol, device\u003d\u0027/dev/vdc\u0027)"},{"line_number":68,"context_line":"        linux_client \u003d remote_client.RemoteClient("},{"line_number":69,"context_line":"            self.get_server_ip(server, validation_resources),"},{"line_number":70,"context_line":"            self.image_ssh_user, self.image_ssh_password,"},{"line_number":71,"context_line":"            validation_resources[\u0027keypair\u0027][\u0027private_key\u0027],"}],"source_content_type":"text/x-python","patch_set":7,"id":"5cdba195_03061589","line":68,"in_reply_to":"186fb011_1b8793a7","updated":"2021-02-05 18:35:02.000000000","message":"Done","commit_id":"9aaa68213ae9d467bdd57a7f6537b9d9f466baea"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"09ae762d0ef8f24b4974fe6276e11042efabf176","unresolved":true,"context_lines":[{"line_number":65,"context_line":"                                                     volume_type\u003d\u0027luks\u0027)"},{"line_number":66,"context_line":"        self.attach_volume(server, unencrypted_vol, device\u003d\u0027/dev/vdb\u0027)"},{"line_number":67,"context_line":"        self.attach_volume(server, encrypted_vol, device\u003d\u0027/dev/vdc\u0027)"},{"line_number":68,"context_line":"        linux_client \u003d remote_client.RemoteClient("},{"line_number":69,"context_line":"            self.get_server_ip(server, validation_resources),"},{"line_number":70,"context_line":"            self.image_ssh_user, self.image_ssh_password,"},{"line_number":71,"context_line":"            validation_resources[\u0027keypair\u0027][\u0027private_key\u0027],"}],"source_content_type":"text/x-python","patch_set":7,"id":"7637382b_b2e526cd","line":68,"in_reply_to":"1a274e58_a2ef9308","updated":"2021-02-02 19:36:21.000000000","message":"+1\n\nya we can grap the user form  \u003cauth username\u003d\u0027cinder\u0027\u003e wehn the source is rbd.\nwe could alos grab it form the connection info in the db if we eeded too.\n\nthis all looks doable with the info you provided so i think this is definetly the directoin we want to go.\n\nin terems of the clis currently we are usign virsh directly so we can extend  the VirshXMLClient for the firts two.\nhttps://opendev.org/openstack/whitebox-tempest-plugin/src/branch/master/whitebox_tempest_plugin/services/clients.py#L57-L66\n\n\nwe should add a sepereat qemu image clint proably for invoking it.\n\nevenually i would prefer if we stoped using those and used the libvirt python bindings but because of the way we connect over ssh this is the shortest path forward.","commit_id":"9aaa68213ae9d467bdd57a7f6537b9d9f466baea"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"8d148a61e311ec96676278dd34c7f2365ae3f6b4","unresolved":true,"context_lines":[{"line_number":65,"context_line":"                                                     volume_type\u003d\u0027luks\u0027)"},{"line_number":66,"context_line":"        self.attach_volume(server, unencrypted_vol, device\u003d\u0027/dev/vdb\u0027)"},{"line_number":67,"context_line":"        self.attach_volume(server, encrypted_vol, device\u003d\u0027/dev/vdc\u0027)"},{"line_number":68,"context_line":"        linux_client \u003d remote_client.RemoteClient("},{"line_number":69,"context_line":"            self.get_server_ip(server, validation_resources),"},{"line_number":70,"context_line":"            self.image_ssh_user, self.image_ssh_password,"},{"line_number":71,"context_line":"            validation_resources[\u0027keypair\u0027][\u0027private_key\u0027],"}],"source_content_type":"text/x-python","patch_set":7,"id":"186fb011_1b8793a7","line":68,"in_reply_to":"7637382b_b2e526cd","updated":"2021-02-02 19:41:30.000000000","message":"oh by the way when invoking qemu-image info we should also pass --output json so we can just do json.loads(output)\n\nthe other two allready return xml so its trivial to parse with xpath but for qemu-image we should force json to avoid parsing the human readable form which is the defualt.","commit_id":"9aaa68213ae9d467bdd57a7f6537b9d9f466baea"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"2f743434ca63a5d30baba17f64080096bfe94efc","unresolved":true,"context_lines":[{"line_number":65,"context_line":"                                                     volume_type\u003d\u0027luks\u0027)"},{"line_number":66,"context_line":"        self.attach_volume(server, unencrypted_vol, device\u003d\u0027/dev/vdb\u0027)"},{"line_number":67,"context_line":"        self.attach_volume(server, encrypted_vol, device\u003d\u0027/dev/vdc\u0027)"},{"line_number":68,"context_line":"        linux_client \u003d remote_client.RemoteClient("},{"line_number":69,"context_line":"            self.get_server_ip(server, validation_resources),"},{"line_number":70,"context_line":"            self.image_ssh_user, self.image_ssh_password,"},{"line_number":71,"context_line":"            validation_resources[\u0027keypair\u0027][\u0027private_key\u0027],"}],"source_content_type":"text/x-python","patch_set":7,"id":"1a274e58_a2ef9308","line":68,"in_reply_to":"ebb3ea95_b4aaf0b4","updated":"2021-02-02 19:13:34.000000000","message":"Here\u0027s some example output with rbd:\n\n    $ sudo virsh secret-list\n     UUID                                   Usage\n    -------------------------------------------------------------------------------------\n     55d063f0-6ee0-4d4d-a7d7-6e00223c8a0c   ceph client.cinder secret\n     eb64082e-6443-4c50-a3c1-7b5dfb62dca1   volume 66f51baa-42d8-45b8-a3bb-4f532b9367d9\n\n    $ sudo virsh domblklist 383cec69-342f-46a0-97cf-da5e69fd3b98\n     Target   Source\n    ---------------------------------------------------------------\n     vda      vms/383cec69-342f-46a0-97cf-da5e69fd3b98_disk\n     vdb      volumes/volume-66f51baa-42d8-45b8-a3bb-4f532b9367d9\n\n    $ sudo virsh dumpxml 383cec69-342f-46a0-97cf-da5e69fd3b98 | grep -A6 -B5 66f51baa-42d8-45b8-a3bb-4f532b9367d9\n        \u003cdisk type\u003d\u0027network\u0027 device\u003d\u0027disk\u0027\u003e\n          \u003cdriver name\u003d\u0027qemu\u0027 type\u003d\u0027raw\u0027 cache\u003d\u0027writeback\u0027 discard\u003d\u0027unmap\u0027/\u003e\n          \u003cauth username\u003d\u0027cinder\u0027\u003e\n            \u003csecret type\u003d\u0027ceph\u0027 uuid\u003d\u002755d063f0-6ee0-4d4d-a7d7-6e00223c8a0c\u0027/\u003e\n          \u003c/auth\u003e\n          \u003csource protocol\u003d\u0027rbd\u0027 name\u003d\u0027volumes/volume-66f51baa-42d8-45b8-a3bb-4f532b9367d9\u0027 index\u003d\u00272\u0027\u003e\n            \u003chost name\u003d\u0027192.168.122.208\u0027 port\u003d\u00276789\u0027/\u003e\n          \u003c/source\u003e\n          \u003ctarget dev\u003d\u0027vdb\u0027 bus\u003d\u0027virtio\u0027/\u003e\n          \u003cserial\u003e66f51baa-42d8-45b8-a3bb-4f532b9367d9\u003c/serial\u003e\n          \u003cencryption format\u003d\u0027luks\u0027\u003e\n            \u003csecret type\u003d\u0027passphrase\u0027 uuid\u003d\u0027eb64082e-6443-4c50-a3c1-7b5dfb62dca1\u0027/\u003e\n          \u003c/encryption\u003e\n          \u003calias name\u003d\u0027virtio-disk1\u0027/\u003e\n          \u003caddress type\u003d\u0027pci\u0027 domain\u003d\u00270x0000\u0027 bus\u003d\u00270x00\u0027 slot\u003d\u00270x07\u0027 function\u003d\u00270x0\u0027/\u003e\n        \u003c/disk\u003e\n\n    $ sudo qemu-img info --force-share rbd:volumes/volume-66f51baa-42d8-45b8-a3bb-4f532b9367d9:id\u003dcinder\n    image: json:{\"driver\": \"luks\", \"file\": {\"pool\": \"volumes\", \"image\": \"volume-66f51baa-42d8-45b8-a3bb-4f532b9367d9\", \"driver\": \"rbd\"}}\n    file format: luks\n    virtual size: 1 GiB (1073741824 bytes)\n    disk size: unavailable\n    encrypted: yes\n    cluster_size: 4194304\n    Format specific information:\n        ivgen alg: plain64\n        hash alg: sha256\n        cipher alg: aes-256\n        uuid: 71dee8a6-9e0a-451c-8628-d3746610a3fa\n        cipher mode: xts\n        slots:\n            [0]:\n                active: true\n                iters: 1967442\n                key offset: 4096\n                stripes: 4000\n            [1]:\n                active: false\n                key offset: 262144\n            [2]:\n                active: false\n                key offset: 520192\n            [3]:\n                active: false\n                key offset: 778240\n            [4]:\n                active: false\n                key offset: 1036288\n            [5]:\n                active: false\n                key offset: 1294336\n            [6]:\n                active: false\n                key offset: 1552384\n            [7]:\n                active: false\n                key offset: 1810432\n        payload offset: 2068480\n        master key iters: 484040\n\n    $ sudo qemu-img info --output\u003djson --force-share rbd:volumes/volume-66f51baa-42d8-45b8-a3bb-4f532b9367d9:id\u003dcinder | jq .format\n    \"luks\"","commit_id":"9aaa68213ae9d467bdd57a7f6537b9d9f466baea"},{"author":{"_account_id":27478,"name":"Archit Modi","email":"amodi@redhat.com","username":"amodi"},"change_message_id":"1757256dbf2babf320ab185127d11637a949cebf","unresolved":true,"context_lines":[{"line_number":29,"context_line":""},{"line_number":30,"context_line":"class TestQEMUVolumeEncrption(base.BaseWhiteboxComputeTest,"},{"line_number":31,"context_line":"                              manager.EncryptionScenarioTest):"},{"line_number":32,"context_line":"    \u0027\u0027\u0027Test which validates encryption. It assumes an"},{"line_number":33,"context_line":"    LVM based block storage server. The test performs the following:"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"    1. Create a VM"},{"line_number":36,"context_line":"    2. Create two volumes- encrypted and unencrypted"}],"source_content_type":"text/x-python","patch_set":9,"id":"9dab0fe2_14a4bb08","line":33,"range":{"start_line":32,"start_character":40,"end_line":33,"end_character":67},"updated":"2021-02-05 18:42:41.000000000","message":"will remove","commit_id":"ef7e301fb42f21e1a081df80aa729e0844ce9034"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"f23105dc84418b9cb98025582b07185eb9a2b40a","unresolved":true,"context_lines":[{"line_number":41,"context_line":"    \u0027\u0027\u0027"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"    def test_qemu_volume_encryption(self):"},{"line_number":44,"context_line":"        server \u003d self.create_test_server(wait_until\u003d\"ACTIVE\")"},{"line_number":45,"context_line":"        unencrypted_vol \u003d self.create_volume()"},{"line_number":46,"context_line":"        encrypted_vol \u003d self.create_encrypted_volume(\u0027luks\u0027,"},{"line_number":47,"context_line":"                                                     volume_type\u003d\u0027luks\u0027)"}],"source_content_type":"text/x-python","patch_set":9,"id":"279b8e9e_c9b5fd11","line":44,"range":{"start_line":44,"start_character":8,"end_line":44,"end_character":61},"updated":"2021-02-08 19:07:16.000000000","message":"FWIW even with the below failure I\u0027m still not seeing this being cleaned up  so there\u0027s still something wrong here.\n\nhttps://storage.bhs.cloud.ovh.net/v1/AUTH_dcaab5e32b234d56b626f72581e3644c/zuul_opendev_logs_fb3/771283/9/check/whitebox-multinode-devstack/fb3ee94/testr_results.html\n\nNote the lack of DELETE /server/$uuid calls during the cleanups.","commit_id":"ef7e301fb42f21e1a081df80aa729e0844ce9034"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"07313446718b6d3ebdd0d9f78b2cd0989e65874d","unresolved":true,"context_lines":[{"line_number":49,"context_line":"        self.attach_volume(server, encrypted_vol, device\u003d\u0027/dev/vdc\u0027)"},{"line_number":50,"context_line":"        host \u003d get_ctlplane_address(server[\u0027OS-EXT-SRV-ATTR:host\u0027])"},{"line_number":51,"context_line":"        virsh_client \u003d VirshXMLClient(host)"},{"line_number":52,"context_line":"        cmd \u003d \u0027virsh secret-list | grep {}\u0027.format(encrypted_vol[\u0027id\u0027])"},{"line_number":53,"context_line":"        secret \u003d virsh_client.execute(cmd, container_name\u003d\u0027nova_libvirt\u0027)"},{"line_number":54,"context_line":"        # Ensure a secret is present for the encrypted volume"},{"line_number":55,"context_line":"        self.assertNotEqual(len(secret), 0, \u0027Something is wrong!\u0027)"}],"source_content_type":"text/x-python","patch_set":9,"id":"efe066b3_2972e895","line":52,"range":{"start_line":52,"start_character":8,"end_line":52,"end_character":71},"updated":"2021-02-08 17:00:19.000000000","message":"FWIW you can use f-strings to keep this readable now.\n\n    cmd \u003d f\"virsh secret-list | grep {encrypted_vol[\u0027id\u0027]}\"","commit_id":"ef7e301fb42f21e1a081df80aa729e0844ce9034"},{"author":{"_account_id":27478,"name":"Archit Modi","email":"amodi@redhat.com","username":"amodi"},"change_message_id":"1757256dbf2babf320ab185127d11637a949cebf","unresolved":true,"context_lines":[{"line_number":52,"context_line":"        cmd \u003d \u0027virsh secret-list | grep {}\u0027.format(encrypted_vol[\u0027id\u0027])"},{"line_number":53,"context_line":"        secret \u003d virsh_client.execute(cmd, container_name\u003d\u0027nova_libvirt\u0027)"},{"line_number":54,"context_line":"        # Ensure a secret is present for the encrypted volume"},{"line_number":55,"context_line":"        self.assertNotEqual(len(secret), 0, \u0027Something is wrong!\u0027)"},{"line_number":56,"context_line":"        extra_command \u003d \"| awk \u0027/vdc/  {{print $2}}\u0027\""},{"line_number":57,"context_line":"        # Ensure the encrypted volume is attached to the instance"},{"line_number":58,"context_line":"        path \u003d virsh_client.domblklist(server[\u0027OS-EXT-SRV-ATTR:instance_name\u0027],"}],"source_content_type":"text/x-python","patch_set":9,"id":"905fd43d_81fe2122","line":55,"range":{"start_line":55,"start_character":8,"end_line":55,"end_character":66},"updated":"2021-02-05 18:42:41.000000000","message":"would like to test this in a better way- suggestions pls!\nAlso, what should be the error msg?","commit_id":"ef7e301fb42f21e1a081df80aa729e0844ce9034"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"07313446718b6d3ebdd0d9f78b2cd0989e65874d","unresolved":true,"context_lines":[{"line_number":52,"context_line":"        cmd \u003d \u0027virsh secret-list | grep {}\u0027.format(encrypted_vol[\u0027id\u0027])"},{"line_number":53,"context_line":"        secret \u003d virsh_client.execute(cmd, container_name\u003d\u0027nova_libvirt\u0027)"},{"line_number":54,"context_line":"        # Ensure a secret is present for the encrypted volume"},{"line_number":55,"context_line":"        self.assertNotEqual(len(secret), 0, \u0027Something is wrong!\u0027)"},{"line_number":56,"context_line":"        extra_command \u003d \"| awk \u0027/vdc/  {{print $2}}\u0027\""},{"line_number":57,"context_line":"        # Ensure the encrypted volume is attached to the instance"},{"line_number":58,"context_line":"        path \u003d virsh_client.domblklist(server[\u0027OS-EXT-SRV-ATTR:instance_name\u0027],"}],"source_content_type":"text/x-python","patch_set":9,"id":"ea9be8f3_92652be4","line":55,"range":{"start_line":55,"start_character":8,"end_line":55,"end_character":66},"in_reply_to":"905fd43d_81fe2122","updated":"2021-02-08 17:00:19.000000000","message":"I think that\u0027s okay, you don\u0027t need to `something is wrong!` part.","commit_id":"ef7e301fb42f21e1a081df80aa729e0844ce9034"},{"author":{"_account_id":27478,"name":"Archit Modi","email":"amodi@redhat.com","username":"amodi"},"change_message_id":"1757256dbf2babf320ab185127d11637a949cebf","unresolved":true,"context_lines":[{"line_number":61,"context_line":"        xml \u003d self.get_server_xml(server[\u0027id\u0027])"},{"line_number":62,"context_line":"        encryption_type \u003d xml.find(\u0027.//disk/encryption\u0027).get(\u0027format\u0027, None)"},{"line_number":63,"context_line":"        # Ensure the encrypted type in xml is LUKS"},{"line_number":64,"context_line":"        self.assertEqual(encryption_type, \u0027luks\u0027, \u0027Something is wrong!\u0027)"},{"line_number":65,"context_line":"        user \u003d xml.find(\u0027.//disk\u0027).get(\u0027auth\u0027, None)"},{"line_number":66,"context_line":"        qemu_info \u003d json.loads(qemu_img_client.info(path, user\u003duser))"},{"line_number":67,"context_line":"        fmt \u003d qemu_info.get(\u0027format\u0027, None)"}],"source_content_type":"text/x-python","patch_set":9,"id":"d56e4583_d44c8e3b","line":64,"range":{"start_line":64,"start_character":8,"end_line":64,"end_character":72},"updated":"2021-02-05 18:42:41.000000000","message":"same","commit_id":"ef7e301fb42f21e1a081df80aa729e0844ce9034"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"07313446718b6d3ebdd0d9f78b2cd0989e65874d","unresolved":true,"context_lines":[{"line_number":61,"context_line":"        xml \u003d self.get_server_xml(server[\u0027id\u0027])"},{"line_number":62,"context_line":"        encryption_type \u003d xml.find(\u0027.//disk/encryption\u0027).get(\u0027format\u0027, None)"},{"line_number":63,"context_line":"        # Ensure the encrypted type in xml is LUKS"},{"line_number":64,"context_line":"        self.assertEqual(encryption_type, \u0027luks\u0027, \u0027Something is wrong!\u0027)"},{"line_number":65,"context_line":"        user \u003d xml.find(\u0027.//disk\u0027).get(\u0027auth\u0027, None)"},{"line_number":66,"context_line":"        qemu_info \u003d json.loads(qemu_img_client.info(path, user\u003duser))"},{"line_number":67,"context_line":"        fmt \u003d qemu_info.get(\u0027format\u0027, None)"}],"source_content_type":"text/x-python","patch_set":9,"id":"792d4930_734b2de0","line":64,"range":{"start_line":64,"start_character":8,"end_line":64,"end_character":72},"in_reply_to":"d56e4583_d44c8e3b","updated":"2021-02-08 17:00:19.000000000","message":"Again I think this is fine just drop the string.","commit_id":"ef7e301fb42f21e1a081df80aa729e0844ce9034"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"07313446718b6d3ebdd0d9f78b2cd0989e65874d","unresolved":true,"context_lines":[{"line_number":63,"context_line":"        # Ensure the encrypted type in xml is LUKS"},{"line_number":64,"context_line":"        self.assertEqual(encryption_type, \u0027luks\u0027, \u0027Something is wrong!\u0027)"},{"line_number":65,"context_line":"        user \u003d xml.find(\u0027.//disk\u0027).get(\u0027auth\u0027, None)"},{"line_number":66,"context_line":"        qemu_info \u003d json.loads(qemu_img_client.info(path, user\u003duser))"},{"line_number":67,"context_line":"        fmt \u003d qemu_info.get(\u0027format\u0027, None)"},{"line_number":68,"context_line":"        # Ensure the encrypted volume has a disk format of LUKS"},{"line_number":69,"context_line":"        self.assertEqual(fmt, \u0027luks\u0027, \u0027Something is wrong!\u0027)"}],"source_content_type":"text/x-python","patch_set":9,"id":"80c24059_19d6f8f0","line":66,"range":{"start_line":66,"start_character":20,"end_line":66,"end_character":30},"updated":"2021-02-08 17:00:19.000000000","message":"Could we not do this in the qemu_img_client code?","commit_id":"ef7e301fb42f21e1a081df80aa729e0844ce9034"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"07313446718b6d3ebdd0d9f78b2cd0989e65874d","unresolved":true,"context_lines":[{"line_number":64,"context_line":"        self.assertEqual(encryption_type, \u0027luks\u0027, \u0027Something is wrong!\u0027)"},{"line_number":65,"context_line":"        user \u003d xml.find(\u0027.//disk\u0027).get(\u0027auth\u0027, None)"},{"line_number":66,"context_line":"        qemu_info \u003d json.loads(qemu_img_client.info(path, user\u003duser))"},{"line_number":67,"context_line":"        fmt \u003d qemu_info.get(\u0027format\u0027, None)"},{"line_number":68,"context_line":"        # Ensure the encrypted volume has a disk format of LUKS"},{"line_number":69,"context_line":"        self.assertEqual(fmt, \u0027luks\u0027, \u0027Something is wrong!\u0027)"}],"source_content_type":"text/x-python","patch_set":9,"id":"6ae0ebec_21058cd9","line":67,"range":{"start_line":67,"start_character":14,"end_line":67,"end_character":43},"updated":"2021-02-08 17:00:19.000000000","message":"Just use this directly in the assert below.","commit_id":"ef7e301fb42f21e1a081df80aa729e0844ce9034"},{"author":{"_account_id":27478,"name":"Archit Modi","email":"amodi@redhat.com","username":"amodi"},"change_message_id":"1757256dbf2babf320ab185127d11637a949cebf","unresolved":true,"context_lines":[{"line_number":66,"context_line":"        qemu_info \u003d json.loads(qemu_img_client.info(path, user\u003duser))"},{"line_number":67,"context_line":"        fmt \u003d qemu_info.get(\u0027format\u0027, None)"},{"line_number":68,"context_line":"        # Ensure the encrypted volume has a disk format of LUKS"},{"line_number":69,"context_line":"        self.assertEqual(fmt, \u0027luks\u0027, \u0027Something is wrong!\u0027)"}],"source_content_type":"text/x-python","patch_set":9,"id":"b59676eb_45500332","line":69,"range":{"start_line":69,"start_character":8,"end_line":69,"end_character":60},"updated":"2021-02-05 18:42:41.000000000","message":"same","commit_id":"ef7e301fb42f21e1a081df80aa729e0844ce9034"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"2d595fbbbb358c1925fd74748f16ea3048832312","unresolved":true,"context_lines":[{"line_number":27,"context_line":""},{"line_number":28,"context_line":"class TestQEMUVolumeEncrption(base.BaseWhiteboxComputeTest,"},{"line_number":29,"context_line":"                              manager.EncryptionScenarioTest):"},{"line_number":30,"context_line":"    \u0027\u0027\u0027Test which validates encryption. It assumes an"},{"line_number":31,"context_line":"    LVM based block storage server. The test performs the following:"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"    1. Create a VM"},{"line_number":34,"context_line":"    2. Create two volumes- encrypted and unencrypted"}],"source_content_type":"text/x-python","patch_set":11,"id":"aad0fbb4_af0402c6","line":31,"range":{"start_line":30,"start_character":40,"end_line":31,"end_character":35},"updated":"2021-02-09 09:56:33.000000000","message":"Yup this is currently true but it shouldn\u0027t take too much to handle rbd as well.","commit_id":"efbca5dbfdd4060c4bff035555b93faf8f5a766e"},{"author":{"_account_id":31033,"name":"James Parker","email":"jparker@redhat.com","username":"jparker"},"change_message_id":"a3a476ac3fc5a9be0417313adca54adc20843e2c","unresolved":false,"context_lines":[{"line_number":27,"context_line":""},{"line_number":28,"context_line":"class TestQEMUVolumeEncrption(base.BaseWhiteboxComputeTest,"},{"line_number":29,"context_line":"                              manager.EncryptionScenarioTest):"},{"line_number":30,"context_line":"    \u0027\u0027\u0027Test which validates encryption. It assumes an"},{"line_number":31,"context_line":"    LVM based block storage server. The test performs the following:"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"    1. Create a VM"},{"line_number":34,"context_line":"    2. Create two volumes- encrypted and unencrypted"}],"source_content_type":"text/x-python","patch_set":11,"id":"e0bbdd0e_3ecba393","line":31,"range":{"start_line":30,"start_character":40,"end_line":31,"end_character":35},"in_reply_to":"aad0fbb4_af0402c6","updated":"2021-02-09 13:27:55.000000000","message":"Ack","commit_id":"efbca5dbfdd4060c4bff035555b93faf8f5a766e"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"2d595fbbbb358c1925fd74748f16ea3048832312","unresolved":true,"context_lines":[{"line_number":41,"context_line":"    7. Validate the xml disk\u0027s encryption format is luks"},{"line_number":42,"context_line":"    8. Pass the xml disk\u0027s source path and auth element to qemu-img info and"},{"line_number":43,"context_line":"    confirm the volume\u0027s format is luks and it is encrypting the volume."},{"line_number":44,"context_line":"    NOTE: encrypted volume\u0027s string should NOT be found"},{"line_number":45,"context_line":"    \u0027\u0027\u0027"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"    def test_qemu_volume_encryption(self):"}],"source_content_type":"text/x-python","patch_set":11,"id":"cd22d82b_371c76e2","line":44,"range":{"start_line":44,"start_character":4,"end_line":44,"end_character":55},"updated":"2021-02-09 09:56:33.000000000","message":"Remove this.","commit_id":"efbca5dbfdd4060c4bff035555b93faf8f5a766e"},{"author":{"_account_id":31033,"name":"James Parker","email":"jparker@redhat.com","username":"jparker"},"change_message_id":"a3a476ac3fc5a9be0417313adca54adc20843e2c","unresolved":false,"context_lines":[{"line_number":41,"context_line":"    7. Validate the xml disk\u0027s encryption format is luks"},{"line_number":42,"context_line":"    8. Pass the xml disk\u0027s source path and auth element to qemu-img info and"},{"line_number":43,"context_line":"    confirm the volume\u0027s format is luks and it is encrypting the volume."},{"line_number":44,"context_line":"    NOTE: encrypted volume\u0027s string should NOT be found"},{"line_number":45,"context_line":"    \u0027\u0027\u0027"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"    def test_qemu_volume_encryption(self):"}],"source_content_type":"text/x-python","patch_set":11,"id":"781fc7e1_cc6b6f5d","line":44,"range":{"start_line":44,"start_character":4,"end_line":44,"end_character":55},"in_reply_to":"cd22d82b_371c76e2","updated":"2021-02-09 13:27:55.000000000","message":"Ack","commit_id":"efbca5dbfdd4060c4bff035555b93faf8f5a766e"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"2d595fbbbb358c1925fd74748f16ea3048832312","unresolved":true,"context_lines":[{"line_number":47,"context_line":"    def test_qemu_volume_encryption(self):"},{"line_number":48,"context_line":"        server \u003d self.create_test_server(wait_until\u003d\"ACTIVE\")"},{"line_number":49,"context_line":"        unencrypted_vol \u003d self.create_volume()"},{"line_number":50,"context_line":"        encrypted_vol \u003d self.create_encrypted_volume(\u0027luks\u0027,"},{"line_number":51,"context_line":"                                                     volume_type\u003d\u0027luks\u0027)"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"        # Attach encrypted and unencrypted volume to the server"},{"line_number":54,"context_line":"        self.attach_volume(server, unencrypted_vol, device\u003d\u0027/dev/vdb\u0027)"}],"source_content_type":"text/x-python","patch_set":11,"id":"eaf3d80a_757c0826","line":51,"range":{"start_line":50,"start_character":0,"end_line":51,"end_character":72},"updated":"2021-02-09 09:56:33.000000000","message":"encrypted_vol \u003d self.create_encrypted_volume(\n        \u0027luks\u0027,\n        volume_type\u003d\u0027luks\u0027\n    )","commit_id":"efbca5dbfdd4060c4bff035555b93faf8f5a766e"},{"author":{"_account_id":31033,"name":"James Parker","email":"jparker@redhat.com","username":"jparker"},"change_message_id":"a3a476ac3fc5a9be0417313adca54adc20843e2c","unresolved":false,"context_lines":[{"line_number":47,"context_line":"    def test_qemu_volume_encryption(self):"},{"line_number":48,"context_line":"        server \u003d self.create_test_server(wait_until\u003d\"ACTIVE\")"},{"line_number":49,"context_line":"        unencrypted_vol \u003d self.create_volume()"},{"line_number":50,"context_line":"        encrypted_vol \u003d self.create_encrypted_volume(\u0027luks\u0027,"},{"line_number":51,"context_line":"                                                     volume_type\u003d\u0027luks\u0027)"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"        # Attach encrypted and unencrypted volume to the server"},{"line_number":54,"context_line":"        self.attach_volume(server, unencrypted_vol, device\u003d\u0027/dev/vdb\u0027)"}],"source_content_type":"text/x-python","patch_set":11,"id":"fe410f02_270b4e0f","line":51,"range":{"start_line":50,"start_character":0,"end_line":51,"end_character":72},"in_reply_to":"eaf3d80a_757c0826","updated":"2021-02-09 13:27:55.000000000","message":"Ack","commit_id":"efbca5dbfdd4060c4bff035555b93faf8f5a766e"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"2d595fbbbb358c1925fd74748f16ea3048832312","unresolved":true,"context_lines":[{"line_number":51,"context_line":"                                                     volume_type\u003d\u0027luks\u0027)"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"        # Attach encrypted and unencrypted volume to the server"},{"line_number":54,"context_line":"        self.attach_volume(server, unencrypted_vol, device\u003d\u0027/dev/vdb\u0027)"},{"line_number":55,"context_line":"        self.attach_volume(server, encrypted_vol, device\u003d\u0027/dev/vdc\u0027)"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"        # Gather instance XML to ensure the encrypted volume is attached to the"}],"source_content_type":"text/x-python","patch_set":11,"id":"3c9c6cec_16d3ad2c","line":54,"range":{"start_line":54,"start_character":50,"end_line":54,"end_character":69},"updated":"2021-02-09 09:56:33.000000000","message":"We shouldn\u0027t need this, it\u0027s not respected by libvirt anyway.","commit_id":"efbca5dbfdd4060c4bff035555b93faf8f5a766e"},{"author":{"_account_id":31033,"name":"James Parker","email":"jparker@redhat.com","username":"jparker"},"change_message_id":"a3a476ac3fc5a9be0417313adca54adc20843e2c","unresolved":false,"context_lines":[{"line_number":51,"context_line":"                                                     volume_type\u003d\u0027luks\u0027)"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"        # Attach encrypted and unencrypted volume to the server"},{"line_number":54,"context_line":"        self.attach_volume(server, unencrypted_vol, device\u003d\u0027/dev/vdb\u0027)"},{"line_number":55,"context_line":"        self.attach_volume(server, encrypted_vol, device\u003d\u0027/dev/vdc\u0027)"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"        # Gather instance XML to ensure the encrypted volume is attached to the"}],"source_content_type":"text/x-python","patch_set":11,"id":"93397f1f_3af93c8d","line":54,"range":{"start_line":54,"start_character":50,"end_line":54,"end_character":69},"in_reply_to":"3c9c6cec_16d3ad2c","updated":"2021-02-09 13:27:55.000000000","message":"Ack","commit_id":"efbca5dbfdd4060c4bff035555b93faf8f5a766e"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"2d595fbbbb358c1925fd74748f16ea3048832312","unresolved":true,"context_lines":[{"line_number":52,"context_line":""},{"line_number":53,"context_line":"        # Attach encrypted and unencrypted volume to the server"},{"line_number":54,"context_line":"        self.attach_volume(server, unencrypted_vol, device\u003d\u0027/dev/vdb\u0027)"},{"line_number":55,"context_line":"        self.attach_volume(server, encrypted_vol, device\u003d\u0027/dev/vdc\u0027)"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"        # Gather instance XML to ensure the encrypted volume is attached to the"},{"line_number":58,"context_line":"        # instance"}],"source_content_type":"text/x-python","patch_set":11,"id":"e6c99313_232d6068","line":55,"range":{"start_line":55,"start_character":50,"end_line":55,"end_character":67},"updated":"2021-02-09 09:56:33.000000000","message":"Ditto.","commit_id":"efbca5dbfdd4060c4bff035555b93faf8f5a766e"},{"author":{"_account_id":31033,"name":"James Parker","email":"jparker@redhat.com","username":"jparker"},"change_message_id":"a3a476ac3fc5a9be0417313adca54adc20843e2c","unresolved":false,"context_lines":[{"line_number":52,"context_line":""},{"line_number":53,"context_line":"        # Attach encrypted and unencrypted volume to the server"},{"line_number":54,"context_line":"        self.attach_volume(server, unencrypted_vol, device\u003d\u0027/dev/vdb\u0027)"},{"line_number":55,"context_line":"        self.attach_volume(server, encrypted_vol, device\u003d\u0027/dev/vdc\u0027)"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"        # Gather instance XML to ensure the encrypted volume is attached to the"},{"line_number":58,"context_line":"        # instance"}],"source_content_type":"text/x-python","patch_set":11,"id":"04dc6c90_1d13207f","line":55,"range":{"start_line":55,"start_character":50,"end_line":55,"end_character":67},"in_reply_to":"e6c99313_232d6068","updated":"2021-02-09 13:27:55.000000000","message":"Ack","commit_id":"efbca5dbfdd4060c4bff035555b93faf8f5a766e"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"2d595fbbbb358c1925fd74748f16ea3048832312","unresolved":true,"context_lines":[{"line_number":63,"context_line":""},{"line_number":64,"context_line":"        # Search instance XML for a disk with matching target device and"},{"line_number":65,"context_line":"        # encryption/secret element"},{"line_number":66,"context_line":"        xml_disk_elements \u003d [x for x in attached_volumes if"},{"line_number":67,"context_line":"                             x.find(\"./target[@dev\u003d\u0027vdc\u0027]\") is not None and"},{"line_number":68,"context_line":"                             x.find(\"./encryption/secret\") is not None]"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"        # There should be one and only one disk element present in the"},{"line_number":71,"context_line":"        # instance xml that matches search criteria"}],"source_content_type":"text/x-python","patch_set":11,"id":"83446404_42843d2c","line":68,"range":{"start_line":66,"start_character":0,"end_line":68,"end_character":71},"updated":"2021-02-09 09:56:33.000000000","message":"Given the above it might be better to base this on the serial of each volume.","commit_id":"efbca5dbfdd4060c4bff035555b93faf8f5a766e"},{"author":{"_account_id":31033,"name":"James Parker","email":"jparker@redhat.com","username":"jparker"},"change_message_id":"a3a476ac3fc5a9be0417313adca54adc20843e2c","unresolved":false,"context_lines":[{"line_number":63,"context_line":""},{"line_number":64,"context_line":"        # Search instance XML for a disk with matching target device and"},{"line_number":65,"context_line":"        # encryption/secret element"},{"line_number":66,"context_line":"        xml_disk_elements \u003d [x for x in attached_volumes if"},{"line_number":67,"context_line":"                             x.find(\"./target[@dev\u003d\u0027vdc\u0027]\") is not None and"},{"line_number":68,"context_line":"                             x.find(\"./encryption/secret\") is not None]"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"        # There should be one and only one disk element present in the"},{"line_number":71,"context_line":"        # instance xml that matches search criteria"}],"source_content_type":"text/x-python","patch_set":11,"id":"dc2cbb89_448dd5f3","line":68,"range":{"start_line":66,"start_character":0,"end_line":68,"end_character":71},"in_reply_to":"83446404_42843d2c","updated":"2021-02-09 13:27:55.000000000","message":"Ack","commit_id":"efbca5dbfdd4060c4bff035555b93faf8f5a766e"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"2d595fbbbb358c1925fd74748f16ea3048832312","unresolved":true,"context_lines":[{"line_number":75,"context_line":"            len(xml_disk_elements))"},{"line_number":76,"context_line":"        encrypted_disk_xml_element \u003d xml_disk_elements[0]"},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"        # Confirm the instance\u0027s serial id is the same as the encrypted volume"},{"line_number":79,"context_line":"        # id"},{"line_number":80,"context_line":"        self.assertEqual(encrypted_disk_xml_element.find(\u0027./serial\u0027).text,"},{"line_number":81,"context_line":"                         encrypted_vol[\u0027id\u0027])"},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"        # Confirm encryption format is luks"},{"line_number":84,"context_line":"        self.assertEqual("}],"source_content_type":"text/x-python","patch_set":11,"id":"0cffb4d0_a526ad28","line":81,"range":{"start_line":78,"start_character":0,"end_line":81,"end_character":45},"updated":"2021-02-09 09:56:33.000000000","message":"Use this above to find the volume, removing the need to assert things.","commit_id":"efbca5dbfdd4060c4bff035555b93faf8f5a766e"},{"author":{"_account_id":31033,"name":"James Parker","email":"jparker@redhat.com","username":"jparker"},"change_message_id":"a3a476ac3fc5a9be0417313adca54adc20843e2c","unresolved":false,"context_lines":[{"line_number":75,"context_line":"            len(xml_disk_elements))"},{"line_number":76,"context_line":"        encrypted_disk_xml_element \u003d xml_disk_elements[0]"},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"        # Confirm the instance\u0027s serial id is the same as the encrypted volume"},{"line_number":79,"context_line":"        # id"},{"line_number":80,"context_line":"        self.assertEqual(encrypted_disk_xml_element.find(\u0027./serial\u0027).text,"},{"line_number":81,"context_line":"                         encrypted_vol[\u0027id\u0027])"},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"        # Confirm encryption format is luks"},{"line_number":84,"context_line":"        self.assertEqual("}],"source_content_type":"text/x-python","patch_set":11,"id":"af04595e_8727aef0","line":81,"range":{"start_line":78,"start_character":0,"end_line":81,"end_character":45},"in_reply_to":"0cffb4d0_a526ad28","updated":"2021-02-09 13:27:55.000000000","message":"Ack","commit_id":"efbca5dbfdd4060c4bff035555b93faf8f5a766e"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"2d595fbbbb358c1925fd74748f16ea3048832312","unresolved":true,"context_lines":[{"line_number":82,"context_line":""},{"line_number":83,"context_line":"        # Confirm encryption format is luks"},{"line_number":84,"context_line":"        self.assertEqual("},{"line_number":85,"context_line":"            encrypted_disk_xml_element.find(\u0027./encryption\u0027).get(\u0027format\u0027),"},{"line_number":86,"context_line":"            \u0027luks\u0027, \u0027Expected encryption type luks but found %s\u0027 %"},{"line_number":87,"context_line":"            encrypted_disk_xml_element.find(\u0027./encryption\u0027).get(\u0027format\u0027))"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"        host \u003d get_ctlplane_address(server[\u0027OS-EXT-SRV-ATTR:host\u0027])"}],"source_content_type":"text/x-python","patch_set":11,"id":"590bafb9_529afa66","line":86,"range":{"start_line":85,"start_character":1,"end_line":86,"end_character":66},"updated":"2021-02-09 09:56:33.000000000","message":"The ordering with assertEqual is expected and then actual.","commit_id":"efbca5dbfdd4060c4bff035555b93faf8f5a766e"},{"author":{"_account_id":31033,"name":"James Parker","email":"jparker@redhat.com","username":"jparker"},"change_message_id":"a3a476ac3fc5a9be0417313adca54adc20843e2c","unresolved":false,"context_lines":[{"line_number":82,"context_line":""},{"line_number":83,"context_line":"        # Confirm encryption format is luks"},{"line_number":84,"context_line":"        self.assertEqual("},{"line_number":85,"context_line":"            encrypted_disk_xml_element.find(\u0027./encryption\u0027).get(\u0027format\u0027),"},{"line_number":86,"context_line":"            \u0027luks\u0027, \u0027Expected encryption type luks but found %s\u0027 %"},{"line_number":87,"context_line":"            encrypted_disk_xml_element.find(\u0027./encryption\u0027).get(\u0027format\u0027))"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"        host \u003d get_ctlplane_address(server[\u0027OS-EXT-SRV-ATTR:host\u0027])"}],"source_content_type":"text/x-python","patch_set":11,"id":"554c4863_dabd07ee","line":86,"range":{"start_line":85,"start_character":1,"end_line":86,"end_character":66},"in_reply_to":"590bafb9_529afa66","updated":"2021-02-09 13:27:55.000000000","message":"Ack","commit_id":"efbca5dbfdd4060c4bff035555b93faf8f5a766e"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"2d595fbbbb358c1925fd74748f16ea3048832312","unresolved":true,"context_lines":[{"line_number":84,"context_line":"        self.assertEqual("},{"line_number":85,"context_line":"            encrypted_disk_xml_element.find(\u0027./encryption\u0027).get(\u0027format\u0027),"},{"line_number":86,"context_line":"            \u0027luks\u0027, \u0027Expected encryption type luks but found %s\u0027 %"},{"line_number":87,"context_line":"            encrypted_disk_xml_element.find(\u0027./encryption\u0027).get(\u0027format\u0027))"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"        host \u003d get_ctlplane_address(server[\u0027OS-EXT-SRV-ATTR:host\u0027])"},{"line_number":90,"context_line":"        qemu_img_client \u003d QEMUImgClient(host)"}],"source_content_type":"text/x-python","patch_set":11,"id":"531e4647_c69456af","line":87,"range":{"start_line":87,"start_character":12,"end_line":87,"end_character":73},"updated":"2021-02-09 09:56:33.000000000","message":"Pull this out into a variable to above duplicate lookups.","commit_id":"efbca5dbfdd4060c4bff035555b93faf8f5a766e"},{"author":{"_account_id":31033,"name":"James Parker","email":"jparker@redhat.com","username":"jparker"},"change_message_id":"a3a476ac3fc5a9be0417313adca54adc20843e2c","unresolved":false,"context_lines":[{"line_number":84,"context_line":"        self.assertEqual("},{"line_number":85,"context_line":"            encrypted_disk_xml_element.find(\u0027./encryption\u0027).get(\u0027format\u0027),"},{"line_number":86,"context_line":"            \u0027luks\u0027, \u0027Expected encryption type luks but found %s\u0027 %"},{"line_number":87,"context_line":"            encrypted_disk_xml_element.find(\u0027./encryption\u0027).get(\u0027format\u0027))"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"        host \u003d get_ctlplane_address(server[\u0027OS-EXT-SRV-ATTR:host\u0027])"},{"line_number":90,"context_line":"        qemu_img_client \u003d QEMUImgClient(host)"}],"source_content_type":"text/x-python","patch_set":11,"id":"c45b08c0_cc4a7e77","line":87,"range":{"start_line":87,"start_character":12,"end_line":87,"end_character":73},"in_reply_to":"531e4647_c69456af","updated":"2021-02-09 13:27:55.000000000","message":"Ack","commit_id":"efbca5dbfdd4060c4bff035555b93faf8f5a766e"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"2d595fbbbb358c1925fd74748f16ea3048832312","unresolved":true,"context_lines":[{"line_number":90,"context_line":"        qemu_img_client \u003d QEMUImgClient(host)"},{"line_number":91,"context_line":""},{"line_number":92,"context_line":"        # Get encrypted volume\u0027s source dev path and auth user"},{"line_number":93,"context_line":"        path \u003d encrypted_disk_xml_element.find(\u0027./source\u0027).get(\u0027dev\u0027)"},{"line_number":94,"context_line":"        user \u003d encrypted_disk_xml_element.get(\u0027auth\u0027)"},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"        # Get volume details via qemu-img info with the volume source path"}],"source_content_type":"text/x-python","patch_set":11,"id":"53958baa_1496f2f2","line":93,"range":{"start_line":93,"start_character":8,"end_line":93,"end_character":69},"updated":"2021-02-09 09:56:33.000000000","message":"This isn\u0027t going to work with rbd volumes that present the following:\n\n    \u003csource protocol\u003d\u0027rbd\u0027 name\u003d\u0027volumes/volume-66f51baa-42d8-45b8-a3bb-4f532b9367d9\u0027 index\u003d\u00272\u0027\u003e\n        \u003chost name\u003d\u0027192.168.122.208\u0027 port\u003d\u00276789\u0027/\u003e\n    \u003c/source\u003e\n\nYou can pull the protocol out and do something like this:\n\n    protocol \u003d encrypted_disk_xml_element.find(\u0027./source\u0027).get(\u0027protocol\u0027)\n    if protocol and protocol \u003d\u003d \u0027rbd\u0027:\n        user \u003d encrypted_disk_xml_element.get(\u0027auth\u0027)\n        volume \u003d encrypted_disk_xml_element.find(\u0027./source\u0027).get(\u0027name\u0027)\n        path \u003d f\"rbd:{volume}:id\u003d{user}\"\n    else:\n        path \u003d encrypted_disk_xml_element.find(\u0027./source\u0027).get(\u0027dev\u0027)\n\n    qemu_info \u003d qemu_img_client.info(path)","commit_id":"efbca5dbfdd4060c4bff035555b93faf8f5a766e"},{"author":{"_account_id":31033,"name":"James Parker","email":"jparker@redhat.com","username":"jparker"},"change_message_id":"a3a476ac3fc5a9be0417313adca54adc20843e2c","unresolved":false,"context_lines":[{"line_number":90,"context_line":"        qemu_img_client \u003d QEMUImgClient(host)"},{"line_number":91,"context_line":""},{"line_number":92,"context_line":"        # Get encrypted volume\u0027s source dev path and auth user"},{"line_number":93,"context_line":"        path \u003d encrypted_disk_xml_element.find(\u0027./source\u0027).get(\u0027dev\u0027)"},{"line_number":94,"context_line":"        user \u003d encrypted_disk_xml_element.get(\u0027auth\u0027)"},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"        # Get volume details via qemu-img info with the volume source path"}],"source_content_type":"text/x-python","patch_set":11,"id":"2129c3ce_1f09656e","line":93,"range":{"start_line":93,"start_character":8,"end_line":93,"end_character":69},"in_reply_to":"53958baa_1496f2f2","updated":"2021-02-09 13:27:55.000000000","message":"Ack","commit_id":"efbca5dbfdd4060c4bff035555b93faf8f5a766e"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"2d595fbbbb358c1925fd74748f16ea3048832312","unresolved":true,"context_lines":[{"line_number":103,"context_line":"            qemu_info.get(\u0027encrypted\u0027), \u0027qemu-img did not report that the \u0027"},{"line_number":104,"context_line":"            \u0027volume was encrypted\u0027)"},{"line_number":105,"context_line":"        self.assertEqual("},{"line_number":106,"context_line":"            qemu_info.get(\u0027format\u0027), \u0027luks\u0027, \u0027Expected volume format to be \u0027"},{"line_number":107,"context_line":"            \u0027luks but instead found %s\u0027 % qemu_info.get(\u0027format\u0027))"}],"source_content_type":"text/x-python","patch_set":11,"id":"c9c03b5c_4c1e9364","line":106,"range":{"start_line":106,"start_character":12,"end_line":106,"end_character":43},"updated":"2021-02-09 09:56:33.000000000","message":"As above.","commit_id":"efbca5dbfdd4060c4bff035555b93faf8f5a766e"},{"author":{"_account_id":31033,"name":"James Parker","email":"jparker@redhat.com","username":"jparker"},"change_message_id":"a3a476ac3fc5a9be0417313adca54adc20843e2c","unresolved":false,"context_lines":[{"line_number":103,"context_line":"            qemu_info.get(\u0027encrypted\u0027), \u0027qemu-img did not report that the \u0027"},{"line_number":104,"context_line":"            \u0027volume was encrypted\u0027)"},{"line_number":105,"context_line":"        self.assertEqual("},{"line_number":106,"context_line":"            qemu_info.get(\u0027format\u0027), \u0027luks\u0027, \u0027Expected volume format to be \u0027"},{"line_number":107,"context_line":"            \u0027luks but instead found %s\u0027 % qemu_info.get(\u0027format\u0027))"}],"source_content_type":"text/x-python","patch_set":11,"id":"54317258_d9268ebd","line":106,"range":{"start_line":106,"start_character":12,"end_line":106,"end_character":43},"in_reply_to":"c9c03b5c_4c1e9364","updated":"2021-02-09 13:27:55.000000000","message":"Ack","commit_id":"efbca5dbfdd4060c4bff035555b93faf8f5a766e"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"5b45ba30ac1801f2edc46287594086d6bd733e5a","unresolved":true,"context_lines":[{"line_number":59,"context_line":"        xml \u003d self.get_server_xml(server[\u0027id\u0027])"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"        # Create a list of all attached volumes on the instance"},{"line_number":62,"context_line":"        attached_volumes \u003d xml.findall(\u0027.//disk\u0027)"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"        # Search the list of disks for the encrypted volume by matching the"},{"line_number":65,"context_line":"        # disk\u0027s serial id with the volume id provided by the volumes client"}],"source_content_type":"text/x-python","patch_set":12,"id":"7f2b3231_88738dad","line":62,"range":{"start_line":62,"start_character":41,"end_line":62,"end_character":43},"updated":"2021-02-10 21:52:20.000000000","message":"Is this a typo or an intentional double slashes for reasons I don\u0027t understand?","commit_id":"00eb0f17cfc4412d899c7971e8d31ab05735f81b"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"a59800941a725586ac615ef210877dfabbdd688f","unresolved":true,"context_lines":[{"line_number":59,"context_line":"        xml \u003d self.get_server_xml(server[\u0027id\u0027])"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"        # Create a list of all attached volumes on the instance"},{"line_number":62,"context_line":"        attached_volumes \u003d xml.findall(\u0027.//disk\u0027)"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"        # Search the list of disks for the encrypted volume by matching the"},{"line_number":65,"context_line":"        # disk\u0027s serial id with the volume id provided by the volumes client"}],"source_content_type":"text/x-python","patch_set":12,"id":"4bd786f3_2a39401d","line":62,"range":{"start_line":62,"start_character":41,"end_line":62,"end_character":43},"in_reply_to":"7f2b3231_88738dad","updated":"2021-02-10 23:08:27.000000000","message":"./ and .// have differnt meanins in xpath\n.//disk is any child (disk) relitive to this at any sub level of nesting\n./ is a direct child disk of the current ellemnt\nsee  https://www.w3schools.com/xml/xpath_syntax.asp\nSelecting Nodes section.\n\nim not sure if the use of // was intentional or not just pointing out that they are different.","commit_id":"00eb0f17cfc4412d899c7971e8d31ab05735f81b"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"0d0b66e3284ff5336507fa24be7512de447f7d06","unresolved":true,"context_lines":[{"line_number":66,"context_line":"        # and also query that it contains the \u0027encryption/secret\u0027 elements"},{"line_number":67,"context_line":"        xml_disk_elements \u003d [x for x in attached_volumes if"},{"line_number":68,"context_line":"                             getattr(x.find(\u0027./serial\u0027), \u0027text\u0027, None) \u003d\u003d"},{"line_number":69,"context_line":"                             encrypted_vol[\u0027id\u0027] and"},{"line_number":70,"context_line":"                             x.find(\"./encryption/secret\") is not None]"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"        # There should be one and only one disk element present in the"},{"line_number":73,"context_line":"        # instance xml that matches search criteria"}],"source_content_type":"text/x-python","patch_set":12,"id":"19f32460_b549a056","line":70,"range":{"start_line":69,"start_character":49,"end_line":70,"end_character":70},"updated":"2021-02-09 19:10:51.000000000","message":"Matching on the serial should be good enough and tbh is something we should extract into a utility method somewhere for reuse.\n\nWe could extract the secret UUID from the returned XML and assert that it is present in libvirt.","commit_id":"00eb0f17cfc4412d899c7971e8d31ab05735f81b"},{"author":{"_account_id":31033,"name":"James Parker","email":"jparker@redhat.com","username":"jparker"},"change_message_id":"27e59c2371d5541b70384e63f2955a052e1c1518","unresolved":true,"context_lines":[{"line_number":66,"context_line":"        # and also query that it contains the \u0027encryption/secret\u0027 elements"},{"line_number":67,"context_line":"        xml_disk_elements \u003d [x for x in attached_volumes if"},{"line_number":68,"context_line":"                             getattr(x.find(\u0027./serial\u0027), \u0027text\u0027, None) \u003d\u003d"},{"line_number":69,"context_line":"                             encrypted_vol[\u0027id\u0027] and"},{"line_number":70,"context_line":"                             x.find(\"./encryption/secret\") is not None]"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"        # There should be one and only one disk element present in the"},{"line_number":73,"context_line":"        # instance xml that matches search criteria"}],"source_content_type":"text/x-python","patch_set":12,"id":"0ce07b91_670929eb","line":70,"range":{"start_line":69,"start_character":49,"end_line":70,"end_character":70},"in_reply_to":"19f32460_b549a056","updated":"2021-02-09 19:35:18.000000000","message":"We recently discussed the need to reorganize and centralize our XML parsing methods, so +1 to creating an extraction utility method.\n\nWhen you say check the secret UUID in libvirt, do you mean confirming the secret UUID appears in \u0027virsh secret-list\u0027?","commit_id":"00eb0f17cfc4412d899c7971e8d31ab05735f81b"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"0d0b66e3284ff5336507fa24be7512de447f7d06","unresolved":true,"context_lines":[{"line_number":85,"context_line":"            \u0027luks\u0027, encryption_format, \u0027Expected encryption type luks but \u0027"},{"line_number":86,"context_line":"            \u0027found %s\u0027 % encryption_format)"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"        # Determine the encrypted disk\u0027s protocol. If RBD then gather user"},{"line_number":89,"context_line":"        # and volume name to generate path, otherwise just use \u0027source/dev\u0027 for"},{"line_number":90,"context_line":"        # volume path"},{"line_number":91,"context_line":"        protocol \u003d encrypted_disk_xml_element.find(\u0027./source\u0027).get(\u0027protocol\u0027)"},{"line_number":92,"context_line":"        if protocol and protocol \u003d\u003d \u0027rbd\u0027:"},{"line_number":93,"context_line":"            user \u003d encrypted_disk_xml_element.get(\u0027auth\u0027)"},{"line_number":94,"context_line":"            volume \u003d encrypted_disk_xml_element.find(\u0027./source\u0027).get(\u0027name\u0027)"},{"line_number":95,"context_line":"            path \u003d f\"rbd:{volume}:id\u003d{user}\""},{"line_number":96,"context_line":"        else:"},{"line_number":97,"context_line":"            path \u003d encrypted_disk_xml_element.find(\u0027./source\u0027).get(\u0027dev\u0027)"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"        # Get volume details from qemu-img info with the previously generated"},{"line_number":100,"context_line":"        # volume path"}],"source_content_type":"text/x-python","patch_set":12,"id":"5d70f960_ca5dec9f","line":97,"range":{"start_line":88,"start_character":0,"end_line":97,"end_character":73},"updated":"2021-02-09 19:10:51.000000000","message":"✔","commit_id":"00eb0f17cfc4412d899c7971e8d31ab05735f81b"}],"whitebox_tempest_plugin/services/clients.py":[{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"2d595fbbbb358c1925fd74748f16ea3048832312","unresolved":true,"context_lines":[{"line_number":71,"context_line":"    \"\"\"A client to get QEMU image info in json format\"\"\""},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"    def info(self, path, user\u003dNone):"},{"line_number":74,"context_line":"        if user:"},{"line_number":75,"context_line":"            path +\u003d \u0027:id\u003d%s\u0027 % user"},{"line_number":76,"context_line":"        command \u003d \u0027qemu-img info --output\u003djson --force-share %s\u0027 % path"},{"line_number":77,"context_line":"        output \u003d self.execute("},{"line_number":78,"context_line":"            command, container_name\u003d\u0027nova_libvirt\u0027, sudo\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":11,"id":"08e3ccb1_69cb2ff5","line":75,"range":{"start_line":74,"start_character":0,"end_line":75,"end_character":35},"updated":"2021-02-09 09:56:33.000000000","message":"You might want to add path.startswith(\u0027rbd\u0027) here as well.","commit_id":"efbca5dbfdd4060c4bff035555b93faf8f5a766e"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"581f6f5d0614e58289f60b7906468fab6f6e31e7","unresolved":true,"context_lines":[{"line_number":71,"context_line":"    \"\"\"A client to get QEMU image info in json format\"\"\""},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"    def info(self, path, user\u003dNone):"},{"line_number":74,"context_line":"        if user:"},{"line_number":75,"context_line":"            path +\u003d \u0027:id\u003d%s\u0027 % user"},{"line_number":76,"context_line":"        command \u003d \u0027qemu-img info --output\u003djson --force-share %s\u0027 % path"},{"line_number":77,"context_line":"        output \u003d self.execute("},{"line_number":78,"context_line":"            command, container_name\u003d\u0027nova_libvirt\u0027, sudo\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":11,"id":"c800d8eb_8ea8c192","line":75,"range":{"start_line":74,"start_character":0,"end_line":75,"end_character":35},"in_reply_to":"08e3ccb1_69cb2ff5","updated":"2021-02-09 09:58:12.000000000","message":"Sorry ignore this I reviewed this first before looking at the actual tests.\n\nYou can remove the user stuff from this IMHO and just provide the correct URI from the test directly.","commit_id":"efbca5dbfdd4060c4bff035555b93faf8f5a766e"},{"author":{"_account_id":31033,"name":"James Parker","email":"jparker@redhat.com","username":"jparker"},"change_message_id":"a3a476ac3fc5a9be0417313adca54adc20843e2c","unresolved":false,"context_lines":[{"line_number":71,"context_line":"    \"\"\"A client to get QEMU image info in json format\"\"\""},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"    def info(self, path, user\u003dNone):"},{"line_number":74,"context_line":"        if user:"},{"line_number":75,"context_line":"            path +\u003d \u0027:id\u003d%s\u0027 % user"},{"line_number":76,"context_line":"        command \u003d \u0027qemu-img info --output\u003djson --force-share %s\u0027 % path"},{"line_number":77,"context_line":"        output \u003d self.execute("},{"line_number":78,"context_line":"            command, container_name\u003d\u0027nova_libvirt\u0027, sudo\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":11,"id":"daeb2810_45597e7c","line":75,"range":{"start_line":74,"start_character":0,"end_line":75,"end_character":35},"in_reply_to":"c800d8eb_8ea8c192","updated":"2021-02-09 13:27:55.000000000","message":"Done","commit_id":"efbca5dbfdd4060c4bff035555b93faf8f5a766e"}]}
