)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"d70e7ac007f64bb6166a0c06b28e2bd3ea3b8c15","unresolved":false,"context_lines":[{"line_number":13,"context_line":""},{"line_number":14,"context_line":"This change introduces a simple workaround that reverts to the old"},{"line_number":15,"context_line":"inaccurate but faster behaviour of using ``os.path.getsize`` to"},{"line_number":16,"context_line":"determine these sizes. Operators should only use this workaround if they"},{"line_number":17,"context_line":"are not using the DiskFilter or CachingScheduler, both of which still"},{"line_number":18,"context_line":"rely on these resource tracker values."},{"line_number":19,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"3f79a3b5_f1f818c5","line":16,"range":{"start_line":16,"start_character":23,"end_line":16,"end_character":72},"updated":"2018-08-08 14:17:28.000000000","message":"So basically you\u0027re saying 95% of deployments which are using the FilterScheduler + Placement...if that\u0027s the case, then the sane default would be to use whatever is needed for the FilterScheduler (since that\u0027s the default scheduler driver) and make the workaround do the other thing. Right?","commit_id":"067569a843a8fa42d8c5b355059adac296b70698"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"3c06ff01bb238c05ce2c1270c6f86dc611fa7bef","unresolved":false,"context_lines":[{"line_number":13,"context_line":""},{"line_number":14,"context_line":"This change introduces a simple workaround that reverts to the old"},{"line_number":15,"context_line":"inaccurate but faster behaviour of using ``os.path.getsize`` to"},{"line_number":16,"context_line":"determine these sizes. Operators should only use this workaround if they"},{"line_number":17,"context_line":"are not using the DiskFilter or CachingScheduler, both of which still"},{"line_number":18,"context_line":"rely on these resource tracker values."},{"line_number":19,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"3f79a3b5_914f6491","line":16,"range":{"start_line":16,"start_character":23,"end_line":16,"end_character":72},"in_reply_to":"3f79a3b5_f1f818c5","updated":"2018-08-08 14:28:07.000000000","message":"Apologies, this should actually be *if* they are using DiskFilter or CachingScheduler.","commit_id":"067569a843a8fa42d8c5b355059adac296b70698"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"d70e7ac007f64bb6166a0c06b28e2bd3ea3b8c15","unresolved":false,"context_lines":[{"line_number":14,"context_line":"This change introduces a simple workaround that reverts to the old"},{"line_number":15,"context_line":"inaccurate but faster behaviour of using ``os.path.getsize`` to"},{"line_number":16,"context_line":"determine these sizes. Operators should only use this workaround if they"},{"line_number":17,"context_line":"are not using the DiskFilter or CachingScheduler, both of which still"},{"line_number":18,"context_line":"rely on these resource tracker values."},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"Closes-bug: #1785827"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"3f79a3b5_1146f422","line":17,"range":{"start_line":17,"start_character":32,"end_line":17,"end_character":48},"updated":"2018-08-08 14:17:28.000000000","message":"And this is deprecated.","commit_id":"067569a843a8fa42d8c5b355059adac296b70698"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"d70e7ac007f64bb6166a0c06b28e2bd3ea3b8c15","unresolved":false,"context_lines":[{"line_number":14,"context_line":"This change introduces a simple workaround that reverts to the old"},{"line_number":15,"context_line":"inaccurate but faster behaviour of using ``os.path.getsize`` to"},{"line_number":16,"context_line":"determine these sizes. Operators should only use this workaround if they"},{"line_number":17,"context_line":"are not using the DiskFilter or CachingScheduler, both of which still"},{"line_number":18,"context_line":"rely on these resource tracker values."},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"Closes-bug: #1785827"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"3f79a3b5_3141b00c","line":17,"range":{"start_line":17,"start_character":18,"end_line":17,"end_character":28},"updated":"2018-08-08 14:17:28.000000000","message":"This is disabled by default and only useful if you\u0027re using the CachingScheduler because the FilterScheduler uses placement which does DISK_GB filtering in SQL.","commit_id":"067569a843a8fa42d8c5b355059adac296b70698"}],"nova/conf/workarounds.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"d70e7ac007f64bb6166a0c06b28e2bd3ea3b8c15","unresolved":false,"context_lines":[{"line_number":182,"context_line":"        help\u003d\"\"\""},{"line_number":183,"context_line":"Do not use qemu-img during get_instance_disk_info."},{"line_number":184,"context_line":""},{"line_number":185,"context_line":"In large environments the use of `qemu-img`` to interrogate a large number of"},{"line_number":186,"context_line":"local disks within get_instance_disk_info can block other operations from"},{"line_number":187,"context_line":"completing while it holds the resource tracker semaphore."},{"line_number":188,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"3f79a3b5_712e4844","line":185,"range":{"start_line":185,"start_character":33,"end_line":185,"end_character":34},"updated":"2018-08-08 14:17:28.000000000","message":"``","commit_id":"067569a843a8fa42d8c5b355059adac296b70698"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"d70e7ac007f64bb6166a0c06b28e2bd3ea3b8c15","unresolved":false,"context_lines":[{"line_number":183,"context_line":"Do not use qemu-img during get_instance_disk_info."},{"line_number":184,"context_line":""},{"line_number":185,"context_line":"In large environments the use of `qemu-img`` to interrogate a large number of"},{"line_number":186,"context_line":"local disks within get_instance_disk_info can block other operations from"},{"line_number":187,"context_line":"completing while it holds the resource tracker semaphore."},{"line_number":188,"context_line":""},{"line_number":189,"context_line":"Operators that are not using DiskFilter or the deprecated CachingScheduler can"},{"line_number":190,"context_line":"now workaround this issue by disabling the use of ``qemu-img`` within"}],"source_content_type":"text/x-python","patch_set":3,"id":"3f79a3b5_918d2433","line":187,"range":{"start_line":186,"start_character":46,"end_line":187,"end_character":57},"updated":"2018-08-08 14:17:28.000000000","message":"Can we thread any of this out? Can we use ionice? I\u0027m thinking about some of the stuff starlingx has done to nova which sounds similar to this, e.g.:\n\nhttps://github.com/starlingx-staging/stx-nova/blob/71acfeae0d1c59fdc77704527d763bd85a276f9a/nova/virt/images.py#L127\n\nhttps://github.com/starlingx-staging/stx-nova/blob/71acfeae0d1c59fdc77704527d763bd85a276f9a/nova/virt/images.py#L135\n\nAlso, _get_instance_disk_info_from_config is used in other places besides just the update_available_resource periodic (which has that semaphore), like hard reboot. So wouldn\u0027t we be getting inaccurate data in cases where we actually need it to be accurate?","commit_id":"067569a843a8fa42d8c5b355059adac296b70698"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"d70e7ac007f64bb6166a0c06b28e2bd3ea3b8c15","unresolved":false,"context_lines":[{"line_number":186,"context_line":"local disks within get_instance_disk_info can block other operations from"},{"line_number":187,"context_line":"completing while it holds the resource tracker semaphore."},{"line_number":188,"context_line":""},{"line_number":189,"context_line":"Operators that are not using DiskFilter or the deprecated CachingScheduler can"},{"line_number":190,"context_line":"now workaround this issue by disabling the use of ``qemu-img`` within"},{"line_number":191,"context_line":"get_instance_disk_info, reverting to the inaccurate ``os.path.getsize`` to"},{"line_number":192,"context_line":"determine the size of local images."},{"line_number":193,"context_line":"\"\"\"),"},{"line_number":194,"context_line":"]"},{"line_number":195,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"3f79a3b5_31b210e8","line":192,"range":{"start_line":189,"start_character":0,"end_line":192,"end_character":35},"updated":"2018-08-08 14:17:28.000000000","message":"Need to note that this only matters if using the libvirt driver.\n\nAlso, what are the side effects of enabling this during the periodic task? Is the get_instance_disk_info result ignored and that\u0027s why this is OK?","commit_id":"067569a843a8fa42d8c5b355059adac296b70698"}],"nova/virt/libvirt/driver.py":[{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"4501e3b7ec1c2ce1124c180db83f04e7b6de313d","unresolved":false,"context_lines":[{"line_number":8075,"context_line":"                over_commit_size \u003d int(virt_size) - dk_size"},{"line_number":8076,"context_line":""},{"line_number":8077,"context_line":"            elif disk_type \u003d\u003d \u0027file\u0027:"},{"line_number":8078,"context_line":"                dk_size \u003d os.stat(path).st_blocks * 512"},{"line_number":8079,"context_line":"                virt_size \u003d os.path.getsize(path)"},{"line_number":8080,"context_line":"                backing_file \u003d \"\""},{"line_number":8081,"context_line":"                over_commit_size \u003d 0"}],"source_content_type":"text/x-python","patch_set":5,"id":"3f79a3b5_7edb417b","line":8078,"range":{"start_line":8078,"start_character":52,"end_line":8078,"end_character":55},"updated":"2018-08-10 09:41:03.000000000","message":"is this 512 fixed? I knew blocks in filesystem can be 1024 etc?\nand seems for file .st_size can be used here?","commit_id":"e6af812865553fbc49114a419170693ff15d5545"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"fff549581840534a7da240a91affd582720e7b41","unresolved":false,"context_lines":[{"line_number":8075,"context_line":"                over_commit_size \u003d int(virt_size) - dk_size"},{"line_number":8076,"context_line":""},{"line_number":8077,"context_line":"            elif disk_type \u003d\u003d \u0027file\u0027:"},{"line_number":8078,"context_line":"                dk_size \u003d os.stat(path).st_blocks * 512"},{"line_number":8079,"context_line":"                virt_size \u003d os.path.getsize(path)"},{"line_number":8080,"context_line":"                backing_file \u003d \"\""},{"line_number":8081,"context_line":"                over_commit_size \u003d 0"}],"source_content_type":"text/x-python","patch_set":5,"id":"3f79a3b5_b39696ef","line":8078,"range":{"start_line":8078,"start_character":52,"end_line":8078,"end_character":55},"in_reply_to":"3f79a3b5_79ad9be7","updated":"2018-08-27 11:50:20.000000000","message":"What\u0027s the resolution on this so? Does something need to be changed?","commit_id":"e6af812865553fbc49114a419170693ff15d5545"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"cc48cab16bda4ae5e7dfb0cf723aa55ac67dc8e4","unresolved":false,"context_lines":[{"line_number":8075,"context_line":"                over_commit_size \u003d int(virt_size) - dk_size"},{"line_number":8076,"context_line":""},{"line_number":8077,"context_line":"            elif disk_type \u003d\u003d \u0027file\u0027:"},{"line_number":8078,"context_line":"                dk_size \u003d os.stat(path).st_blocks * 512"},{"line_number":8079,"context_line":"                virt_size \u003d os.path.getsize(path)"},{"line_number":8080,"context_line":"                backing_file \u003d \"\""},{"line_number":8081,"context_line":"                over_commit_size \u003d 0"}],"source_content_type":"text/x-python","patch_set":5,"id":"3f79a3b5_bea1d948","line":8078,"range":{"start_line":8078,"start_character":52,"end_line":8078,"end_character":55},"in_reply_to":"3f79a3b5_7edb417b","updated":"2018-08-10 10:13:14.000000000","message":"Yeah sorry we need to use st_blksize here.","commit_id":"e6af812865553fbc49114a419170693ff15d5545"},{"author":{"_account_id":9373,"name":"Vlad Gusev","email":"vlad.esten@gmail.com","username":"s10"},"change_message_id":"5621bcad258221af108f72269a684d8a7d8fdb4f","unresolved":false,"context_lines":[{"line_number":8075,"context_line":"                over_commit_size \u003d int(virt_size) - dk_size"},{"line_number":8076,"context_line":""},{"line_number":8077,"context_line":"            elif disk_type \u003d\u003d \u0027file\u0027:"},{"line_number":8078,"context_line":"                dk_size \u003d os.stat(path).st_blocks * 512"},{"line_number":8079,"context_line":"                virt_size \u003d os.path.getsize(path)"},{"line_number":8080,"context_line":"                backing_file \u003d \"\""},{"line_number":8081,"context_line":"                over_commit_size \u003d 0"}],"source_content_type":"text/x-python","patch_set":5,"id":"3f79a3b5_76b54c7d","line":8078,"range":{"start_line":8078,"start_character":52,"end_line":8078,"end_character":55},"in_reply_to":"3f79a3b5_b39696ef","updated":"2018-08-27 12:34:48.000000000","message":"Nothing needs to be changed, the current code calculates dk_size for raw file right.","commit_id":"e6af812865553fbc49114a419170693ff15d5545"},{"author":{"_account_id":9373,"name":"Vlad Gusev","email":"vlad.esten@gmail.com","username":"s10"},"change_message_id":"8f05d7898d790f95b93c2dab499021c22edd05de","unresolved":false,"context_lines":[{"line_number":8075,"context_line":"                over_commit_size \u003d int(virt_size) - dk_size"},{"line_number":8076,"context_line":""},{"line_number":8077,"context_line":"            elif disk_type \u003d\u003d \u0027file\u0027:"},{"line_number":8078,"context_line":"                dk_size \u003d os.stat(path).st_blocks * 512"},{"line_number":8079,"context_line":"                virt_size \u003d os.path.getsize(path)"},{"line_number":8080,"context_line":"                backing_file \u003d \"\""},{"line_number":8081,"context_line":"                over_commit_size \u003d 0"}],"source_content_type":"text/x-python","patch_set":5,"id":"3f79a3b5_79ad9be7","line":8078,"range":{"start_line":8078,"start_character":52,"end_line":8078,"end_character":55},"in_reply_to":"3f79a3b5_bea1d948","updated":"2018-08-10 10:28:40.000000000","message":"It might be wrong, because posix st_blocks always return number of the 512 byte blocks.\n\n\nExample:\n$ qemu-img info disk\nimage: disk\nfile format: raw\nvirtual size: 10G (10737418240 bytes)\ndisk size: 2.5G\n\n\u003e\u003e\u003e import os\n\u003e\u003e\u003e path \u003d \u0027/var/lib/nova/instances/0004da70-c3b0-45d4-a87c-4ca270a74edb/disk\u0027\n\u003e\u003e\u003e os.stat(path).st_blocks\n5160192\n\u003e\u003e\u003e os.stat(path).st_blksize\n4096\n\u003e\u003e\u003e os.stat(path).st_blocks * 512\n2642018304","commit_id":"e6af812865553fbc49114a419170693ff15d5545"}]}
