)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"9619364e9c806350fa1233f167144edbc783a482","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Reserve DISK_GB resource for the image cache"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"If the nova compute image cache is on the same disk as the instance"},{"line_number":10,"context_line":"directory then the images in the cache consuming the same disk resource"},{"line_number":11,"context_line":"as the nova instances which can lead to disk overallocation."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"This patch adds a new config option"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"ff570b3c_924eb435","line":10,"range":{"start_line":10,"start_character":39,"end_line":10,"end_character":48},"updated":"2020-05-19 14:08:35.000000000","message":"\"are consuming\" or \"will consume\"","commit_id":"eb0bbbed8a86b86bc5ce7ecd36ddb3e762b283ad"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"d61c72c06eb1c81e6c0fe998be8bb5ae83977c8a","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Reserve DISK_GB resource for the image cache"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"If the nova compute image cache is on the same disk as the instance"},{"line_number":10,"context_line":"directory then the images in the cache consuming the same disk resource"},{"line_number":11,"context_line":"as the nova instances which can lead to disk overallocation."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"This patch adds a new config option"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"ff570b3c_f8d5511d","line":10,"range":{"start_line":10,"start_character":39,"end_line":10,"end_character":48},"in_reply_to":"ff570b3c_924eb435","updated":"2020-05-19 15:12:32.000000000","message":"Done","commit_id":"eb0bbbed8a86b86bc5ce7ecd36ddb3e762b283ad"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"9619364e9c806350fa1233f167144edbc783a482","unresolved":false,"context_lines":[{"line_number":13,"context_line":"This patch adds a new config option"},{"line_number":14,"context_line":"[workarounds]/reserve_disk_resource_for_image_cache . If it is set the"},{"line_number":15,"context_line":"libvirt driver will reserve DISK_GB resources in placement for the"},{"line_number":16,"context_line":"actual size of the image cache and also makes sure that such reservation"},{"line_number":17,"context_line":"is updated before a new image is downloaded from glance."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"This is a low complexity solution with known limitations:"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"ff570b3c_320ec8e4","line":16,"range":{"start_line":16,"start_character":40,"end_line":16,"end_character":45},"updated":"2020-05-19 14:08:35.000000000","message":"\"make\"","commit_id":"eb0bbbed8a86b86bc5ce7ecd36ddb3e762b283ad"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"d61c72c06eb1c81e6c0fe998be8bb5ae83977c8a","unresolved":false,"context_lines":[{"line_number":13,"context_line":"This patch adds a new config option"},{"line_number":14,"context_line":"[workarounds]/reserve_disk_resource_for_image_cache . If it is set the"},{"line_number":15,"context_line":"libvirt driver will reserve DISK_GB resources in placement for the"},{"line_number":16,"context_line":"actual size of the image cache and also makes sure that such reservation"},{"line_number":17,"context_line":"is updated before a new image is downloaded from glance."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"This is a low complexity solution with known limitations:"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"ff570b3c_18df653a","line":16,"range":{"start_line":16,"start_character":40,"end_line":16,"end_character":45},"in_reply_to":"ff570b3c_320ec8e4","updated":"2020-05-19 15:12:32.000000000","message":"Done","commit_id":"eb0bbbed8a86b86bc5ce7ecd36ddb3e762b283ad"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"9619364e9c806350fa1233f167144edbc783a482","unresolved":false,"context_lines":[{"line_number":13,"context_line":"This patch adds a new config option"},{"line_number":14,"context_line":"[workarounds]/reserve_disk_resource_for_image_cache . If it is set the"},{"line_number":15,"context_line":"libvirt driver will reserve DISK_GB resources in placement for the"},{"line_number":16,"context_line":"actual size of the image cache and also makes sure that such reservation"},{"line_number":17,"context_line":"is updated before a new image is downloaded from glance."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"This is a low complexity solution with known limitations:"},{"line_number":20,"context_line":"* reservation is updated long after the image is downloaded"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"ff570b3c_3227e866","line":17,"range":{"start_line":16,"start_character":61,"end_line":17,"end_character":56},"updated":"2020-05-19 14:08:35.000000000","message":"I don\u0027t think this is right. Until it\u0027s downloaded it won\u0027t be considered, right?","commit_id":"eb0bbbed8a86b86bc5ce7ecd36ddb3e762b283ad"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"d61c72c06eb1c81e6c0fe998be8bb5ae83977c8a","unresolved":false,"context_lines":[{"line_number":13,"context_line":"This patch adds a new config option"},{"line_number":14,"context_line":"[workarounds]/reserve_disk_resource_for_image_cache . If it is set the"},{"line_number":15,"context_line":"libvirt driver will reserve DISK_GB resources in placement for the"},{"line_number":16,"context_line":"actual size of the image cache and also makes sure that such reservation"},{"line_number":17,"context_line":"is updated before a new image is downloaded from glance."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"This is a low complexity solution with known limitations:"},{"line_number":20,"context_line":"* reservation is updated long after the image is downloaded"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"ff570b3c_d8c16d56","line":17,"range":{"start_line":16,"start_character":61,"end_line":17,"end_character":56},"in_reply_to":"ff570b3c_3227e866","updated":"2020-05-19 15:12:32.000000000","message":"You are right. Removed.","commit_id":"eb0bbbed8a86b86bc5ce7ecd36ddb3e762b283ad"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"9619364e9c806350fa1233f167144edbc783a482","unresolved":false,"context_lines":[{"line_number":17,"context_line":"is updated before a new image is downloaded from glance."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"This is a low complexity solution with known limitations:"},{"line_number":20,"context_line":"* reservation is updated long after the image is downloaded"},{"line_number":21,"context_line":"* this code allows to reserve more that (total - usage)"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"Change-Id: If874f018ea996587e178219569c2903c2ee923cf"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"ff570b3c_122aa42a","line":20,"updated":"2020-05-19 14:08:35.000000000","message":"^^","commit_id":"eb0bbbed8a86b86bc5ce7ecd36ddb3e762b283ad"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"9619364e9c806350fa1233f167144edbc783a482","unresolved":false,"context_lines":[{"line_number":18,"context_line":""},{"line_number":19,"context_line":"This is a low complexity solution with known limitations:"},{"line_number":20,"context_line":"* reservation is updated long after the image is downloaded"},{"line_number":21,"context_line":"* this code allows to reserve more that (total - usage)"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"Change-Id: If874f018ea996587e178219569c2903c2ee923cf"},{"line_number":24,"context_line":"Closes-Bug: #1878024"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"ff570b3c_72d2002a","line":21,"range":{"start_line":21,"start_character":35,"end_line":21,"end_character":39},"updated":"2020-05-19 14:08:35.000000000","message":"\"than\"\n\nMight be clearer to say something like \"This code allows the reservation to push the provider into negative available resource if the reservation+allocations exceed the total inventory.\"","commit_id":"eb0bbbed8a86b86bc5ce7ecd36ddb3e762b283ad"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"d61c72c06eb1c81e6c0fe998be8bb5ae83977c8a","unresolved":false,"context_lines":[{"line_number":18,"context_line":""},{"line_number":19,"context_line":"This is a low complexity solution with known limitations:"},{"line_number":20,"context_line":"* reservation is updated long after the image is downloaded"},{"line_number":21,"context_line":"* this code allows to reserve more that (total - usage)"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"Change-Id: If874f018ea996587e178219569c2903c2ee923cf"},{"line_number":24,"context_line":"Closes-Bug: #1878024"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"ff570b3c_d8a68dc1","line":21,"range":{"start_line":21,"start_character":35,"end_line":21,"end_character":39},"in_reply_to":"ff570b3c_72d2002a","updated":"2020-05-19 15:12:32.000000000","message":"Done","commit_id":"eb0bbbed8a86b86bc5ce7ecd36ddb3e762b283ad"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"095487f8108df533b07122d2a6dfada3ffe83e1c","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Reserve DISK_GB resource for the image cache"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"If the nova compute image cache is on the same disk as the instance"},{"line_number":10,"context_line":"directory then the images in the cache will consume the same disk"},{"line_number":11,"context_line":"resource as the nova instances which can lead to disk overallocation."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"This patch adds a new config option"},{"line_number":14,"context_line":"[workarounds]/reserve_disk_resource_for_image_cache . If it is set the"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"ff570b3c_c7d98422","line":11,"range":{"start_line":9,"start_character":0,"end_line":11,"end_character":69},"updated":"2020-05-19 18:29:41.000000000","message":"nit: i get the intend e.g. if the cache and isntance dirs are on the same mount on the host they both compete for the disk space aviabley which is reported to placment as local_GB.\n\nbut the phrasing implies to me at least that the cache image would also use the same amound of space as the instance flavor root disk which is not true.\n\ni could be reading into that a bit too much but\ndepending no the file type and image setting the image in the cache can be either a raw image or a qcow image and similarly the instance disk can be a raw image or a qcow image.\n\nso worst case if both are raw images, the cache image should be the size of the image in glance and the instance image will be the size of the flavor root disk.\n\nif we use a qcow backing files in the cache then its size on disk could be smaller then the virtual size listed for the image assuming we do not preallocate it and similarly if we have a qcow image for the vm that uses the cache image as a backing file the overall used space on disk can be quite small.\n\nso just confirming you wanted to imply that they are both consumign the same resouce (local disk) on the host and in plamcent and not that the cached image will be the same size as the flavor root disk.","commit_id":"89fe504abfbd41a9c37f9b544c0ce98b23b45799"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"6e180395f803bd9bb34ff82fd21c6c54f5633bcd","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Reserve DISK_GB resource for the image cache"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"If the nova compute image cache is on the same disk as the instance"},{"line_number":10,"context_line":"directory then the images in the cache will consume the same disk"},{"line_number":11,"context_line":"resource as the nova instances which can lead to disk overallocation."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"This patch adds a new config option"},{"line_number":14,"context_line":"[workarounds]/reserve_disk_resource_for_image_cache . If it is set the"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"ff570b3c_b94e3835","line":11,"range":{"start_line":9,"start_character":0,"end_line":11,"end_character":69},"in_reply_to":"ff570b3c_c7d98422","updated":"2020-05-19 18:43:34.000000000","message":"FWIW, even after reading your assessment, I can\u0027t read the sentence here as anything implying any relation between image and flavor root disk size.","commit_id":"89fe504abfbd41a9c37f9b544c0ce98b23b45799"}],"nova/conf/libvirt.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"738a73811e9443cc8dfaf5619652a1524fccc2e0","unresolved":false,"context_lines":[{"line_number":894,"context_line":"  :oslo.config:option:`libvirt.hw_machine_type`; see"},{"line_number":895,"context_line":"  :ref:`deploying-sev-capable-infrastructure` for more on this."},{"line_number":896,"context_line":"\"\"\"),"},{"line_number":897,"context_line":"    cfg.BoolOpt(\u0027reserve_disk_resource_for_image_cache\u0027,"},{"line_number":898,"context_line":"               default\u003dFalse,"},{"line_number":899,"context_line":"               help\u003d\"\"\""},{"line_number":900,"context_line":"If it is set to True then the driver will reserve DISK_GB resource for the"}],"source_content_type":"text/x-python","patch_set":1,"id":"ff570b3c_f0c928ac","line":897,"updated":"2020-05-15 13:56:34.000000000","message":"I was kinda expecting this to be a workaround. I guess because I\u0027m just not totally confident that this is the best path forward and want to hedge. Do you feel like it really should be here? Also, I dunno how other drivers work, but I thought they some did sort of image caching as well, so putting it in workarounds is more neutral. Could also just put it straight into compute if we\u0027re confident.","commit_id":"527a6a5a47316f632b181082a46242a513a09edb"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"d380fb5f31337e9d0c18875d162bf1fe2eca95f3","unresolved":false,"context_lines":[{"line_number":894,"context_line":"  :oslo.config:option:`libvirt.hw_machine_type`; see"},{"line_number":895,"context_line":"  :ref:`deploying-sev-capable-infrastructure` for more on this."},{"line_number":896,"context_line":"\"\"\"),"},{"line_number":897,"context_line":"    cfg.BoolOpt(\u0027reserve_disk_resource_for_image_cache\u0027,"},{"line_number":898,"context_line":"               default\u003dFalse,"},{"line_number":899,"context_line":"               help\u003d\"\"\""},{"line_number":900,"context_line":"If it is set to True then the driver will reserve DISK_GB resource for the"}],"source_content_type":"text/x-python","patch_set":1,"id":"ff570b3c_f0e768ab","line":897,"in_reply_to":"ff570b3c_f0c928ac","updated":"2020-05-15 14:06:47.000000000","message":"you are right it is better be in the [workaround] for now.","commit_id":"527a6a5a47316f632b181082a46242a513a09edb"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"56f6571e94824a83dddea23edab02ecb21de6634","unresolved":false,"context_lines":[{"line_number":894,"context_line":"  :oslo.config:option:`libvirt.hw_machine_type`; see"},{"line_number":895,"context_line":"  :ref:`deploying-sev-capable-infrastructure` for more on this."},{"line_number":896,"context_line":"\"\"\"),"},{"line_number":897,"context_line":"    cfg.BoolOpt(\u0027reserve_disk_resource_for_image_cache\u0027,"},{"line_number":898,"context_line":"               default\u003dFalse,"},{"line_number":899,"context_line":"               help\u003d\"\"\""},{"line_number":900,"context_line":"If it is set to True then the driver will reserve DISK_GB resource for the"}],"source_content_type":"text/x-python","patch_set":1,"id":"ff570b3c_24ad1ee9","line":897,"in_reply_to":"ff570b3c_f0e768ab","updated":"2020-05-15 16:18:55.000000000","message":"Done","commit_id":"527a6a5a47316f632b181082a46242a513a09edb"}],"nova/conf/workarounds.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"9619364e9c806350fa1233f167144edbc783a482","unresolved":false,"context_lines":[{"line_number":333,"context_line":"If it is set to True then the libvirt driver will reserve DISK_GB resource for"},{"line_number":334,"context_line":"the images stored in the image cache. If the"},{"line_number":335,"context_line":":oslo.config:option:`DEFAULT.instances_path` is on different disk partition"},{"line_number":336,"context_line":"that then image cache directory then the driver will not reserve resource for"},{"line_number":337,"context_line":"the cache."},{"line_number":338,"context_line":""},{"line_number":339,"context_line":"Such disk reservation is done by a periodic task in the resource tracker that"}],"source_content_type":"text/x-python","patch_set":3,"id":"ff570b3c_a038c1ed","line":336,"range":{"start_line":336,"start_character":0,"end_line":336,"end_character":9},"updated":"2020-05-19 14:08:35.000000000","message":"than the","commit_id":"eb0bbbed8a86b86bc5ce7ecd36ddb3e762b283ad"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"d61c72c06eb1c81e6c0fe998be8bb5ae83977c8a","unresolved":false,"context_lines":[{"line_number":333,"context_line":"If it is set to True then the libvirt driver will reserve DISK_GB resource for"},{"line_number":334,"context_line":"the images stored in the image cache. If the"},{"line_number":335,"context_line":":oslo.config:option:`DEFAULT.instances_path` is on different disk partition"},{"line_number":336,"context_line":"that then image cache directory then the driver will not reserve resource for"},{"line_number":337,"context_line":"the cache."},{"line_number":338,"context_line":""},{"line_number":339,"context_line":"Such disk reservation is done by a periodic task in the resource tracker that"}],"source_content_type":"text/x-python","patch_set":3,"id":"ff570b3c_75a5caa1","line":336,"range":{"start_line":336,"start_character":0,"end_line":336,"end_character":9},"in_reply_to":"ff570b3c_a038c1ed","updated":"2020-05-19 15:12:32.000000000","message":"Done","commit_id":"eb0bbbed8a86b86bc5ce7ecd36ddb3e762b283ad"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"9619364e9c806350fa1233f167144edbc783a482","unresolved":false,"context_lines":[{"line_number":338,"context_line":""},{"line_number":339,"context_line":"Such disk reservation is done by a periodic task in the resource tracker that"},{"line_number":340,"context_line":"runs every :oslo.config:option:`update_resources_interval` seconds. So the"},{"line_number":341,"context_line":"reservation is not updated immediately when an image is cached."},{"line_number":342,"context_line":""},{"line_number":343,"context_line":"Related options:"},{"line_number":344,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"ff570b3c_b2493861","line":341,"updated":"2020-05-19 14:08:35.000000000","message":"Probably not worth changing this, but this runs during RT update() right? Which means we run this every time we boot an instance, AFAIK. The reservation for a given instance won\u0027t include its own cached image, but the next instance boot will update for the previous one, if that happens before the periodic runs.","commit_id":"eb0bbbed8a86b86bc5ce7ecd36ddb3e762b283ad"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"d61c72c06eb1c81e6c0fe998be8bb5ae83977c8a","unresolved":false,"context_lines":[{"line_number":338,"context_line":""},{"line_number":339,"context_line":"Such disk reservation is done by a periodic task in the resource tracker that"},{"line_number":340,"context_line":"runs every :oslo.config:option:`update_resources_interval` seconds. So the"},{"line_number":341,"context_line":"reservation is not updated immediately when an image is cached."},{"line_number":342,"context_line":""},{"line_number":343,"context_line":"Related options:"},{"line_number":344,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"ff570b3c_95705e0a","line":341,"in_reply_to":"ff570b3c_b2493861","updated":"2020-05-19 15:12:32.000000000","message":"You are correct. I feel that these are technical details that does not really affect the usage of this config.","commit_id":"eb0bbbed8a86b86bc5ce7ecd36ddb3e762b283ad"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"1aa8fed0645feba29eec239a7f9aed0fd914df4f","unresolved":false,"context_lines":[{"line_number":333,"context_line":"If it is set to True then the libvirt driver will reserve DISK_GB resource for"},{"line_number":334,"context_line":"the images stored in the image cache. If the"},{"line_number":335,"context_line":":oslo.config:option:`DEFAULT.instances_path` is on different disk partition"},{"line_number":336,"context_line":"that the image cache directory then the driver will not reserve resource for"},{"line_number":337,"context_line":"the cache."},{"line_number":338,"context_line":""},{"line_number":339,"context_line":"Such disk reservation is done by a periodic task in the resource tracker that"}],"source_content_type":"text/x-python","patch_set":4,"id":"ff570b3c_380d0990","line":336,"range":{"start_line":336,"start_character":0,"end_line":336,"end_character":4},"updated":"2020-05-19 15:16:00.000000000","message":"This should be \"than\". \"that\" doesn\u0027t make any sense.","commit_id":"799a953e80e74ffb3c92d14d6f8abc1909b4d5e0"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"53678962ac11f46e472196cf6fa880c828cf2b33","unresolved":false,"context_lines":[{"line_number":333,"context_line":"If it is set to True then the libvirt driver will reserve DISK_GB resource for"},{"line_number":334,"context_line":"the images stored in the image cache. If the"},{"line_number":335,"context_line":":oslo.config:option:`DEFAULT.instances_path` is on different disk partition"},{"line_number":336,"context_line":"that the image cache directory then the driver will not reserve resource for"},{"line_number":337,"context_line":"the cache."},{"line_number":338,"context_line":""},{"line_number":339,"context_line":"Such disk reservation is done by a periodic task in the resource tracker that"}],"source_content_type":"text/x-python","patch_set":4,"id":"ff570b3c_d89a0d12","line":336,"range":{"start_line":336,"start_character":0,"end_line":336,"end_character":4},"in_reply_to":"ff570b3c_380d0990","updated":"2020-05-19 15:48:32.000000000","message":"Done","commit_id":"799a953e80e74ffb3c92d14d6f8abc1909b4d5e0"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"095487f8108df533b07122d2a6dfada3ffe83e1c","unresolved":false,"context_lines":[{"line_number":337,"context_line":"the cache."},{"line_number":338,"context_line":""},{"line_number":339,"context_line":"Such disk reservation is done by a periodic task in the resource tracker that"},{"line_number":340,"context_line":"runs every :oslo.config:option:`update_resources_interval` seconds. So the"},{"line_number":341,"context_line":"reservation is not updated immediately when an image is cached."},{"line_number":342,"context_line":""},{"line_number":343,"context_line":"Related options:"},{"line_number":344,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"ff570b3c_673cf82e","line":341,"range":{"start_line":340,"start_character":67,"end_line":341,"end_character":63},"updated":"2020-05-19 18:29:41.000000000","message":"ok so this is another one of the limitations the latency between the cache consuming resouces on disk and the reserved value being updated.","commit_id":"89fe504abfbd41a9c37f9b544c0ce98b23b45799"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"6e180395f803bd9bb34ff82fd21c6c54f5633bcd","unresolved":false,"context_lines":[{"line_number":337,"context_line":"the cache."},{"line_number":338,"context_line":""},{"line_number":339,"context_line":"Such disk reservation is done by a periodic task in the resource tracker that"},{"line_number":340,"context_line":"runs every :oslo.config:option:`update_resources_interval` seconds. So the"},{"line_number":341,"context_line":"reservation is not updated immediately when an image is cached."},{"line_number":342,"context_line":""},{"line_number":343,"context_line":"Related options:"},{"line_number":344,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"ff570b3c_190804d8","line":341,"range":{"start_line":340,"start_character":67,"end_line":341,"end_character":63},"in_reply_to":"ff570b3c_673cf82e","updated":"2020-05-19 18:43:34.000000000","message":"See comments by me earlier in the revisions. It\u0027s not actually as bad as stated here, and happens more often. However, this is an easy-to-understand upper bound which I think is sensible for CONF documentation.","commit_id":"89fe504abfbd41a9c37f9b544c0ce98b23b45799"}],"nova/virt/libvirt/driver.py":[{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"8c1160c29c0f3a00afbbb73c6942e6888d191c4e","unresolved":false,"context_lines":[{"line_number":9988,"context_line":"            return 0"},{"line_number":9989,"context_line":""},{"line_number":9990,"context_line":"        return compute_utils.convert_mb_to_ceil_gb("},{"line_number":9991,"context_line":"            self.image_cache_manager.get_disk_usage() / 1024.0 / 1024.0)"},{"line_number":9992,"context_line":""},{"line_number":9993,"context_line":"    def _is_path_shared_with(self, dest, path):"},{"line_number":9994,"context_line":"        # NOTE (rmk): There are two methods of determining whether we are"}],"source_content_type":"text/x-python","patch_set":5,"id":"ff570b3c_47a45408","line":9991,"updated":"2020-05-19 18:49:36.000000000","message":"Note to self: this converts get_disk_usage() bytes to MB then passes that to a method to convert MB to GB ceiling.","commit_id":"89fe504abfbd41a9c37f9b544c0ce98b23b45799"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"095487f8108df533b07122d2a6dfada3ffe83e1c","unresolved":false,"context_lines":[{"line_number":9987,"context_line":"        if not CONF.workarounds.reserve_disk_resource_for_image_cache:"},{"line_number":9988,"context_line":"            return 0"},{"line_number":9989,"context_line":""},{"line_number":9990,"context_line":"        return compute_utils.convert_mb_to_ceil_gb("},{"line_number":9991,"context_line":"            self.image_cache_manager.get_disk_usage() / 1024.0 / 1024.0)"},{"line_number":9992,"context_line":""},{"line_number":9993,"context_line":"    def _is_path_shared_with(self, dest, path):"},{"line_number":9994,"context_line":"        # NOTE (rmk): There are two methods of determining whether we are"}],"source_content_type":"text/x-python","patch_set":5,"id":"ff570b3c_c7fce43f","line":9991,"range":{"start_line":9990,"start_character":15,"end_line":9991,"end_character":72},"updated":"2020-05-19 18:29:41.000000000","message":"i guess  self.image_cache_manager.get_disk_usage() is returning in bytes then we are deviding by 1024.0 twice to convert to MB and finally getting the ceiling to round up to the nearest GB.\n\nya that should work i guess. \n\nmy next question would be does self.image_cache_manager.get_disk_usage report the size on disk or the sum of the virtal size. i assume the size on disk.\n\n-----\nlater yep its the space on disk so this makes sense.\nalthough i kind of feel like we should be returnign that value in MB altready rather than bytes.","commit_id":"89fe504abfbd41a9c37f9b544c0ce98b23b45799"}],"nova/virt/libvirt/imagecache.py":[{"author":{"_account_id":28332,"name":"Alexandre arents","email":"alexandre.arents@corp.ovh.com","username":"aarents"},"change_message_id":"b3a5adc0ff7eee050d3dd48d6aa30757cb1bbf66","unresolved":false,"context_lines":[{"line_number":355,"context_line":"        self._age_and_verify_cached_images(context, all_instances, base_dir)"},{"line_number":356,"context_line":"        self._age_and_verify_swap_images(context, base_dir)"},{"line_number":357,"context_line":""},{"line_number":358,"context_line":"    def get_disk_usage(self):"},{"line_number":359,"context_line":"        if not self._is_cache_dir_on_same_dev_as_instances_dir():"},{"line_number":360,"context_line":"            return 0"},{"line_number":361,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"ff570b3c_74295388","line":358,"range":{"start_line":358,"start_character":8,"end_line":358,"end_character":22},"updated":"2020-05-19 10:43:11.000000000","message":"I would be great in futur that this method take into consideration disk_overcommit (count reservation/pending cache download, disk image claimed) more detail below.","commit_id":"eb0bbbed8a86b86bc5ce7ecd36ddb3e762b283ad"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"fe72a692748016b9d90127c4bd5866df7cc0cf05","unresolved":false,"context_lines":[{"line_number":355,"context_line":"        self._age_and_verify_cached_images(context, all_instances, base_dir)"},{"line_number":356,"context_line":"        self._age_and_verify_swap_images(context, base_dir)"},{"line_number":357,"context_line":""},{"line_number":358,"context_line":"    def get_disk_usage(self):"},{"line_number":359,"context_line":"        if not self._is_cache_dir_on_same_dev_as_instances_dir():"},{"line_number":360,"context_line":"            return 0"},{"line_number":361,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"ff570b3c_2f2ca4aa","line":358,"range":{"start_line":358,"start_character":8,"end_line":358,"end_character":22},"in_reply_to":"ff570b3c_74295388","updated":"2020-05-19 12:21:58.000000000","message":"The disk overcommit is considered in the allocation_ratio in placement so we don\u0027t have to consider it here. \n\nPending download and image claim handling needs a separate solution.","commit_id":"eb0bbbed8a86b86bc5ce7ecd36ddb3e762b283ad"},{"author":{"_account_id":28332,"name":"Alexandre arents","email":"alexandre.arents@corp.ovh.com","username":"aarents"},"change_message_id":"b3a5adc0ff7eee050d3dd48d6aa30757cb1bbf66","unresolved":false,"context_lines":[{"line_number":371,"context_line":"    @property"},{"line_number":372,"context_line":"    def cache_dir(self):"},{"line_number":373,"context_line":"        return os.path.join("},{"line_number":374,"context_line":"            CONF.instances_path, CONF.image_cache.subdirectory_name)"},{"line_number":375,"context_line":""},{"line_number":376,"context_line":"    def _is_cache_dir_on_same_dev_as_instances_dir(self):"},{"line_number":377,"context_line":"        # NOTE(gibi): this does not work on Windows properly as st_dev is"}],"source_content_type":"text/x-python","patch_set":3,"id":"ff570b3c_b143fd6b","line":374,"range":{"start_line":374,"start_character":33,"end_line":374,"end_character":67},"updated":"2020-05-19 10:43:11.000000000","message":"I guess you mean CONF.image_cache_subdirectory_name (s/\\./_/)\nI confirm that once renamed, method _is_cache_dir_on_same_dev_as_instances_dir return False when fs id is different on cache_dir as expected. Not sure it deserve a specific test.","commit_id":"eb0bbbed8a86b86bc5ce7ecd36ddb3e762b283ad"},{"author":{"_account_id":28332,"name":"Alexandre arents","email":"alexandre.arents@corp.ovh.com","username":"aarents"},"change_message_id":"1a1d7cb63f6c5e528c135091e3ec96c3309dc141","unresolved":false,"context_lines":[{"line_number":371,"context_line":"    @property"},{"line_number":372,"context_line":"    def cache_dir(self):"},{"line_number":373,"context_line":"        return os.path.join("},{"line_number":374,"context_line":"            CONF.instances_path, CONF.image_cache.subdirectory_name)"},{"line_number":375,"context_line":""},{"line_number":376,"context_line":"    def _is_cache_dir_on_same_dev_as_instances_dir(self):"},{"line_number":377,"context_line":"        # NOTE(gibi): this does not work on Windows properly as st_dev is"}],"source_content_type":"text/x-python","patch_set":3,"id":"ff570b3c_4a6626c3","line":374,"range":{"start_line":374,"start_character":33,"end_line":374,"end_character":67},"in_reply_to":"ff570b3c_8f485087","updated":"2020-05-19 12:35:24.000000000","message":"Ok, that why I need to change it for stein.","commit_id":"eb0bbbed8a86b86bc5ce7ecd36ddb3e762b283ad"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"fe72a692748016b9d90127c4bd5866df7cc0cf05","unresolved":false,"context_lines":[{"line_number":371,"context_line":"    @property"},{"line_number":372,"context_line":"    def cache_dir(self):"},{"line_number":373,"context_line":"        return os.path.join("},{"line_number":374,"context_line":"            CONF.instances_path, CONF.image_cache.subdirectory_name)"},{"line_number":375,"context_line":""},{"line_number":376,"context_line":"    def _is_cache_dir_on_same_dev_as_instances_dir(self):"},{"line_number":377,"context_line":"        # NOTE(gibi): this does not work on Windows properly as st_dev is"}],"source_content_type":"text/x-python","patch_set":3,"id":"ff570b3c_8f485087","line":374,"range":{"start_line":374,"start_character":33,"end_line":374,"end_character":67},"in_reply_to":"ff570b3c_b143fd6b","updated":"2020-05-19 12:21:58.000000000","message":"The [image_cache]/subdirectory_name in the new place for the config image_cache_subdirectory_name is deprecated. See: https://docs.openstack.org/nova/latest/configuration/config.html#image_cache.subdirectory_name","commit_id":"eb0bbbed8a86b86bc5ce7ecd36ddb3e762b283ad"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"9619364e9c806350fa1233f167144edbc783a482","unresolved":false,"context_lines":[{"line_number":373,"context_line":"        return os.path.join("},{"line_number":374,"context_line":"            CONF.instances_path, CONF.image_cache.subdirectory_name)"},{"line_number":375,"context_line":""},{"line_number":376,"context_line":"    def _is_cache_dir_on_same_dev_as_instances_dir(self):"},{"line_number":377,"context_line":"        # NOTE(gibi): this does not work on Windows properly as st_dev is"},{"line_number":378,"context_line":"        # always 0"},{"line_number":379,"context_line":"        return (os.stat(CONF.instances_path).st_dev \u003d\u003d"}],"source_content_type":"text/x-python","patch_set":3,"id":"ff570b3c_f29d70bc","line":376,"updated":"2020-05-19 14:08:35.000000000","message":"I\u0027m not sure why this can\u0027t be an @property as well just for parity... It would avoid you having to mock two stat() results each time you want this to really run :)","commit_id":"eb0bbbed8a86b86bc5ce7ecd36ddb3e762b283ad"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"53678962ac11f46e472196cf6fa880c828cf2b33","unresolved":false,"context_lines":[{"line_number":373,"context_line":"        return os.path.join("},{"line_number":374,"context_line":"            CONF.instances_path, CONF.image_cache.subdirectory_name)"},{"line_number":375,"context_line":""},{"line_number":376,"context_line":"    def _is_cache_dir_on_same_dev_as_instances_dir(self):"},{"line_number":377,"context_line":"        # NOTE(gibi): this does not work on Windows properly as st_dev is"},{"line_number":378,"context_line":"        # always 0"},{"line_number":379,"context_line":"        return (os.stat(CONF.instances_path).st_dev \u003d\u003d"}],"source_content_type":"text/x-python","patch_set":3,"id":"ff570b3c_bb4753bc","line":376,"in_reply_to":"ff570b3c_388229c9","updated":"2020-05-19 15:48:32.000000000","message":"Now I see. Thanks. I changed the test to do this way.","commit_id":"eb0bbbed8a86b86bc5ce7ecd36ddb3e762b283ad"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"1aa8fed0645feba29eec239a7f9aed0fd914df4f","unresolved":false,"context_lines":[{"line_number":373,"context_line":"        return os.path.join("},{"line_number":374,"context_line":"            CONF.instances_path, CONF.image_cache.subdirectory_name)"},{"line_number":375,"context_line":""},{"line_number":376,"context_line":"    def _is_cache_dir_on_same_dev_as_instances_dir(self):"},{"line_number":377,"context_line":"        # NOTE(gibi): this does not work on Windows properly as st_dev is"},{"line_number":378,"context_line":"        # always 0"},{"line_number":379,"context_line":"        return (os.stat(CONF.instances_path).st_dev \u003d\u003d"}],"source_content_type":"text/x-python","patch_set":3,"id":"ff570b3c_388229c9","line":376,"in_reply_to":"ff570b3c_b853d9e1","updated":"2020-05-19 15:16:00.000000000","message":"Well, I was thinking you would just mock this to return True or False instead of mocking stat() and always having to provide a side_effect of two things. Obviously this doesn\u0027t need to be a property to do that, and I didn\u0027t mean you had to change this, I was just commenting.","commit_id":"eb0bbbed8a86b86bc5ce7ecd36ddb3e762b283ad"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"d61c72c06eb1c81e6c0fe998be8bb5ae83977c8a","unresolved":false,"context_lines":[{"line_number":373,"context_line":"        return os.path.join("},{"line_number":374,"context_line":"            CONF.instances_path, CONF.image_cache.subdirectory_name)"},{"line_number":375,"context_line":""},{"line_number":376,"context_line":"    def _is_cache_dir_on_same_dev_as_instances_dir(self):"},{"line_number":377,"context_line":"        # NOTE(gibi): this does not work on Windows properly as st_dev is"},{"line_number":378,"context_line":"        # always 0"},{"line_number":379,"context_line":"        return (os.stat(CONF.instances_path).st_dev \u003d\u003d"}],"source_content_type":"text/x-python","patch_set":3,"id":"ff570b3c_b853d9e1","line":376,"in_reply_to":"ff570b3c_f29d70bc","updated":"2020-05-19 15:12:32.000000000","message":"Sure, I made it as a @property now, but don\u0027t know how that spares me some mocking.","commit_id":"eb0bbbed8a86b86bc5ce7ecd36ddb3e762b283ad"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"095487f8108df533b07122d2a6dfada3ffe83e1c","unresolved":false,"context_lines":[{"line_number":355,"context_line":"        self._age_and_verify_cached_images(context, all_instances, base_dir)"},{"line_number":356,"context_line":"        self._age_and_verify_swap_images(context, base_dir)"},{"line_number":357,"context_line":""},{"line_number":358,"context_line":"    def get_disk_usage(self):"},{"line_number":359,"context_line":"        if not self.cache_dir_is_on_same_dev_as_instances_dir:"},{"line_number":360,"context_line":"            return 0"},{"line_number":361,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"ff570b3c_a7a57049","line":358,"range":{"start_line":358,"start_character":8,"end_line":358,"end_character":22},"updated":"2020-05-19 18:29:41.000000000","message":"nit: as noted elsewhere wee proably should just make this requtrn a float of MB rather then bytes but this works too.\n\ndoing the convertion later is not really a  big deal.","commit_id":"89fe504abfbd41a9c37f9b544c0ce98b23b45799"},{"author":{"_account_id":25089,"name":"MarkMielke","email":"mark.mielke@gmail.com","username":"MarkMielke"},"change_message_id":"f2b80e75f6bb696d62b30892f4968cf9f7d7fd66","unresolved":false,"context_lines":[{"line_number":356,"context_line":"        self._age_and_verify_swap_images(context, base_dir)"},{"line_number":357,"context_line":""},{"line_number":358,"context_line":"    def get_disk_usage(self):"},{"line_number":359,"context_line":"        if not self.cache_dir_is_on_same_dev_as_instances_dir:"},{"line_number":360,"context_line":"            return 0"},{"line_number":361,"context_line":""},{"line_number":362,"context_line":"        # NOTE(gibi): we need to use the disk size occupied from the file"}],"source_content_type":"text/x-python","patch_set":5,"id":"bf51134e_1cb68eda","line":359,"updated":"2020-06-19 07:18:27.000000000","message":"I think that prior to checking if the cache dir is on the same dev as instances dir, it should first check if the cache dir exists.\n\nI tried this feature and am seeing errors on hypervisors like:\n\n\n2020-06-19 03:06:38.011 12118 ERROR nova.compute.manager FileNotFoundError: [Errno 2] No such file or directory: \u0027/var/lib/nova/instances/_base\u0027\n\nThis is the case of a new hypervisor. However, not all hypervisors will ever use ephemeral storage, so it could happen on any hypervisor, just with reduced probability the longer the hypervisor is in use.","commit_id":"89fe504abfbd41a9c37f9b544c0ce98b23b45799"}],"releasenotes/notes/bug-1878024-reserve-disk-for-image-cache-ef6688f869b12bcb.yaml":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"a8f592e509b7c361d5efad4f46a34691b5f5f836","unresolved":false,"context_lines":[{"line_number":5,"context_line":"    option was added to fix the `bug 1878024`_ where the images in the compute"},{"line_number":6,"context_line":"    image cache overallocate the local disk. If this new config is set then the"},{"line_number":7,"context_line":"    libvirt driver will reserve DISK_GB resources in placement based on the"},{"line_number":8,"context_line":"    actualy disk usage of the image cache."},{"line_number":9,"context_line":""},{"line_number":10,"context_line":"    .. _bug 1878024: https://bugs.launchpad.net/nova/+bug/1878024"}],"source_content_type":"text/x-yaml","patch_set":4,"id":"ff570b3c_98ded5d7","line":8,"range":{"start_line":8,"start_character":4,"end_line":8,"end_character":11},"updated":"2020-05-19 15:17:09.000000000","message":"actual","commit_id":"799a953e80e74ffb3c92d14d6f8abc1909b4d5e0"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"53678962ac11f46e472196cf6fa880c828cf2b33","unresolved":false,"context_lines":[{"line_number":5,"context_line":"    option was added to fix the `bug 1878024`_ where the images in the compute"},{"line_number":6,"context_line":"    image cache overallocate the local disk. If this new config is set then the"},{"line_number":7,"context_line":"    libvirt driver will reserve DISK_GB resources in placement based on the"},{"line_number":8,"context_line":"    actualy disk usage of the image cache."},{"line_number":9,"context_line":""},{"line_number":10,"context_line":"    .. _bug 1878024: https://bugs.launchpad.net/nova/+bug/1878024"}],"source_content_type":"text/x-yaml","patch_set":4,"id":"ff570b3c_38b7c988","line":8,"range":{"start_line":8,"start_character":4,"end_line":8,"end_character":11},"in_reply_to":"ff570b3c_98ded5d7","updated":"2020-05-19 15:48:32.000000000","message":"Done","commit_id":"799a953e80e74ffb3c92d14d6f8abc1909b4d5e0"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b1edf2987c291324f7a016140a6955440a0a0d80","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"fixes:"},{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    A new ``[workarounds]/reserve_disk_resource_for_image_cache`` config"}],"source_content_type":"text/x-yaml","patch_set":5,"id":"ff570b3c_2c114705","line":1,"updated":"2020-05-19 17:19:15.000000000","message":"Note that for a follow up you might consider documenting this here:\n\nhttps://docs.openstack.org/nova/latest/admin/image-caching.html\n\nOr with a troubleshooting page:\n\nhttps://docs.openstack.org/nova/latest/admin/support-compute.html","commit_id":"89fe504abfbd41a9c37f9b544c0ce98b23b45799"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"10e8e9937794587f0dc83ca90210c85e50e757ea","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"fixes:"},{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    A new ``[workarounds]/reserve_disk_resource_for_image_cache`` config"}],"source_content_type":"text/x-yaml","patch_set":5,"id":"ff570b3c_8c069351","line":1,"in_reply_to":"ff570b3c_2c114705","updated":"2020-05-19 17:45:27.000000000","message":"Yeah, that\u0027s a good call. I wrote some or all of that image caching thing, so I\u0027ll put up a patch after this to add that for discussion.","commit_id":"89fe504abfbd41a9c37f9b544c0ce98b23b45799"}]}
