)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"6ad8cbed8d13fb65ebd813ca7dfbb00500502175","unresolved":true,"context_lines":[{"line_number":4,"context_line":"Commit:     Dmitriy Rabotyagov \u003cnoonedeadpunk@gmail.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2023-12-16 14:08:32 +0100"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"[spec] Add Cross-AZ scheduling blueprint"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Implements: blueprint cross-az-instance-scheduling"},{"line_number":10,"context_line":"Change-Id: Ie8862c74d4e186271f14362c8acc22fd0e4a18e3"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"d9763038_9d867a31","line":7,"updated":"2023-12-20 00:51:29.000000000","message":"there is also https://review.opendev.org/c/openstack/nova-specs/+/890779","commit_id":"49914ea10791184774eb588de4a6585e80a237fe"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"6061726712539960f07f1d3a024d9830ec8cd341","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Dmitriy Rabotyagov \u003cnoonedeadpunk@gmail.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2023-12-16 14:08:32 +0100"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"[spec] Add Cross-AZ scheduling blueprint"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Implements: blueprint cross-az-instance-scheduling"},{"line_number":10,"context_line":"Change-Id: Ie8862c74d4e186271f14362c8acc22fd0e4a18e3"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"2a9de43d_a662a120","line":7,"in_reply_to":"d9763038_9d867a31","updated":"2025-11-21 20:01:21.000000000","message":"we discussed this in the ptg and agreed to continue with this spec","commit_id":"49914ea10791184774eb588de4a6585e80a237fe"}],"/PATCHSET_LEVEL":[{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"32c17e80dc58d23e412214fa97e88b7e9f00b3c0","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"11e503ec_0c84940a","updated":"2024-01-10 12:31:25.000000000","message":"+2 over all but +1 due to pep8 issue","commit_id":"49914ea10791184774eb588de4a6585e80a237fe"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"11d3955e369968273dd903159590a2b7b3f666ce","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"6f8a1314_46545922","updated":"2024-01-10 16:15:02.000000000","message":"-1 as I want to make sure that someone can work on it during Caracal. FWIW, we already have 20 accepted features and we need to make sure that we are able to review all of them.","commit_id":"7597905eb0c493a406d9df2f208ab9a5e2e9896c"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"ee2c38173744fba62ea81113c80cc0cbec37c3e4","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"11f0c3f7_b79ecb97","updated":"2024-01-10 17:27:51.000000000","message":"sorry i forgot we also need to reconsile this with \nhttps://review.opendev.org/c/openstack/nova-specs/+/890779/3/specs/2024.1/approved/availability-zone-affinity-filters.rst","commit_id":"7597905eb0c493a406d9df2f208ab9a5e2e9896c"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"6061726712539960f07f1d3a024d9830ec8cd341","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":7,"id":"6e0ebfe6_2e9baf7f","updated":"2025-11-21 20:01:21.000000000","message":"This need a bit more deail on exactly how your going to implement this\nbut over all it looks ok and consitent with what we dicussed at the ptg","commit_id":"a251caffb263869756465cee77a4e42f45abd1bd"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"0536b45e9a7f3de3938943880ab9d7e911a06ceb","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":11,"id":"aa0e5369_9f566631","updated":"2025-11-27 19:12:10.000000000","message":"i am not able to review this fully today but ill try and look at it tomrorow","commit_id":"872d04d552dba41d1d2101272aaae46ee5f8e536"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"ac413281d1e83b3418cf156e9978c269af2dd0a9","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":12,"id":"e2bf5841_2a2435bb","updated":"2025-12-01 15:43:11.000000000","message":"I have a concern with the --az parameter.","commit_id":"724dcd8b5facfe8e6133786d95eae2966e42b890"},{"author":{"_account_id":28619,"name":"Dmitriy Rabotyagov","email":"noonedeadpunk@gmail.com","username":"noonedeadpunk"},"change_message_id":"9f0a64d2eb2a3fdf092989213398f0bebb901e25","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":13,"id":"0dc48404_5828c99c","updated":"2025-12-18 13:36:57.000000000","message":"I guess I have to rebase that now to 2026.2...","commit_id":"6e8a634a8292056b242e4864c3bc4c00b56f0747"}],"specs/2024.1/approved/cross-az-instance-scheduling.rst":[{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"77d217df2cfbe9b4a3b46594e7adfc0d7b5c964b","unresolved":true,"context_lines":[{"line_number":102,"context_line":"  At the same time ``policies`` parameter is not going to be extended, since"},{"line_number":103,"context_line":"  it is only available until the 2.63 microversion."},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"* ``max_server_per_host`` will still be respected for ``az-soft-anti-affinity``"},{"line_number":106,"context_line":"  policy, meaning maximum amount of server per Availability Zone rather then"},{"line_number":107,"context_line":"  host"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"Security impact"}],"source_content_type":"text/x-rst","patch_set":2,"id":"c5688d24_d20feebf","line":107,"range":{"start_line":105,"start_character":0,"end_line":107,"end_character":6},"updated":"2023-12-06 13:08:47.000000000","message":"That smells a bit :) I don\u0027t know how others feel about it, but I would rather add a new `max_server_per_az` rule that is used for `az-soft-anti-affinity` and I would ignore `max_server_per_host` for `az-soft-anti-affinity`","commit_id":"5856337bf6fd5cc9e4bd748cc18893fb3c9fb11c"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"32c17e80dc58d23e412214fa97e88b7e9f00b3c0","unresolved":false,"context_lines":[{"line_number":102,"context_line":"  At the same time ``policies`` parameter is not going to be extended, since"},{"line_number":103,"context_line":"  it is only available until the 2.63 microversion."},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"* ``max_server_per_host`` will still be respected for ``az-soft-anti-affinity``"},{"line_number":106,"context_line":"  policy, meaning maximum amount of server per Availability Zone rather then"},{"line_number":107,"context_line":"  host"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"Security impact"}],"source_content_type":"text/x-rst","patch_set":2,"id":"c20b9b37_1e064c34","line":107,"range":{"start_line":105,"start_character":0,"end_line":107,"end_character":6},"in_reply_to":"b79a5467_278f5c66","updated":"2024-01-10 12:31:25.000000000","message":"Done","commit_id":"5856337bf6fd5cc9e4bd748cc18893fb3c9fb11c"},{"author":{"_account_id":28619,"name":"Dmitriy Rabotyagov","email":"noonedeadpunk@gmail.com","username":"noonedeadpunk"},"change_message_id":"52e4b4965f9738ebbd2e35a4a4d67e153d89f24f","unresolved":false,"context_lines":[{"line_number":102,"context_line":"  At the same time ``policies`` parameter is not going to be extended, since"},{"line_number":103,"context_line":"  it is only available until the 2.63 microversion."},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"* ``max_server_per_host`` will still be respected for ``az-soft-anti-affinity``"},{"line_number":106,"context_line":"  policy, meaning maximum amount of server per Availability Zone rather then"},{"line_number":107,"context_line":"  host"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"Security impact"}],"source_content_type":"text/x-rst","patch_set":2,"id":"a01787a1_2fbc3d2f","line":107,"range":{"start_line":105,"start_character":0,"end_line":107,"end_character":6},"in_reply_to":"c5688d24_d20feebf","updated":"2024-01-10 17:39:52.000000000","message":"Done","commit_id":"5856337bf6fd5cc9e4bd748cc18893fb3c9fb11c"},{"author":{"_account_id":28619,"name":"Dmitriy Rabotyagov","email":"noonedeadpunk@gmail.com","username":"noonedeadpunk"},"change_message_id":"f89bd9d1f23c237ca5904a80d5c0988314c3b007","unresolved":true,"context_lines":[{"line_number":102,"context_line":"  At the same time ``policies`` parameter is not going to be extended, since"},{"line_number":103,"context_line":"  it is only available until the 2.63 microversion."},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"* ``max_server_per_host`` will still be respected for ``az-soft-anti-affinity``"},{"line_number":106,"context_line":"  policy, meaning maximum amount of server per Availability Zone rather then"},{"line_number":107,"context_line":"  host"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"Security impact"}],"source_content_type":"text/x-rst","patch_set":2,"id":"b79a5467_278f5c66","line":107,"range":{"start_line":105,"start_character":0,"end_line":107,"end_character":6},"in_reply_to":"c5688d24_d20feebf","updated":"2023-12-06 16:20:45.000000000","message":"fair enough, was not sure about complexity of that though. Will fix that","commit_id":"5856337bf6fd5cc9e4bd748cc18893fb3c9fb11c"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"77d217df2cfbe9b4a3b46594e7adfc0d7b5c964b","unresolved":true,"context_lines":[{"line_number":175,"context_line":"Testing"},{"line_number":176,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":177,"context_line":""},{"line_number":178,"context_line":"Testing of the new policy can be done only as a unit test, since as of today"},{"line_number":179,"context_line":"there are no multi-AZ grenade job. So feature should be tested in the same way"},{"line_number":180,"context_line":"as the rest of the AZ functionality."},{"line_number":181,"context_line":""}],"source_content_type":"text/x-rst","patch_set":2,"id":"8ab1cb81_9440447d","line":178,"updated":"2023-12-06 13:08:47.000000000","message":"I suggest to add a functional test coverage.","commit_id":"5856337bf6fd5cc9e4bd748cc18893fb3c9fb11c"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"32c17e80dc58d23e412214fa97e88b7e9f00b3c0","unresolved":true,"context_lines":[{"line_number":175,"context_line":"Testing"},{"line_number":176,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":177,"context_line":""},{"line_number":178,"context_line":"Testing of the new policy can be done only as a unit test, since as of today"},{"line_number":179,"context_line":"there are no multi-AZ grenade job. So feature should be tested in the same way"},{"line_number":180,"context_line":"as the rest of the AZ functionality."},{"line_number":181,"context_line":""}],"source_content_type":"text/x-rst","patch_set":2,"id":"8419eebd_1c054da4","line":178,"in_reply_to":"3975dbb6_4ffc0af9","updated":"2024-01-10 12:31:25.000000000","message":"in generaly no you would just need to test your feature but im ok with building the funcitonal test incrementally as followups.\n\nwe have several funcitonal test examples where we create multipel compute nodes\n\nall you would have to do is create a test with 3 comput nodes add 2 to one az and the other to a diffent az. then with that base toplogy you can assert diffent behaivors.\n\ni.e. show that you cant boot 3 vms if you set max_server_per_az\u003d1\n\nand that if you boot 2 vms then one is scheduled to each az.\n\ni think we can discuss that in the implementation review however.\n\nthis shoudl be less work then you feared but i dont think we need to block the speck on this.\n\nthe tempest level testing is more complex and again i think we can defer\nwhile we have multi node jobs actully testing this properly reqiures specific setup and tempest supprot that is out of scope if we have functional tests.\n\ngrenade testing is not really needed in this case.\nthis feature is more or less entirly implemented by the schduler( and a minor change to the api) so in a upgade senarior the behavior wont vary based on the compute node version.\n\nsince the api and sechuler need to be the same version of nova there is nothign really to test from a grenade perspective.","commit_id":"5856337bf6fd5cc9e4bd748cc18893fb3c9fb11c"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"d750dcd2ddf93459acc48d189a7d87ca29d435ef","unresolved":false,"context_lines":[{"line_number":175,"context_line":"Testing"},{"line_number":176,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":177,"context_line":""},{"line_number":178,"context_line":"Testing of the new policy can be done only as a unit test, since as of today"},{"line_number":179,"context_line":"there are no multi-AZ grenade job. So feature should be tested in the same way"},{"line_number":180,"context_line":"as the rest of the AZ functionality."},{"line_number":181,"context_line":""}],"source_content_type":"text/x-rst","patch_set":2,"id":"636d2191_cd9ff051","line":178,"in_reply_to":"8419eebd_1c054da4","updated":"2024-01-10 12:49:08.000000000","message":"Done","commit_id":"5856337bf6fd5cc9e4bd748cc18893fb3c9fb11c"},{"author":{"_account_id":28619,"name":"Dmitriy Rabotyagov","email":"noonedeadpunk@gmail.com","username":"noonedeadpunk"},"change_message_id":"f89bd9d1f23c237ca5904a80d5c0988314c3b007","unresolved":true,"context_lines":[{"line_number":175,"context_line":"Testing"},{"line_number":176,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":177,"context_line":""},{"line_number":178,"context_line":"Testing of the new policy can be done only as a unit test, since as of today"},{"line_number":179,"context_line":"there are no multi-AZ grenade job. So feature should be tested in the same way"},{"line_number":180,"context_line":"as the rest of the AZ functionality."},{"line_number":181,"context_line":""}],"source_content_type":"text/x-rst","patch_set":2,"id":"3975dbb6_4ffc0af9","line":178,"in_reply_to":"8ab1cb81_9440447d","updated":"2023-12-06 16:20:45.000000000","message":"I assume that implies testing of whole AZ functionality somehow? I was kinda trying to leave these efforts out of scope of spec frankly speaking. While agree that must be tested, I don\u0027t feel confident at all doing that with devstack or grenade...","commit_id":"5856337bf6fd5cc9e4bd748cc18893fb3c9fb11c"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"32c17e80dc58d23e412214fa97e88b7e9f00b3c0","unresolved":true,"context_lines":[{"line_number":102,"context_line":"  At the same time ``policies`` parameter is not going to be extended, since"},{"line_number":103,"context_line":"  it is only available until the 2.63 microversion."},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"* Add a new property ``max_server_per_az`` to define a maximum amount of servers"},{"line_number":106,"context_line":"  that can be created per Availability Zone."},{"line_number":107,"context_line":""},{"line_number":108,"context_line":""}],"source_content_type":"text/x-rst","patch_set":3,"id":"6d792f6e_bf6f9b28","line":105,"updated":"2024-01-10 12:31:25.000000000","message":"this is exceeding 79 columns so pep8 is unhappy can you wrap this.","commit_id":"49914ea10791184774eb588de4a6585e80a237fe"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"d750dcd2ddf93459acc48d189a7d87ca29d435ef","unresolved":false,"context_lines":[{"line_number":102,"context_line":"  At the same time ``policies`` parameter is not going to be extended, since"},{"line_number":103,"context_line":"  it is only available until the 2.63 microversion."},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"* Add a new property ``max_server_per_az`` to define a maximum amount of servers"},{"line_number":106,"context_line":"  that can be created per Availability Zone."},{"line_number":107,"context_line":""},{"line_number":108,"context_line":""}],"source_content_type":"text/x-rst","patch_set":3,"id":"84ee543c_c18ae8d2","line":105,"in_reply_to":"6d792f6e_bf6f9b28","updated":"2024-01-10 12:49:08.000000000","message":"Done","commit_id":"49914ea10791184774eb588de4a6585e80a237fe"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"32c17e80dc58d23e412214fa97e88b7e9f00b3c0","unresolved":true,"context_lines":[{"line_number":185,"context_line":""},{"line_number":186,"context_line":"No significat documentation changes are expected. Generated API reference along"},{"line_number":187,"context_line":"with the release note for the feature should be enough for the proposed"},{"line_number":188,"context_line":"implementation."},{"line_number":189,"context_line":""},{"line_number":190,"context_line":"References"},{"line_number":191,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":3,"id":"22f64761_17c5b4d9","line":188,"updated":"2024-01-10 12:31:25.000000000","message":"we will likely want to update the schudler doc in the user docs just to note the new policy and affinity/anti affinity capablity but the content will be very similar to the release note so ill call that out when reviewing the code.","commit_id":"49914ea10791184774eb588de4a6585e80a237fe"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"d750dcd2ddf93459acc48d189a7d87ca29d435ef","unresolved":false,"context_lines":[{"line_number":185,"context_line":""},{"line_number":186,"context_line":"No significat documentation changes are expected. Generated API reference along"},{"line_number":187,"context_line":"with the release note for the feature should be enough for the proposed"},{"line_number":188,"context_line":"implementation."},{"line_number":189,"context_line":""},{"line_number":190,"context_line":"References"},{"line_number":191,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":3,"id":"825703ad_fc41ace7","line":188,"in_reply_to":"22f64761_17c5b4d9","updated":"2024-01-10 12:49:08.000000000","message":"Done","commit_id":"49914ea10791184774eb588de4a6585e80a237fe"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"11d3955e369968273dd903159590a2b7b3f666ce","unresolved":true,"context_lines":[{"line_number":59,"context_line":"that request is impossible to fulfill (ie amount of instances in the group"},{"line_number":60,"context_line":"is higher then amount of AZs for the provider or some AZ is lacking capacity)."},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"When ``az-soft-anti-affinity`` is set, scheduler will fetch a list of"},{"line_number":63,"context_line":"Availability Zones and attempt to place instances into separate AZs. If amount"},{"line_number":64,"context_line":"of available for scheduling AZs is less than amount of instances in the group,"},{"line_number":65,"context_line":"AZ with fewest instances from the group should be selected."},{"line_number":66,"context_line":""}],"source_content_type":"text/x-rst","patch_set":4,"id":"d3a4c07c_7fd196f6","line":63,"range":{"start_line":62,"start_character":39,"end_line":63,"end_character":68},"updated":"2024-01-10 16:15:02.000000000","message":"we try to avoid as much as possible DB calls in the filters so even that\u0027s an implementation detail, I want to make sure we cache the list of availability zones in the scheduler *before* we call the filters and then when we run the weigher, it lookups this cache object.","commit_id":"7597905eb0c493a406d9df2f208ab9a5e2e9896c"},{"author":{"_account_id":28619,"name":"Dmitriy Rabotyagov","email":"noonedeadpunk@gmail.com","username":"noonedeadpunk"},"change_message_id":"52e4b4965f9738ebbd2e35a4a4d67e153d89f24f","unresolved":false,"context_lines":[{"line_number":59,"context_line":"that request is impossible to fulfill (ie amount of instances in the group"},{"line_number":60,"context_line":"is higher then amount of AZs for the provider or some AZ is lacking capacity)."},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"When ``az-soft-anti-affinity`` is set, scheduler will fetch a list of"},{"line_number":63,"context_line":"Availability Zones and attempt to place instances into separate AZs. If amount"},{"line_number":64,"context_line":"of available for scheduling AZs is less than amount of instances in the group,"},{"line_number":65,"context_line":"AZ with fewest instances from the group should be selected."},{"line_number":66,"context_line":""}],"source_content_type":"text/x-rst","patch_set":4,"id":"6f0044cd_4673e7cd","line":63,"range":{"start_line":62,"start_character":39,"end_line":63,"end_character":68},"in_reply_to":"d3a4c07c_7fd196f6","updated":"2024-01-10 17:39:52.000000000","message":"Done","commit_id":"7597905eb0c493a406d9df2f208ab9a5e2e9896c"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"ee2c38173744fba62ea81113c80cc0cbec37c3e4","unresolved":true,"context_lines":[{"line_number":59,"context_line":"that request is impossible to fulfill (ie amount of instances in the group"},{"line_number":60,"context_line":"is higher then amount of AZs for the provider or some AZ is lacking capacity)."},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"When ``az-soft-anti-affinity`` is set, scheduler will fetch a list of"},{"line_number":63,"context_line":"Availability Zones and attempt to place instances into separate AZs. If amount"},{"line_number":64,"context_line":"of available for scheduling AZs is less than amount of instances in the group,"},{"line_number":65,"context_line":"AZ with fewest instances from the group should be selected."},{"line_number":66,"context_line":""}],"source_content_type":"text/x-rst","patch_set":4,"id":"db76a090_51657e4e","line":63,"range":{"start_line":62,"start_character":39,"end_line":63,"end_character":68},"in_reply_to":"d3a4c07c_7fd196f6","updated":"2024-01-10 17:27:51.000000000","message":"i was expecting to follow the same pattern that the exissting host aggarte filters work\n\nhttps://github.com/openstack/nova/blob/master/nova/scheduler/filters/aggregate_multitenancy_isolation.py#L43-L44\n\nbut for a weigher we could actully do it slightly diffently more on that below","commit_id":"7597905eb0c493a406d9df2f208ab9a5e2e9896c"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"11d3955e369968273dd903159590a2b7b3f666ce","unresolved":true,"context_lines":[{"line_number":62,"context_line":"When ``az-soft-anti-affinity`` is set, scheduler will fetch a list of"},{"line_number":63,"context_line":"Availability Zones and attempt to place instances into separate AZs. If amount"},{"line_number":64,"context_line":"of available for scheduling AZs is less than amount of instances in the group,"},{"line_number":65,"context_line":"AZ with fewest instances from the group should be selected."},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"With that the user should be able to define maximum amount of instances within"},{"line_number":68,"context_line":"the group that can reside in the same AZ when cross-AZ scheduling is not"}],"source_content_type":"text/x-rst","patch_set":4,"id":"2a20a689_4edda031","line":65,"updated":"2024-01-10 16:15:02.000000000","message":"tbc, the scheduler query should be done by a new weigher.","commit_id":"7597905eb0c493a406d9df2f208ab9a5e2e9896c"},{"author":{"_account_id":28619,"name":"Dmitriy Rabotyagov","email":"noonedeadpunk@gmail.com","username":"noonedeadpunk"},"change_message_id":"52e4b4965f9738ebbd2e35a4a4d67e153d89f24f","unresolved":false,"context_lines":[{"line_number":62,"context_line":"When ``az-soft-anti-affinity`` is set, scheduler will fetch a list of"},{"line_number":63,"context_line":"Availability Zones and attempt to place instances into separate AZs. If amount"},{"line_number":64,"context_line":"of available for scheduling AZs is less than amount of instances in the group,"},{"line_number":65,"context_line":"AZ with fewest instances from the group should be selected."},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"With that the user should be able to define maximum amount of instances within"},{"line_number":68,"context_line":"the group that can reside in the same AZ when cross-AZ scheduling is not"}],"source_content_type":"text/x-rst","patch_set":4,"id":"e249f2d5_5af449a4","line":65,"in_reply_to":"2a20a689_4edda031","updated":"2024-01-10 17:39:52.000000000","message":"Done","commit_id":"7597905eb0c493a406d9df2f208ab9a5e2e9896c"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"ee2c38173744fba62ea81113c80cc0cbec37c3e4","unresolved":true,"context_lines":[{"line_number":62,"context_line":"When ``az-soft-anti-affinity`` is set, scheduler will fetch a list of"},{"line_number":63,"context_line":"Availability Zones and attempt to place instances into separate AZs. If amount"},{"line_number":64,"context_line":"of available for scheduling AZs is less than amount of instances in the group,"},{"line_number":65,"context_line":"AZ with fewest instances from the group should be selected."},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"With that the user should be able to define maximum amount of instances within"},{"line_number":68,"context_line":"the group that can reside in the same AZ when cross-AZ scheduling is not"}],"source_content_type":"text/x-rst","patch_set":4,"id":"544efdca_0c9fa949","line":65,"in_reply_to":"2a20a689_4edda031","updated":"2024-01-10 17:27:51.000000000","message":"yes it should be a new weigher as this is soft not hard affinity/antiafinity\n\nsoft \u003d\u003e weigher\nhard \u003d\u003e filter\n\nthis will be the first aggregatre weigher\n\nunlike filters with run per host weigher run a  a list of hosts\nthat means that instead of doing \n\n\"\"\"metadata \u003d utils.aggregate_metadata_get_by_host(host_state)\"\"\"\n\nfor each host we can do a more optimised queary and get a list of all azs and all host\n\nin the request spec we are going to want to also have a map of az to list of instnaces\n\nthat is waht we do for the normal anti affintiy filtere\nwe use the request spec to hold that mapping infor to support multi crate","commit_id":"7597905eb0c493a406d9df2f208ab9a5e2e9896c"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"11d3955e369968273dd903159590a2b7b3f666ce","unresolved":true,"context_lines":[{"line_number":67,"context_line":"With that the user should be able to define maximum amount of instances within"},{"line_number":68,"context_line":"the group that can reside in the same AZ when cross-AZ scheduling is not"},{"line_number":69,"context_line":"possible with a ``max_server_per_host`` parameter."},{"line_number":70,"context_line":""},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"Alternatives"},{"line_number":73,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":4,"id":"6c3c9e74_a5b437e9","line":70,"updated":"2024-01-10 16:15:02.000000000","message":"you should write that we need to add a new weigher and possibly use the existing weigher module : https://github.com/openstack/nova/blob/39f560d6730f2b212506b7d754645c288d13f1cd/nova/scheduler/weights/affinity.py","commit_id":"7597905eb0c493a406d9df2f208ab9a5e2e9896c"},{"author":{"_account_id":28619,"name":"Dmitriy Rabotyagov","email":"noonedeadpunk@gmail.com","username":"noonedeadpunk"},"change_message_id":"7ac8e53803e97c8af42de5733b8104d612a5cf6c","unresolved":false,"context_lines":[{"line_number":67,"context_line":"With that the user should be able to define maximum amount of instances within"},{"line_number":68,"context_line":"the group that can reside in the same AZ when cross-AZ scheduling is not"},{"line_number":69,"context_line":"possible with a ``max_server_per_host`` parameter."},{"line_number":70,"context_line":""},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"Alternatives"},{"line_number":73,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":4,"id":"985d8e20_9a38666c","line":70,"in_reply_to":"6c3c9e74_a5b437e9","updated":"2025-11-19 11:48:50.000000000","message":"Done","commit_id":"7597905eb0c493a406d9df2f208ab9a5e2e9896c"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"11d3955e369968273dd903159590a2b7b3f666ce","unresolved":true,"context_lines":[{"line_number":72,"context_line":"Alternatives"},{"line_number":73,"context_line":"------------"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"* Keep things as is, but suggest that users avoid defining"},{"line_number":76,"context_line":"  ``default_schedule_zone`` in ``nova.conf``. While this may result in"},{"line_number":77,"context_line":"  instances being placed on different AZs, it is not guaranteed. Additionally,"},{"line_number":78,"context_line":"  this approach assumes that the price and capacity of all Availability Zones"}],"source_content_type":"text/x-rst","patch_set":4,"id":"ddf4cf88_98ee20ad","line":75,"range":{"start_line":75,"start_character":38,"end_line":75,"end_character":43},"updated":"2024-01-10 16:15:02.000000000","message":"nit: operators instead","commit_id":"7597905eb0c493a406d9df2f208ab9a5e2e9896c"},{"author":{"_account_id":28619,"name":"Dmitriy Rabotyagov","email":"noonedeadpunk@gmail.com","username":"noonedeadpunk"},"change_message_id":"7ac8e53803e97c8af42de5733b8104d612a5cf6c","unresolved":false,"context_lines":[{"line_number":72,"context_line":"Alternatives"},{"line_number":73,"context_line":"------------"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"* Keep things as is, but suggest that users avoid defining"},{"line_number":76,"context_line":"  ``default_schedule_zone`` in ``nova.conf``. While this may result in"},{"line_number":77,"context_line":"  instances being placed on different AZs, it is not guaranteed. Additionally,"},{"line_number":78,"context_line":"  this approach assumes that the price and capacity of all Availability Zones"}],"source_content_type":"text/x-rst","patch_set":4,"id":"21efeb85_61247233","line":75,"range":{"start_line":75,"start_character":38,"end_line":75,"end_character":43},"in_reply_to":"ddf4cf88_98ee20ad","updated":"2025-11-19 11:48:50.000000000","message":"Done","commit_id":"7597905eb0c493a406d9df2f208ab9a5e2e9896c"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"11d3955e369968273dd903159590a2b7b3f666ce","unresolved":false,"context_lines":[{"line_number":100,"context_line":""},{"line_number":101,"context_line":"* Add ``az-soft-anti-affinity`` as a possible value for ``policy`` parameter."},{"line_number":102,"context_line":"  At the same time ``policies`` parameter is not going to be extended, since"},{"line_number":103,"context_line":"  it is only available until the 2.63 microversion."},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"* Add a new property ``max_server_per_az`` to define a maximum amount of"},{"line_number":106,"context_line":"  servers that can be created per Availability Zone."}],"source_content_type":"text/x-rst","patch_set":4,"id":"ddce5ea4_dc1d71b3","line":103,"updated":"2024-01-10 16:15:02.000000000","message":"lgtm","commit_id":"7597905eb0c493a406d9df2f208ab9a5e2e9896c"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"11d3955e369968273dd903159590a2b7b3f666ce","unresolved":true,"context_lines":[{"line_number":102,"context_line":"  At the same time ``policies`` parameter is not going to be extended, since"},{"line_number":103,"context_line":"  it is only available until the 2.63 microversion."},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"* Add a new property ``max_server_per_az`` to define a maximum amount of"},{"line_number":106,"context_line":"  servers that can be created per Availability Zone."},{"line_number":107,"context_line":""},{"line_number":108,"context_line":""}],"source_content_type":"text/x-rst","patch_set":4,"id":"9c5234ef_3127e52f","line":105,"range":{"start_line":105,"start_character":12,"end_line":105,"end_character":20},"updated":"2024-01-10 16:15:02.000000000","message":"you mean a new server group rule, right?","commit_id":"7597905eb0c493a406d9df2f208ab9a5e2e9896c"},{"author":{"_account_id":28619,"name":"Dmitriy Rabotyagov","email":"noonedeadpunk@gmail.com","username":"noonedeadpunk"},"change_message_id":"52e4b4965f9738ebbd2e35a4a4d67e153d89f24f","unresolved":false,"context_lines":[{"line_number":102,"context_line":"  At the same time ``policies`` parameter is not going to be extended, since"},{"line_number":103,"context_line":"  it is only available until the 2.63 microversion."},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"* Add a new property ``max_server_per_az`` to define a maximum amount of"},{"line_number":106,"context_line":"  servers that can be created per Availability Zone."},{"line_number":107,"context_line":""},{"line_number":108,"context_line":""}],"source_content_type":"text/x-rst","patch_set":4,"id":"b914320c_ea2e1cf5","line":105,"range":{"start_line":105,"start_character":12,"end_line":105,"end_character":20},"in_reply_to":"9c5234ef_3127e52f","updated":"2024-01-10 17:39:52.000000000","message":"Done","commit_id":"7597905eb0c493a406d9df2f208ab9a5e2e9896c"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"ee2c38173744fba62ea81113c80cc0cbec37c3e4","unresolved":true,"context_lines":[{"line_number":102,"context_line":"  At the same time ``policies`` parameter is not going to be extended, since"},{"line_number":103,"context_line":"  it is only available until the 2.63 microversion."},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"* Add a new property ``max_server_per_az`` to define a maximum amount of"},{"line_number":106,"context_line":"  servers that can be created per Availability Zone."},{"line_number":107,"context_line":""},{"line_number":108,"context_line":""}],"source_content_type":"text/x-rst","patch_set":4,"id":"a52e2091_195c545d","line":105,"range":{"start_line":105,"start_character":12,"end_line":105,"end_character":20},"in_reply_to":"9c5234ef_3127e52f","updated":"2024-01-10 17:27:51.000000000","message":"yes its a new server group rule. this was gibis suggestion.\nthis should be updated.","commit_id":"7597905eb0c493a406d9df2f208ab9a5e2e9896c"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"11d3955e369968273dd903159590a2b7b3f666ce","unresolved":true,"context_lines":[{"line_number":130,"context_line":"Other deployer impact"},{"line_number":131,"context_line":"---------------------"},{"line_number":132,"context_line":""},{"line_number":133,"context_line":"None"},{"line_number":134,"context_line":""},{"line_number":135,"context_line":"Developer impact"},{"line_number":136,"context_line":"----------------"}],"source_content_type":"text/x-rst","patch_set":4,"id":"c069086c_6a4282eb","line":133,"updated":"2024-01-10 16:15:02.000000000","message":"deployers could disable this weigher but by default we run all of the weighers : https://docs.openstack.org/nova/latest/configuration/config.html#filter_scheduler.weight_classes","commit_id":"7597905eb0c493a406d9df2f208ab9a5e2e9896c"},{"author":{"_account_id":28619,"name":"Dmitriy Rabotyagov","email":"noonedeadpunk@gmail.com","username":"noonedeadpunk"},"change_message_id":"7ac8e53803e97c8af42de5733b8104d612a5cf6c","unresolved":false,"context_lines":[{"line_number":130,"context_line":"Other deployer impact"},{"line_number":131,"context_line":"---------------------"},{"line_number":132,"context_line":""},{"line_number":133,"context_line":"None"},{"line_number":134,"context_line":""},{"line_number":135,"context_line":"Developer impact"},{"line_number":136,"context_line":"----------------"}],"source_content_type":"text/x-rst","patch_set":4,"id":"1575073f_cd8443f5","line":133,"in_reply_to":"aa32524b_e14e6b13","updated":"2025-11-19 11:48:50.000000000","message":"Done","commit_id":"7597905eb0c493a406d9df2f208ab9a5e2e9896c"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"ee2c38173744fba62ea81113c80cc0cbec37c3e4","unresolved":true,"context_lines":[{"line_number":130,"context_line":"Other deployer impact"},{"line_number":131,"context_line":"---------------------"},{"line_number":132,"context_line":""},{"line_number":133,"context_line":"None"},{"line_number":134,"context_line":""},{"line_number":135,"context_line":"Developer impact"},{"line_number":136,"context_line":"----------------"}],"source_content_type":"text/x-rst","patch_set":4,"id":"aa32524b_e14e6b13","line":133,"in_reply_to":"c069086c_6a4282eb","updated":"2024-01-10 17:27:51.000000000","message":"fair we can call that out.\nand yes it would be enabled by default but it would not have any effect unless you\nrequest it via the new server group policy\n\nthe weigher can just return 1 for the weight for all host in that case.","commit_id":"7597905eb0c493a406d9df2f208ab9a5e2e9896c"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"11d3955e369968273dd903159590a2b7b3f666ce","unresolved":true,"context_lines":[{"line_number":151,"context_line":"-----------"},{"line_number":152,"context_line":""},{"line_number":153,"context_line":"Primary assignee:"},{"line_number":154,"context_line":"  None"},{"line_number":155,"context_line":""},{"line_number":156,"context_line":"Other contributors:"},{"line_number":157,"context_line":"  noonedeadpunk"}],"source_content_type":"text/x-rst","patch_set":4,"id":"3b906ab2_f00f3912","line":154,"updated":"2024-01-10 16:15:02.000000000","message":"ahem, does that mean we need to wait for someone to arrive in our community before we can work on this feature ?","commit_id":"7597905eb0c493a406d9df2f208ab9a5e2e9896c"},{"author":{"_account_id":28619,"name":"Dmitriy Rabotyagov","email":"noonedeadpunk@gmail.com","username":"noonedeadpunk"},"change_message_id":"7ac8e53803e97c8af42de5733b8104d612a5cf6c","unresolved":false,"context_lines":[{"line_number":151,"context_line":"-----------"},{"line_number":152,"context_line":""},{"line_number":153,"context_line":"Primary assignee:"},{"line_number":154,"context_line":"  None"},{"line_number":155,"context_line":""},{"line_number":156,"context_line":"Other contributors:"},{"line_number":157,"context_line":"  noonedeadpunk"}],"source_content_type":"text/x-rst","patch_set":4,"id":"e8c50073_246fe87f","line":154,"in_reply_to":"28f2672e_e7af05ac","updated":"2025-11-19 11:48:50.000000000","message":"Done","commit_id":"7597905eb0c493a406d9df2f208ab9a5e2e9896c"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"ee2c38173744fba62ea81113c80cc0cbec37c3e4","unresolved":true,"context_lines":[{"line_number":151,"context_line":"-----------"},{"line_number":152,"context_line":""},{"line_number":153,"context_line":"Primary assignee:"},{"line_number":154,"context_line":"  None"},{"line_number":155,"context_line":""},{"line_number":156,"context_line":"Other contributors:"},{"line_number":157,"context_line":"  noonedeadpunk"}],"source_content_type":"text/x-rst","patch_set":4,"id":"28f2672e_e7af05ac","line":154,"in_reply_to":"3b906ab2_f00f3912","updated":"2024-01-10 17:27:51.000000000","message":"i belvie noonedeadpunk was goign to work on it but perhaps im wrong.\n\nif we don thave a contiriubute linged up to work on this it would be a backlog spec instead.","commit_id":"7597905eb0c493a406d9df2f208ab9a5e2e9896c"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"11d3955e369968273dd903159590a2b7b3f666ce","unresolved":true,"context_lines":[{"line_number":163,"context_line":"Work Items"},{"line_number":164,"context_line":"----------"},{"line_number":165,"context_line":""},{"line_number":166,"context_line":"TBD"},{"line_number":167,"context_line":""},{"line_number":168,"context_line":"Dependencies"},{"line_number":169,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":4,"id":"ebc42b99_ee433870","line":166,"updated":"2024-01-10 16:15:02.000000000","message":"Ahem, before accepting this spec, I\u0027d prefer if you could write the very simple work items: \n- add the new weigher\n- amend the policies and provide a new microversion","commit_id":"7597905eb0c493a406d9df2f208ab9a5e2e9896c"},{"author":{"_account_id":28619,"name":"Dmitriy Rabotyagov","email":"noonedeadpunk@gmail.com","username":"noonedeadpunk"},"change_message_id":"52e4b4965f9738ebbd2e35a4a4d67e153d89f24f","unresolved":false,"context_lines":[{"line_number":163,"context_line":"Work Items"},{"line_number":164,"context_line":"----------"},{"line_number":165,"context_line":""},{"line_number":166,"context_line":"TBD"},{"line_number":167,"context_line":""},{"line_number":168,"context_line":"Dependencies"},{"line_number":169,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":4,"id":"6061a0c5_ef8b98c9","line":166,"in_reply_to":"ebc42b99_ee433870","updated":"2024-01-10 17:39:52.000000000","message":"Done","commit_id":"7597905eb0c493a406d9df2f208ab9a5e2e9896c"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"d750dcd2ddf93459acc48d189a7d87ca29d435ef","unresolved":true,"context_lines":[{"line_number":179,"context_line":""},{"line_number":180,"context_line":"Implementation of tempest testing is still appreciated, but can be"},{"line_number":181,"context_line":"achived separately from this blueprint to include wider coverage of"},{"line_number":182,"context_line":"multi-AZ setup as a whole."},{"line_number":183,"context_line":""},{"line_number":184,"context_line":""},{"line_number":185,"context_line":"Documentation Impact"}],"source_content_type":"text/x-rst","patch_set":4,"id":"a6090468_8a1234cb","line":182,"updated":"2024-01-10 12:49:08.000000000","message":"+1","commit_id":"7597905eb0c493a406d9df2f208ab9a5e2e9896c"},{"author":{"_account_id":28619,"name":"Dmitriy Rabotyagov","email":"noonedeadpunk@gmail.com","username":"noonedeadpunk"},"change_message_id":"855ccbb44e34cb0983e70fd24f2acf9626444173","unresolved":false,"context_lines":[{"line_number":179,"context_line":""},{"line_number":180,"context_line":"Implementation of tempest testing is still appreciated, but can be"},{"line_number":181,"context_line":"achived separately from this blueprint to include wider coverage of"},{"line_number":182,"context_line":"multi-AZ setup as a whole."},{"line_number":183,"context_line":""},{"line_number":184,"context_line":""},{"line_number":185,"context_line":"Documentation Impact"}],"source_content_type":"text/x-rst","patch_set":4,"id":"bd849e6f_6caa44e5","line":182,"in_reply_to":"a6090468_8a1234cb","updated":"2025-12-08 16:18:12.000000000","message":"Acknowledged","commit_id":"7597905eb0c493a406d9df2f208ab9a5e2e9896c"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"d750dcd2ddf93459acc48d189a7d87ca29d435ef","unresolved":true,"context_lines":[{"line_number":187,"context_line":""},{"line_number":188,"context_line":"Scheduler documentation for users should be updated to mention new"},{"line_number":189,"context_line":"functionality. Apart from that, the generated API reference and release note"},{"line_number":190,"context_line":"should provide comprehensive documentation of the changes."},{"line_number":191,"context_line":""},{"line_number":192,"context_line":"References"},{"line_number":193,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":4,"id":"c598950c_e74dba01","line":190,"updated":"2024-01-10 12:49:08.000000000","message":"+1","commit_id":"7597905eb0c493a406d9df2f208ab9a5e2e9896c"},{"author":{"_account_id":28619,"name":"Dmitriy Rabotyagov","email":"noonedeadpunk@gmail.com","username":"noonedeadpunk"},"change_message_id":"855ccbb44e34cb0983e70fd24f2acf9626444173","unresolved":false,"context_lines":[{"line_number":187,"context_line":""},{"line_number":188,"context_line":"Scheduler documentation for users should be updated to mention new"},{"line_number":189,"context_line":"functionality. Apart from that, the generated API reference and release note"},{"line_number":190,"context_line":"should provide comprehensive documentation of the changes."},{"line_number":191,"context_line":""},{"line_number":192,"context_line":"References"},{"line_number":193,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":4,"id":"21aed1b1_b530657b","line":190,"in_reply_to":"c598950c_e74dba01","updated":"2025-12-08 16:18:12.000000000","message":"Acknowledged","commit_id":"7597905eb0c493a406d9df2f208ab9a5e2e9896c"}],"specs/2026.1/approved/cross-az-instance-scheduling.rst":[{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"6061726712539960f07f1d3a024d9830ec8cd341","unresolved":true,"context_lines":[{"line_number":28,"context_line":""},{"line_number":29,"context_line":"It introduces a need for independent implementation of AZ support for"},{"line_number":30,"context_line":"external projects (like Octavia, Zun, Trove, Magnum, etc.) and tools (like"},{"line_number":31,"context_line":"OpenTofu provider, Kubernetes operator, Ansible, etc.). Right now there is no"},{"line_number":32,"context_line":"consistent solution of the problem for mentioned tools exist."},{"line_number":33,"context_line":""},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"Use Cases"}],"source_content_type":"text/x-rst","patch_set":7,"id":"a0d8c857_bd20ed60","line":32,"range":{"start_line":31,"start_character":56,"end_line":32,"end_character":61},"updated":"2025-11-21 20:01:21.000000000","message":"something feels off about this phrasing.\nperhaps this is better?\n\n```suggestion\nOpenTofu provider, Kubernetes operator, Ansible, etc.). Right now there is no\nconsistent solution for the problem across the mentioned tools.\n```","commit_id":"a251caffb263869756465cee77a4e42f45abd1bd"},{"author":{"_account_id":28619,"name":"Dmitriy Rabotyagov","email":"noonedeadpunk@gmail.com","username":"noonedeadpunk"},"change_message_id":"d9ce65776a77709feed1b37f579283b5d916e7b6","unresolved":false,"context_lines":[{"line_number":28,"context_line":""},{"line_number":29,"context_line":"It introduces a need for independent implementation of AZ support for"},{"line_number":30,"context_line":"external projects (like Octavia, Zun, Trove, Magnum, etc.) and tools (like"},{"line_number":31,"context_line":"OpenTofu provider, Kubernetes operator, Ansible, etc.). Right now there is no"},{"line_number":32,"context_line":"consistent solution of the problem for mentioned tools exist."},{"line_number":33,"context_line":""},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"Use Cases"}],"source_content_type":"text/x-rst","patch_set":7,"id":"3fdb7310_e204df1e","line":32,"range":{"start_line":31,"start_character":56,"end_line":32,"end_character":61},"in_reply_to":"a0d8c857_bd20ed60","updated":"2025-11-26 15:02:42.000000000","message":"Done","commit_id":"a251caffb263869756465cee77a4e42f45abd1bd"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"6061726712539960f07f1d3a024d9830ec8cd341","unresolved":true,"context_lines":[{"line_number":35,"context_line":"Use Cases"},{"line_number":36,"context_line":"---------"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"Availability Zones mostly perceived as a physically isolated set of hardware,"},{"line_number":39,"context_line":"like placed in different fire rooms or even different datacenter within"},{"line_number":40,"context_line":"relatively small range."},{"line_number":41,"context_line":"With that scenario in mind, users might want to additionally protect their"},{"line_number":42,"context_line":"data and/or clusters availability by spreading resources across"},{"line_number":43,"context_line":"Availability Zones and avoid having the single point of failure."}],"source_content_type":"text/x-rst","patch_set":7,"id":"a2cf83f9_245c0f28","line":40,"range":{"start_line":38,"start_character":0,"end_line":40,"end_character":23},"updated":"2025-11-21 20:01:21.000000000","message":"they can be but they are exipclty not fault domains which seam to be way you are describign\n\n\nthey have several other us cease for example the other common one is to create a availability zone per hardware generation.\n\ni.e. whwen a data center does a hardware refresh and intoduces a new generation fo a cpu sku the woudl create a new az for that.\n\n\nor they would use AZs for diffent security or reglatory domains\nsuch as FIPS or geo-location.\n\nkeystone regions are the closet thing to a fault domain that openstack has.\n\ni think this is a better wording to position your proposal\n\n```suggestion\nA common useage of Availability Zones is to model physically isolated set of hardware, such as different datacenter rooms with isolated power/data/fire contol or even different datacenters with a relatively low latancy such that it makes sense to model it as a signle cloud region (fault domain).\n```","commit_id":"a251caffb263869756465cee77a4e42f45abd1bd"},{"author":{"_account_id":28619,"name":"Dmitriy Rabotyagov","email":"noonedeadpunk@gmail.com","username":"noonedeadpunk"},"change_message_id":"d9ce65776a77709feed1b37f579283b5d916e7b6","unresolved":false,"context_lines":[{"line_number":35,"context_line":"Use Cases"},{"line_number":36,"context_line":"---------"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"Availability Zones mostly perceived as a physically isolated set of hardware,"},{"line_number":39,"context_line":"like placed in different fire rooms or even different datacenter within"},{"line_number":40,"context_line":"relatively small range."},{"line_number":41,"context_line":"With that scenario in mind, users might want to additionally protect their"},{"line_number":42,"context_line":"data and/or clusters availability by spreading resources across"},{"line_number":43,"context_line":"Availability Zones and avoid having the single point of failure."}],"source_content_type":"text/x-rst","patch_set":7,"id":"86b50dd4_5b3a3711","line":40,"range":{"start_line":38,"start_character":0,"end_line":40,"end_character":23},"in_reply_to":"a2cf83f9_245c0f28","updated":"2025-11-26 15:02:42.000000000","message":"Yeah, good phrasing. I think I was trying to draw the line with AWS AZ concept without throwing names and highlight that they are different in OpenStack, but done that poorly.","commit_id":"a251caffb263869756465cee77a4e42f45abd1bd"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"6061726712539960f07f1d3a024d9830ec8cd341","unresolved":true,"context_lines":[{"line_number":38,"context_line":"Availability Zones mostly perceived as a physically isolated set of hardware,"},{"line_number":39,"context_line":"like placed in different fire rooms or even different datacenter within"},{"line_number":40,"context_line":"relatively small range."},{"line_number":41,"context_line":"With that scenario in mind, users might want to additionally protect their"},{"line_number":42,"context_line":"data and/or clusters availability by spreading resources across"},{"line_number":43,"context_line":"Availability Zones and avoid having the single point of failure."},{"line_number":44,"context_line":"This potentially provides higher resilience and reduces risk of outages of"},{"line_number":45,"context_line":"clusters spawned inside OpenStack."},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"Good example of that use-case might be a database cluster, where each member"},{"line_number":48,"context_line":"of the cluster should reside in a different Availability Zone."}],"source_content_type":"text/x-rst","patch_set":7,"id":"eb21682b_45cc70e1","line":45,"range":{"start_line":41,"start_character":0,"end_line":45,"end_character":34},"updated":"2025-11-21 20:01:21.000000000","message":"so openstack user shoudl not expect AZs ot provide any fault tollerance since that is not what they are for but it is a common misconstpion that they hold form aws\n\n\n```suggestion\nIf an operator offers availability zones with different uptime garentees, power or data providers a user might want to enhance there workload availability by spreading resources across Availability Zones and avoid having the single point of failure. While AZs in openack are not fault domains with careful architecture of the cloud the are often presented to a user as a convient abstraction to model\nmodel different aviablity of resources. This potentially provides higher resilience, and reduces risk of outages of clusters spawned inside OpenStack.\n```\n\na neutron outage can still cause a complete outage of all networking across all AZs\nmangiablity has a signle point of failure if keyston has an issues.\nso we can motivte the use case but we should be clear to not imply that AZs \u003d\u003d Fault domains because that is simply not ture in general.\n\nif we could go back in time and chagne one thing in novas history it may have been to call AZs just `zones` from day one so that its clear they shoudl not be taught of as AWS AZs.","commit_id":"a251caffb263869756465cee77a4e42f45abd1bd"},{"author":{"_account_id":28619,"name":"Dmitriy Rabotyagov","email":"noonedeadpunk@gmail.com","username":"noonedeadpunk"},"change_message_id":"d9ce65776a77709feed1b37f579283b5d916e7b6","unresolved":false,"context_lines":[{"line_number":38,"context_line":"Availability Zones mostly perceived as a physically isolated set of hardware,"},{"line_number":39,"context_line":"like placed in different fire rooms or even different datacenter within"},{"line_number":40,"context_line":"relatively small range."},{"line_number":41,"context_line":"With that scenario in mind, users might want to additionally protect their"},{"line_number":42,"context_line":"data and/or clusters availability by spreading resources across"},{"line_number":43,"context_line":"Availability Zones and avoid having the single point of failure."},{"line_number":44,"context_line":"This potentially provides higher resilience and reduces risk of outages of"},{"line_number":45,"context_line":"clusters spawned inside OpenStack."},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"Good example of that use-case might be a database cluster, where each member"},{"line_number":48,"context_line":"of the cluster should reside in a different Availability Zone."}],"source_content_type":"text/x-rst","patch_set":7,"id":"5f3f2455_854823ef","line":45,"range":{"start_line":41,"start_character":0,"end_line":45,"end_character":34},"in_reply_to":"eb21682b_45cc70e1","updated":"2025-11-26 15:02:42.000000000","message":"Done","commit_id":"a251caffb263869756465cee77a4e42f45abd1bd"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"6061726712539960f07f1d3a024d9830ec8cd341","unresolved":true,"context_lines":[{"line_number":63,"context_line":"server group policy will be introduced."},{"line_number":64,"context_line":"When a group with the ``az-soft-anti-affinity`` policy is supplied, the"},{"line_number":65,"context_line":"scheduler will fetch and weight existing Availability Zones to attempt placing"},{"line_number":66,"context_line":"instances into separate AZs. If amount of available for scheduling AZs is less"},{"line_number":67,"context_line":"than amount of instances in the group, AZ with the fewest instances from the"},{"line_number":68,"context_line":"group should be selected."},{"line_number":69,"context_line":""}],"source_content_type":"text/x-rst","patch_set":7,"id":"de525164_f9a0dc9f","line":66,"updated":"2025-11-21 20:01:21.000000000","message":"How do you propose to implement this?\n\nCurrently, OpenStack Nova\u0027s database structure provides mappings for:\n1. Instance to Host (instance and related tables).\n2. Host Aggregate to Host (host_aggregate_hosts table).\n\nHowever, Availability Zones (AZs) are not stored as a top-level\nresource in the database. They are defined purely as a metadata\nkey on a Host Aggregate.\n\nTherefore, the first required step is to dynamically build a list\nof **AZ to Host mappings**. This would involve a join operation on the\nHost Aggregate metadata and Host Aggregate mapping tables, filtering\nfor aggregates that possess an AZ key.\n\n***Pseudo SQL Example for AZ to Host Mapping***\n```sql\nSELECT ham.zone, hah.host\nFROM host_aggregates_metadata AS ham\nJOIN host_aggregate_host AS hah\nON ham.aggregate_id \u003d hah.aggregate_id\nWHERE ham.key \u003d \u0027availability_zone\u0027;\n````\n\nSeparately, you will need to identify all **instances belonging to**\n**the server group** and determine their respective AZs. This is\nnecessary to count the number of instances per AZ for anti-affinity\nbalancing.\n\n***Pseudo SQL Example for Server Group Instances***\n\n```sql\nSELECT i.host\nFROM instances AS i\nJOIN server_group_members AS sgm\nON i.uuid \u003d sgm.instance_uuid\nWHERE sgm.group_id \u003d $group_id;\n```\n\nFrom these two data sets, you can construct a mapping of **AZ -\\\u003e**\n**count of instances in the server group**. This can then be managed\nusing a **Min Heap** (or Priority Queue) structure. The Min Heap\nproperty would ensure that the AZ with the lowest instance count is\nalways at the root (top) of the heap.\n\nFor a single-instance creation request, the `peak` operation on the\nheap gives the target AZ to select. if you do this with a list its also just\nheap[0]\n\nFor a multi-create request, you can repeatedly select the root of the heap\nthe target AZ, **increment the count for that AZ**, and sort the heap\nrelying on the heap\u0027s structure (re-heapify or presever the heap-property) to\nfind the next least-used AZ for the next instance.\n\nReference for heap implementation: https://docs.python.org/3/library/heapq.html\n\n\nthere are other ways to do this of course but that is the natual approch that comes to mind for me.","commit_id":"a251caffb263869756465cee77a4e42f45abd1bd"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"b0c0ebd1352afd3c3536ca65b86afbf8c8b2acc3","unresolved":true,"context_lines":[{"line_number":63,"context_line":"server group policy will be introduced."},{"line_number":64,"context_line":"When a group with the ``az-soft-anti-affinity`` policy is supplied, the"},{"line_number":65,"context_line":"scheduler will fetch and weight existing Availability Zones to attempt placing"},{"line_number":66,"context_line":"instances into separate AZs. If amount of available for scheduling AZs is less"},{"line_number":67,"context_line":"than amount of instances in the group, AZ with the fewest instances from the"},{"line_number":68,"context_line":"group should be selected."},{"line_number":69,"context_line":""}],"source_content_type":"text/x-rst","patch_set":7,"id":"f0c8fe0a_99772e3b","line":66,"in_reply_to":"bb1468b0_3f03bd0c","updated":"2025-11-27 13:17:56.000000000","message":"ack. i was jsut provdieing them so we coudl reason about the alghoritim\n\nthe spec is ment to cature those impleamtion detail as that is not somethign that shoudl be defered to the code review.\n\nwe do not need the exact impelaiton but we do need a high level decription of the over all oeprtions\n\nweigher and fileter run per host so we try to avoid any db calls in them includign via fucntion like those in https://opendev.org/openstack/nova/src/commit/23b462d77df1a1d09c43d0918bca853ef3af1e3f/nova/availability_zones.py\n\nin stead we try to prefect that infromation up front in the schduler manager and encode the information in the hoststate objects\n\nthe hoststate object host a list of aggreat that he host belong too\n\nhttps://github.com/openstack/nova/blob/master/nova/scheduler/host_manager.py#L140\n\nwhich woudl inlcude th AZ info althoeur i dont think we have a conventiet helper method to get that returns the host az\nwe might want to add a property to the hoststate object for that so you can just do `host.az`\n\n\nwhat you are mising is a map of the member fo the isntnace group to the az they are assgiend too.\n\nthat is proably somthing that shoudl be added to the reqest spec if the info is not already in the member list\n\nhttps://github.com/openstack/nova/blob/master/nova/scheduler/weights/affinity.py#L49-L51\n\nlooking at the instnace_group object  memers is just a list of stings\nhttps://github.com/openstack/nova/blob/master/nova/objects/instance_group.py#L134\ns we either need to add a new dict filed to hold the mapping form each member to the az they are in or change that to be a list of member object with uuid and az values.","commit_id":"a251caffb263869756465cee77a4e42f45abd1bd"},{"author":{"_account_id":28619,"name":"Dmitriy Rabotyagov","email":"noonedeadpunk@gmail.com","username":"noonedeadpunk"},"change_message_id":"d9ce65776a77709feed1b37f579283b5d916e7b6","unresolved":false,"context_lines":[{"line_number":63,"context_line":"server group policy will be introduced."},{"line_number":64,"context_line":"When a group with the ``az-soft-anti-affinity`` policy is supplied, the"},{"line_number":65,"context_line":"scheduler will fetch and weight existing Availability Zones to attempt placing"},{"line_number":66,"context_line":"instances into separate AZs. If amount of available for scheduling AZs is less"},{"line_number":67,"context_line":"than amount of instances in the group, AZ with the fewest instances from the"},{"line_number":68,"context_line":"group should be selected."},{"line_number":69,"context_line":""}],"source_content_type":"text/x-rst","patch_set":7,"id":"bb1468b0_3f03bd0c","line":66,"in_reply_to":"de525164_f9a0dc9f","updated":"2025-11-26 15:02:42.000000000","message":"I was not really thinking about implementation, and big thanks for this lead - it helped a ton.\n\nI\u0027ve adjusted the spec to mention that. I did not mention SQL requests, as hoping to use https://opendev.org/openstack/nova/src/commit/23b462d77df1a1d09c43d0918bca853ef3af1e3f/nova/availability_zones.py for this purpose.","commit_id":"a251caffb263869756465cee77a4e42f45abd1bd"},{"author":{"_account_id":28619,"name":"Dmitriy Rabotyagov","email":"noonedeadpunk@gmail.com","username":"noonedeadpunk"},"change_message_id":"12e0297fc578b240ef7802cacb9a194ab685f4af","unresolved":false,"context_lines":[{"line_number":63,"context_line":"server group policy will be introduced."},{"line_number":64,"context_line":"When a group with the ``az-soft-anti-affinity`` policy is supplied, the"},{"line_number":65,"context_line":"scheduler will fetch and weight existing Availability Zones to attempt placing"},{"line_number":66,"context_line":"instances into separate AZs. If amount of available for scheduling AZs is less"},{"line_number":67,"context_line":"than amount of instances in the group, AZ with the fewest instances from the"},{"line_number":68,"context_line":"group should be selected."},{"line_number":69,"context_line":""}],"source_content_type":"text/x-rst","patch_set":7,"id":"1dfef7f6_e2c71ee5","line":66,"in_reply_to":"f0c8fe0a_99772e3b","updated":"2025-11-27 17:56:05.000000000","message":"Oh, yes, totally, I\u0027m extremely grateful for such detailed review. It contains amazing pointers.\n\nGiven that I can override `BaseWeigher.weigh_objects` and most of the data is already there (except, probably, other instances AZs in the group), it should be rather efficient to execute. And I hope addresses your comment as well 😊","commit_id":"a251caffb263869756465cee77a4e42f45abd1bd"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"6061726712539960f07f1d3a024d9830ec8cd341","unresolved":true,"context_lines":[{"line_number":69,"context_line":""},{"line_number":70,"context_line":"With that the user should be able to define maximum amount of instances within"},{"line_number":71,"context_line":"the group that can reside in the same AZ when cross-AZ scheduling is not"},{"line_number":72,"context_line":"possible with a ``max_server_per_host`` parameter."},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"Once instance is created, ``az-soft-anti-affinity`` group membership can not"},{"line_number":75,"context_line":"be changed, and group membership should be stored in request specs for the"}],"source_content_type":"text/x-rst","patch_set":7,"id":"da2c10e8_9ae56f6f","line":72,"updated":"2025-11-21 20:01:21.000000000","message":"sure we can supprot that.\n\nby default if that is not set are you propsoingo to round robin the selction like i am proposing above by just leving it up to the heap property\n\nor do you want this to default to 1 and reject the request if thre are not enough AZs\n\nboth are valid, i prefer the round robbin approch but we need to docuemnt it either way.","commit_id":"a251caffb263869756465cee77a4e42f45abd1bd"},{"author":{"_account_id":28619,"name":"Dmitriy Rabotyagov","email":"noonedeadpunk@gmail.com","username":"noonedeadpunk"},"change_message_id":"d9ce65776a77709feed1b37f579283b5d916e7b6","unresolved":false,"context_lines":[{"line_number":69,"context_line":""},{"line_number":70,"context_line":"With that the user should be able to define maximum amount of instances within"},{"line_number":71,"context_line":"the group that can reside in the same AZ when cross-AZ scheduling is not"},{"line_number":72,"context_line":"possible with a ``max_server_per_host`` parameter."},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"Once instance is created, ``az-soft-anti-affinity`` group membership can not"},{"line_number":75,"context_line":"be changed, and group membership should be stored in request specs for the"}],"source_content_type":"text/x-rst","patch_set":7,"id":"a1c47b64_840664a6","line":72,"in_reply_to":"da2c10e8_9ae56f6f","updated":"2025-11-26 15:02:42.000000000","message":"Yeah, I prefer round robin by default as well, with ability to override.\n\nI guess we need to actually introduce a new rule, which would be `max_server_per_az` with default value of 0, rather then re-using an existing one.\nEspecially, I\u0027ve mentioned this new rule name in API impact already.","commit_id":"a251caffb263869756465cee77a4e42f45abd1bd"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"6061726712539960f07f1d3a024d9830ec8cd341","unresolved":true,"context_lines":[{"line_number":73,"context_line":""},{"line_number":74,"context_line":"Once instance is created, ``az-soft-anti-affinity`` group membership can not"},{"line_number":75,"context_line":"be changed, and group membership should be stored in request specs for the"},{"line_number":76,"context_line":"instance."},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"In case an instance is part of the group with ``az-soft-anti-affinity`` policy"},{"line_number":79,"context_line":"default Availability Zone defined in ``nova.conf`` will be ignored, and the"}],"source_content_type":"text/x-rst","patch_set":7,"id":"9fde10ad_cf305244","line":76,"updated":"2025-11-21 20:01:21.000000000","message":"yes this sill be done automitaclly just based on the fact its a member of a server goup vai the schduelr hint menting the group by name.\n\nso no change is needed here to do this.","commit_id":"a251caffb263869756465cee77a4e42f45abd1bd"},{"author":{"_account_id":28619,"name":"Dmitriy Rabotyagov","email":"noonedeadpunk@gmail.com","username":"noonedeadpunk"},"change_message_id":"d9ce65776a77709feed1b37f579283b5d916e7b6","unresolved":false,"context_lines":[{"line_number":73,"context_line":""},{"line_number":74,"context_line":"Once instance is created, ``az-soft-anti-affinity`` group membership can not"},{"line_number":75,"context_line":"be changed, and group membership should be stored in request specs for the"},{"line_number":76,"context_line":"instance."},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"In case an instance is part of the group with ``az-soft-anti-affinity`` policy"},{"line_number":79,"context_line":"default Availability Zone defined in ``nova.conf`` will be ignored, and the"}],"source_content_type":"text/x-rst","patch_set":7,"id":"ab831d2c_b571b777","line":76,"in_reply_to":"9fde10ad_cf305244","updated":"2025-11-26 15:02:42.000000000","message":"I\u0027d leave this statement in spec for documentation purposes 😊","commit_id":"a251caffb263869756465cee77a4e42f45abd1bd"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"6061726712539960f07f1d3a024d9830ec8cd341","unresolved":true,"context_lines":[{"line_number":77,"context_line":""},{"line_number":78,"context_line":"In case an instance is part of the group with ``az-soft-anti-affinity`` policy"},{"line_number":79,"context_line":"default Availability Zone defined in ``nova.conf`` will be ignored, and the"},{"line_number":80,"context_line":"server group policy will have precedence over it."},{"line_number":81,"context_line":""},{"line_number":82,"context_line":""},{"line_number":83,"context_line":""}],"source_content_type":"text/x-rst","patch_set":7,"id":"4b59ddc1_acc15a96","line":80,"updated":"2025-11-21 20:01:21.000000000","message":"+1\n\nwe need to also defien what the semantics are with cross_az_attach set to False as well.\n\nwe coud defin it by saying cross_az_attach is always trated as if its true when \na server is part of az-soft-anti-affinity\n\nwe coudl chack what its set to in the api and assume the value is the same on the compte (its a per compute option so that does not really hold in genreal)\n\nif az-soft-anti-affinity was specifyed and the vm had a volume and cross_az_attach is false then the only real option we have is to reject the requst if we cant fulfile the az request form the voluem while meeting the az-soft-anti-affinity\nrequriemetn\n\nthis is partly which i prefer threaing max_server_per_host as unlimited by defautl instad of 1.\n\nas that will allow mutple instance ot be sent to the same az if forced to by cross_az_attach\u003dfalse.","commit_id":"a251caffb263869756465cee77a4e42f45abd1bd"},{"author":{"_account_id":28619,"name":"Dmitriy Rabotyagov","email":"noonedeadpunk@gmail.com","username":"noonedeadpunk"},"change_message_id":"d9ce65776a77709feed1b37f579283b5d916e7b6","unresolved":false,"context_lines":[{"line_number":77,"context_line":""},{"line_number":78,"context_line":"In case an instance is part of the group with ``az-soft-anti-affinity`` policy"},{"line_number":79,"context_line":"default Availability Zone defined in ``nova.conf`` will be ignored, and the"},{"line_number":80,"context_line":"server group policy will have precedence over it."},{"line_number":81,"context_line":""},{"line_number":82,"context_line":""},{"line_number":83,"context_line":""}],"source_content_type":"text/x-rst","patch_set":7,"id":"5fde6b7e_46764ac0","line":80,"in_reply_to":"4b59ddc1_acc15a96","updated":"2025-11-26 15:02:42.000000000","message":"I added a short note, that we don\u0027t touch this part with this spec...","commit_id":"a251caffb263869756465cee77a4e42f45abd1bd"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"6061726712539960f07f1d3a024d9830ec8cd341","unresolved":true,"context_lines":[{"line_number":132,"context_line":"---------------------"},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"* ``python-novaclient`` and OpenStackSDK should be updated to support the new"},{"line_number":135,"context_line":"  ``az-soft-anti-affinity`` policy for server groups."},{"line_number":136,"context_line":""},{"line_number":137,"context_line":"Performance Impact"},{"line_number":138,"context_line":"------------------"}],"source_content_type":"text/x-rst","patch_set":7,"id":"d0fb164d_6eb06b4b","line":135,"updated":"2025-11-21 20:01:21.000000000","message":"not quite\n\nwe have forzen the python nova clinet and nolonger update its python bindign or its\ncli\n\n\nso this shoudl say the sdk and openstack clinet will be updated.","commit_id":"a251caffb263869756465cee77a4e42f45abd1bd"},{"author":{"_account_id":28619,"name":"Dmitriy Rabotyagov","email":"noonedeadpunk@gmail.com","username":"noonedeadpunk"},"change_message_id":"d9ce65776a77709feed1b37f579283b5d916e7b6","unresolved":false,"context_lines":[{"line_number":132,"context_line":"---------------------"},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"* ``python-novaclient`` and OpenStackSDK should be updated to support the new"},{"line_number":135,"context_line":"  ``az-soft-anti-affinity`` policy for server groups."},{"line_number":136,"context_line":""},{"line_number":137,"context_line":"Performance Impact"},{"line_number":138,"context_line":"------------------"}],"source_content_type":"text/x-rst","patch_set":7,"id":"58312a01_805e7d79","line":135,"in_reply_to":"d0fb164d_6eb06b4b","updated":"2025-11-26 15:02:42.000000000","message":"Done","commit_id":"a251caffb263869756465cee77a4e42f45abd1bd"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"6061726712539960f07f1d3a024d9830ec8cd341","unresolved":true,"context_lines":[{"line_number":144,"context_line":""},{"line_number":145,"context_line":"The new weighter can be disabled when needed, though it is enabled by default."},{"line_number":146,"context_line":"Deployment tools that define explicit list of enabled weighers might need"},{"line_number":147,"context_line":"to consider expanding list with the new weighter."},{"line_number":148,"context_line":""},{"line_number":149,"context_line":"Developer impact"},{"line_number":150,"context_line":"----------------"}],"source_content_type":"text/x-rst","patch_set":7,"id":"da047953_0befa66f","line":147,"updated":"2025-11-21 20:01:21.000000000","message":"ok the ohter option is to set its multipleor to 0 and have it early out\n\nwhich bring up another point each weighter should have its onw config option to specify the mutiple used to specify the impact of each weighers decsion on the filnal outcome\n\n\nby convetion if its on by defualt it shoudl decault to 1.0 and if the weither is off by default we default it to 0.0 and do an early return in the weiher impleemtion and just retrun 0 for all hosts so it has no impact on the host selection. or 1\n\nin any case you shoudl docuemtn the name of the config option for the muitplper here and its default value.","commit_id":"a251caffb263869756465cee77a4e42f45abd1bd"},{"author":{"_account_id":28619,"name":"Dmitriy Rabotyagov","email":"noonedeadpunk@gmail.com","username":"noonedeadpunk"},"change_message_id":"d9ce65776a77709feed1b37f579283b5d916e7b6","unresolved":false,"context_lines":[{"line_number":144,"context_line":""},{"line_number":145,"context_line":"The new weighter can be disabled when needed, though it is enabled by default."},{"line_number":146,"context_line":"Deployment tools that define explicit list of enabled weighers might need"},{"line_number":147,"context_line":"to consider expanding list with the new weighter."},{"line_number":148,"context_line":""},{"line_number":149,"context_line":"Developer impact"},{"line_number":150,"context_line":"----------------"}],"source_content_type":"text/x-rst","patch_set":7,"id":"0a21b1fc_653b0b33","line":147,"in_reply_to":"da047953_0befa66f","updated":"2025-11-26 15:02:42.000000000","message":"Done","commit_id":"a251caffb263869756465cee77a4e42f45abd1bd"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"eaffc6a0a9e6b2aa291aa828575149cc3cab4497","unresolved":true,"context_lines":[{"line_number":53,"context_line":"OpenStack."},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"Good example of that use-case might be a database cluster, where each member"},{"line_number":56,"context_line":"of the cluster should reside in a different Availability Zone."},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"Proposed change"},{"line_number":59,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":8,"id":"fff89d40_eeadef08","line":56,"updated":"2025-11-26 17:52:08.000000000","message":"These aren\u0027t really formatted as use-cases, but also, they seem to be justifying AZs in general and not the use-case you\u0027re trying to address by this spec.","commit_id":"c00e32b8e4c70c86eb4708ebd1cf9eff3f270c57"},{"author":{"_account_id":28619,"name":"Dmitriy Rabotyagov","email":"noonedeadpunk@gmail.com","username":"noonedeadpunk"},"change_message_id":"7a3a91c12e7f49d2944594764e2a9853c9947ffd","unresolved":false,"context_lines":[{"line_number":53,"context_line":"OpenStack."},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"Good example of that use-case might be a database cluster, where each member"},{"line_number":56,"context_line":"of the cluster should reside in a different Availability Zone."},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"Proposed change"},{"line_number":59,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":8,"id":"fb8227a7_3bd13fa4","line":56,"in_reply_to":"fff89d40_eeadef08","updated":"2025-11-27 11:49:37.000000000","message":"I tired to elaborate on them to be slightly more clear.","commit_id":"c00e32b8e4c70c86eb4708ebd1cf9eff3f270c57"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"eaffc6a0a9e6b2aa291aa828575149cc3cab4497","unresolved":true,"context_lines":[{"line_number":73,"context_line":"scheduler will ask for allocation candidates without supplying an aggregate to"},{"line_number":74,"context_line":"weight hosts based of Availability Zones. If amount of available for"},{"line_number":75,"context_line":"scheduling AZs is less than amount of instances in the group, AZ with the"},{"line_number":76,"context_line":"fewest instances from the group should be selected."},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"In order to weight allocation candidates, we will leverage `heap queue \u003chttps://docs.python.org/3/library/heapq.html\u003e`_"},{"line_number":79,"context_line":"algorithm. We need to create two mappings for that:"}],"source_content_type":"text/x-rst","patch_set":8,"id":"6fd8d02b_2b4e0b88","line":76,"updated":"2025-11-26 17:52:08.000000000","message":"You\u0027re effectively trying to implement a spread, but across AZs instead of hosts right?\n\nTBH, this seems a bit scary. I know it\u0027s \"soft\" but it seems like if you care at all about AZs you care which instance goes where. This could easily go wrong and end up with all your DBs on one AZ and all your web servers on another.","commit_id":"c00e32b8e4c70c86eb4708ebd1cf9eff3f270c57"},{"author":{"_account_id":28619,"name":"Dmitriy Rabotyagov","email":"noonedeadpunk@gmail.com","username":"noonedeadpunk"},"change_message_id":"125a6a3e434fee26ffd74337cb501277f58a013a","unresolved":true,"context_lines":[{"line_number":73,"context_line":"scheduler will ask for allocation candidates without supplying an aggregate to"},{"line_number":74,"context_line":"weight hosts based of Availability Zones. If amount of available for"},{"line_number":75,"context_line":"scheduling AZs is less than amount of instances in the group, AZ with the"},{"line_number":76,"context_line":"fewest instances from the group should be selected."},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"In order to weight allocation candidates, we will leverage `heap queue \u003chttps://docs.python.org/3/library/heapq.html\u003e`_"},{"line_number":79,"context_line":"algorithm. We need to create two mappings for that:"}],"source_content_type":"text/x-rst","patch_set":8,"id":"56a8f5e4_9db25b40","line":76,"in_reply_to":"4d786506_04e87770","updated":"2025-12-08 16:17:14.000000000","message":"\u003e I think we could document that, so I\u0027m not afraid about this question, but indeed operators should definitely may knowing the fact that if they use groups, they can\u0027t eventually remove instances from groups\n\nI have documented that on L110?\n`Once instance is created, ``az-soft-anti-affinity`` group membership can not\nbe changed, and group membership should be stored in request specs for the\ninstance.`\n\n\u003e I don\u0027t see ow that helps.\n\nUm, you create group A with az-soft-anti-affinity and group B and C with soft-anti-affinity.\n\nThen web servers are part of group A and B, while databases part of group A and C. As we allow a server to be part of multiple groups, don\u0027t we? Or I am dreaming now that you can do that?\n\nGiven, that operator will configure higher multiplier, and you can have multiple groups for a server, then it should be fine?\n\nIt\u0027s a good question though what to do if only one group can be supplied... I\u0027d say, we should be allowing a server group to be a list and do another spec for this matter...\nBut ofc we can say that this weighter will not only weight cross-AZ, but also will weight inside of the AZ to achieve regular soft-anti-afffinity.","commit_id":"c00e32b8e4c70c86eb4708ebd1cf9eff3f270c57"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"6cc20d65aaf71bf5ad906d0626b3b9e9d2995164","unresolved":true,"context_lines":[{"line_number":73,"context_line":"scheduler will ask for allocation candidates without supplying an aggregate to"},{"line_number":74,"context_line":"weight hosts based of Availability Zones. If amount of available for"},{"line_number":75,"context_line":"scheduling AZs is less than amount of instances in the group, AZ with the"},{"line_number":76,"context_line":"fewest instances from the group should be selected."},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"In order to weight allocation candidates, we will leverage `heap queue \u003chttps://docs.python.org/3/library/heapq.html\u003e`_"},{"line_number":79,"context_line":"algorithm. We need to create two mappings for that:"}],"source_content_type":"text/x-rst","patch_set":8,"id":"ed6243c1_2692a63e","line":76,"in_reply_to":"56a8f5e4_9db25b40","updated":"2026-01-21 15:57:06.000000000","message":"\u003e It\u0027s a good question though what to do if only one group can be supplied... I\u0027d say, we should be allowing a server group to be a list and do another spec for this matter...\n\nIsn\u0027t it just one `group\u003d` hint?\n\nhttps://docs.openstack.org/nova/latest/user/server-groups.html","commit_id":"c00e32b8e4c70c86eb4708ebd1cf9eff3f270c57"},{"author":{"_account_id":28619,"name":"Dmitriy Rabotyagov","email":"noonedeadpunk@gmail.com","username":"noonedeadpunk"},"change_message_id":"7a3a91c12e7f49d2944594764e2a9853c9947ffd","unresolved":true,"context_lines":[{"line_number":73,"context_line":"scheduler will ask for allocation candidates without supplying an aggregate to"},{"line_number":74,"context_line":"weight hosts based of Availability Zones. If amount of available for"},{"line_number":75,"context_line":"scheduling AZs is less than amount of instances in the group, AZ with the"},{"line_number":76,"context_line":"fewest instances from the group should be selected."},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"In order to weight allocation candidates, we will leverage `heap queue \u003chttps://docs.python.org/3/library/heapq.html\u003e`_"},{"line_number":79,"context_line":"algorithm. We need to create two mappings for that:"}],"source_content_type":"text/x-rst","patch_set":8,"id":"fe7a89a6_19f09b3f","line":76,"in_reply_to":"6fd8d02b_2b4e0b88","updated":"2025-11-27 11:49:37.000000000","message":"\u003e You\u0027re effectively trying to implement a spread, but across AZs instead of hosts right?\n\nYes, this is correct.\n\n\u003e end up with all your DBs on one AZ and all your web servers on another\n\nwell, you should be using different groups for DBs and web servers. And also potentially make them part of regular anti-affinity group, to ensure they are at least on a different hosts, even though they are in the same AZ.","commit_id":"c00e32b8e4c70c86eb4708ebd1cf9eff3f270c57"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"4892077da6ee003d4c8de1ba93825c773f647cc4","unresolved":true,"context_lines":[{"line_number":73,"context_line":"scheduler will ask for allocation candidates without supplying an aggregate to"},{"line_number":74,"context_line":"weight hosts based of Availability Zones. If amount of available for"},{"line_number":75,"context_line":"scheduling AZs is less than amount of instances in the group, AZ with the"},{"line_number":76,"context_line":"fewest instances from the group should be selected."},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"In order to weight allocation candidates, we will leverage `heap queue \u003chttps://docs.python.org/3/library/heapq.html\u003e`_"},{"line_number":79,"context_line":"algorithm. We need to create two mappings for that:"}],"source_content_type":"text/x-rst","patch_set":8,"id":"4d786506_04e87770","line":76,"in_reply_to":"99820d9e_c862bfe8","updated":"2025-12-01 17:37:07.000000000","message":"\u003e well, you should be using different groups for DBs and web servers.\n\nI don\u0027t see ow that helps.\n\n\u003e And also potentially make them part of regular anti-affinity group, to ensure they are at least on a different hosts, even though they are in the same AZ.\n\nBut we only allow one policy per group now, right? So ... you choose anti-affinity (host) for your important things and, use this for.. unimportant things? I guess this just seems waayy too soft for an important topic like AZs to me.\n\n\u003ewe can document this as you sugest to make that clear.\n\nAn API user has no idea if the weigher is enabled or weighted though. So they may choose the server group policy and then get absolutely no different behavior without knowing why.","commit_id":"c00e32b8e4c70c86eb4708ebd1cf9eff3f270c57"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"057d6a6ddf029e5c310632165ef89e49b0a1171b","unresolved":true,"context_lines":[{"line_number":73,"context_line":"scheduler will ask for allocation candidates without supplying an aggregate to"},{"line_number":74,"context_line":"weight hosts based of Availability Zones. If amount of available for"},{"line_number":75,"context_line":"scheduling AZs is less than amount of instances in the group, AZ with the"},{"line_number":76,"context_line":"fewest instances from the group should be selected."},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"In order to weight allocation candidates, we will leverage `heap queue \u003chttps://docs.python.org/3/library/heapq.html\u003e`_"},{"line_number":79,"context_line":"algorithm. We need to create two mappings for that:"}],"source_content_type":"text/x-rst","patch_set":8,"id":"99820d9e_c862bfe8","line":76,"in_reply_to":"b30dd634_c1f7b67f","updated":"2025-12-01 16:20:28.000000000","message":"well this will also be implemtend as a weigher, so its soft anti affinity so the oiperator coudl move it ot a diffent az if they really needed too.\nthe weigher can also be disabled in 2 ways\neither by seting the multipler to 0 which likely shoudl be the default or by removing it form the enabled weighers list in the config.\n\nso if we make it opt in by the operator then they will be knowling chooing to\ntake on any operational burden this imposes on them.\n\nwe can document this as you sugest to make that clear.\n\nmy understanded is the fact that this si soft anti afinity si a key part of this proposal as we dicussed fi we shoudl supprot hard anti affinity at the az level and said no. at lest not for now.","commit_id":"c00e32b8e4c70c86eb4708ebd1cf9eff3f270c57"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"ac413281d1e83b3418cf156e9978c269af2dd0a9","unresolved":true,"context_lines":[{"line_number":73,"context_line":"scheduler will ask for allocation candidates without supplying an aggregate to"},{"line_number":74,"context_line":"weight hosts based of Availability Zones. If amount of available for"},{"line_number":75,"context_line":"scheduling AZs is less than amount of instances in the group, AZ with the"},{"line_number":76,"context_line":"fewest instances from the group should be selected."},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"In order to weight allocation candidates, we will leverage `heap queue \u003chttps://docs.python.org/3/library/heapq.html\u003e`_"},{"line_number":79,"context_line":"algorithm. We need to create two mappings for that:"}],"source_content_type":"text/x-rst","patch_set":8,"id":"b30dd634_c1f7b67f","line":76,"in_reply_to":"fe7a89a6_19f09b3f","updated":"2025-12-01 15:43:11.000000000","message":"I think we could document that, so I\u0027m not afraid about this question, but indeed operators should definitely may knowing the fact that if they use groups, they can\u0027t eventually remove instances from groups so that\u0027s why Dan is a bit scary.","commit_id":"c00e32b8e4c70c86eb4708ebd1cf9eff3f270c57"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"eaffc6a0a9e6b2aa291aa828575149cc3cab4497","unresolved":true,"context_lines":[{"line_number":93,"context_line":"    FROM nova_cell.instances AS i"},{"line_number":94,"context_line":"    JOIN nova_api.instance_group_member AS sgm"},{"line_number":95,"context_line":"    ON i.uuid \u003d sgm.instance_uuid"},{"line_number":96,"context_line":"    WHERE sgm.group_id \u003d $group_id;"},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"We can also leverage functions defined in `nova.availability_zones \u003chttps://opendev.org/openstack/nova/src/commit/23b462d77df1a1d09c43d0918bca853ef3af1e3f/nova/availability_zones.py\u003e`_"},{"line_number":99,"context_line":"to build these mappings. This should be relatively efficient operation, as"}],"source_content_type":"text/x-rst","patch_set":8,"id":"6611f9de_c5122b0d","line":96,"updated":"2025-11-26 17:52:08.000000000","message":"You\u0027ll need to account for all the cells, so scatter/gather and merge the results right?","commit_id":"c00e32b8e4c70c86eb4708ebd1cf9eff3f270c57"},{"author":{"_account_id":28619,"name":"Dmitriy Rabotyagov","email":"noonedeadpunk@gmail.com","username":"noonedeadpunk"},"change_message_id":"7a3a91c12e7f49d2944594764e2a9853c9947ffd","unresolved":false,"context_lines":[{"line_number":93,"context_line":"    FROM nova_cell.instances AS i"},{"line_number":94,"context_line":"    JOIN nova_api.instance_group_member AS sgm"},{"line_number":95,"context_line":"    ON i.uuid \u003d sgm.instance_uuid"},{"line_number":96,"context_line":"    WHERE sgm.group_id \u003d $group_id;"},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"We can also leverage functions defined in `nova.availability_zones \u003chttps://opendev.org/openstack/nova/src/commit/23b462d77df1a1d09c43d0918bca853ef3af1e3f/nova/availability_zones.py\u003e`_"},{"line_number":99,"context_line":"to build these mappings. This should be relatively efficient operation, as"}],"source_content_type":"text/x-rst","patch_set":8,"id":"6c8234ce_d7f22ad5","line":96,"in_reply_to":"6611f9de_c5122b0d","updated":"2025-11-27 11:49:37.000000000","message":"Yes, I think you are right and this should be merged result between cells.","commit_id":"c00e32b8e4c70c86eb4708ebd1cf9eff3f270c57"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"eaffc6a0a9e6b2aa291aa828575149cc3cab4497","unresolved":true,"context_lines":[{"line_number":110,"context_line":"the server group, or the value equals to zero, it means \"no limit\"."},{"line_number":111,"context_line":"In case it is set to any positive number and each AZ already reached the"},{"line_number":112,"context_line":"defined amount of VMs in the Availability Zone, VM creation request should"},{"line_number":113,"context_line":"fail."},{"line_number":114,"context_line":""},{"line_number":115,"context_line":"Once instance is created, ``az-soft-anti-affinity`` group membership can not"},{"line_number":116,"context_line":"be changed, and group membership should be stored in request specs for the"}],"source_content_type":"text/x-rst","patch_set":8,"id":"dfbe7aa0_10ed4d16","line":113,"updated":"2025-11-26 17:52:08.000000000","message":"Where is this going to be enforced? Right now `max_server_per_host` is enforced on the compute node during build time. But, such an AZ check can\u0027t really be done by the compute node, nor can a weigher abort the schedule request.","commit_id":"c00e32b8e4c70c86eb4708ebd1cf9eff3f270c57"},{"author":{"_account_id":28619,"name":"Dmitriy Rabotyagov","email":"noonedeadpunk@gmail.com","username":"noonedeadpunk"},"change_message_id":"7a3a91c12e7f49d2944594764e2a9853c9947ffd","unresolved":false,"context_lines":[{"line_number":110,"context_line":"the server group, or the value equals to zero, it means \"no limit\"."},{"line_number":111,"context_line":"In case it is set to any positive number and each AZ already reached the"},{"line_number":112,"context_line":"defined amount of VMs in the Availability Zone, VM creation request should"},{"line_number":113,"context_line":"fail."},{"line_number":114,"context_line":""},{"line_number":115,"context_line":"Once instance is created, ``az-soft-anti-affinity`` group membership can not"},{"line_number":116,"context_line":"be changed, and group membership should be stored in request specs for the"}],"source_content_type":"text/x-rst","patch_set":8,"id":"ff990a0c_acf816c8","line":113,"in_reply_to":"dfbe7aa0_10ed4d16","updated":"2025-11-27 11:49:37.000000000","message":"Ok, yes, you\u0027re right, `max_server_per_host`  is applicable only for filters, and we\u0027re doing a weight here.\nRemoved from spec.","commit_id":"c00e32b8e4c70c86eb4708ebd1cf9eff3f270c57"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"eaffc6a0a9e6b2aa291aa828575149cc3cab4497","unresolved":true,"context_lines":[{"line_number":139,"context_line":"  higher efforts to maintain the documentation in the long run."},{"line_number":140,"context_line":"* Allow to easily migrate instances between AZs, but that may be tricky to"},{"line_number":141,"context_line":"  support for some scenarios, like when ``cross_az_attach`` is set to"},{"line_number":142,"context_line":"  False and storage is not shared across AZs."},{"line_number":143,"context_line":""},{"line_number":144,"context_line":""},{"line_number":145,"context_line":"Data model impact"}],"source_content_type":"text/x-rst","patch_set":8,"id":"b3ad72e4_b8d28318","line":142,"updated":"2025-11-26 17:52:08.000000000","message":"AFAIK, this last one is planned, or at least understood that we need to do it.\n\nI\u0027m a bit lost in your actual implementation suggestion, but one way to do this would be to just have a weigher that scores hosts (negatively) based on how many instances from the group are in their AZ right? So something like `-1 * group.instances[host.az]` ? I know that doesn\u0027t give you the hard limit per AZ, but should pretty much ensure an even distribution. As noted above, I\u0027m not sure where we\u0027re going to enforce the limit anyway.","commit_id":"c00e32b8e4c70c86eb4708ebd1cf9eff3f270c57"},{"author":{"_account_id":28619,"name":"Dmitriy Rabotyagov","email":"noonedeadpunk@gmail.com","username":"noonedeadpunk"},"change_message_id":"7a3a91c12e7f49d2944594764e2a9853c9947ffd","unresolved":false,"context_lines":[{"line_number":139,"context_line":"  higher efforts to maintain the documentation in the long run."},{"line_number":140,"context_line":"* Allow to easily migrate instances between AZs, but that may be tricky to"},{"line_number":141,"context_line":"  support for some scenarios, like when ``cross_az_attach`` is set to"},{"line_number":142,"context_line":"  False and storage is not shared across AZs."},{"line_number":143,"context_line":""},{"line_number":144,"context_line":""},{"line_number":145,"context_line":"Data model impact"}],"source_content_type":"text/x-rst","patch_set":8,"id":"f6ff56e6_c2680af4","line":142,"in_reply_to":"b3ad72e4_b8d28318","updated":"2025-11-27 11:49:37.000000000","message":"Yes, that is correct, and the idea is to have the weight to score based on amount of VMs in the group in the same AZ.\n\nIt can probably need to helper methods, but yes, idea is like you\u0027ve described it pretty much.","commit_id":"c00e32b8e4c70c86eb4708ebd1cf9eff3f270c57"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"0536b45e9a7f3de3938943880ab9d7e911a06ceb","unresolved":true,"context_lines":[{"line_number":84,"context_line":"We need to create two mappings inside the weight to rank all hypervisors at"},{"line_number":85,"context_line":"once:"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"* AZ to allocation candidates mapping, as all candidates inside the same AZ"},{"line_number":88,"context_line":"  should be weighted by the same amount. List of ``HostState`` objects is"},{"line_number":89,"context_line":"  passed to the ``BaseWeigher.weigh_objects``, and can get aggregate (and AZ)"},{"line_number":90,"context_line":"  data from ``HostState`` directly."}],"source_content_type":"text/x-rst","patch_set":11,"id":"20a37893_28232055","line":87,"range":{"start_line":87,"start_character":2,"end_line":87,"end_character":38},"updated":"2025-11-27 19:12:10.000000000","message":"this shoudl be az to host or hsot states since we can have many allcoation candiates for the same host (the allcoation candiates are in the host state obejct)\nso in this case you want to weigh the host not the candiates.","commit_id":"872d04d552dba41d1d2101272aaae46ee5f8e536"},{"author":{"_account_id":28619,"name":"Dmitriy Rabotyagov","email":"noonedeadpunk@gmail.com","username":"noonedeadpunk"},"change_message_id":"00c234b46c7afc6d728ff619fcc04d5cc50f7b41","unresolved":false,"context_lines":[{"line_number":84,"context_line":"We need to create two mappings inside the weight to rank all hypervisors at"},{"line_number":85,"context_line":"once:"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"* AZ to allocation candidates mapping, as all candidates inside the same AZ"},{"line_number":88,"context_line":"  should be weighted by the same amount. List of ``HostState`` objects is"},{"line_number":89,"context_line":"  passed to the ``BaseWeigher.weigh_objects``, and can get aggregate (and AZ)"},{"line_number":90,"context_line":"  data from ``HostState`` directly."}],"source_content_type":"text/x-rst","patch_set":11,"id":"a88395bf_c5fdf86b","line":87,"range":{"start_line":87,"start_character":2,"end_line":87,"end_character":38},"in_reply_to":"20a37893_28232055","updated":"2025-12-01 12:20:46.000000000","message":"Done","commit_id":"872d04d552dba41d1d2101272aaae46ee5f8e536"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"ac413281d1e83b3418cf156e9978c269af2dd0a9","unresolved":true,"context_lines":[{"line_number":38,"context_line":"A common usage of Availability Zones is to model physically isolated set of"},{"line_number":39,"context_line":"hardware, such as different datacenter rooms with isolated power/data/fire"},{"line_number":40,"context_line":"control or even different datacenters with a relatively low latency such that"},{"line_number":41,"context_line":"it makes sense to model it as a single cloud region (fault domain)."},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"While Availability Zones functionality in OpenStack was never designed to"},{"line_number":44,"context_line":"represent failure domains and were designed for solving other use-cases,"}],"source_content_type":"text/x-rst","patch_set":12,"id":"e4447afa_48b12bff","line":41,"updated":"2025-12-01 15:43:11.000000000","message":"just to be clear, while that is usually the common usage for public clouds, other environments could use AZs for other cases, eg. end-user ask for different groups of nodes (like aggregates) even if those nodes are not isolated.","commit_id":"724dcd8b5facfe8e6133786d95eae2966e42b890"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"6cc20d65aaf71bf5ad906d0626b3b9e9d2995164","unresolved":true,"context_lines":[{"line_number":38,"context_line":"A common usage of Availability Zones is to model physically isolated set of"},{"line_number":39,"context_line":"hardware, such as different datacenter rooms with isolated power/data/fire"},{"line_number":40,"context_line":"control or even different datacenters with a relatively low latency such that"},{"line_number":41,"context_line":"it makes sense to model it as a single cloud region (fault domain)."},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"While Availability Zones functionality in OpenStack was never designed to"},{"line_number":44,"context_line":"represent failure domains and were designed for solving other use-cases,"}],"source_content_type":"text/x-rst","patch_set":12,"id":"ed3f8ca3_765bdc01","line":41,"in_reply_to":"3682644a_2e54e3c5","updated":"2026-01-21 15:57:06.000000000","message":"Just to add on to or clarify this... AZs can be used for physically isolated nodes as this spec says (and the name implies), but they are also _very_ often used for user-selectable destination groups that have nothing to do with availability. Quite often it could be  combination of both, and the user infers geo spread or other attributes by the name.\n\nPoint being, if I have four AZs in nova, two of which are at site 1 and two of which are site 2, each with a \"high performance\" and \"low performance\" grouping (just an example) exposed as an AZ, this weigher will do the wrong thing. I may very well use this, expecting to have two instances landing on different _actual_ availability zones, but since nova knows nothing about this, it may land both of them in the same site in the two AZs that are separate, but have no actual availability difference between each other.","commit_id":"724dcd8b5facfe8e6133786d95eae2966e42b890"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"057d6a6ddf029e5c310632165ef89e49b0a1171b","unresolved":true,"context_lines":[{"line_number":38,"context_line":"A common usage of Availability Zones is to model physically isolated set of"},{"line_number":39,"context_line":"hardware, such as different datacenter rooms with isolated power/data/fire"},{"line_number":40,"context_line":"control or even different datacenters with a relatively low latency such that"},{"line_number":41,"context_line":"it makes sense to model it as a single cloud region (fault domain)."},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"While Availability Zones functionality in OpenStack was never designed to"},{"line_number":44,"context_line":"represent failure domains and were designed for solving other use-cases,"}],"source_content_type":"text/x-rst","patch_set":12,"id":"3682644a_2e54e3c5","line":41,"in_reply_to":"e4447afa_48b12bff","updated":"2025-12-01 16:20:28.000000000","message":"yep imention this is ofthe used for hardware generation or other usages that are not fault to mains.\n\n\nthe closet thing to a fault domain in openstack is a keystoen region.\n\nthat is the equvlenet of aws east-1 vs west-1 not an AZ","commit_id":"724dcd8b5facfe8e6133786d95eae2966e42b890"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"ac413281d1e83b3418cf156e9978c269af2dd0a9","unresolved":false,"context_lines":[{"line_number":43,"context_line":"While Availability Zones functionality in OpenStack was never designed to"},{"line_number":44,"context_line":"represent failure domains and were designed for solving other use-cases,"},{"line_number":45,"context_line":"operators still may use them as a convenient abstraction model for"},{"line_number":46,"context_line":"representing resource separation to end users."},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"With smart design and architecture underneath, AZs still can be used to"},{"line_number":49,"context_line":"provide different SLAs depending on conditions and underlying providers."}],"source_content_type":"text/x-rst","patch_set":12,"id":"81d04480_085e9c4a","line":46,"updated":"2025-12-01 15:43:11.000000000","message":"correct","commit_id":"724dcd8b5facfe8e6133786d95eae2966e42b890"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"ac413281d1e83b3418cf156e9978c269af2dd0a9","unresolved":true,"context_lines":[{"line_number":50,"context_line":""},{"line_number":51,"context_line":"As a result such design can potentially provide higher resilience for some"},{"line_number":52,"context_line":"deployment components and reduce risk of outages for workloads running on"},{"line_number":53,"context_line":"OpenStack."},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"The following use-cases are attempted to be covered with the proposed change:"},{"line_number":56,"context_line":""}],"source_content_type":"text/x-rst","patch_set":12,"id":"8d7e1c4b_8143832b","line":53,"updated":"2025-12-01 15:43:11.000000000","message":"honestly, I don\u0027t think we need explain what AZs are used in this section, hence we could just remove all of the above, but meh.","commit_id":"724dcd8b5facfe8e6133786d95eae2966e42b890"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"057d6a6ddf029e5c310632165ef89e49b0a1171b","unresolved":true,"context_lines":[{"line_number":50,"context_line":""},{"line_number":51,"context_line":"As a result such design can potentially provide higher resilience for some"},{"line_number":52,"context_line":"deployment components and reduce risk of outages for workloads running on"},{"line_number":53,"context_line":"OpenStack."},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"The following use-cases are attempted to be covered with the proposed change:"},{"line_number":56,"context_line":""}],"source_content_type":"text/x-rst","patch_set":12,"id":"c797e2f6_ce0cdab3","line":53,"in_reply_to":"8d7e1c4b_8143832b","updated":"2025-12-01 16:20:28.000000000","message":"we coudl just remove liens 48-53\n\ni would proably move lines 38-46 to the previous section as\nthat is context information, its not a use case.","commit_id":"724dcd8b5facfe8e6133786d95eae2966e42b890"},{"author":{"_account_id":28619,"name":"Dmitriy Rabotyagov","email":"noonedeadpunk@gmail.com","username":"noonedeadpunk"},"change_message_id":"125a6a3e434fee26ffd74337cb501277f58a013a","unresolved":false,"context_lines":[{"line_number":50,"context_line":""},{"line_number":51,"context_line":"As a result such design can potentially provide higher resilience for some"},{"line_number":52,"context_line":"deployment components and reduce risk of outages for workloads running on"},{"line_number":53,"context_line":"OpenStack."},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"The following use-cases are attempted to be covered with the proposed change:"},{"line_number":56,"context_line":""}],"source_content_type":"text/x-rst","patch_set":12,"id":"ffac9d20_ec5ebc7c","line":53,"in_reply_to":"c797e2f6_ce0cdab3","updated":"2025-12-08 16:17:14.000000000","message":"Done","commit_id":"724dcd8b5facfe8e6133786d95eae2966e42b890"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"ac413281d1e83b3418cf156e9978c269af2dd0a9","unresolved":false,"context_lines":[{"line_number":55,"context_line":"The following use-cases are attempted to be covered with the proposed change:"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"* As a user, I want to be able to create multiple VMs in a different AZs with"},{"line_number":58,"context_line":"  a single API request."},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"* As a tool/service maintainer, I want to have an API-oriented way to attempt"},{"line_number":61,"context_line":"  distributing workload between multiple AZs, without a need to re-implement"}],"source_content_type":"text/x-rst","patch_set":12,"id":"9b3aa30e_6ffec493","line":58,"updated":"2025-12-01 15:43:11.000000000","message":"++","commit_id":"724dcd8b5facfe8e6133786d95eae2966e42b890"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"ac413281d1e83b3418cf156e9978c269af2dd0a9","unresolved":false,"context_lines":[{"line_number":59,"context_line":""},{"line_number":60,"context_line":"* As a tool/service maintainer, I want to have an API-oriented way to attempt"},{"line_number":61,"context_line":"  distributing workload between multiple AZs, without a need to re-implement"},{"line_number":62,"context_line":"  scheduling internally."},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"Proposed change"},{"line_number":65,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":12,"id":"aef9fdb1_63b1af9e","line":62,"updated":"2025-12-01 15:43:11.000000000","message":"++","commit_id":"724dcd8b5facfe8e6133786d95eae2966e42b890"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"ac413281d1e83b3418cf156e9978c269af2dd0a9","unresolved":true,"context_lines":[{"line_number":153,"context_line":""},{"line_number":154,"context_line":"* Add a new server group rule ``max_server_per_az`` to define a maximum amount"},{"line_number":155,"context_line":"  of servers that can be created per Availability Zone."},{"line_number":156,"context_line":""},{"line_number":157,"context_line":""},{"line_number":158,"context_line":"Security impact"},{"line_number":159,"context_line":"---------------"}],"source_content_type":"text/x-rst","patch_set":12,"id":"b08538bb_12443884","line":156,"updated":"2025-12-01 15:43:11.000000000","message":"what if a user is passing a --availability-zone parameter when calling openstack server create with a \"--hint group\" parameter as well ? Shouldn\u0027t we return a HTTP409 Conflict exception ?","commit_id":"724dcd8b5facfe8e6133786d95eae2966e42b890"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"4892077da6ee003d4c8de1ba93825c773f647cc4","unresolved":true,"context_lines":[{"line_number":153,"context_line":""},{"line_number":154,"context_line":"* Add a new server group rule ``max_server_per_az`` to define a maximum amount"},{"line_number":155,"context_line":"  of servers that can be created per Availability Zone."},{"line_number":156,"context_line":""},{"line_number":157,"context_line":""},{"line_number":158,"context_line":"Security impact"},{"line_number":159,"context_line":"---------------"}],"source_content_type":"text/x-rst","patch_set":12,"id":"4ee30427_77f15fbc","line":156,"in_reply_to":"1bc10e34_0c05f719","updated":"2025-12-01 17:37:07.000000000","message":"There\u0027s also a conflict with `default_schedule_group` which the spec mentions will just be ignored if the group policy is set to this. To me, this has a lot of tentacles into things like the --az conflict, etc. I\u0027m really struggling to see the cost vs. benefit here.","commit_id":"724dcd8b5facfe8e6133786d95eae2966e42b890"},{"author":{"_account_id":28619,"name":"Dmitriy Rabotyagov","email":"noonedeadpunk@gmail.com","username":"noonedeadpunk"},"change_message_id":"125a6a3e434fee26ffd74337cb501277f58a013a","unresolved":true,"context_lines":[{"line_number":153,"context_line":""},{"line_number":154,"context_line":"* Add a new server group rule ``max_server_per_az`` to define a maximum amount"},{"line_number":155,"context_line":"  of servers that can be created per Availability Zone."},{"line_number":156,"context_line":""},{"line_number":157,"context_line":""},{"line_number":158,"context_line":"Security impact"},{"line_number":159,"context_line":"---------------"}],"source_content_type":"text/x-rst","patch_set":12,"id":"1b43569c_685cac7f","line":156,"in_reply_to":"4ee30427_77f15fbc","updated":"2025-12-08 16:17:14.000000000","message":"I am fine to do either way, tbh. I think I\u0027d leave to scheduler to decide, but not against adding exception to the spec/implementation if there is consensus it\u0027s better.","commit_id":"724dcd8b5facfe8e6133786d95eae2966e42b890"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"057d6a6ddf029e5c310632165ef89e49b0a1171b","unresolved":true,"context_lines":[{"line_number":153,"context_line":""},{"line_number":154,"context_line":"* Add a new server group rule ``max_server_per_az`` to define a maximum amount"},{"line_number":155,"context_line":"  of servers that can be created per Availability Zone."},{"line_number":156,"context_line":""},{"line_number":157,"context_line":""},{"line_number":158,"context_line":"Security impact"},{"line_number":159,"context_line":"---------------"}],"source_content_type":"text/x-rst","patch_set":12,"id":"1bc10e34_0c05f719","line":156,"in_reply_to":"b08538bb_12443884","updated":"2025-12-01 16:20:28.000000000","message":"we do not need too for the mvp but i think that would be an ok check to add.\n\nit woudl return a 409 in the api really early\n\n\nthe only reason i hesitate is is if the AZ would not cause an acutal conflict then it may be ok to just let the scdhuer determin that later but in general i agree that this new server group policy shoudl really only be used with instnace that are not pinned to an az.\n\nso im ok with either adding this restriction or choosing not too and leaving it to the scheduler as currently proposed.\n\nthe feature can logicly stil work in either case so i see this more as a signal for intened usage rather then correctness.","commit_id":"724dcd8b5facfe8e6133786d95eae2966e42b890"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"6cc20d65aaf71bf5ad906d0626b3b9e9d2995164","unresolved":true,"context_lines":[{"line_number":126,"context_line":"  higher efforts to maintain the documentation in the long run."},{"line_number":127,"context_line":"* Allow to easily migrate instances between AZs, but that may be tricky to"},{"line_number":128,"context_line":"  support for some scenarios, like when ``cross_az_attach`` is set to"},{"line_number":129,"context_line":"  False and storage is not shared across AZs."},{"line_number":130,"context_line":""},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"Data model impact"}],"source_content_type":"text/x-rst","patch_set":13,"id":"a8d19ce5_3325050a","line":129,"updated":"2026-01-21 15:57:06.000000000","message":"I\u0027m not sure how this third case is a solution to your actual use-case, but we\u0027ve already identified it as a thing we should do at some point.\n\nIf you\u0027re manually choosing AZs, you can make sure you have the anti-affinity spread you need. It does mean you may change your mind later and want a way to do that, which I\u0027m definitely in favor of.","commit_id":"6e8a634a8292056b242e4864c3bc4c00b56f0747"}]}
