)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":1921,"name":"Andrea Frittoli","email":"andrea.frittoli@gmail.com","username":"andrea-frittoli"},"change_message_id":"c5b50b60c56ec23c5a8e1539f3e8db3c22efde2a","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Add a test for cinder multiattach"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This adds a compute API test for testing a multiattach volume in"},{"line_number":10,"context_line":"Cinder being attached to multiple instances in Nova and then"},{"line_number":11,"context_line":"detaching them."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Follow on tests will test the boot from volume case with multiattach."},{"line_number":14,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":14,"id":"7aa08908_fbaa7f6f","line":11,"range":{"start_line":10,"start_character":52,"end_line":11,"end_character":15},"updated":"2016-06-06 09:04:52.000000000","message":"If the detach step is part of what you want to cover in this test, I think detach should be part of the test body as well and not only invoked via addCleanup.\nYou may want to include detach in the test name as well.\n\nI guess there are other scenarios that you may want to test, e.g. deleting one of the servers from a multi-attach without explicit volume detach first.","commit_id":"1631eed030b273da507f03ce01d203aa3c217550"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"553c03fcc4cf5ef7be576acf16a5450c79f6104c","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Add a test for cinder multiattach"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This adds a compute API test for testing a multiattach volume in"},{"line_number":10,"context_line":"Cinder being attached to multiple instances in Nova and then"},{"line_number":11,"context_line":"detaching them."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Follow on tests will test the boot from volume case with multiattach."},{"line_number":14,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":14,"id":"9f91af0f_ad5103db","line":11,"range":{"start_line":10,"start_character":52,"end_line":11,"end_character":15},"in_reply_to":"7aa08908_fbaa7f6f","updated":"2018-01-03 19:35:41.000000000","message":"Ack. Will probably add TODOs in the code since the first step is going to be getting this rebased successfully.","commit_id":"1631eed030b273da507f03ce01d203aa3c217550"}],"doc/source/microversion_testing.rst":[{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"54f4c8f3d36354fbe23f43c41da56121b1870ade","unresolved":false,"context_lines":[{"line_number":345,"context_line":"  * `2.60`_"},{"line_number":346,"context_line":""},{"line_number":347,"context_line":"  .. _2.60: https://docs.openstack.org/nova/latest/reference/api-microversion-history.html#id54"},{"line_number":348,"context_line":""},{"line_number":349,"context_line":"* Volume"},{"line_number":350,"context_line":""},{"line_number":351,"context_line":"  * `3.3`_"}],"source_content_type":"text/x-rst","patch_set":33,"id":"5f93b717_58d2775e","line":348,"range":{"start_line":348,"start_character":0,"end_line":348,"end_character":0},"updated":"2018-01-26 08:50:42.000000000","message":"thanks for updating this.","commit_id":"1e0eaf967f33398bac446bde557b87c07c8da269"}],"tempest/api/compute/base.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ed93ea6db90d0971d7c2a0f050aeae8de58a5fdf","unresolved":false,"context_lines":[{"line_number":269,"context_line":"        wait_until \u003d kwargs.pop(\u0027wait_until\u0027, None)"},{"line_number":270,"context_line":"        wait_for_server \u003d kwargs.pop(\u0027wait_for_server\u0027, True)"},{"line_number":271,"context_line":""},{"line_number":272,"context_line":"        image \u003d cls.compute_images_client.create_image(server_id, name\u003dname,"},{"line_number":273,"context_line":"                                                       **kwargs)"},{"line_number":274,"context_line":"        if api_version_utils.compare_version_header_to_response("},{"line_number":275,"context_line":"            \"OpenStack-API-Version\", \"compute 2.45\", image.response, \"lt\"):"}],"source_content_type":"text/x-python","patch_set":20,"id":"9f91af0f_60ce392f","line":272,"updated":"2018-01-08 15:44:39.000000000","message":"This is failing with 2.59 because the response body validation isn\u0027t expecting a response body, which is kind of weird when there is a microversion check below for it.\n\nhttp://logs.openstack.org/86/531386/6/check/tempest-full/9b6872d/job-output.txt.gz#_2018-01-07_23_57_52_731047","commit_id":"343280149fad3fed3c2f1db66b977e9cab86138e"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"349a9922ea4114316ce68fde72664ca5f98ab2ed","unresolved":false,"context_lines":[{"line_number":282,"context_line":""},{"line_number":283,"context_line":"        if wait_until is not None:"},{"line_number":284,"context_line":"            try:"},{"line_number":285,"context_line":"                # The compute image proxy APIs were deprecated in 2.36 so"},{"line_number":286,"context_line":"                # use the images client directly if the API microversion being"},{"line_number":287,"context_line":"                # used is \u003e\u003d2.36."},{"line_number":288,"context_line":"                if api_version_utils.compare_version_header_to_response("}],"source_content_type":"text/x-python","patch_set":20,"id":"9f91af0f_4e72564b","line":285,"updated":"2018-01-08 15:41:22.000000000","message":"This could be split out into a separate change.","commit_id":"343280149fad3fed3c2f1db66b977e9cab86138e"}],"tempest/api/compute/volumes/test_attach_volume.py":[{"author":{"_account_id":5997,"name":"Walt","display_name":"Hemna","email":"waboring@hemna.com","username":"walter-boring","status":"SAP"},"change_message_id":"95d86f175f4f66a47b27dcaa1d68007459502a27","unresolved":false,"context_lines":[{"line_number":85,"context_line":"            self.server[\u0027id\u0027])[\u0027addresses\u0027]"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"        # Create a volume and wait for it to become ready"},{"line_number":88,"context_line":"        kwargs \u003d dict(multiattach\u003dTrue) if multiattach else {}"},{"line_number":89,"context_line":"        self.volume \u003d self.volumes_client.create_volume("},{"line_number":90,"context_line":"            size\u003dCONF.volume.volume_size, display_name\u003d\u0027test\u0027,"},{"line_number":91,"context_line":"            **kwargs)[\u0027volume\u0027]"}],"source_content_type":"text/x-python","patch_set":1,"id":"da6ed579_3a628dae","line":88,"updated":"2016-01-12 23:14:26.000000000","message":"this should work for lvm, as lvm has multiattach capability enabled, but other cinder drivers currently don\u0027t support multiattach.   I\u0027m not sure how we account for it here, but we shouldn\u0027t try to do multiattach if we know tempest is configured for a cinder backend that doesn\u0027t support it.  the cinder create call will fail.","commit_id":"4ebf7e0d459cbf4923639dde81e40f54f4f86061"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"7e98f8ccc86d239f9e29e399212e2dad52f97b5f","unresolved":false,"context_lines":[{"line_number":85,"context_line":"            self.server[\u0027id\u0027])[\u0027addresses\u0027]"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"        # Create a volume and wait for it to become ready"},{"line_number":88,"context_line":"        kwargs \u003d dict(multiattach\u003dTrue) if multiattach else {}"},{"line_number":89,"context_line":"        self.volume \u003d self.volumes_client.create_volume("},{"line_number":90,"context_line":"            size\u003dCONF.volume.volume_size, display_name\u003d\u0027test\u0027,"},{"line_number":91,"context_line":"            **kwargs)[\u0027volume\u0027]"}],"source_content_type":"text/x-python","patch_set":1,"id":"da6ed579_faddd042","line":88,"in_reply_to":"da6ed579_3a628dae","updated":"2016-01-13 02:02:21.000000000","message":"Good point, that\u0027s what CONF.compute_feature_enabled.volume_multiattach is for. This is totally configurable, which I\u0027m doing in devstack here:\n\nhttps://review.openstack.org/#/c/266633/\n\nThat is going to have to enable this when using the nova libvirt driver and the cinder lvm backend.","commit_id":"4ebf7e0d459cbf4923639dde81e40f54f4f86061"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"d7e7d52eb331bb40fc32f777c62bd3387f8d89a4","unresolved":false,"context_lines":[{"line_number":82,"context_line":""},{"line_number":83,"context_line":"        # Record addresses so that we can ssh later"},{"line_number":84,"context_line":"        self.server[\u0027addresses\u0027] \u003d self.servers_client.list_addresses("},{"line_number":85,"context_line":"            self.server[\u0027id\u0027])[\u0027addresses\u0027]"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"        # Create a volume and wait for it to become ready"},{"line_number":88,"context_line":"        kwargs \u003d dict(multiattach\u003dTrue) if multiattach else {}"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a68dd71_e45c93ef","line":85,"range":{"start_line":85,"start_character":12,"end_line":85,"end_character":29},"updated":"2016-01-20 15:11:45.000000000","message":"This is wrong for multiattach, you get a different result back for create_test_server when min_count is used:\n\nhttp://logs.openstack.org/33/266633/2/check/gate-tempest-dsvm-full/8795802/console.html#_2016-01-19_21_37_56_913","commit_id":"4802fb82a710a38d534df9b22cef1cb29ce67897"},{"author":{"_account_id":5689,"name":"Masayuki Igawa","email":"masayuki@igawa.io","username":"igawa"},"change_message_id":"b5d3fbf6de88afdbba10955f9660ebcf40d6457a","unresolved":false,"context_lines":[{"line_number":95,"context_line":""},{"line_number":96,"context_line":"        # Attach the volume to the server(s)"},{"line_number":97,"context_line":"        self.attachments \u003d {}"},{"line_number":98,"context_line":"        for server in self.servers:"},{"line_number":99,"context_line":"            # map the server id to the volume attachment"},{"line_number":100,"context_line":"            self.attachments[server[\u0027id\u0027]] \u003d \\"},{"line_number":101,"context_line":"                self.servers_client.attach_volume("}],"source_content_type":"text/x-python","patch_set":3,"id":"da6ed579_3e466f7b","line":98,"updated":"2016-01-15 06:37:57.000000000","message":"Does this \u0027self.servers\u0027 contain all the servers of the base.BaseV2ComputeTest class?\n# This may be a silly question, though.","commit_id":"4802fb82a710a38d534df9b22cef1cb29ce67897"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"d7e7d52eb331bb40fc32f777c62bd3387f8d89a4","unresolved":false,"context_lines":[{"line_number":95,"context_line":""},{"line_number":96,"context_line":"        # Attach the volume to the server(s)"},{"line_number":97,"context_line":"        self.attachments \u003d {}"},{"line_number":98,"context_line":"        for server in self.servers:"},{"line_number":99,"context_line":"            # map the server id to the volume attachment"},{"line_number":100,"context_line":"            self.attachments[server[\u0027id\u0027]] \u003d \\"},{"line_number":101,"context_line":"                self.servers_client.attach_volume("}],"source_content_type":"text/x-python","patch_set":3,"id":"9a68dd71_6400a3ab","line":98,"in_reply_to":"da6ed579_3e466f7b","updated":"2016-01-20 15:11:45.000000000","message":"Good question - I know I\u0027m storing this incorrectly above so I have to update this and I\u0027ll check on that.","commit_id":"4802fb82a710a38d534df9b22cef1cb29ce67897"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"70756968ea4c727bf78b5072978d14c425099557","unresolved":false,"context_lines":[{"line_number":51,"context_line":""},{"line_number":52,"context_line":"    def _detach(self, server_id, volume_id):"},{"line_number":53,"context_line":"        if self.attachments:"},{"line_number":54,"context_line":"            self.servers_client.detach_volume(server_id, volume_id)"},{"line_number":55,"context_line":"            # If there is only one attached server, then detaching the volume"},{"line_number":56,"context_line":"            # should put it back in \u0027available\u0027 status, else it will stay"},{"line_number":57,"context_line":"            # \u0027in-use\u0027."}],"source_content_type":"text/x-python","patch_set":4,"id":"9a68dd71_6aba4e70","line":54,"updated":"2016-01-22 01:18:18.000000000","message":"Something is failing here:\n\nhttp://logs.openstack.org/33/266633/2/check/gate-tempest-dsvm-full/93b2e47//console.html#_2016-01-22_01_08_51_614","commit_id":"8644e4e9f8c04abd8e70367a9882bb0493ebe227"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"a32420ef59b3139afcb30f51a5ff0d874fad922e","unresolved":false,"context_lines":[{"line_number":51,"context_line":""},{"line_number":52,"context_line":"    def _detach(self, server_id, volume_id):"},{"line_number":53,"context_line":"        if self.attachments:"},{"line_number":54,"context_line":"            self.servers_client.detach_volume(server_id, volume_id)"},{"line_number":55,"context_line":"            # If there is only one attached server, then detaching the volume"},{"line_number":56,"context_line":"            # should put it back in \u0027available\u0027 status, else it will stay"},{"line_number":57,"context_line":"            # \u0027in-use\u0027."}],"source_content_type":"text/x-python","patch_set":4,"id":"9a68dd71_089e0c63","line":54,"in_reply_to":"9a68dd71_6aba4e70","updated":"2016-01-22 19:27:50.000000000","message":"So the issue is we aren\u0027t waiting for the first attachment to be gone when we make the 2nd attachment request. While the first detach is happening, the volume\u0027s attach_status is \u0027detaching\u0027 and the volume status is \u0027in-use\u0027.\n\nThe \u0027attach_status\u0027 is not in the volume response body, so we (tempest) are going to have to check the volume status + the attachment list before we can move on in the case of multiattach. So in the multiattach case, we need to get the attachment_id for the server and volume before calling detach, then call detach, and then poll the volume until that attachment_id is no longer associated.","commit_id":"8644e4e9f8c04abd8e70367a9882bb0493ebe227"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"70756968ea4c727bf78b5072978d14c425099557","unresolved":false,"context_lines":[{"line_number":66,"context_line":"    def _delete_volume(self):"},{"line_number":67,"context_line":"        # Delete the created Volumes"},{"line_number":68,"context_line":"        if self.volume:"},{"line_number":69,"context_line":"            self.volumes_client.delete_volume(self.volume[\u0027id\u0027])"},{"line_number":70,"context_line":"            self.volumes_client.wait_for_resource_deletion(self.volume[\u0027id\u0027])"},{"line_number":71,"context_line":"            self.volume \u003d None"},{"line_number":72,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"9a68dd71_8ac8e223","line":69,"updated":"2016-01-22 01:18:18.000000000","message":"This fails because it\u0027s not waiting for the detach to complete.\n\nhttp://logs.openstack.org/33/266633/2/check/gate-tempest-dsvm-full/93b2e47//console.html","commit_id":"8644e4e9f8c04abd8e70367a9882bb0493ebe227"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"70756968ea4c727bf78b5072978d14c425099557","unresolved":false,"context_lines":[{"line_number":106,"context_line":"        # list."},{"line_number":107,"context_line":"        servers \u003d []"},{"line_number":108,"context_line":"        for x in range(2):"},{"line_number":109,"context_line":"            servers.append(self.create_test_server(wait_until\u003d\u0027ACTIVE\u0027))"},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"        # Create a volume and wait for it to become ready"},{"line_number":112,"context_line":"        self.volume \u003d self.volumes_client.create_volume("}],"source_content_type":"text/x-python","patch_set":4,"id":"9a68dd71_2a51b662","line":109,"updated":"2016-01-22 01:18:18.000000000","message":"We should create the servers and then wait for them to go ACTIVE so we\u0027re not making this serial.","commit_id":"8644e4e9f8c04abd8e70367a9882bb0493ebe227"},{"author":{"_account_id":9562,"name":"Ildiko Vancsa","email":"ildiko.vancsa@gmail.com","username":"ildikov"},"change_message_id":"5c756047acc47f2bf188cace448fd577eddd0829","unresolved":false,"context_lines":[{"line_number":228,"context_line":"        # List attachments from the volume and make sure the server uuids"},{"line_number":229,"context_line":"        # are in that list."},{"line_number":230,"context_line":"        attachments \u003d self.volumes_client.show_volume("},{"line_number":231,"context_line":"            self.volume[\u0027id\u0027])[\u0027attachments\u0027]"},{"line_number":232,"context_line":"        attached_server_ids \u003d [attachment[\u0027server_id\u0027]"},{"line_number":233,"context_line":"                               for attachment in attachments]"},{"line_number":234,"context_line":"        self.assertEqual(2, len(attached_server_ids))"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a68dd71_0b8034bf","line":231,"range":{"start_line":231,"start_character":30,"end_line":231,"end_character":45},"updated":"2016-01-23 09:38:26.000000000","message":"this should be [\u0027volume\u0027][\u0027attachments\u0027], see the API response here: http://developer.openstack.org/api-ref-blockstorage-v2.html#showVolume\n\nI uploaded a new patch set with the fix to see the test runs, detach is looking good now.","commit_id":"cdd8a4148c6184cd95b1ca64050c87dd733b5cb6"},{"author":{"_account_id":9562,"name":"Ildiko Vancsa","email":"ildiko.vancsa@gmail.com","username":"ildikov"},"change_message_id":"d4b7cac370440e3415c60fdfe799af5768667066","unresolved":false,"context_lines":[{"line_number":52,"context_line":"        super(AttachVolumeTestJSON, cls).resource_setup()"},{"line_number":53,"context_line":"        cls.device \u003d CONF.compute.volume_device_name"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"    def _detach(self, server_id, volume_id):"},{"line_number":56,"context_line":"        if self.attachments:"},{"line_number":57,"context_line":"            LOG.debug(\u0027Detaching volume %s from server %s. Currently there \u0027"},{"line_number":58,"context_line":"                      \u0027are %s attachments.\u0027,"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a68dd71_4862ad3f","line":55,"range":{"start_line":55,"start_character":7,"end_line":55,"end_character":15},"updated":"2016-01-23 14:03:42.000000000","message":"Here is the disconnect_volume issue: http://logs.openstack.org/33/266633/2/check/gate-tempest-dsvm-full/8302217/logs/screen-n-cpu.txt.gz#_2016-01-23_12_25_18_587\n\nFor the second detach \u0027No records\u0027 found, as the initiator is removed at the time of the first attachment: http://logs.openstack.org/33/266633/2/check/gate-tempest-dsvm-full/8302217/logs/screen-n-cpu.txt.gz#_2016-01-23_12_25_14_939\n\nThe target is also removed at the first detach on the Cinder side, \"No iscsi_target...\": http://logs.openstack.org/33/266633/2/check/gate-tempest-dsvm-full/8302217/logs/screen-c-vol.txt.gz#_2016-01-23_12_25_20_345","commit_id":"fdf5b8bf69b15c5539541d24b2e4b6b2e5c3b39b"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"73615fb88299f61d87460aee58af79c37881cc94","unresolved":false,"context_lines":[{"line_number":52,"context_line":"        super(AttachVolumeTestJSON, cls).resource_setup()"},{"line_number":53,"context_line":"        cls.device \u003d CONF.compute.volume_device_name"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"    def _detach(self, server_id, volume_id):"},{"line_number":56,"context_line":"        if self.attachments:"},{"line_number":57,"context_line":"            LOG.debug(\u0027Detaching volume %s from server %s. Currently there \u0027"},{"line_number":58,"context_line":"                      \u0027are %s attachments.\u0027,"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a68dd71_fd28f434","line":55,"range":{"start_line":55,"start_character":7,"end_line":55,"end_character":15},"in_reply_to":"9a68dd71_4862ad3f","updated":"2016-01-24 16:33:18.000000000","message":"OK, bug in nova or cinder? Or talk to hemna?","commit_id":"fdf5b8bf69b15c5539541d24b2e4b6b2e5c3b39b"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"5d4c46ce991f629e5de4b46c7d83e0c828446c7b","unresolved":false,"context_lines":[{"line_number":52,"context_line":"        super(AttachVolumeTestJSON, cls).resource_setup()"},{"line_number":53,"context_line":"        cls.device \u003d CONF.compute.volume_device_name"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"    def _detach(self, server_id, volume_id):"},{"line_number":56,"context_line":"        if self.attachments:"},{"line_number":57,"context_line":"            LOG.debug(\u0027Detaching volume %s from server %s. Currently there \u0027"},{"line_number":58,"context_line":"                      \u0027are %s attachments.\u0027,"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a68dd71_93acff36","line":55,"range":{"start_line":55,"start_character":7,"end_line":55,"end_character":15},"in_reply_to":"9a68dd71_9da538a3","updated":"2016-01-26 10:22:31.000000000","message":"This: \"or we handle it as part of the multiattach feature implementation\"","commit_id":"fdf5b8bf69b15c5539541d24b2e4b6b2e5c3b39b"},{"author":{"_account_id":9562,"name":"Ildiko Vancsa","email":"ildiko.vancsa@gmail.com","username":"ildikov"},"change_message_id":"3d5e9961d7eb56d3b810e0d99e37d9ca0651f7a2","unresolved":false,"context_lines":[{"line_number":52,"context_line":"        super(AttachVolumeTestJSON, cls).resource_setup()"},{"line_number":53,"context_line":"        cls.device \u003d CONF.compute.volume_device_name"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"    def _detach(self, server_id, volume_id):"},{"line_number":56,"context_line":"        if self.attachments:"},{"line_number":57,"context_line":"            LOG.debug(\u0027Detaching volume %s from server %s. Currently there \u0027"},{"line_number":58,"context_line":"                      \u0027are %s attachments.\u0027,"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a68dd71_9da538a3","line":55,"range":{"start_line":55,"start_character":7,"end_line":55,"end_character":15},"in_reply_to":"9a68dd71_fd28f434","updated":"2016-01-24 16:57:06.000000000","message":"All of these. :) It\u0027s actually not one bug, but two, one on Cinder and one on Nova.\n\nAs removing the target too early is a Cinder issue and it\u0027s currently specific to the lvm driver as far as I know. I talked to hemna about this, he has a fix up for review, but since then jgriffith had another idea how to fix the issue, so I think we will need to talk to both of them or discuss this on the mid-cycle how it would be the best to handle the issue. And there\u0027s already a bug reported for this issue: https://bugs.launchpad.net/cinder/+bug/1471278 This is why the \u0027Pass host to Cinder\u0027 patch was needed.\n\nThe disconnect_volume issue is on Nova side, we call out to os-brick immediately so the initiator is removed during the first detach. My best guess would be to check in check_detach whether there\u0027s another attachment on the host or not and pass the result to the virt_driver and call out to os-brick or not based on that. I rely on you and ndipanov on this that what would be the best and less racy solution here. Should I report a bug for this issue or we handle it as part of the multiattach feature implementation?","commit_id":"fdf5b8bf69b15c5539541d24b2e4b6b2e5c3b39b"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"73615fb88299f61d87460aee58af79c37881cc94","unresolved":false,"context_lines":[{"line_number":67,"context_line":"                # sets the volume status to \u0027detaching\u0027 before the Nova API"},{"line_number":68,"context_line":"                # casts off to the compute to do the actual detach, at which"},{"line_number":69,"context_line":"                # point the volume status will go back to \u0027in-use\u0027."},{"line_number":70,"context_line":"                self.volumes_client.wait_for_volume_status("},{"line_number":71,"context_line":"                    volume_id, \u0027detaching\u0027)"},{"line_number":72,"context_line":"                self.volumes_client.wait_for_volume_status("},{"line_number":73,"context_line":"                    volume_id, \u0027in-use\u0027)"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a68dd71_dd23b056","line":70,"updated":"2016-01-24 16:33:18.000000000","message":"We probably don\u0027t even have to check for detaching status. Nova calls to Cinder to put it in detaching status before returning the response on the detach REST API, so the volume should already be in \u0027detaching\u0027 status, so Tempest could just wait for it to go to \u0027in-use\u0027. If the detach failed I\u0027d expect the volume to go to an error state rather than back to in-use, that might be the only issue with not waiting for the volume to go to \u0027detaching\u0027 status.","commit_id":"fdf5b8bf69b15c5539541d24b2e4b6b2e5c3b39b"},{"author":{"_account_id":9562,"name":"Ildiko Vancsa","email":"ildiko.vancsa@gmail.com","username":"ildikov"},"change_message_id":"3d5e9961d7eb56d3b810e0d99e37d9ca0651f7a2","unresolved":false,"context_lines":[{"line_number":67,"context_line":"                # sets the volume status to \u0027detaching\u0027 before the Nova API"},{"line_number":68,"context_line":"                # casts off to the compute to do the actual detach, at which"},{"line_number":69,"context_line":"                # point the volume status will go back to \u0027in-use\u0027."},{"line_number":70,"context_line":"                self.volumes_client.wait_for_volume_status("},{"line_number":71,"context_line":"                    volume_id, \u0027detaching\u0027)"},{"line_number":72,"context_line":"                self.volumes_client.wait_for_volume_status("},{"line_number":73,"context_line":"                    volume_id, \u0027in-use\u0027)"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a68dd71_bd94bc42","line":70,"in_reply_to":"9a68dd71_dd23b056","updated":"2016-01-24 16:57:06.000000000","message":"I agree, I was wondering the same thing. The volume is supposed to go into \u0027detaching\u0027 state when begin_detaching is called, which means that it does not make much sense to wait for it here. I\u0027m not sure, when and how the error states are handled.","commit_id":"fdf5b8bf69b15c5539541d24b2e4b6b2e5c3b39b"},{"author":{"_account_id":7350,"name":"Jordan Pittier","email":"jordan.pittier@gmail.com","username":"JordanP"},"change_message_id":"095cd43542ceb9e0ba003ff057d6207be2a5b67d","unresolved":false,"context_lines":[{"line_number":87,"context_line":"            self.volumes_client.wait_for_resource_deletion(self.volume[\u0027id\u0027])"},{"line_number":88,"context_line":"            self.volume \u003d None"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"    def _create_volume(self, multiattach\u003dFalse):"},{"line_number":91,"context_line":"        # Create a volume and wait for it to become ready"},{"line_number":92,"context_line":"        name \u003d \u0027multiattach-vol\u0027 if multiattach else \u0027test\u0027"},{"line_number":93,"context_line":"        kwargs \u003d dict(multiattach\u003dTrue) if multiattach else {}"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a68dd71_3a6c3634","line":90,"updated":"2016-01-25 12:45:55.000000000","message":"Yet another wrapper. \n\nI am going to submit a patch that does this \u0027create_volume, addCleanup, wait_for_volume_status\u0027 everywhere and consistently. We keep duplicating some code here.","commit_id":"fdf5b8bf69b15c5539541d24b2e4b6b2e5c3b39b"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"5d4c46ce991f629e5de4b46c7d83e0c828446c7b","unresolved":false,"context_lines":[{"line_number":87,"context_line":"            self.volumes_client.wait_for_resource_deletion(self.volume[\u0027id\u0027])"},{"line_number":88,"context_line":"            self.volume \u003d None"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"    def _create_volume(self, multiattach\u003dFalse):"},{"line_number":91,"context_line":"        # Create a volume and wait for it to become ready"},{"line_number":92,"context_line":"        name \u003d \u0027multiattach-vol\u0027 if multiattach else \u0027test\u0027"},{"line_number":93,"context_line":"        kwargs \u003d dict(multiattach\u003dTrue) if multiattach else {}"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a68dd71_f3ec5b94","line":90,"in_reply_to":"9a68dd71_3a6c3634","updated":"2016-01-26 10:22:31.000000000","message":"Yeah the difference here is the multiattach flag, which in earlier patch sets I was integrating into the existing method, but it got messy so I just did this and pulled the common parts out.","commit_id":"fdf5b8bf69b15c5539541d24b2e4b6b2e5c3b39b"},{"author":{"_account_id":7350,"name":"Jordan Pittier","email":"jordan.pittier@gmail.com","username":"JordanP"},"change_message_id":"095cd43542ceb9e0ba003ff057d6207be2a5b67d","unresolved":false,"context_lines":[{"line_number":92,"context_line":"        name \u003d \u0027multiattach-vol\u0027 if multiattach else \u0027test\u0027"},{"line_number":93,"context_line":"        kwargs \u003d dict(multiattach\u003dTrue) if multiattach else {}"},{"line_number":94,"context_line":"        # TODO(mriedem): eventually stop storing volume as a class variable"},{"line_number":95,"context_line":"        self.volume \u003d self.volumes_client.create_volume("},{"line_number":96,"context_line":"            size\u003dCONF.volume.volume_size, display_name\u003dname,"},{"line_number":97,"context_line":"            **kwargs)[\u0027volume\u0027]"},{"line_number":98,"context_line":"        self.addCleanup(self._delete_volume)"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a68dd71_c652ea34","line":95,"updated":"2016-01-25 12:45:55.000000000","message":"Make this a local variable and return volume at the end of this method","commit_id":"fdf5b8bf69b15c5539541d24b2e4b6b2e5c3b39b"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"5d4c46ce991f629e5de4b46c7d83e0c828446c7b","unresolved":false,"context_lines":[{"line_number":92,"context_line":"        name \u003d \u0027multiattach-vol\u0027 if multiattach else \u0027test\u0027"},{"line_number":93,"context_line":"        kwargs \u003d dict(multiattach\u003dTrue) if multiattach else {}"},{"line_number":94,"context_line":"        # TODO(mriedem): eventually stop storing volume as a class variable"},{"line_number":95,"context_line":"        self.volume \u003d self.volumes_client.create_volume("},{"line_number":96,"context_line":"            size\u003dCONF.volume.volume_size, display_name\u003dname,"},{"line_number":97,"context_line":"            **kwargs)[\u0027volume\u0027]"},{"line_number":98,"context_line":"        self.addCleanup(self._delete_volume)"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a68dd71_d3b9177b","line":95,"in_reply_to":"9a68dd71_c652ea34","updated":"2016-01-26 10:22:31.000000000","message":"That\u0027s what the TODO is for. I can\u0027t do that here because it\u0027s used in the cleanup methods as a class variable. Otherwise I agree with you.","commit_id":"fdf5b8bf69b15c5539541d24b2e4b6b2e5c3b39b"},{"author":{"_account_id":7350,"name":"Jordan Pittier","email":"jordan.pittier@gmail.com","username":"JordanP"},"change_message_id":"095cd43542ceb9e0ba003ff057d6207be2a5b67d","unresolved":false,"context_lines":[{"line_number":116,"context_line":"            # actually attaches the server to the volume."},{"line_number":117,"context_line":"            self.volumes_client.wait_for_volume_status(volume_id,"},{"line_number":118,"context_line":"                                                       \u0027in-use\u0027)"},{"line_number":119,"context_line":"            self.addCleanup(self._detach, server[\u0027id\u0027], self.volume[\u0027id\u0027])"},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"    def _create_and_attach(self):"},{"line_number":122,"context_line":"        # Start a server and wait for it to become ready"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a68dd71_9a50c20c","line":119,"updated":"2016-01-25 12:45:55.000000000","message":"Could this be \nself.addCleanup(self._detach, server[\u0027id\u0027], volume_id)\n?\n\nI know Tempest is not the best example but let\u0027s try not to use class variable when we have the info passed as a parameter.","commit_id":"fdf5b8bf69b15c5539541d24b2e4b6b2e5c3b39b"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"5d4c46ce991f629e5de4b46c7d83e0c828446c7b","unresolved":false,"context_lines":[{"line_number":116,"context_line":"            # actually attaches the server to the volume."},{"line_number":117,"context_line":"            self.volumes_client.wait_for_volume_status(volume_id,"},{"line_number":118,"context_line":"                                                       \u0027in-use\u0027)"},{"line_number":119,"context_line":"            self.addCleanup(self._detach, server[\u0027id\u0027], self.volume[\u0027id\u0027])"},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"    def _create_and_attach(self):"},{"line_number":122,"context_line":"        # Start a server and wait for it to become ready"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a68dd71_f32f7ba5","line":119,"in_reply_to":"9a68dd71_9a50c20c","updated":"2016-01-26 10:22:31.000000000","message":"Yeah I can change to that, this is a carry over from a previous patch set.","commit_id":"fdf5b8bf69b15c5539541d24b2e4b6b2e5c3b39b"},{"author":{"_account_id":13167,"name":"Yogesh","email":"ykshirsa@netapp.com","username":"yogi1"},"change_message_id":"6938dd50b39e9fc54e522c036cee596d95db73f3","unresolved":false,"context_lines":[{"line_number":86,"context_line":"            self.volume \u003d None"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"    def _create_volume(self, multiattach\u003dFalse):"},{"line_number":89,"context_line":"        # Create a volume and wait for it to become ready"},{"line_number":90,"context_line":"        name \u003d \u0027multiattach-vol\u0027 if multiattach else \u0027test\u0027"},{"line_number":91,"context_line":"        kwargs \u003d dict(multiattach\u003dTrue) if multiattach else {}"},{"line_number":92,"context_line":"        # TODO(mriedem): eventually stop storing volume as a class variable"}],"source_content_type":"text/x-python","patch_set":8,"id":"7a5de9d1_1f4c516f","line":89,"range":{"start_line":89,"start_character":52,"end_line":89,"end_character":57},"updated":"2016-01-28 16:13:09.000000000","message":"s/ready/available","commit_id":"15e48c9357da65d657aa6e6456b9b8c8c88aec6c"},{"author":{"_account_id":1921,"name":"Andrea Frittoli","email":"andrea.frittoli@gmail.com","username":"andrea-frittoli"},"change_message_id":"c5b50b60c56ec23c5a8e1539f3e8db3c22efde2a","unresolved":false,"context_lines":[{"line_number":55,"context_line":"        cls.device \u003d CONF.compute.volume_device_name"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"    def _detach(self, server_id, volume_id):"},{"line_number":58,"context_line":"        if self.attachments:"},{"line_number":59,"context_line":"            LOG.debug(\u0027Detaching volume %s from server %s. Currently there \u0027"},{"line_number":60,"context_line":"                      \u0027are %s attachments.\u0027,"},{"line_number":61,"context_line":"                      volume_id, server_id, len(self.attachments))"}],"source_content_type":"text/x-python","patch_set":14,"id":"7aa08908_7b3a0f38","line":58,"range":{"start_line":58,"start_character":8,"end_line":58,"end_character":28},"updated":"2016-06-06 09:04:52.000000000","message":"NOTE: this is needed in case the cleanup is called as part of the test, but also stacked into the cleanup queue. Storing the list of attachments in the class but relying on server_id and volume_id here feels a bit odd. You could pass the expected target status as a parameter as well.","commit_id":"1631eed030b273da507f03ce01d203aa3c217550"},{"author":{"_account_id":1921,"name":"Andrea Frittoli","email":"andrea.frittoli@gmail.com","username":"andrea-frittoli"},"change_message_id":"c5b50b60c56ec23c5a8e1539f3e8db3c22efde2a","unresolved":false,"context_lines":[{"line_number":101,"context_line":""},{"line_number":102,"context_line":"    def _attach_volume_to_servers(self, volume_id, servers):"},{"line_number":103,"context_line":"        # Attaches the given volume to the list of servers."},{"line_number":104,"context_line":"        # TODO(mriedem): eventually stop storing attachments as a class var"},{"line_number":105,"context_line":"        self.attachments \u003d {}"},{"line_number":106,"context_line":"        for server in servers:"},{"line_number":107,"context_line":"            # map the server id to the volume attachment"}],"source_content_type":"text/x-python","patch_set":14,"id":"7aa08908_7baa0fd6","line":104,"range":{"start_line":104,"start_character":8,"end_line":104,"end_character":75},"updated":"2016-06-06 09:04:52.000000000","message":"I was going to comment that we should invest towards storing less in the class rather than more, but it\u0027s ok to do that in a separate change.","commit_id":"1631eed030b273da507f03ce01d203aa3c217550"},{"author":{"_account_id":1921,"name":"Andrea Frittoli","email":"andrea.frittoli@gmail.com","username":"andrea-frittoli"},"change_message_id":"c5b50b60c56ec23c5a8e1539f3e8db3c22efde2a","unresolved":false,"context_lines":[{"line_number":169,"context_line":"        # Attach the volume to the servers"},{"line_number":170,"context_line":"        self._attach_volume_to_servers(self.volume[\u0027id\u0027], servers)"},{"line_number":171,"context_line":""},{"line_number":172,"context_line":"        return servers"},{"line_number":173,"context_line":""},{"line_number":174,"context_line":"    @test.idempotent_id(\u002752e9045a-e90d-4c0d-9087-79d657faffff\u0027)"},{"line_number":175,"context_line":"    @testtools.skipUnless(CONF.validation.run_validation,"}],"source_content_type":"text/x-python","patch_set":14,"id":"7aa08908_fb31dfed","line":172,"range":{"start_line":172,"start_character":8,"end_line":172,"end_character":22},"updated":"2016-06-06 09:04:52.000000000","message":"It\u0027s nice to return the servers here, it\u0027s a bit strange to return them and not the volume which is provisioned as well, but I understand that self.volume is used already a lot in the code, and removing that is out of scope of this change.","commit_id":"1631eed030b273da507f03ce01d203aa3c217550"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"553c03fcc4cf5ef7be576acf16a5450c79f6104c","unresolved":false,"context_lines":[{"line_number":306,"context_line":"    @test.idempotent_id(\u00278d5853f7-56e7-4988-9b0c-48cea3c7049a\u0027)"},{"line_number":307,"context_line":"    @testtools.skipUnless(CONF.compute_feature_enabled.volume_multiattach,"},{"line_number":308,"context_line":"                          \u0027Unable to attach a volume to multiple instances.\u0027)"},{"line_number":309,"context_line":"    def test_list_get_volume_attachments_multiattach(self):"},{"line_number":310,"context_line":"        # Attach a single volume to two servers."},{"line_number":311,"context_line":"        servers \u003d self._create_and_multiattach()"},{"line_number":312,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"9f91af0f_6d7e9be5","line":309,"range":{"start_line":309,"start_character":8,"end_line":309,"end_character":52},"updated":"2018-01-03 19:35:41.000000000","message":"This should be in AttachVolumeTestJSON since it doesn\u0027t do anything with shelve. Or it should go into it\u0027s own test class.","commit_id":"1631eed030b273da507f03ce01d203aa3c217550"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"0f7887805dd456154ecd9b5c7ea710a170c0c2df","unresolved":false,"context_lines":[{"line_number":283,"context_line":"        attachments \u003d {}"},{"line_number":284,"context_line":"        for server in servers:"},{"line_number":285,"context_line":"            # map the server id to the volume attachment"},{"line_number":286,"context_line":"            attachments[server[\u0027id\u0027]] \u003d self.attach_volume(server, volume)"},{"line_number":287,"context_line":"            # NOTE(mriedem): In the case of multi-attach, after the first"},{"line_number":288,"context_line":"            # attach the volume will be in-use. On the second attach, nova will"},{"line_number":289,"context_line":"            # \u0027reserve\u0027 the volume which puts it back into \u0027attaching\u0027 status"}],"source_content_type":"text/x-python","patch_set":17,"id":"9f91af0f_c062f73e","line":286,"range":{"start_line":286,"start_character":45,"end_line":286,"end_character":58},"updated":"2018-01-03 21:08:34.000000000","message":"The problem with this is that on teardown of the test, this detaches the volume and waits for the volume to be available, but for a multiattach volume with multiple attachments, it won\u0027t be available until the final attachment is gone, so we\u0027ll need to build some attachment counting logic into the detach volume code.","commit_id":"ee931198c1f59cf0c8a2199c1f3e4ec940259173"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"a1742560558a522e212dcf53a18b570c0a1224e6","unresolved":false,"context_lines":[{"line_number":335,"context_line":"                server[\u0027id\u0027])[\u0027volumeAttachments\u0027]"},{"line_number":336,"context_line":"            self.assertEqual(1, len(body))"},{"line_number":337,"context_line":"            attachment \u003d attachments[server[\u0027id\u0027]]"},{"line_number":338,"context_line":"            # FIXME(mriedem): Isn\u0027t this checking that a dict is in a dict?"},{"line_number":339,"context_line":"            self.assertIn(attachment, body)"},{"line_number":340,"context_line":""},{"line_number":341,"context_line":"            # Get Volume attachment of the server"},{"line_number":342,"context_line":"            body \u003d self.servers_client.show_volume_attachment("}],"source_content_type":"text/x-python","patch_set":17,"id":"9f91af0f_0050df5c","line":339,"range":{"start_line":338,"start_character":12,"end_line":339,"end_character":43},"updated":"2018-01-03 21:10:52.000000000","message":"This should be something like:\n\nself.assertDictEqual(attachment, body[0])","commit_id":"ee931198c1f59cf0c8a2199c1f3e4ec940259173"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"a1742560558a522e212dcf53a18b570c0a1224e6","unresolved":false,"context_lines":[{"line_number":338,"context_line":"            # FIXME(mriedem): Isn\u0027t this checking that a dict is in a dict?"},{"line_number":339,"context_line":"            self.assertIn(attachment, body)"},{"line_number":340,"context_line":""},{"line_number":341,"context_line":"            # Get Volume attachment of the server"},{"line_number":342,"context_line":"            body \u003d self.servers_client.show_volume_attachment("},{"line_number":343,"context_line":"                server[\u0027id\u0027], attachment[\u0027id\u0027])[\u0027volumeAttachment\u0027]"},{"line_number":344,"context_line":"            self.assertEqual(server[\u0027id\u0027], body[\u0027serverId\u0027])"},{"line_number":345,"context_line":"            self.assertEqual(volume[\u0027id\u0027], body[\u0027volumeId\u0027])"},{"line_number":346,"context_line":"            self.assertEqual(attachment[\u0027id\u0027], body[\u0027id\u0027])"},{"line_number":347,"context_line":""},{"line_number":348,"context_line":"    # TODO(mriedem): Test attach/detach with multiattach."},{"line_number":349,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"9f91af0f_c0c75712","line":346,"range":{"start_line":341,"start_character":12,"end_line":346,"end_character":58},"updated":"2018-01-03 21:10:52.000000000","message":"This is redundant with the above check.","commit_id":"ee931198c1f59cf0c8a2199c1f3e4ec940259173"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"0ac4e5bebfd9f6d731063346377a7d606343879c","unresolved":false,"context_lines":[{"line_number":347,"context_line":""},{"line_number":348,"context_line":"    # TODO(mriedem): Test attach/detach with multiattach."},{"line_number":349,"context_line":""},{"line_number":350,"context_line":"    # TODO(mriedem): Test boot from volume with multiattach."}],"source_content_type":"text/x-python","patch_set":17,"id":"9f91af0f_a679f993","line":350,"updated":"2018-01-04 16:43:29.000000000","message":"Also test attaching a multiattach volume to a shelved offloaded instance when the volume is already attached to another instance.","commit_id":"ee931198c1f59cf0c8a2199c1f3e4ec940259173"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"a29543eef6975f63a125e63ae07f130dec5ce9a3","unresolved":false,"context_lines":[{"line_number":347,"context_line":""},{"line_number":348,"context_line":"    # TODO(mriedem): Test attach/detach with multiattach."},{"line_number":349,"context_line":""},{"line_number":350,"context_line":"    # TODO(mriedem): Test boot from volume with multiattach."}],"source_content_type":"text/x-python","patch_set":17,"id":"9f91af0f_f75fa93e","line":350,"in_reply_to":"9f91af0f_a679f993","updated":"2018-01-04 19:35:12.000000000","message":"Do we also need a test for swap_volume for swapping to/from a multiattach volume? Or will Cinder not allow that for retype/volume migration?","commit_id":"ee931198c1f59cf0c8a2199c1f3e4ec940259173"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"5b58da6c4d9cf39cf282b4bce1298a2ee9fa0e35","unresolved":false,"context_lines":[{"line_number":347,"context_line":""},{"line_number":348,"context_line":"    # TODO(mriedem): Test attach/detach with multiattach."},{"line_number":349,"context_line":""},{"line_number":350,"context_line":"    # TODO(mriedem): Test boot from volume with multiattach."}],"source_content_type":"text/x-python","patch_set":17,"id":"9f91af0f_24f145ce","line":350,"in_reply_to":"9f91af0f_f75fa93e","updated":"2018-01-05 20:14:05.000000000","message":"Another idea: create a multiattach bootable volume, boot an instance from that volume, and then attach the volume to another instance and take a snapshot of the volume-backed instance - does that work?","commit_id":"ee931198c1f59cf0c8a2199c1f3e4ec940259173"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"1759648f0add5d28c0437d448bd3b1d2d5a32478","unresolved":false,"context_lines":[{"line_number":299,"context_line":"        more attachments or \u0027available\u0027 state if there are no more attachments."},{"line_number":300,"context_line":"        \"\"\""},{"line_number":301,"context_line":"        # Count the number of attachments before starting the detach."},{"line_number":302,"context_line":"        volume \u003d self.volumes_client.show_volume(volume_id)[\u0027volume\u0027]"},{"line_number":303,"context_line":"        attachments \u003d volume[\u0027attachments\u0027]"},{"line_number":304,"context_line":"        wait_status \u003d \u0027in-use\u0027 if len(attachments) \u003e 1 else \u0027available\u0027"},{"line_number":305,"context_line":"        # Now detach the volume from the given server."}],"source_content_type":"text/x-python","patch_set":18,"id":"9f91af0f_d81b917e","line":302,"updated":"2018-01-06 18:33:47.000000000","message":"I can\u0027t figure out why, but when this runs we get a 400 bad content type error:\n\nhttp://logs.openstack.org/86/531386/5/check/tempest-full/2932954/job-output.txt.gz#_2018-01-06_03_19_12_865528\n\nAnd the teardown to detach the volume fails too:\n\nhttp://logs.openstack.org/86/531386/5/check/tempest-full/2932954/job-output.txt.gz#_2018-01-06_03_19_12_895761\n\n2018-01-06 02:49:28,896 18544 INFO     [tempest.lib.common.rest_client] Request (AttachVolumeMultiAttachTest:_run_cleanups): 400 GET https://15.184.67.210/volume/v3/6c190d5537134d49ba0a5775a75bda98/volumes/response: {u\u0027x-compute-request-id\u0027: \u0027req-62bbb81c-2d91-4f24-be7f-27e99e82240f\u0027, u\u0027content-type\u0027: \u0027application/json\u0027, u\u0027connection\u0027: \u0027close\u0027, u\u0027openstack-api-version\u0027: \u0027compute 2.59\u0027, u\u0027x-openstack-nova-api-version\u0027: \u00272.59\u0027, u\u0027x-openstack-request-id\u0027: \u0027req-62bbb81c-2d91-4f24-be7f-27e99e82240f\u0027, \u0027content-location\u0027: \u0027https:/15.184.67.210/compute/v2.1/servers\u0027, \u0027status\u0027: \u0027202\u0027, u\u0027location\u0027: \u0027https:/15.184.67.210/compute/v2.1/servers/19e8fb32-17ca-4dc8-aa95-d57204bc9528\u0027, u\u0027date\u0027: \u0027Sat, 06 Jan 2018 02:49:03 GMT\u0027, u\u0027vary\u0027: \u0027OpenStack-API-Version,X-OpenStack-Nova-API-Version\u0027, u\u0027server\u0027: \u0027Apache/2.4.18 (Ubuntu)\u0027, u\u0027content-length\u0027: \u0027386\u0027}\n\nIt\u0027s making a request to the volume API but it seems to be mixed up with a response for the compute API...\n\nAnd we\u0027re getting some type of html response instead of json:\n\nu\u0027content-type\u0027: \u0027text/html; charset\u003diso-8859-1\u0027\n\nAnd looking at the request ID there, it shows up as a server create request in the compute API:\n\nJan 06 02:49:03.721600 ubuntu-xenial-infracloud-vanilla-0001712754 devstack@n-api.service[1846]: DEBUG nova.api.openstack.wsgi [None req-62bbb81c-2d91-4f24-be7f-27e99e82240f tempest-AttachVolumeMultiAttachTest-455009957 tempest-AttachVolumeMultiAttachTest-455009957] Action: \u0027create\u0027, calling method: \u003cbound method ServersController.create of \u003cnova.api.openstack.compute.servers.ServersController object at 0x7ff51ca9bb50\u003e\u003e, body: {\"server\": {\"networks\": \"none\", \"name\": \"multiattach-server-1\", \"flavorRef\": \"42\", \"imageRef\": \"425746ff-9c6f-4edb-9889-ab6be7ceaba5\"}} {{(pid\u003d1849) _process_stack /opt/stack/nova/nova/api/openstack/wsgi.py:609}}\n\nAnd that ^ request is much earlier than the failure during _run_cleanups...","commit_id":"942c67284d724c4f6189df4b4c10dea22388d9c8"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"9a3586e952a580ad0a2f790a106a395c975b3283","unresolved":false,"context_lines":[{"line_number":299,"context_line":"        more attachments or \u0027available\u0027 state if there are no more attachments."},{"line_number":300,"context_line":"        \"\"\""},{"line_number":301,"context_line":"        # Count the number of attachments before starting the detach."},{"line_number":302,"context_line":"        volume \u003d self.volumes_client.show_volume(volume_id)[\u0027volume\u0027]"},{"line_number":303,"context_line":"        attachments \u003d volume[\u0027attachments\u0027]"},{"line_number":304,"context_line":"        wait_status \u003d \u0027in-use\u0027 if len(attachments) \u003e 1 else \u0027available\u0027"},{"line_number":305,"context_line":"        # Now detach the volume from the given server."}],"source_content_type":"text/x-python","patch_set":18,"id":"9f91af0f_63c73a98","line":302,"in_reply_to":"9f91af0f_d81b917e","updated":"2018-01-06 19:00:04.000000000","message":"Oh I think the problem is that the cleanup method in the base class is also called _detach_volume and since I\u0027ve overridden it here, we\u0027re sending the wrong thing - oops!","commit_id":"942c67284d724c4f6189df4b4c10dea22388d9c8"},{"author":{"_account_id":21897,"name":"lianghao","email":"lianghao@cmss.chinamobile.com","username":"cloud-liang"},"change_message_id":"e761a26be4e72fcb4bc05ed113f10d42fb542857","unresolved":false,"context_lines":[{"line_number":311,"context_line":""},{"line_number":312,"context_line":"    def _create_multiattach_volume(self, bootable\u003dFalse):"},{"line_number":313,"context_line":"        kwargs \u003d {}"},{"line_number":314,"context_line":"        if bootable:"},{"line_number":315,"context_line":"            kwargs[\u0027image_ref\u0027] \u003d CONF.compute.image_ref"},{"line_number":316,"context_line":"        volume \u003d self.create_volume(multiattach\u003dTrue, **kwargs)"},{"line_number":317,"context_line":"        if bootable:"},{"line_number":318,"context_line":"            self.volumes_client.set_bootable_volume(volume[\u0027id\u0027],"},{"line_number":319,"context_line":"                                                    bootable\u003dTrue)"},{"line_number":320,"context_line":"        return volume"},{"line_number":321,"context_line":""},{"line_number":322,"context_line":"    def _create_and_multiattach(self):"}],"source_content_type":"text/x-python","patch_set":23,"id":"9f91af0f_c007ee81","line":319,"range":{"start_line":314,"start_character":8,"end_line":319,"end_character":66},"updated":"2018-01-09 10:23:12.000000000","message":"If bootable\u003dTrue,when finish to execute the line of 316,the bootable of the volume is already True,so the line 317-319 can be delete.","commit_id":"24442dfaf8aad85b6210552074bc6412882ade56"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"c53067db572091ab3798780e8b2a8946a9a38cfe","unresolved":false,"context_lines":[{"line_number":311,"context_line":""},{"line_number":312,"context_line":"    def _create_multiattach_volume(self, bootable\u003dFalse):"},{"line_number":313,"context_line":"        kwargs \u003d {}"},{"line_number":314,"context_line":"        if bootable:"},{"line_number":315,"context_line":"            kwargs[\u0027image_ref\u0027] \u003d CONF.compute.image_ref"},{"line_number":316,"context_line":"        volume \u003d self.create_volume(multiattach\u003dTrue, **kwargs)"},{"line_number":317,"context_line":"        if bootable:"},{"line_number":318,"context_line":"            self.volumes_client.set_bootable_volume(volume[\u0027id\u0027],"},{"line_number":319,"context_line":"                                                    bootable\u003dTrue)"},{"line_number":320,"context_line":"        return volume"},{"line_number":321,"context_line":""},{"line_number":322,"context_line":"    def _create_and_multiattach(self):"}],"source_content_type":"text/x-python","patch_set":23,"id":"9f91af0f_29dc7ee2","line":319,"range":{"start_line":314,"start_character":8,"end_line":319,"end_character":66},"in_reply_to":"9f91af0f_c007ee81","updated":"2018-01-09 15:24:36.000000000","message":"I don\u0027t think so. \"bootable\" isn\u0027t a kwarg / parameter for creating a volume, it\u0027s something you have to update on the volume once it\u0027s created.\n\nhttps://developer.openstack.org/api-ref/block-storage/v2/#create-volume","commit_id":"24442dfaf8aad85b6210552074bc6412882ade56"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"51466a064a1391763075666e4a32fe9894787acc","unresolved":false,"context_lines":[{"line_number":414,"context_line":"        self.servers_client.delete_server(server[\u0027id\u0027])"},{"line_number":415,"context_line":"        waiters.wait_for_server_termination(self.servers_client, server[\u0027id\u0027])"},{"line_number":416,"context_line":"        # Delete the volume and cascade the delete of the volume snapshot."},{"line_number":417,"context_line":"        self.volumes_client.delete_volume(volume[\u0027id\u0027], cascade\u003dTrue)"},{"line_number":418,"context_line":""},{"line_number":419,"context_line":"    # TODO(mriedem): Might be interesting to create a bootable multiattach"},{"line_number":420,"context_line":"    # volume with delete_on_termination\u003dTrue, create server1 from the"}],"source_content_type":"text/x-python","patch_set":24,"id":"9f91af0f_4dc8e572","line":417,"range":{"start_line":417,"start_character":8,"end_line":417,"end_character":69},"updated":"2018-01-09 20:48:59.000000000","message":"We have to wait for the volume to be gone, otherwise this is a 202 and then teardown kicks in and fails because the volume has a snapshot still.","commit_id":"65f6e564a575728283270ea43f0d91b1d987a57b"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"80b2c5bc2c868e73e88b975f9a0753bbce5a1529","unresolved":false,"context_lines":[{"line_number":442,"context_line":"    # the volume to a 2nd server and snapshot the first volume-backed server."},{"line_number":443,"context_line":"    # Is that too much of a scenario test?"},{"line_number":444,"context_line":""},{"line_number":445,"context_line":"    # TODO(mriedem): Test migration with a multiattached volume."},{"line_number":446,"context_line":""},{"line_number":447,"context_line":"    # TODO(mriedem): Test swap_volume with a multiattach volume (admin-only)."}],"source_content_type":"text/x-python","patch_set":26,"id":"7f96bb07_bc385dd3","line":445,"range":{"start_line":445,"start_character":4,"end_line":445,"end_character":64},"updated":"2018-01-11 20:35:18.000000000","message":"This TODO could be removed since resize is testing cold migration.","commit_id":"d04640ffec1e2c60a91adddc8c5d69e2fb50d6a1"},{"author":{"_account_id":9562,"name":"Ildiko Vancsa","email":"ildiko.vancsa@gmail.com","username":"ildikov"},"change_message_id":"cb14c524096157887df835c336048a330a459041","unresolved":false,"context_lines":[{"line_number":265,"context_line":""},{"line_number":266,"context_line":""},{"line_number":267,"context_line":"class AttachVolumeMultiAttachTest(BaseAttachVolumeTest):"},{"line_number":268,"context_line":"    min_microversion \u003d \u00272.59\u0027"},{"line_number":269,"context_line":"    max_microversion \u003d \u0027latest\u0027"},{"line_number":270,"context_line":""},{"line_number":271,"context_line":"    @classmethod"}],"source_content_type":"text/x-python","patch_set":27,"id":"7f96bb07_71cc1761","line":268,"range":{"start_line":268,"start_character":26,"end_line":268,"end_character":28},"updated":"2018-01-13 00:05:51.000000000","message":"We bumped this to 60, I will update the patch.","commit_id":"967ab780dd442468600953967a763722c3ab9545"},{"author":{"_account_id":5196,"name":"Matthew Treinish","email":"mtreinish@kortar.org","username":"treinish"},"change_message_id":"b7a3b396dc3412da210f230831fcf4a1b6805d0a","unresolved":false,"context_lines":[{"line_number":327,"context_line":"                  dict entries"},{"line_number":328,"context_line":"        \"\"\""},{"line_number":329,"context_line":"        servers \u003d []"},{"line_number":330,"context_line":"        for x in range(2):"},{"line_number":331,"context_line":"            name \u003d \u0027multiattach-server-%i\u0027 % x"},{"line_number":332,"context_line":"            servers.append(self.create_test_server(name\u003dname))"},{"line_number":333,"context_line":""}],"source_content_type":"text/x-python","patch_set":27,"id":"7f96bb07_cb177da3","line":330,"updated":"2018-01-12 19:54:39.000000000","message":"Is there any value in making this configurable with a kwarg? Or do you think we\u0027ll only ever want to do 2 servers with this helper?","commit_id":"967ab780dd442468600953967a763722c3ab9545"},{"author":{"_account_id":9562,"name":"Ildiko Vancsa","email":"ildiko.vancsa@gmail.com","username":"ildikov"},"change_message_id":"cb14c524096157887df835c336048a330a459041","unresolved":false,"context_lines":[{"line_number":327,"context_line":"                  dict entries"},{"line_number":328,"context_line":"        \"\"\""},{"line_number":329,"context_line":"        servers \u003d []"},{"line_number":330,"context_line":"        for x in range(2):"},{"line_number":331,"context_line":"            name \u003d \u0027multiattach-server-%i\u0027 % x"},{"line_number":332,"context_line":"            servers.append(self.create_test_server(name\u003dname))"},{"line_number":333,"context_line":""}],"source_content_type":"text/x-python","patch_set":27,"id":"7f96bb07_51d1dbfa","line":330,"in_reply_to":"7f96bb07_4bd60dc6","updated":"2018-01-13 00:05:51.000000000","message":"Agreed, the nastiest case is to have two instances on the same host with attachments to the same volume.","commit_id":"967ab780dd442468600953967a763722c3ab9545"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"21f0f0644e1d0c74002833bc9b631e436d8df155","unresolved":false,"context_lines":[{"line_number":327,"context_line":"                  dict entries"},{"line_number":328,"context_line":"        \"\"\""},{"line_number":329,"context_line":"        servers \u003d []"},{"line_number":330,"context_line":"        for x in range(2):"},{"line_number":331,"context_line":"            name \u003d \u0027multiattach-server-%i\u0027 % x"},{"line_number":332,"context_line":"            servers.append(self.create_test_server(name\u003dname))"},{"line_number":333,"context_line":""}],"source_content_type":"text/x-python","patch_set":27,"id":"7f96bb07_4bd60dc6","line":330,"in_reply_to":"7f96bb07_cb177da3","updated":"2018-01-12 20:01:15.000000000","message":"I don\u0027t see much reason to do more than 2, since more than 1 is really all you need to make sure things are working properly.","commit_id":"967ab780dd442468600953967a763722c3ab9545"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"32dd8d42a03e0e44c1bb008d9f292a7f74d91c08","unresolved":false,"context_lines":[{"line_number":265,"context_line":""},{"line_number":266,"context_line":""},{"line_number":267,"context_line":"class AttachVolumeMultiAttachTest(BaseAttachVolumeTest):"},{"line_number":268,"context_line":"    min_microversion \u003d \u00272.60\u0027"},{"line_number":269,"context_line":"    max_microversion \u003d \u0027latest\u0027"},{"line_number":270,"context_line":""},{"line_number":271,"context_line":"    @classmethod"}],"source_content_type":"text/x-python","patch_set":32,"id":"5f93b717_fb126bb1","line":268,"updated":"2018-01-25 15:53:03.000000000","message":"I suppose I should update this as well:\n\nhttps://github.com/openstack/tempest/blob/master/doc/source/microversion_testing.rst#microversion-tests-implemented-in-tempest","commit_id":"3abf8f764b7bee5c906b592d3199d69c9a39f046"},{"author":{"_account_id":20190,"name":"zhufl","email":"zhu.fanglei@zte.com.cn","username":"zhufl"},"change_message_id":"59ff59768ce51e13da262ff227177842befb75d7","unresolved":false,"context_lines":[{"line_number":278,"context_line":"        \"\"\"Attaches the given volume to the list of servers."},{"line_number":279,"context_line":""},{"line_number":280,"context_line":"        :param volume: The multiattach volume to use."},{"line_number":281,"context_line":"        :param servers: list of server instances to attach to the volume"},{"line_number":282,"context_line":"        :returns: dict of server ID to volumeAttachment dict entries"},{"line_number":283,"context_line":"        \"\"\""},{"line_number":284,"context_line":"        attachments \u003d {}"}],"source_content_type":"text/x-python","patch_set":32,"id":"5f93b717_cef4a15e","line":281,"range":{"start_line":281,"start_character":49,"end_line":281,"end_character":72},"updated":"2018-01-25 02:38:46.000000000","message":"to attach the volume?","commit_id":"3abf8f764b7bee5c906b592d3199d69c9a39f046"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"32dd8d42a03e0e44c1bb008d9f292a7f74d91c08","unresolved":false,"context_lines":[{"line_number":278,"context_line":"        \"\"\"Attaches the given volume to the list of servers."},{"line_number":279,"context_line":""},{"line_number":280,"context_line":"        :param volume: The multiattach volume to use."},{"line_number":281,"context_line":"        :param servers: list of server instances to attach to the volume"},{"line_number":282,"context_line":"        :returns: dict of server ID to volumeAttachment dict entries"},{"line_number":283,"context_line":"        \"\"\""},{"line_number":284,"context_line":"        attachments \u003d {}"}],"source_content_type":"text/x-python","patch_set":32,"id":"5f93b717_7b1e5bbb","line":281,"range":{"start_line":281,"start_character":49,"end_line":281,"end_character":72},"in_reply_to":"5f93b717_cef4a15e","updated":"2018-01-25 15:53:03.000000000","message":"No, this is what I meant. Although I guess it\u0027s more accurate to say, \"list of server instances on which the volume will be attached\" since we attach the volume to the instance via the compute API.","commit_id":"3abf8f764b7bee5c906b592d3199d69c9a39f046"},{"author":{"_account_id":20190,"name":"zhufl","email":"zhu.fanglei@zte.com.cn","username":"zhufl"},"change_message_id":"59ff59768ce51e13da262ff227177842befb75d7","unresolved":false,"context_lines":[{"line_number":315,"context_line":"            kwargs[\u0027image_ref\u0027] \u003d CONF.compute.image_ref"},{"line_number":316,"context_line":"        volume \u003d self.create_volume(multiattach\u003dTrue, **kwargs)"},{"line_number":317,"context_line":"        if bootable:"},{"line_number":318,"context_line":"            self.volumes_client.set_bootable_volume(volume[\u0027id\u0027],"},{"line_number":319,"context_line":"                                                    bootable\u003dTrue)"},{"line_number":320,"context_line":"        return volume"},{"line_number":321,"context_line":""},{"line_number":322,"context_line":"    def _create_and_multiattach(self):"}],"source_content_type":"text/x-python","patch_set":32,"id":"5f93b717_2b973793","line":319,"range":{"start_line":318,"start_character":0,"end_line":319,"end_character":66},"updated":"2018-01-25 02:38:46.000000000","message":"Since volume is created from image, so it should be bootable, and so is this needed?","commit_id":"3abf8f764b7bee5c906b592d3199d69c9a39f046"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"32dd8d42a03e0e44c1bb008d9f292a7f74d91c08","unresolved":false,"context_lines":[{"line_number":315,"context_line":"            kwargs[\u0027image_ref\u0027] \u003d CONF.compute.image_ref"},{"line_number":316,"context_line":"        volume \u003d self.create_volume(multiattach\u003dTrue, **kwargs)"},{"line_number":317,"context_line":"        if bootable:"},{"line_number":318,"context_line":"            self.volumes_client.set_bootable_volume(volume[\u0027id\u0027],"},{"line_number":319,"context_line":"                                                    bootable\u003dTrue)"},{"line_number":320,"context_line":"        return volume"},{"line_number":321,"context_line":""},{"line_number":322,"context_line":"    def _create_and_multiattach(self):"}],"source_content_type":"text/x-python","patch_set":32,"id":"5f93b717_1b62b73f","line":319,"range":{"start_line":318,"start_character":0,"end_line":319,"end_character":66},"in_reply_to":"5f93b717_2b973793","updated":"2018-01-25 15:53:03.000000000","message":"I didn\u0027t realize that was automatic if image_ref was specified but I guess it is:\n\nhttps://developer.openstack.org/api-ref/block-storage/v3/#create-a-volume","commit_id":"3abf8f764b7bee5c906b592d3199d69c9a39f046"},{"author":{"_account_id":20190,"name":"zhufl","email":"zhu.fanglei@zte.com.cn","username":"zhufl"},"change_message_id":"59ff59768ce51e13da262ff227177842befb75d7","unresolved":false,"context_lines":[{"line_number":326,"context_line":"                  the created volume, and dict of server ID to volumeAttachment"},{"line_number":327,"context_line":"                  dict entries"},{"line_number":328,"context_line":"        \"\"\""},{"line_number":329,"context_line":"        servers \u003d []"},{"line_number":330,"context_line":"        for x in range(2):"},{"line_number":331,"context_line":"            name \u003d \u0027multiattach-server-%i\u0027 % x"},{"line_number":332,"context_line":"            servers.append(self.create_test_server(name\u003dname))"},{"line_number":333,"context_line":""},{"line_number":334,"context_line":"        # Now wait for the servers to be ACTIVE."},{"line_number":335,"context_line":"        for server in servers:"},{"line_number":336,"context_line":"            waiters.wait_for_server_status(self.servers_client, server[\u0027id\u0027],"},{"line_number":337,"context_line":"                                           \u0027ACTIVE\u0027)"},{"line_number":338,"context_line":""},{"line_number":339,"context_line":"        volume \u003d self._create_multiattach_volume()"},{"line_number":340,"context_line":""}],"source_content_type":"text/x-python","patch_set":32,"id":"5f93b717_8bbc4b6a","line":337,"range":{"start_line":329,"start_character":0,"end_line":337,"end_character":52},"updated":"2018-01-25 02:38:46.000000000","message":"how about:\n        network \u003d self.get_tenant_network()\n        _, servers \u003d compute.create_test_server(\n            self.os_primary, tenant_network\u003dnetwork,\n            wait_until\u003d\u0027ACTIVE\u0027, min_count\u003d2)","commit_id":"3abf8f764b7bee5c906b592d3199d69c9a39f046"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"32dd8d42a03e0e44c1bb008d9f292a7f74d91c08","unresolved":false,"context_lines":[{"line_number":326,"context_line":"                  the created volume, and dict of server ID to volumeAttachment"},{"line_number":327,"context_line":"                  dict entries"},{"line_number":328,"context_line":"        \"\"\""},{"line_number":329,"context_line":"        servers \u003d []"},{"line_number":330,"context_line":"        for x in range(2):"},{"line_number":331,"context_line":"            name \u003d \u0027multiattach-server-%i\u0027 % x"},{"line_number":332,"context_line":"            servers.append(self.create_test_server(name\u003dname))"},{"line_number":333,"context_line":""},{"line_number":334,"context_line":"        # Now wait for the servers to be ACTIVE."},{"line_number":335,"context_line":"        for server in servers:"},{"line_number":336,"context_line":"            waiters.wait_for_server_status(self.servers_client, server[\u0027id\u0027],"},{"line_number":337,"context_line":"                                           \u0027ACTIVE\u0027)"},{"line_number":338,"context_line":""},{"line_number":339,"context_line":"        volume \u003d self._create_multiattach_volume()"},{"line_number":340,"context_line":""}],"source_content_type":"text/x-python","patch_set":32,"id":"5f93b717_5bfd9f38","line":337,"range":{"start_line":329,"start_character":0,"end_line":337,"end_character":52},"in_reply_to":"5f93b717_8bbc4b6a","updated":"2018-01-25 15:53:03.000000000","message":"I think the reason I did it this way was to take advantage of the built-in cleanup in the base class, otherwise that has to be replayed here specifically, or I can go through the base class self.create_test_server() but then would need to turn around and get the servers via the reservation_id in the body response. This just seemed easier.","commit_id":"3abf8f764b7bee5c906b592d3199d69c9a39f046"},{"author":{"_account_id":20190,"name":"zhufl","email":"zhu.fanglei@zte.com.cn","username":"zhufl"},"change_message_id":"59ff59768ce51e13da262ff227177842befb75d7","unresolved":false,"context_lines":[{"line_number":405,"context_line":"        \"\"\""},{"line_number":406,"context_line":"        server, volume \u003d self._boot_from_multiattach_volume()"},{"line_number":407,"context_line":"        # Create a snapshot of the server (and volume implicitly)."},{"line_number":408,"context_line":"        self.create_image_from_server("},{"line_number":409,"context_line":"            server[\u0027id\u0027], name\u003d\u0027multiattach-snapshot\u0027,"},{"line_number":410,"context_line":"            wait_until\u003d\u0027active\u0027, wait_for_server\u003dTrue)"},{"line_number":411,"context_line":"        # TODO(mriedem): Make sure the volume snapshot exists. This requires"}],"source_content_type":"text/x-python","patch_set":32,"id":"5f93b717_6e6c6d08","line":408,"range":{"start_line":408,"start_character":8,"end_line":408,"end_character":37},"updated":"2018-01-25 02:38:46.000000000","message":"I am curious why this is tested for mutiattach volume? Does it make any difference between creating a server from a multiattach and from a non-multiattach volume?","commit_id":"3abf8f764b7bee5c906b592d3199d69c9a39f046"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"32dd8d42a03e0e44c1bb008d9f292a7f74d91c08","unresolved":false,"context_lines":[{"line_number":405,"context_line":"        \"\"\""},{"line_number":406,"context_line":"        server, volume \u003d self._boot_from_multiattach_volume()"},{"line_number":407,"context_line":"        # Create a snapshot of the server (and volume implicitly)."},{"line_number":408,"context_line":"        self.create_image_from_server("},{"line_number":409,"context_line":"            server[\u0027id\u0027], name\u003d\u0027multiattach-snapshot\u0027,"},{"line_number":410,"context_line":"            wait_until\u003d\u0027active\u0027, wait_for_server\u003dTrue)"},{"line_number":411,"context_line":"        # TODO(mriedem): Make sure the volume snapshot exists. This requires"}],"source_content_type":"text/x-python","patch_set":32,"id":"5f93b717_db9e8f06","line":408,"range":{"start_line":408,"start_character":8,"end_line":408,"end_character":37},"in_reply_to":"5f93b717_6e6c6d08","updated":"2018-01-25 15:53:03.000000000","message":"There are different code paths within nova for multiattach volumes, and so I\u0027m trying to test really anything that has to do with volumes attached to an instance, and a volume-backed instance snapshot is one of those things.","commit_id":"3abf8f764b7bee5c906b592d3199d69c9a39f046"},{"author":{"_account_id":20190,"name":"zhufl","email":"zhu.fanglei@zte.com.cn","username":"zhufl"},"change_message_id":"7f969b60d93a26e8a2334f55fe521ee0f5831f14","unresolved":false,"context_lines":[{"line_number":407,"context_line":"        # Create a snapshot of the server (and volume implicitly)."},{"line_number":408,"context_line":"        self.create_image_from_server("},{"line_number":409,"context_line":"            server[\u0027id\u0027], name\u003d\u0027multiattach-snapshot\u0027,"},{"line_number":410,"context_line":"            wait_until\u003d\u0027active\u0027, wait_for_server\u003dTrue)"},{"line_number":411,"context_line":"        # TODO(mriedem): Make sure the volume snapshot exists. This requires"},{"line_number":412,"context_line":"        # adding the volume snapshots client to BaseV2ComputeTest."},{"line_number":413,"context_line":"        # Delete the server, wait for it to be gone, and make sure the volume"}],"source_content_type":"text/x-python","patch_set":32,"id":"5f93b717_d1a526b7","line":410,"range":{"start_line":410,"start_character":23,"end_line":410,"end_character":30},"updated":"2018-01-25 02:52:37.000000000","message":"this seems should be \u0027ACTIVE\u0027, but I don\u0027t know why the testcase can pass","commit_id":"3abf8f764b7bee5c906b592d3199d69c9a39f046"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"32dd8d42a03e0e44c1bb008d9f292a7f74d91c08","unresolved":false,"context_lines":[{"line_number":407,"context_line":"        # Create a snapshot of the server (and volume implicitly)."},{"line_number":408,"context_line":"        self.create_image_from_server("},{"line_number":409,"context_line":"            server[\u0027id\u0027], name\u003d\u0027multiattach-snapshot\u0027,"},{"line_number":410,"context_line":"            wait_until\u003d\u0027active\u0027, wait_for_server\u003dTrue)"},{"line_number":411,"context_line":"        # TODO(mriedem): Make sure the volume snapshot exists. This requires"},{"line_number":412,"context_line":"        # adding the volume snapshots client to BaseV2ComputeTest."},{"line_number":413,"context_line":"        # Delete the server, wait for it to be gone, and make sure the volume"}],"source_content_type":"text/x-python","patch_set":32,"id":"5f93b717_5b927ff8","line":410,"range":{"start_line":410,"start_character":23,"end_line":410,"end_character":30},"in_reply_to":"5f93b717_d1a526b7","updated":"2018-01-25 15:53:03.000000000","message":"This is the image status, not the instance (server) status.","commit_id":"3abf8f764b7bee5c906b592d3199d69c9a39f046"},{"author":{"_account_id":20190,"name":"zhufl","email":"zhu.fanglei@zte.com.cn","username":"zhufl"},"change_message_id":"59ff59768ce51e13da262ff227177842befb75d7","unresolved":false,"context_lines":[{"line_number":421,"context_line":"        # might still exist."},{"line_number":422,"context_line":"        self.volumes_client.wait_for_resource_deletion(volume[\u0027id\u0027])"},{"line_number":423,"context_line":""},{"line_number":424,"context_line":"    # TODO(mriedem): Might be interesting to create a bootable multiattach"},{"line_number":425,"context_line":"    # volume with delete_on_termination\u003dTrue, create server1 from the"},{"line_number":426,"context_line":"    # volume, then attach it to server2, and then delete server1 in which"},{"line_number":427,"context_line":"    # case the volume won\u0027t be deleted because it\u0027s still attached to"},{"line_number":428,"context_line":"    # server2 and make sure the volume is still attached to server2."},{"line_number":429,"context_line":""},{"line_number":430,"context_line":"    # TODO(mriedem): Test migration with a multiattached volume."},{"line_number":431,"context_line":""}],"source_content_type":"text/x-python","patch_set":32,"id":"5f93b717_510fd62d","line":428,"range":{"start_line":424,"start_character":4,"end_line":428,"end_character":68},"updated":"2018-01-25 02:38:46.000000000","message":"Yes it makes sense. And maybe we can also create a multiattach volume and attach it to server1 and server2, \nand then delete server1, check wether volume is stilled attached to server2 with \u0027in-use\u0027 status","commit_id":"3abf8f764b7bee5c906b592d3199d69c9a39f046"}],"tempest/config.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"70756968ea4c727bf78b5072978d14c425099557","unresolved":false,"context_lines":[{"line_number":417,"context_line":"    cfg.BoolOpt(\u0027config_drive\u0027,"},{"line_number":418,"context_line":"                default\u003dTrue,"},{"line_number":419,"context_line":"                help\u003d\u0027Enable special configuration drive with metadata.\u0027),"},{"line_number":420,"context_line":"    cfg.BoolOpt(\u0027volume_multiattach\u0027,"},{"line_number":421,"context_line":"                default\u003dFalse,"},{"line_number":422,"context_line":"                help\u003d\u0027Does the test environment support attaching a volume to \u0027"},{"line_number":423,"context_line":"                     \u0027more than one instance?\u0027),"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a68dd71_4a5bca87","line":420,"updated":"2016-01-22 01:18:18.000000000","message":"This should be replaced with a microversion in newton.","commit_id":"8644e4e9f8c04abd8e70367a9882bb0493ebe227"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"553c03fcc4cf5ef7be576acf16a5450c79f6104c","unresolved":false,"context_lines":[{"line_number":426,"context_line":"                help\u003d\u0027Does the test environment support attaching a volume to \u0027"},{"line_number":427,"context_line":"                     \u0027more than one instance? NOTE: This should be replaced \u0027"},{"line_number":428,"context_line":"                     \u0027with a microversion in the compute v2.1 REST API in \u0027"},{"line_number":429,"context_line":"                     \u0027the Nova 14.0.0 release.\u0027),"},{"line_number":430,"context_line":"]"},{"line_number":431,"context_line":""},{"line_number":432,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"9f91af0f_8d6d1f9a","line":429,"range":{"start_line":429,"start_character":31,"end_line":429,"end_character":33},"updated":"2018-01-03 19:35:41.000000000","message":"17","commit_id":"1631eed030b273da507f03ce01d203aa3c217550"},{"author":{"_account_id":20190,"name":"zhufl","email":"zhu.fanglei@zte.com.cn","username":"zhufl"},"change_message_id":"59ff59768ce51e13da262ff227177842befb75d7","unresolved":false,"context_lines":[{"line_number":477,"context_line":"                default\u003dFalse,"},{"line_number":478,"context_line":"                help\u003d\u0027Does the test environment support volume-backed live \u0027"},{"line_number":479,"context_line":"                     \u0027migration?\u0027),"},{"line_number":480,"context_line":"    cfg.BoolOpt(\u0027volume_multiattach\u0027,"},{"line_number":481,"context_line":"                default\u003dFalse,"},{"line_number":482,"context_line":"                help\u003d\u0027Does the test environment support attaching a volume to \u0027"},{"line_number":483,"context_line":"                     \u0027more than one instance? This depends on hypervisor and \u0027"}],"source_content_type":"text/x-python","patch_set":32,"id":"7f96bb07_943ddc8f","line":480,"range":{"start_line":480,"start_character":17,"end_line":480,"end_character":35},"updated":"2018-01-25 02:38:46.000000000","message":"add a reno file for this?","commit_id":"3abf8f764b7bee5c906b592d3199d69c9a39f046"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"32dd8d42a03e0e44c1bb008d9f292a7f74d91c08","unresolved":false,"context_lines":[{"line_number":477,"context_line":"                default\u003dFalse,"},{"line_number":478,"context_line":"                help\u003d\u0027Does the test environment support volume-backed live \u0027"},{"line_number":479,"context_line":"                     \u0027migration?\u0027),"},{"line_number":480,"context_line":"    cfg.BoolOpt(\u0027volume_multiattach\u0027,"},{"line_number":481,"context_line":"                default\u003dFalse,"},{"line_number":482,"context_line":"                help\u003d\u0027Does the test environment support attaching a volume to \u0027"},{"line_number":483,"context_line":"                     \u0027more than one instance? This depends on hypervisor and \u0027"}],"source_content_type":"text/x-python","patch_set":32,"id":"5f93b717_3bc3f3ef","line":480,"range":{"start_line":480,"start_character":17,"end_line":480,"end_character":35},"in_reply_to":"7f96bb07_943ddc8f","updated":"2018-01-25 15:53:03.000000000","message":"Sure.","commit_id":"3abf8f764b7bee5c906b592d3199d69c9a39f046"}]}
