)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":28048,"name":"Will Szumski","email":"will@stackhpc.com","username":"jovial"},"change_message_id":"650a01217a7654a29315fe5febb13f9a8b1aa891","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"031fba24_de6d2d07","updated":"2025-12-01 11:45:51.000000000","message":"Workflow: -1 to address Sean\u0027s comments","commit_id":"0e860b0d26bdf4c00dd82149017ef9dad59f5b53"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"b00473c9c6f136f27beab70969b0cf104d3c08d2","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"5f833473_f050f796","updated":"2025-11-28 13:39:25.000000000","message":"if we want to treat this as a bug i think we shoudl first create a fucntional regression tests to demondstate the collision behavior and hte interaction wthe the anti affinity policy as an inital patch.\n\nonce we have that you rebase this patch on top and show how it reduces the colios because fo the randomisation.","commit_id":"0e860b0d26bdf4c00dd82149017ef9dad59f5b53"},{"author":{"_account_id":28048,"name":"Will Szumski","email":"will@stackhpc.com","username":"jovial"},"change_message_id":"650a01217a7654a29315fe5febb13f9a8b1aa891","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":3,"id":"f006aa8f_7b60681c","in_reply_to":"5f833473_f050f796","updated":"2025-12-01 11:45:51.000000000","message":"Thanks for the review Sean. I\u0027ll see if I can create a regression test.","commit_id":"0e860b0d26bdf4c00dd82149017ef9dad59f5b53"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"24459e2c385fdbbd7e43607776b121a66a6a1135","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":3,"id":"e6019f76_5f6376b7","in_reply_to":"835573a0_2ff44196","updated":"2025-12-04 02:06:22.000000000","message":"we normally cheat and force the synchronisation with locks.\n\nbasically you use a lock or other constuct liek a semephero ro threading event\n\nso that you can pasue the instnace create a specific spot combined with using a weigher that will ensure the host are return in a specific order.\n\nthis will allow you to create 2-3 seperate api request which will all slect the same host because all are aviabel and all are sorted in the same order\n\nthen you can release the lock or decrement the semiphor so that one of the pending isntances will be booted (taking up the remaining space causein a reschduer) then you can release the final too at the same tiem.\n\nyou can combine that technie with usign a spy to observe the alternite hosts that were generate by adn assert that they are randomised byond jsut the fisrt one.\n\ni.e. for at least one of the vms it was not just a roate of one of the noed to the front of the list.\n\nwe can asset that all of them are not jsut a rotate because that is a valid randmoistaion.\n\nthis demonstrates the HostNameWeigher\n\nhttps://github.com/openstack/nova/blob/23b462d77df1a1d09c43d0918bca853ef3af1e3f/nova/tests/functional/regressions/test_bug_2125052.py\nhttps://github.com/openstack/nova/blob/master/nova/tests/functional/regressions/test_bug_2125935.py\n\nhttps://github.com/openstack/nova/blob/23b462d77df1a1d09c43d0918bca853ef3af1e3f/nova/tests/functional/regressions/test_bug_2048837.py\nand\nhttps://github.com/openstack/nova/blob/23b462d77df1a1d09c43d0918bca853ef3af1e3f/nova/tests/functional/regressions/test_bug_2085975.py\nshow the lockign approch.\n\nhttps://github.com/openstack/nova/blob/23b462d77df1a1d09c43d0918bca853ef3af1e3f/nova/tests/functional/test_aggregates.py#L949-L998 \nand\nhttps://github.com/openstack/nova/blob/23b462d77df1a1d09c43d0918bca853ef3af1e3f/nova/tests/functional/test_servers_resource_request.py#L2891-L2975\n\nshow how to create a spy function that allows you to observe the output of a fucntion without changing its behvior\n\nim not sure fi that will help you to achive that but those are some of the techniques i would consdier.\n\ni tought this merged 2 weeks ago\nhttps://review.opendev.org/c/openstack/nova/+/916322/13/nova/tests/functional/regressions/test_bug_2048837.py\nbut there i am recreatign a race bwteen paralle deletes of 2 instance that share the same multi attach volume on the same host.\n\nits not quite the same thing but it demonstrate how we can create races in a stable way in some cases.","commit_id":"0e860b0d26bdf4c00dd82149017ef9dad59f5b53"},{"author":{"_account_id":28048,"name":"Will Szumski","email":"will@stackhpc.com","username":"jovial"},"change_message_id":"246635144f3c9dd8dbfba481df9207dbddd398eb","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":3,"id":"37947dc8_d7de080b","in_reply_to":"87ff5d70_5a13c8f3","updated":"2025-12-24 17:47:42.000000000","message":"I\u0027ve finally got round to trying out some of your suggested techniques. I\u0027ve come up with something in:\n\nhttps://review.opendev.org/c/openstack/nova/+/969380\n\nI\u0027d appreciate your review on that. I also have an alternative fix that actually fixes the race where both instances get rescheduled. It caused a lot of churn in the tests, so would also value your input on that:\n\nhttps://review.opendev.org/c/openstack/nova/+/969894/3","commit_id":"0e860b0d26bdf4c00dd82149017ef9dad59f5b53"},{"author":{"_account_id":28048,"name":"Will Szumski","email":"will@stackhpc.com","username":"jovial"},"change_message_id":"79d23129ac3caa2609511c582453f0b227ac9ae2","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":3,"id":"87ff5d70_5a13c8f3","in_reply_to":"e6019f76_5f6376b7","updated":"2025-12-04 14:40:50.000000000","message":"Thank you Sean - some nice examples there. I\u0027ll see if I can figure something out 😊","commit_id":"0e860b0d26bdf4c00dd82149017ef9dad59f5b53"},{"author":{"_account_id":28048,"name":"Will Szumski","email":"will@stackhpc.com","username":"jovial"},"change_message_id":"c3cac2af46c2f25c442a2ca64f69f156485159db","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":3,"id":"835573a0_2ff44196","in_reply_to":"f006aa8f_7b60681c","updated":"2025-12-03 19:45:52.000000000","message":"I had a go at reproducing the bug in:\n\n https://review.opendev.org/c/openstack/nova/+/969380/\n\nalong with John Garbutt, but we weren\u0027t sure how to get the parallelism need to reproduce the race. I think the test case might be serialising the creation of all the VMs (at least that is what the logging shows). We tried stopping the compute service before creating the servers, so that both requests would be processed in parallel, but that didn\u0027t work.\n\nDo you have any ideas about how to reproduce this is a functional test? I was essentially thinking I could mock the random choice to always return the first host and then I was hoping to show that all retries would trigger the anti affinity violation which leads to max_attempts being exhausted.\n\nI\u0027ve some notes about a race we think we are hitting:\n\nhttps://review.opendev.org/c/openstack/nova/+/969380/2/nova/compute/manager.py#2658\n\nso that both instances trigger an anti affinity violation.","commit_id":"0e860b0d26bdf4c00dd82149017ef9dad59f5b53"}],"releasenotes/notes/randomize-best-hosts-851e53e4425ca952.yaml":[{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"66822580b506602dba260302fb322a82d99daa9b","unresolved":true,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"fixes:"},{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    The scheduling logic was changed so that all of the best hosts, determined"},{"line_number":5,"context_line":"    by ``[filter_scheduler]/host_subset_size`` are now randomised instead of just"}],"source_content_type":"text/x-yaml","patch_set":3,"id":"aab6359a_dd33b35e","line":2,"updated":"2025-11-28 13:36:36.000000000","message":"this is not a fix its a mini feature.\n\nwe may agree to allow this as a whishlist bug but its not a backport cantaidate or fix.","commit_id":"0e860b0d26bdf4c00dd82149017ef9dad59f5b53"}]}
