)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"ffbdaf3fe50b61b75328c86c47fe938802539746","unresolved":true,"context_lines":[{"line_number":18,"context_line":"To avoid the above scenario, we are adding a virtual_size check at the"},{"line_number":19,"context_line":"API layer to fail fast if the volume size doesn\u0027t satisfy the contraints"},{"line_number":20,"context_line":"to store the image."},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"Closes-Bug: #1980268"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"Change-Id: Ia5950c2dc6186b721c9c9cfc4629d72e3b731889"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"09d5daf9_a6b1104f","line":21,"updated":"2022-07-06 15:17:54.000000000","message":"nit: Lines in the commit message are too long","commit_id":"65db55c1b0ea6e21c0396817c378e46e43707c75"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"68bad1f90b5632d7379375f279e53d2be67dd299","unresolved":false,"context_lines":[{"line_number":18,"context_line":"To avoid the above scenario, we are adding a virtual_size check at the"},{"line_number":19,"context_line":"API layer to fail fast if the volume size doesn\u0027t satisfy the contraints"},{"line_number":20,"context_line":"to store the image."},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"Closes-Bug: #1980268"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"Change-Id: Ia5950c2dc6186b721c9c9cfc4629d72e3b731889"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"974f50f8_12ecb65d","line":21,"in_reply_to":"09d5daf9_a6b1104f","updated":"2022-07-08 09:19:39.000000000","message":"Done","commit_id":"65db55c1b0ea6e21c0396817c378e46e43707c75"}],"/PATCHSET_LEVEL":[{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"c47ea8e7bba5188810b729c3e561f6a690738209","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"b1cbe567_ac8606d1","updated":"2022-07-06 15:48:40.000000000","message":"Forgot to vote.","commit_id":"65db55c1b0ea6e21c0396817c378e46e43707c75"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"ffbdaf3fe50b61b75328c86c47fe938802539746","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"1bdcbb3e_3d550dbc","updated":"2022-07-06 15:17:54.000000000","message":"LGTM, only a couple of nits","commit_id":"65db55c1b0ea6e21c0396817c378e46e43707c75"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"14bfb2baa2256e0dd88b8c9d742ccc08651bf25d","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"101a4c68_9c00aef0","updated":"2022-07-06 15:48:11.000000000","message":"This is a good idea.  Some comments and a question inline.","commit_id":"65db55c1b0ea6e21c0396817c378e46e43707c75"},{"author":{"_account_id":20813,"name":"Sofia Enriquez","email":"lsofia.enriquez@gmail.com","username":"enriquetaso"},"change_message_id":"ebf8f52b8f70cb7fa238ca9f0bae209694e693bf","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"a06466d3_36d3801a","updated":"2022-07-05 20:17:34.000000000","message":"recheck","commit_id":"65db55c1b0ea6e21c0396817c378e46e43707c75"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"8932565c9b56a569cf57753fe805aa091d3e5583","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"b51e8da6_10d1d3b1","updated":"2022-06-30 05:04:22.000000000","message":"recheck","commit_id":"65db55c1b0ea6e21c0396817c378e46e43707c75"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"d522e460335f1384fd3fd7f1542a37d333f1d747","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"4b5aae91_a5421f65","updated":"2022-06-30 05:05:21.000000000","message":"unrelated failures in cinder-plugin-ceph-tempest https://zuul.opendev.org/t/openstack/build/3aad330e04414bc390dd07da661bf3b7 : FAILURE in 2h 00m 50s\n","commit_id":"65db55c1b0ea6e21c0396817c378e46e43707c75"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"b13f11ada8e30f4c7d81350f664f6f20fb2324a4","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"e5db1fb9_89ae3898","updated":"2022-07-08 10:15:43.000000000","message":"LGTM","commit_id":"75d5fabff0946530a96f4066019f7cee515e4d51"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"b5302ac60a6c27e88f125a282b137658c1970949","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"0bd6ae10_32e5b2c0","updated":"2022-07-18 22:35:22.000000000","message":"Revisions LGTM.","commit_id":"75d5fabff0946530a96f4066019f7cee515e4d51"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"68bad1f90b5632d7379375f279e53d2be67dd299","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"8e8bcbbe_864cda71","updated":"2022-07-08 09:19:39.000000000","message":"Thanks Gorka and Brian for the review.","commit_id":"75d5fabff0946530a96f4066019f7cee515e4d51"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"6d284066cd74b2f1b9f8a08c55dfc288c3ef012d","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"fd4d844a_fe63803b","updated":"2022-07-08 12:10:29.000000000","message":"recheck\n\nunrelated failure in py38 job\ncinder.tests.unit.volume.test_volume_migration.VolumeMigrationTestCase.test_migrate_volume_generic_cross_az\ntesttools.matchers._impl.MismatchError: \u0027AZ2\u0027 !\u003d \u0027nova\u0027","commit_id":"75d5fabff0946530a96f4066019f7cee515e4d51"}],"cinder/tests/unit/test_volume_utils.py":[{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"14bfb2baa2256e0dd88b8c9d742ccc08651bf25d","unresolved":true,"context_lines":[{"line_number":1148,"context_line":"        # Restore image status after asserting"},{"line_number":1149,"context_line":"        image_meta[\u0027status\u0027] \u003d \u0027active\u0027"},{"line_number":1150,"context_line":""},{"line_number":1151,"context_line":"        vol_size \u003d 4"},{"line_number":1152,"context_line":"        res \u003d self.assertRaises(exception.ImageUnacceptable,"},{"line_number":1153,"context_line":"                                volume_utils.check_image_metadata,"},{"line_number":1154,"context_line":"                                image_meta,"},{"line_number":1155,"context_line":"                                vol_size)"},{"line_number":1156,"context_line":"        self.assertIn(\"Image virtual size is %(image_size)dGB\""},{"line_number":1157,"context_line":"                      \" and doesn\u0027t fit in a volume of size\""},{"line_number":1158,"context_line":"                      \" %(volume_size)dGB.\" %"},{"line_number":1159,"context_line":"                      {\u0027image_size\u0027: image_meta[\u0027virtual_size\u0027] // units.Gi,"},{"line_number":1160,"context_line":"                       \u0027volume_size\u0027: vol_size}, str(res))"},{"line_number":1161,"context_line":"        # Restore volume size after asserting"},{"line_number":1162,"context_line":"        vol_size \u003d 2"},{"line_number":1163,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"bb40b553_faaa0100","line":1160,"range":{"start_line":1151,"start_character":0,"end_line":1160,"end_character":58},"updated":"2022-07-06 15:48:11.000000000","message":"IMO, this should be in a separate test.  That way you don\u0027t have to worry about resetting the image properties, but also you need to check the case where the virtual_size is None (and for really old, images, it might not even be present).","commit_id":"65db55c1b0ea6e21c0396817c378e46e43707c75"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"68bad1f90b5632d7379375f279e53d2be67dd299","unresolved":false,"context_lines":[{"line_number":1148,"context_line":"        # Restore image status after asserting"},{"line_number":1149,"context_line":"        image_meta[\u0027status\u0027] \u003d \u0027active\u0027"},{"line_number":1150,"context_line":""},{"line_number":1151,"context_line":"        vol_size \u003d 4"},{"line_number":1152,"context_line":"        res \u003d self.assertRaises(exception.ImageUnacceptable,"},{"line_number":1153,"context_line":"                                volume_utils.check_image_metadata,"},{"line_number":1154,"context_line":"                                image_meta,"},{"line_number":1155,"context_line":"                                vol_size)"},{"line_number":1156,"context_line":"        self.assertIn(\"Image virtual size is %(image_size)dGB\""},{"line_number":1157,"context_line":"                      \" and doesn\u0027t fit in a volume of size\""},{"line_number":1158,"context_line":"                      \" %(volume_size)dGB.\" %"},{"line_number":1159,"context_line":"                      {\u0027image_size\u0027: image_meta[\u0027virtual_size\u0027] // units.Gi,"},{"line_number":1160,"context_line":"                       \u0027volume_size\u0027: vol_size}, str(res))"},{"line_number":1161,"context_line":"        # Restore volume size after asserting"},{"line_number":1162,"context_line":"        vol_size \u003d 2"},{"line_number":1163,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"eb20bcad_9af5cd93","line":1160,"range":{"start_line":1151,"start_character":0,"end_line":1160,"end_character":58},"in_reply_to":"621d0f84_39a69c15","updated":"2022-07-08 09:19:39.000000000","message":"Done","commit_id":"65db55c1b0ea6e21c0396817c378e46e43707c75"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"1eb426102510741073124919a1636787f3ce3fc0","unresolved":true,"context_lines":[{"line_number":1148,"context_line":"        # Restore image status after asserting"},{"line_number":1149,"context_line":"        image_meta[\u0027status\u0027] \u003d \u0027active\u0027"},{"line_number":1150,"context_line":""},{"line_number":1151,"context_line":"        vol_size \u003d 4"},{"line_number":1152,"context_line":"        res \u003d self.assertRaises(exception.ImageUnacceptable,"},{"line_number":1153,"context_line":"                                volume_utils.check_image_metadata,"},{"line_number":1154,"context_line":"                                image_meta,"},{"line_number":1155,"context_line":"                                vol_size)"},{"line_number":1156,"context_line":"        self.assertIn(\"Image virtual size is %(image_size)dGB\""},{"line_number":1157,"context_line":"                      \" and doesn\u0027t fit in a volume of size\""},{"line_number":1158,"context_line":"                      \" %(volume_size)dGB.\" %"},{"line_number":1159,"context_line":"                      {\u0027image_size\u0027: image_meta[\u0027virtual_size\u0027] // units.Gi,"},{"line_number":1160,"context_line":"                       \u0027volume_size\u0027: vol_size}, str(res))"},{"line_number":1161,"context_line":"        # Restore volume size after asserting"},{"line_number":1162,"context_line":"        vol_size \u003d 2"},{"line_number":1163,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"621d0f84_39a69c15","line":1160,"range":{"start_line":1151,"start_character":0,"end_line":1160,"end_character":58},"in_reply_to":"bb40b553_faaa0100","updated":"2022-07-08 09:17:51.000000000","message":"The reason for doing it like this is because the virtual_size validation is part of the check_image_metadata method and other validations are done in the same way. Though i understand the code when initially proposed is not always in the best format. I will add a new test.","commit_id":"65db55c1b0ea6e21c0396817c378e46e43707c75"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"ffbdaf3fe50b61b75328c86c47fe938802539746","unresolved":true,"context_lines":[{"line_number":1145,"context_line":"                                image_meta,"},{"line_number":1146,"context_line":"                                vol_size)"},{"line_number":1147,"context_line":"        self.assertIn(\"Image 1 is not active.\", str(res))"},{"line_number":1148,"context_line":"        # Restore image status after asserting"},{"line_number":1149,"context_line":"        image_meta[\u0027status\u0027] \u003d \u0027active\u0027"},{"line_number":1150,"context_line":""},{"line_number":1151,"context_line":"        vol_size \u003d 4"},{"line_number":1152,"context_line":"        res \u003d self.assertRaises(exception.ImageUnacceptable,"},{"line_number":1153,"context_line":"                                volume_utils.check_image_metadata,"},{"line_number":1154,"context_line":"                                image_meta,"},{"line_number":1155,"context_line":"                                vol_size)"},{"line_number":1156,"context_line":"        self.assertIn(\"Image virtual size is %(image_size)dGB\""},{"line_number":1157,"context_line":"                      \" and doesn\u0027t fit in a volume of size\""},{"line_number":1158,"context_line":"                      \" %(volume_size)dGB.\" %"},{"line_number":1159,"context_line":"                      {\u0027image_size\u0027: image_meta[\u0027virtual_size\u0027] // units.Gi,"},{"line_number":1160,"context_line":"                       \u0027volume_size\u0027: vol_size}, str(res))"},{"line_number":1161,"context_line":"        # Restore volume size after asserting"},{"line_number":1162,"context_line":"        vol_size \u003d 2"},{"line_number":1163,"context_line":""},{"line_number":1164,"context_line":"    def test_enable_volume_bootable(self):"},{"line_number":1165,"context_line":"        ctxt \u003d context.get_admin_context()"}],"source_content_type":"text/x-python","patch_set":3,"id":"e5ccd217_c6324214","line":1162,"range":{"start_line":1148,"start_character":0,"end_line":1162,"end_character":20},"updated":"2022-07-06 15:17:54.000000000","message":"nit: This should be a different test case, not included in another method.","commit_id":"65db55c1b0ea6e21c0396817c378e46e43707c75"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"68bad1f90b5632d7379375f279e53d2be67dd299","unresolved":false,"context_lines":[{"line_number":1145,"context_line":"                                image_meta,"},{"line_number":1146,"context_line":"                                vol_size)"},{"line_number":1147,"context_line":"        self.assertIn(\"Image 1 is not active.\", str(res))"},{"line_number":1148,"context_line":"        # Restore image status after asserting"},{"line_number":1149,"context_line":"        image_meta[\u0027status\u0027] \u003d \u0027active\u0027"},{"line_number":1150,"context_line":""},{"line_number":1151,"context_line":"        vol_size \u003d 4"},{"line_number":1152,"context_line":"        res \u003d self.assertRaises(exception.ImageUnacceptable,"},{"line_number":1153,"context_line":"                                volume_utils.check_image_metadata,"},{"line_number":1154,"context_line":"                                image_meta,"},{"line_number":1155,"context_line":"                                vol_size)"},{"line_number":1156,"context_line":"        self.assertIn(\"Image virtual size is %(image_size)dGB\""},{"line_number":1157,"context_line":"                      \" and doesn\u0027t fit in a volume of size\""},{"line_number":1158,"context_line":"                      \" %(volume_size)dGB.\" %"},{"line_number":1159,"context_line":"                      {\u0027image_size\u0027: image_meta[\u0027virtual_size\u0027] // units.Gi,"},{"line_number":1160,"context_line":"                       \u0027volume_size\u0027: vol_size}, str(res))"},{"line_number":1161,"context_line":"        # Restore volume size after asserting"},{"line_number":1162,"context_line":"        vol_size \u003d 2"},{"line_number":1163,"context_line":""},{"line_number":1164,"context_line":"    def test_enable_volume_bootable(self):"},{"line_number":1165,"context_line":"        ctxt \u003d context.get_admin_context()"}],"source_content_type":"text/x-python","patch_set":3,"id":"df217e6f_c7dad0a6","line":1162,"range":{"start_line":1148,"start_character":0,"end_line":1162,"end_character":20},"in_reply_to":"e5ccd217_c6324214","updated":"2022-07-08 09:19:39.000000000","message":"Done","commit_id":"65db55c1b0ea6e21c0396817c378e46e43707c75"}],"cinder/volume/volume_utils.py":[{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"14bfb2baa2256e0dd88b8c9d742ccc08651bf25d","unresolved":true,"context_lines":[{"line_number":1098,"context_line":"    return mosr"},{"line_number":1099,"context_line":""},{"line_number":1100,"context_line":""},{"line_number":1101,"context_line":"def check_image_metadata(image_meta: dict[str, Union[str, int]],"},{"line_number":1102,"context_line":"                         vol_size: int) -\u003e None:"},{"line_number":1103,"context_line":"    \"\"\"Validates the image metadata.\"\"\""},{"line_number":1104,"context_line":"    # Check whether image is active"}],"source_content_type":"text/x-python","patch_set":3,"id":"965b2f46_aea162e0","line":1101,"range":{"start_line":1101,"start_character":4,"end_line":1101,"end_character":24},"updated":"2022-07-06 15:48:11.000000000","message":"For volume-create, this isn\u0027t called until cinder.volume.flows.api.create_volume ... isn\u0027t that too late for the REST API to reject the request?\n\nIt\u0027s also called by cinder.volume.api.reimage, but that\u0027s done before the rpcapi call is made, so I think that one is OK.","commit_id":"65db55c1b0ea6e21c0396817c378e46e43707c75"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"b5302ac60a6c27e88f125a282b137658c1970949","unresolved":true,"context_lines":[{"line_number":1098,"context_line":"    return mosr"},{"line_number":1099,"context_line":""},{"line_number":1100,"context_line":""},{"line_number":1101,"context_line":"def check_image_metadata(image_meta: dict[str, Union[str, int]],"},{"line_number":1102,"context_line":"                         vol_size: int) -\u003e None:"},{"line_number":1103,"context_line":"    \"\"\"Validates the image metadata.\"\"\""},{"line_number":1104,"context_line":"    # Check whether image is active"}],"source_content_type":"text/x-python","patch_set":3,"id":"b7c326c5_f7087810","line":1101,"range":{"start_line":1101,"start_character":4,"end_line":1101,"end_character":24},"in_reply_to":"03b8d78c_a737f7e8","updated":"2022-07-18 22:35:22.000000000","message":"OK, looked more closely, looks like ImageUnacceptable will be raised when flow_engine.run() is called (just like InvalidAvailabilityZone is), so it will happen synchronously with the call to volume_api.create_volume() the REST API, which is exactly what we want.","commit_id":"65db55c1b0ea6e21c0396817c378e46e43707c75"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"1eb426102510741073124919a1636787f3ce3fc0","unresolved":true,"context_lines":[{"line_number":1098,"context_line":"    return mosr"},{"line_number":1099,"context_line":""},{"line_number":1100,"context_line":""},{"line_number":1101,"context_line":"def check_image_metadata(image_meta: dict[str, Union[str, int]],"},{"line_number":1102,"context_line":"                         vol_size: int) -\u003e None:"},{"line_number":1103,"context_line":"    \"\"\"Validates the image metadata.\"\"\""},{"line_number":1104,"context_line":"    # Check whether image is active"}],"source_content_type":"text/x-python","patch_set":3,"id":"03b8d78c_a737f7e8","line":1101,"range":{"start_line":1101,"start_character":4,"end_line":1101,"end_character":24},"in_reply_to":"965b2f46_aea162e0","updated":"2022-07-08 09:17:51.000000000","message":"Initially I was thinking of doing it as early as when checking the image_id[1] but \nwe don\u0027t fetch the image_metadata until[2] (which is in the file you mentioned) and we check the metadata properties right after that.\nThe reason for not doing it earlier is it will add an additional API call to glance to fetch the metadata which is an overhead in the most common operation i.e. creating a volume and we won\u0027t fail every time but we will fetch metadata (additionally) every time. My thinking is, until we are failing in the API and synchronously we should be good and not wasting end users time waiting for the operation to fail.\n\n[1] https://opendev.org/openstack/cinder/src/commit/a2deecef891a16703e5410eb7805442961307090/cinder/volume/api.py#L239-L240\n[2] https://opendev.org/openstack/cinder/src/commit/a2deecef891a16703e5410eb7805442961307090/cinder/volume/flows/api/create_volume.py#L251","commit_id":"65db55c1b0ea6e21c0396817c378e46e43707c75"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"707e42347f62f6476fa81888220daba03dd238b7","unresolved":false,"context_lines":[{"line_number":1098,"context_line":"    return mosr"},{"line_number":1099,"context_line":""},{"line_number":1100,"context_line":""},{"line_number":1101,"context_line":"def check_image_metadata(image_meta: dict[str, Union[str, int]],"},{"line_number":1102,"context_line":"                         vol_size: int) -\u003e None:"},{"line_number":1103,"context_line":"    \"\"\"Validates the image metadata.\"\"\""},{"line_number":1104,"context_line":"    # Check whether image is active"}],"source_content_type":"text/x-python","patch_set":3,"id":"4797f9d4_193958ba","line":1101,"range":{"start_line":1101,"start_character":4,"end_line":1101,"end_character":24},"in_reply_to":"b7c326c5_f7087810","updated":"2022-07-20 19:02:21.000000000","message":"Yes, I\u0027ve tested in my environment that it fails synchronously (in the API layer).","commit_id":"65db55c1b0ea6e21c0396817c378e46e43707c75"}],"releasenotes/notes/added-virtual-size-check-42a84f6b24366e5d.yaml":[{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"14bfb2baa2256e0dd88b8c9d742ccc08651bf25d","unresolved":true,"context_lines":[{"line_number":2,"context_line":"fixes:"},{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    `Bug #1980268 \u003chttps://bugs.launchpad.net/cinder/+bug/1980268\u003e`_:"},{"line_number":5,"context_line":"    Added a check for virtual size of the image at the API layer to fail"},{"line_number":6,"context_line":"    fast and synchronously if virtual size of the image is greater than"},{"line_number":7,"context_line":"    the size of the volume."}],"source_content_type":"text/x-yaml","patch_set":3,"id":"ff7e499b_ee8c55d5","line":7,"range":{"start_line":5,"start_character":4,"end_line":7,"end_character":27},"updated":"2022-07-06 15:48:11.000000000","message":"virtual_size isn\u0027t populated on legacy images (and possibly some new images in weird formats), so I think we need to make clear here that we\u0027re relying on an image property to do this check.  Maybe something like:\n\nWhen creating a volume from an image, a check has been added to compare the requested volume size to the image\u0027s ``virtual_size`` property and fail the request if the volume will be too small to contain the image.  If the image record does not contain this property, the request is accepted but the volume will go to ``error`` status if the image does not fit (which is the current behavior).","commit_id":"65db55c1b0ea6e21c0396817c378e46e43707c75"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"68bad1f90b5632d7379375f279e53d2be67dd299","unresolved":false,"context_lines":[{"line_number":2,"context_line":"fixes:"},{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    `Bug #1980268 \u003chttps://bugs.launchpad.net/cinder/+bug/1980268\u003e`_:"},{"line_number":5,"context_line":"    Added a check for virtual size of the image at the API layer to fail"},{"line_number":6,"context_line":"    fast and synchronously if virtual size of the image is greater than"},{"line_number":7,"context_line":"    the size of the volume."}],"source_content_type":"text/x-yaml","patch_set":3,"id":"15f57dfe_9e8bd75f","line":7,"range":{"start_line":5,"start_character":4,"end_line":7,"end_character":27},"in_reply_to":"ff7e499b_ee8c55d5","updated":"2022-07-08 09:19:39.000000000","message":"Done","commit_id":"65db55c1b0ea6e21c0396817c378e46e43707c75"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"b13f11ada8e30f4c7d81350f664f6f20fb2324a4","unresolved":false,"context_lines":[{"line_number":7,"context_line":"    fail the request if the volume will be too small to contain the image."},{"line_number":8,"context_line":"    If the image record does not contain this property, the request is"},{"line_number":9,"context_line":"    accepted but the volume will go to ``error`` status if the image does"},{"line_number":10,"context_line":"    not fit (which is the current behavior)."}],"source_content_type":"text/x-yaml","patch_set":4,"id":"f866efbf_cb8d8a6b","line":10,"updated":"2022-07-08 10:15:43.000000000","message":"Should we start documenting these behaviors somewhere?","commit_id":"75d5fabff0946530a96f4066019f7cee515e4d51"}]}
