)]}'
{"tempest/scenario/test_volume_boot_pattern.py":[{"author":{"_account_id":20190,"name":"zhufl","email":"zhu.fanglei@zte.com.cn","username":"zhufl"},"change_message_id":"63e2db5c74c71a3b6c98285c7ac486a755b04230","unresolved":false,"context_lines":[{"line_number":193,"context_line":"    @testtools.skipUnless(CONF.volume_feature_enabled.snapshot,"},{"line_number":194,"context_line":"                          \u0027Cinder volume snapshots are disabled\u0027)"},{"line_number":195,"context_line":"    @utils.services(\u0027compute\u0027, \u0027volume\u0027, \u0027image\u0027)"},{"line_number":196,"context_line":"    def test_create_ebs_image_and_check_boot(self):"},{"line_number":197,"context_line":"        # create an instance from image-backed volume"},{"line_number":198,"context_line":"        volume_origin \u003d self._create_volume_from_image()"},{"line_number":199,"context_line":"        instance \u003d self._boot_instance_from_resource("}],"source_content_type":"text/x-python","patch_set":1,"id":"df7087c5_664e4e39","line":196,"range":{"start_line":196,"start_character":20,"end_line":196,"end_character":23},"updated":"2018-03-23 02:22:46.000000000","message":"Btw, \u0027ebs\u0027 in the testcase name is confusing, does it mean AWS\u0027s Elastic Block Store?","commit_id":"28a815047485f678bf0bc97145e7f553df064d0c"},{"author":{"_account_id":20190,"name":"zhufl","email":"zhu.fanglei@zte.com.cn","username":"zhufl"},"change_message_id":"824a83777b89ec001ea2bbf3f10a00d602d0b1d6","unresolved":false,"context_lines":[{"line_number":193,"context_line":"    @testtools.skipUnless(CONF.volume_feature_enabled.snapshot,"},{"line_number":194,"context_line":"                          \u0027Cinder volume snapshots are disabled\u0027)"},{"line_number":195,"context_line":"    @utils.services(\u0027compute\u0027, \u0027volume\u0027, \u0027image\u0027)"},{"line_number":196,"context_line":"    def test_create_ebs_image_and_check_boot(self):"},{"line_number":197,"context_line":"        # create an instance from image-backed volume"},{"line_number":198,"context_line":"        volume_origin \u003d self._create_volume_from_image()"},{"line_number":199,"context_line":"        instance \u003d self._boot_instance_from_resource("}],"source_content_type":"text/x-python","patch_set":1,"id":"bf659307_9a21e9b7","line":196,"range":{"start_line":196,"start_character":20,"end_line":196,"end_character":23},"in_reply_to":"df7087c5_147bee27","updated":"2018-03-26 06:23:48.000000000","message":"Yes I\u0027d like the testcase to be renamed, just wait for other\u0027s opinion:)","commit_id":"28a815047485f678bf0bc97145e7f553df064d0c"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"9ef861408140fa07306da100e6bb2e25bc6f6f41","unresolved":false,"context_lines":[{"line_number":193,"context_line":"    @testtools.skipUnless(CONF.volume_feature_enabled.snapshot,"},{"line_number":194,"context_line":"                          \u0027Cinder volume snapshots are disabled\u0027)"},{"line_number":195,"context_line":"    @utils.services(\u0027compute\u0027, \u0027volume\u0027, \u0027image\u0027)"},{"line_number":196,"context_line":"    def test_create_ebs_image_and_check_boot(self):"},{"line_number":197,"context_line":"        # create an instance from image-backed volume"},{"line_number":198,"context_line":"        volume_origin \u003d self._create_volume_from_image()"},{"line_number":199,"context_line":"        instance \u003d self._boot_instance_from_resource("}],"source_content_type":"text/x-python","patch_set":1,"id":"df7087c5_147bee27","line":196,"range":{"start_line":196,"start_character":20,"end_line":196,"end_character":23},"in_reply_to":"df7087c5_664e4e39","updated":"2018-03-23 14:54:58.000000000","message":"Yes, and agree it\u0027s confusing. I thought about renaming it to just \"test_create_from_image_defined_volume_snapshot\" or something similar, but wasn\u0027t sure if people would care for that in this same patch. I realize we can rename tests though since the idempotent id is what can\u0027t change. Let me know if you want me to rename the test also.","commit_id":"28a815047485f678bf0bc97145e7f553df064d0c"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"9ef861408140fa07306da100e6bb2e25bc6f6f41","unresolved":false,"context_lines":[{"line_number":228,"context_line":"                         created_volume)"},{"line_number":229,"context_line":"        self.assertEqual(instance[\u0027id\u0027],"},{"line_number":230,"context_line":"                         created_volume[\u0027attachments\u0027][0][\u0027server_id\u0027])"},{"line_number":231,"context_line":"        self.assertEqual(created_volume[0][\u0027id\u0027],"},{"line_number":232,"context_line":"                         created_volume[\u0027attachments\u0027][0][\u0027volume_id\u0027])"},{"line_number":233,"context_line":"        self.assertEqual("},{"line_number":234,"context_line":"            volume_origin[\u0027volume_image_metadata\u0027][\u0027image_id\u0027],"},{"line_number":235,"context_line":"            created_volume[\u0027volume_image_metadata\u0027][\u0027image_id\u0027])"}],"source_content_type":"text/x-python","patch_set":1,"id":"df7087c5_34b4f281","line":232,"range":{"start_line":231,"start_character":8,"end_line":232,"end_character":71},"updated":"2018-03-23 14:54:58.000000000","message":"This is wrong:\n\nTraceback (most recent call last):\n  File \"tempest/common/utils/__init__.py\", line 88, in wrapper\n    return f(*func_args, **func_kwargs)\n  File \"tempest/scenario/test_volume_boot_pattern.py\", line 231, in test_create_ebs_image_and_check_boot\n    self.assertEqual(created_volume[0][\u0027id\u0027],\nKeyError: 0\n\n\nShould be:\n\nself.assertEqual(volume_attachments[0][\u0027id\u0027],\n                 created_volume[\u0027attachments\u0027][0][\u0027volume_id\u0027])","commit_id":"28a815047485f678bf0bc97145e7f553df064d0c"},{"author":{"_account_id":20190,"name":"zhufl","email":"zhu.fanglei@zte.com.cn","username":"zhufl"},"change_message_id":"63e2db5c74c71a3b6c98285c7ac486a755b04230","unresolved":false,"context_lines":[{"line_number":234,"context_line":"            volume_origin[\u0027volume_image_metadata\u0027][\u0027image_id\u0027],"},{"line_number":235,"context_line":"            created_volume[\u0027volume_image_metadata\u0027][\u0027image_id\u0027])"},{"line_number":236,"context_line":""},{"line_number":237,"context_line":"        # Delete the second server which should also delete the second volume"},{"line_number":238,"context_line":"        # created from the volume snapshot."},{"line_number":239,"context_line":"        self._delete_server(instance)"},{"line_number":240,"context_line":""},{"line_number":241,"context_line":"    @decorators.idempotent_id(\u0027cb78919a-e553-4bab-b73b-10cf4d2eb125\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"df7087c5_e671fea9","line":238,"range":{"start_line":237,"start_character":35,"end_line":238,"end_character":43},"updated":"2018-03-23 02:22:46.000000000","message":"Does it need to add a check for this?","commit_id":"28a815047485f678bf0bc97145e7f553df064d0c"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"9ef861408140fa07306da100e6bb2e25bc6f6f41","unresolved":false,"context_lines":[{"line_number":234,"context_line":"            volume_origin[\u0027volume_image_metadata\u0027][\u0027image_id\u0027],"},{"line_number":235,"context_line":"            created_volume[\u0027volume_image_metadata\u0027][\u0027image_id\u0027])"},{"line_number":236,"context_line":""},{"line_number":237,"context_line":"        # Delete the second server which should also delete the second volume"},{"line_number":238,"context_line":"        # created from the volume snapshot."},{"line_number":239,"context_line":"        self._delete_server(instance)"},{"line_number":240,"context_line":""},{"line_number":241,"context_line":"    @decorators.idempotent_id(\u0027cb78919a-e553-4bab-b73b-10cf4d2eb125\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"df7087c5_14af6e2a","line":238,"range":{"start_line":237,"start_character":35,"end_line":238,"end_character":43},"in_reply_to":"df7087c5_e671fea9","updated":"2018-03-23 14:54:58.000000000","message":"There wasn\u0027t one already so I didn\u0027t plan on adding one in this change. Looking at how the snapshot is created, this code will delete the volume snapshot on teardown:\n\nhttps://github.com/openstack/tempest/blob/91fa36dd6d5468d7cc7cc7dbe75a9ff887f11e95/tempest/scenario/manager.py#L477-L490\n\nAnd actually I think what probably happens here is when tempest deletes the 2nd server here, nova tries to delete the related volume (because delete_on_termination\u003dTrue), which will fail because the volume has a snapshot associated with it, which doesn\u0027t get deleted until the test tears down. There should be a message in the n-cpu logs for the volume delete failure. We should see this:\n\nhttps://github.com/openstack/nova/blob/7b96206699ac28f807676bd08c6dee7a89bcb77c/nova/compute/manager.py#L2450\n\nand maybe that\u0027s this:\n\nhttp://logs.openstack.org/20/541420/2/check/tempest-full/a416830/controller/logs/screen-n-cpu.txt.gz?level\u003dWARNING#_Mar_22_17_32_28_069168\n\nLooking at that instance, yes it\u0027s from this test:\n\nhttp://logs.openstack.org/20/541420/2/check/tempest-full/a416830/controller/logs/screen-n-cpu.txt.gz?#_Mar_22_17_32_20_882849\n\n\u003cnova:name\u003etempest-TestVolumeBootPattern-server-432349952\u003c/nova:name\u003e\n\nSo this test does orphan the volume. The test would have to delete the volume snapshot *before* deleting the server and then we could assert that the volume is automatically cleaned up. However, I\u0027d prefer to do that in a separate patch if that\u0027s OK.","commit_id":"28a815047485f678bf0bc97145e7f553df064d0c"},{"author":{"_account_id":20190,"name":"zhufl","email":"zhu.fanglei@zte.com.cn","username":"zhufl"},"change_message_id":"49effde481f5b010e90ec0af909fa34e3c410158","unresolved":false,"context_lines":[{"line_number":234,"context_line":"            volume_origin[\u0027volume_image_metadata\u0027][\u0027image_id\u0027],"},{"line_number":235,"context_line":"            created_volume[\u0027volume_image_metadata\u0027][\u0027image_id\u0027])"},{"line_number":236,"context_line":""},{"line_number":237,"context_line":"        # Delete the second server which should also delete the second volume"},{"line_number":238,"context_line":"        # created from the volume snapshot."},{"line_number":239,"context_line":"        # TODO(mriedem): Currently, the compute service fails to delete the"},{"line_number":240,"context_line":"        # volume it created because the volume still has the snapshot"},{"line_number":241,"context_line":"        # associated with it, and the cleanups for the volume snapshot which"}],"source_content_type":"text/x-python","patch_set":2,"id":"bf659307_bd6ce708","line":238,"range":{"start_line":237,"start_character":35,"end_line":238,"end_character":43},"updated":"2018-03-26 07:16:34.000000000","message":"A question: why delete the second server should also delete the created volume?\n{\n\t\"server\": {\n\t\t\"flavorRef\": \"097ce497-dd33-4635-8800-0afb751536d1\",\n\t\t\"networks\": [{\n\t\t\t\"uuid\": \"4a4683ef-45b1-48fe-ace8-215b8261a121\"\n\t\t}],\n\t\t\"imageRef\": \"b8e067af-248b-47b7-81f0-9a4755d72e69\",\n\t\t\"name\": \"tempest-TestVolumeBootPattern-server-676251266\"\n\t}\n}","commit_id":"a3cbee5355485822e6edf70ba56835ceb743ae03"},{"author":{"_account_id":20190,"name":"zhufl","email":"zhu.fanglei@zte.com.cn","username":"zhufl"},"change_message_id":"1373f4af97f01a237e599f38f2efe60fc56069d9","unresolved":false,"context_lines":[{"line_number":234,"context_line":"            volume_origin[\u0027volume_image_metadata\u0027][\u0027image_id\u0027],"},{"line_number":235,"context_line":"            created_volume[\u0027volume_image_metadata\u0027][\u0027image_id\u0027])"},{"line_number":236,"context_line":""},{"line_number":237,"context_line":"        # Delete the second server which should also delete the second volume"},{"line_number":238,"context_line":"        # created from the volume snapshot."},{"line_number":239,"context_line":"        # TODO(mriedem): Currently, the compute service fails to delete the"},{"line_number":240,"context_line":"        # volume it created because the volume still has the snapshot"},{"line_number":241,"context_line":"        # associated with it, and the cleanups for the volume snapshot which"}],"source_content_type":"text/x-python","patch_set":2,"id":"bf659307_af43ea6b","line":238,"range":{"start_line":237,"start_character":35,"end_line":238,"end_character":43},"in_reply_to":"bf659307_4271c60b","updated":"2018-03-29 01:41:48.000000000","message":"got it, thanks!","commit_id":"a3cbee5355485822e6edf70ba56835ceb743ae03"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"fb327051ab2be757866ad897de2c850e7a587242","unresolved":false,"context_lines":[{"line_number":234,"context_line":"            volume_origin[\u0027volume_image_metadata\u0027][\u0027image_id\u0027],"},{"line_number":235,"context_line":"            created_volume[\u0027volume_image_metadata\u0027][\u0027image_id\u0027])"},{"line_number":236,"context_line":""},{"line_number":237,"context_line":"        # Delete the second server which should also delete the second volume"},{"line_number":238,"context_line":"        # created from the volume snapshot."},{"line_number":239,"context_line":"        # TODO(mriedem): Currently, the compute service fails to delete the"},{"line_number":240,"context_line":"        # volume it created because the volume still has the snapshot"},{"line_number":241,"context_line":"        # associated with it, and the cleanups for the volume snapshot which"}],"source_content_type":"text/x-python","patch_set":2,"id":"bf659307_4271c60b","line":238,"range":{"start_line":237,"start_character":35,"end_line":238,"end_character":43},"in_reply_to":"bf659307_bd6ce708","updated":"2018-03-28 22:44:24.000000000","message":"The first server is booted from a volume with the delete_on_termination\u003dTrue flag, and when that first server is snapshot, the image metadata has BDM (block_device_mapping_v2) metadata stored in it. That makes that image snapshot contain an image-defined BDM, which when used to create the 2nd server, makes that 2nd server boot from volume. Nova will take the snapshot volume info, from the image metadata, and create a new volume from it and use that to boot the 2nd server. Because the first BDM was delete_on_termination\u003dTrue, that\u0027s stored and re-used in the 2nd server so when you delete the 2nd server, nova also deletes the 2nd volume.","commit_id":"a3cbee5355485822e6edf70ba56835ceb743ae03"},{"author":{"_account_id":20190,"name":"zhufl","email":"zhu.fanglei@zte.com.cn","username":"zhufl"},"change_message_id":"49effde481f5b010e90ec0af909fa34e3c410158","unresolved":false,"context_lines":[{"line_number":236,"context_line":""},{"line_number":237,"context_line":"        # Delete the second server which should also delete the second volume"},{"line_number":238,"context_line":"        # created from the volume snapshot."},{"line_number":239,"context_line":"        # TODO(mriedem): Currently, the compute service fails to delete the"},{"line_number":240,"context_line":"        # volume it created because the volume still has the snapshot"},{"line_number":241,"context_line":"        # associated with it, and the cleanups for the volume snapshot which"},{"line_number":242,"context_line":"        # were added in create_server_snapshot above, don\u0027t run until after"},{"line_number":243,"context_line":"        # this is called. So we need to delete the volume snapshot and wait for"},{"line_number":244,"context_line":"        # it to be gone here first before deleting the server, and then we can"},{"line_number":245,"context_line":"        # also assert that the underlying volume is deleted when the server is"},{"line_number":246,"context_line":"        # deleted."},{"line_number":247,"context_line":"        self._delete_server(instance)"},{"line_number":248,"context_line":""},{"line_number":249,"context_line":"    @decorators.idempotent_id(\u0027cb78919a-e553-4bab-b73b-10cf4d2eb125\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"bf659307_9d7323e8","line":246,"range":{"start_line":239,"start_character":8,"end_line":246,"end_character":18},"updated":"2018-03-26 07:16:34.000000000","message":"This really reveals something ignored by us in the past.","commit_id":"a3cbee5355485822e6edf70ba56835ceb743ae03"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"eb8967dfccd2e7b6da9f3498dcb01051a6894f9e","unresolved":false,"context_lines":[{"line_number":236,"context_line":""},{"line_number":237,"context_line":"        # Delete the second server which should also delete the second volume"},{"line_number":238,"context_line":"        # created from the volume snapshot."},{"line_number":239,"context_line":"        # TODO(mriedem): Currently, the compute service fails to delete the"},{"line_number":240,"context_line":"        # volume it created because the volume still has the snapshot"},{"line_number":241,"context_line":"        # associated with it, and the cleanups for the volume snapshot which"},{"line_number":242,"context_line":"        # were added in create_server_snapshot above, don\u0027t run until after"},{"line_number":243,"context_line":"        # this is called. So we need to delete the volume snapshot and wait for"},{"line_number":244,"context_line":"        # it to be gone here first before deleting the server, and then we can"},{"line_number":245,"context_line":"        # also assert that the underlying volume is deleted when the server is"},{"line_number":246,"context_line":"        # deleted."},{"line_number":247,"context_line":"        self._delete_server(instance)"},{"line_number":248,"context_line":""},{"line_number":249,"context_line":"    @decorators.idempotent_id(\u0027cb78919a-e553-4bab-b73b-10cf4d2eb125\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"bf659307_45493b30","line":246,"range":{"start_line":239,"start_character":8,"end_line":246,"end_character":18},"in_reply_to":"bf659307_6f2632d1","updated":"2018-04-05 16:44:05.000000000","message":"How about, \"test_image_defined_boot_from_volume\"?","commit_id":"a3cbee5355485822e6edf70ba56835ceb743ae03"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"fb327051ab2be757866ad897de2c850e7a587242","unresolved":false,"context_lines":[{"line_number":236,"context_line":""},{"line_number":237,"context_line":"        # Delete the second server which should also delete the second volume"},{"line_number":238,"context_line":"        # created from the volume snapshot."},{"line_number":239,"context_line":"        # TODO(mriedem): Currently, the compute service fails to delete the"},{"line_number":240,"context_line":"        # volume it created because the volume still has the snapshot"},{"line_number":241,"context_line":"        # associated with it, and the cleanups for the volume snapshot which"},{"line_number":242,"context_line":"        # were added in create_server_snapshot above, don\u0027t run until after"},{"line_number":243,"context_line":"        # this is called. So we need to delete the volume snapshot and wait for"},{"line_number":244,"context_line":"        # it to be gone here first before deleting the server, and then we can"},{"line_number":245,"context_line":"        # also assert that the underlying volume is deleted when the server is"},{"line_number":246,"context_line":"        # deleted."},{"line_number":247,"context_line":"        self._delete_server(instance)"},{"line_number":248,"context_line":""},{"line_number":249,"context_line":"    @decorators.idempotent_id(\u0027cb78919a-e553-4bab-b73b-10cf4d2eb125\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"bf659307_a259c28e","line":246,"range":{"start_line":239,"start_character":8,"end_line":246,"end_character":18},"in_reply_to":"bf659307_9d7323e8","updated":"2018-03-28 22:44:24.000000000","message":"This is the only test that we hit this issue, and yes, this test is notoriously tricky and hard to debug. I\u0027ve spent long hours fixing bugs in nova surfaced by how this test works, but that also means it\u0027s actually a pretty good test.","commit_id":"a3cbee5355485822e6edf70ba56835ceb743ae03"},{"author":{"_account_id":20190,"name":"zhufl","email":"zhu.fanglei@zte.com.cn","username":"zhufl"},"change_message_id":"1373f4af97f01a237e599f38f2efe60fc56069d9","unresolved":false,"context_lines":[{"line_number":236,"context_line":""},{"line_number":237,"context_line":"        # Delete the second server which should also delete the second volume"},{"line_number":238,"context_line":"        # created from the volume snapshot."},{"line_number":239,"context_line":"        # TODO(mriedem): Currently, the compute service fails to delete the"},{"line_number":240,"context_line":"        # volume it created because the volume still has the snapshot"},{"line_number":241,"context_line":"        # associated with it, and the cleanups for the volume snapshot which"},{"line_number":242,"context_line":"        # were added in create_server_snapshot above, don\u0027t run until after"},{"line_number":243,"context_line":"        # this is called. So we need to delete the volume snapshot and wait for"},{"line_number":244,"context_line":"        # it to be gone here first before deleting the server, and then we can"},{"line_number":245,"context_line":"        # also assert that the underlying volume is deleted when the server is"},{"line_number":246,"context_line":"        # deleted."},{"line_number":247,"context_line":"        self._delete_server(instance)"},{"line_number":248,"context_line":""},{"line_number":249,"context_line":"    @decorators.idempotent_id(\u0027cb78919a-e553-4bab-b73b-10cf4d2eb125\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"bf659307_6f2632d1","line":246,"range":{"start_line":239,"start_character":8,"end_line":246,"end_character":18},"in_reply_to":"bf659307_a259c28e","updated":"2018-03-29 01:41:48.000000000","message":"My last concern is whether we can modify the testcase name, now the whole testcase is clear except the name:)","commit_id":"a3cbee5355485822e6edf70ba56835ceb743ae03"}]}
