)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"bcf646f3f81762051b52410864ececed470adb69","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"6a236bc9_517c2ea3","updated":"2023-08-16 14:43:02.000000000","message":"I could be wrong, but I think this is not really a complete solution, it just works because the `chunk_length` is always (currently) smaller than `WRITE_CHUNK_SIZE`. -1 for visibility, but if I\u0027m wrong I\u0027ll change it.","commit_id":"47b8ec48375d8942e9bb4dbfaa75ff3d1eb3fd7f"},{"author":{"_account_id":33006,"name":"Gustavo Santos","email":"gufsnts@gmail.com","username":"gooshtavow"},"change_message_id":"6f3fb76feb47750a27b1c0d0008b6ae53679bb67","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"d0c152a3_f1acd6ec","updated":"2023-08-16 12:46:13.000000000","message":"This change fixed the image creation from volume using HAProxy for me on Zed. Thank you, Andrew and Robert!","commit_id":"47b8ec48375d8942e9bb4dbfaa75ff3d1eb3fd7f"},{"author":{"_account_id":33633,"name":"Jonathan Heathcote","email":"jonathan.heathcote@bbc.co.uk","username":"mossblaser"},"change_message_id":"a223bae9507bab33a8e5c454456b752665c34bf7","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"515fa6ed_38c1babc","updated":"2023-11-22 14:00:30.000000000","message":"Whilst I can\u0027t comment on Dan\u0027s concerns -- I\u0027m not familiar with this code -- I can confirm that this patch does indeed resolve our issue of unreliable creation of glance images from volumes.\n\n(Thanks very much!)","commit_id":"47b8ec48375d8942e9bb4dbfaa75ff3d1eb3fd7f"},{"author":{"_account_id":12932,"name":"Andrew Bogott","email":"andrewbogott@gmail.com","username":"Andrew"},"change_message_id":"bd5aa077dc351adfc177e5f51d9dae0cd850f052","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"2fd55b01_534287f4","updated":"2023-11-29 21:53:00.000000000","message":"@Dan can you please respond? This fix (or something like it) remains necessary for glance to work properly for me and others.","commit_id":"fa43561078bbee531ccc8acf2e185b3fc6d98b2a"},{"author":{"_account_id":13095,"name":"Marc Gariépy","email":"gariepy.marc@gmail.com","username":"mgariepy"},"change_message_id":"4a527d236d916231ff3143c6ff90ca21a3568505","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"637e27aa_4d3ba4a7","updated":"2024-01-16 21:03:07.000000000","message":"@dansmith can you please help a bit to push this patch ?\n\nthanks\n\nMarc","commit_id":"fa43561078bbee531ccc8acf2e185b3fc6d98b2a"},{"author":{"_account_id":28619,"name":"Dmitriy Rabotyagov","email":"noonedeadpunk@gmail.com","username":"noonedeadpunk"},"change_message_id":"d13f4414e1acf7cb8b95ccac302fa1be8e05c889","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"3d58b159_1c76dfaa","updated":"2024-01-12 13:54:58.000000000","message":"recheck timeout","commit_id":"fa43561078bbee531ccc8acf2e185b3fc6d98b2a"},{"author":{"_account_id":13095,"name":"Marc Gariépy","email":"gariepy.marc@gmail.com","username":"mgariepy"},"change_message_id":"5e6fcb32b3d66e043a8febb0989b26940daeb154","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"46ff64b7_351cd4b8","updated":"2024-01-12 18:42:41.000000000","message":"recheck timeout","commit_id":"fa43561078bbee531ccc8acf2e185b3fc6d98b2a"},{"author":{"_account_id":28619,"name":"Dmitriy Rabotyagov","email":"noonedeadpunk@gmail.com","username":"noonedeadpunk"},"change_message_id":"bfab8cbff8fd566da78ca5032cb9c31841f59021","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":5,"id":"c0725e82_20816fb2","in_reply_to":"2fd55b01_534287f4","updated":"2023-12-07 08:52:46.000000000","message":"+1 can confirm that issue is present as of today or glance+uwsgi+ceph that are behind haproxy.","commit_id":"fa43561078bbee531ccc8acf2e185b3fc6d98b2a"},{"author":{"_account_id":13095,"name":"Marc Gariépy","email":"gariepy.marc@gmail.com","username":"mgariepy"},"change_message_id":"4a527d236d916231ff3143c6ff90ca21a3568505","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":5,"id":"17790281_7792a7ea","in_reply_to":"c0725e82_20816fb2","updated":"2024-01-16 21:03:07.000000000","message":"i did test the provided patch and it works correctly for me.","commit_id":"fa43561078bbee531ccc8acf2e185b3fc6d98b2a"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"eb95e4672e718b4964ac959042eb8cd0c19e27cb","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":6,"id":"3d7d6053_9100d40c","updated":"2024-01-18 09:42:10.000000000","message":"Thank you!","commit_id":"62044431bd55e3dbbb6c97b0ec0bf591b3c9ef6f"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"5ddb4725a58b5e16fbb3381c298d1522631cc31e","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":6,"id":"29c04d45_88a0858b","updated":"2024-01-17 16:20:03.000000000","message":"Without going back through this in detail, it sounds like this fixes things for multiple people. My comment was more about further hardening and I don\u0027t think this is any worse than it is today. So, I think it\u0027s probably worth just putting it in even if there\u0027s more room for improvement.","commit_id":"62044431bd55e3dbbb6c97b0ec0bf591b3c9ef6f"},{"author":{"_account_id":25023,"name":"Jonathan Rosser","email":"jonathan.rosser@rd.bbc.co.uk","username":"jrosser"},"change_message_id":"f8bb2b1b82c451394db2ad4f12b0073f4972cb26","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":6,"id":"1396b1ca_341fd512","updated":"2024-02-14 13:22:19.000000000","message":"can we backport this as it\u0027s a very long standing bug that is addressed","commit_id":"62044431bd55e3dbbb6c97b0ec0bf591b3c9ef6f"}],"glance_store/_drivers/rbd.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"bcf646f3f81762051b52410864ececed470adb69","unresolved":true,"context_lines":[{"line_number":526,"context_line":"        \"\"\"Handle the rbd resize when needed.\"\"\""},{"line_number":527,"context_line":"        if image_size !\u003d 0 or self.size \u003e\u003d bytes_written + chunk_length:"},{"line_number":528,"context_line":"            return self.size"},{"line_number":529,"context_line":"        new_size \u003d self.size + self.resize_amount"},{"line_number":530,"context_line":"        LOG.debug(\"resizing image to %s KiB\" % (new_size / units.Ki))"},{"line_number":531,"context_line":"        image.resize(new_size)"},{"line_number":532,"context_line":"        # Note(jokke): We double how much we grow the image each time"}],"source_content_type":"text/x-python","patch_set":4,"id":"a4077986_dfc24997","side":"PARENT","line":529,"updated":"2023-08-16 14:43:02.000000000","message":"So the first time this will be only `self.WRITE_CHUNK_SIZE` larger than our current size, right? And `bytes_written + chunk_length` may be larger than `self.size + 4MiB` so we don\u0027t make the image big enough, right?","commit_id":"9bd9cf4fcd8a0aedc98fafb983fc19744e404015"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"bcf646f3f81762051b52410864ececed470adb69","unresolved":true,"context_lines":[{"line_number":529,"context_line":"        # Note(jokke): We double how much we grow the image each time"},{"line_number":530,"context_line":"        # up to 8gigs to avoid resizing for each write on bigger images"},{"line_number":531,"context_line":"        self.resize_amount \u003d min(self.resize_amount * 2, 8 * units.Gi)"},{"line_number":532,"context_line":"        new_size \u003d self.size + self.resize_amount"},{"line_number":533,"context_line":"        LOG.debug(\"resizing image to %s KiB\" % (new_size / units.Ki))"},{"line_number":534,"context_line":"        image.resize(new_size)"},{"line_number":535,"context_line":"        return new_size"}],"source_content_type":"text/x-python","patch_set":4,"id":"e5b09807_72d9440a","line":532,"updated":"2023-08-16 14:43:02.000000000","message":"I guess the thing that strikes me is that this only solves the problem if the chunk is smaller than the resize_amount. Shouldn\u0027t we make sure that the new_size is larger than the amount we need to write in case chunks get much larger later?\n\nSomething like:\n```\nmin_increase \u003d max(self.resize_amount, chunk_length)\nself.resize_amount \u003d min(min_increase * 2, 8 * units.Gi)\n```\n\nWouldn\u0027t that be safer? I think we probably also want to make sure the min_increase is an even power of two, so that we keep some reasonable alignment, perhaps round to the nearest `WRITE_CHUNK_SIZE` or something?","commit_id":"47b8ec48375d8942e9bb4dbfaa75ff3d1eb3fd7f"},{"author":{"_account_id":12932,"name":"Andrew Bogott","email":"andrewbogott@gmail.com","username":"Andrew"},"change_message_id":"6292fff3de377f49fb191fb1ddbcbd81af2d9231","unresolved":true,"context_lines":[{"line_number":529,"context_line":"        # Note(jokke): We double how much we grow the image each time"},{"line_number":530,"context_line":"        # up to 8gigs to avoid resizing for each write on bigger images"},{"line_number":531,"context_line":"        self.resize_amount \u003d min(self.resize_amount * 2, 8 * units.Gi)"},{"line_number":532,"context_line":"        new_size \u003d self.size + self.resize_amount"},{"line_number":533,"context_line":"        LOG.debug(\"resizing image to %s KiB\" % (new_size / units.Ki))"},{"line_number":534,"context_line":"        image.resize(new_size)"},{"line_number":535,"context_line":"        return new_size"}],"source_content_type":"text/x-python","patch_set":4,"id":"3ef96f0c_9d042258","line":532,"in_reply_to":"e5b09807_72d9440a","updated":"2023-08-31 16:47:33.000000000","message":"I think I follow what you\u0027re saying -- it looks to me, though, that resize_amount is initialized to be \u003d\u003d chunk size, so I think the scenario you\u0027re worried about will never happen?  In configure_add:\n\nself.resize_amount \u003d self.WRITE_CHUNKSIZE\n\nand chunk_size is static after being initially set?\n\nI\u0027m not super familiar with this code, though, so let me know if I\u0027m misunderstanding!","commit_id":"47b8ec48375d8942e9bb4dbfaa75ff3d1eb3fd7f"}]}
