)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":16207,"name":"ribaudr","display_name":"uggla","email":"rene.ribaud@gmail.com","username":"uggla","status":"Red Hat"},"change_message_id":"d3a8e3d4c52336cc0b996227acc9989ba84ac194","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":1,"id":"8c7c2ad8_6458ff3a","updated":"2023-06-21 14:13:21.000000000","message":"Should we not add also a couple of functional tests to ensure this filter is working as expected ?\nIf I understand well, on a 2 nodes configuration setting the filter to -1, starting 1 instance on the first node, the second instance should go to the second one.\nSetting the filter to 1000, should start the second instance on the same node as the first one.","commit_id":"271b441bbc9f1f7306653cdf32fac0c1fe552dd7"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"3c9e85da2697e05fe1268dae0fa792b966885b6f","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"b8c3a5f7_89d53e3c","updated":"2023-06-22 09:12:11.000000000","message":"recheck bug 2024160","commit_id":"271b441bbc9f1f7306653cdf32fac0c1fe552dd7"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"347664681595b0cabb84195ecd8bc58eb9e5dbde","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"2c2da4ac_a4915e60","updated":"2023-06-20 09:51:28.000000000","message":"recheck neutron live-migration port trunk failed","commit_id":"271b441bbc9f1f7306653cdf32fac0c1fe552dd7"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"2acf81d514a6eb1edbed4193c6170d6db8f2a1f0","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":1,"id":"9e0a9161_69852047","in_reply_to":"8c7c2ad8_6458ff3a","updated":"2023-06-22 09:34:51.000000000","message":"\u003e Should we not add also a couple of functional tests to ensure this filter is working as expected ?\n\nI could work on this, but we already have UTs that verify the weigh :\nhttps://review.opendev.org/c/openstack/nova/+/886232/1/nova/tests/unit/scheduler/weights/test_weights_num_instances.py\n\n\u003e If I understand well, on a 2 nodes configuration setting the filter to -1, starting 1 instance on the first node, the second instance should go to the second one.\n\nNo, you were confused due to my wrong explanation on the weigher comments, which is different from the config and the relnote, which are correct.\n\n\u003e Setting the filter to 1000, should start the second instance on the same node as the first one.\n\nLemme explain it more : we calculate by this way : num_instances * weigh_multiplier and then we normalize the number between all the hosts in between 0.0 and 1.0 :\nhttps://github.com/openstack/nova/blob/f6620d48c86fb1c5034c09da6411ea46b4d9c2ed/nova/weights.py#L30-L56\n\nIf hostA has 2 instances, its value would be -2 with the default multiplier.\nIf hostB has 5 instances, its value would be -5.\nIf hostC has 10 instances, its value becomes -10.\n\nThen, we normalize in between 0.0 and 1.0. With the normalize formula, we have the normalized weights :\n\n{\u0027hostA\u0027 : 1.0, \u0027hostB\u0027 : 0.625, \u0027hostC\u0027 : 0.0}\n\nwhere the formula is :\n\n    range_ \u003d maxval - minval\n    return ((i - minval) / range_ for i in weight_list)\n\nAs you maybe don\u0027t know, the higher normalized weight wins, so \u0027hostA\u0027 wins.\nYou can see that we sort the list above by reversing it here :\nhttps://github.com/openstack/nova/blob/f6620d48c86fb1c5034c09da6411ea46b4d9c2ed/nova/weights.py#L172\n\nAnyway, I\u0027ll modify the docstrings of the weigher which are confusing.","commit_id":"271b441bbc9f1f7306653cdf32fac0c1fe552dd7"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"7e26e50c03806689c022a1b382c5d86c8bb978cb","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":1,"id":"b9696336_28f16762","in_reply_to":"9e0a9161_69852047","updated":"2023-06-22 10:27:59.000000000","message":"Actually, nevermind my previous explanation, I was wrong but the result is the same : we normalize the weights *before* we use the multiplier so the normalized values in my example would be :\n\n{\u0027hostA\u0027 : 0.0, \u0027hostB\u0027 : 0.375, \u0027hostC\u0027 : 1.0}\n\nAfter we use the multiplier, the values become :\n\n{\u0027hostA\u0027 : 0.0, \u0027hostB\u0027 : -0.375, \u0027hostC\u0027 : -1.0}\n\nand then, given we sort out the list by reversing it, that\u0027s still the same, hostA wins (as 0.0 is above -1.0 and -0.375)\n\nProof with the UTs and the logs :\n\n```\n2023-06-22 12:19:59,860 DEBUG [nova.weights] NumInstancesWeigher: raw weights {(\u0027host1\u0027, \u0027node1\u0027): 2, (\u0027host2\u0027, \u0027node2\u0027): 5, (\u0027host3\u0027, \u0027node3\u0027): 4, (\u0027host4\u0027, \u0027node4\u0027): 10}\n2023-06-22 12:19:59,861 DEBUG [nova.weights] NumInstancesWeigher: normalized weights {(\u0027host1\u0027, \u0027node1\u0027): 0.0, (\u0027host2\u0027, \u0027node2\u0027): 0.375, (\u0027host3\u0027, \u0027node3\u0027): 0.25, (\u0027host4\u0027, \u0027node4\u0027): 1.0}\n2023-06-22 12:19:59,861 DEBUG [nova.weights] NumInstancesWeigher: score (multiplier * weight) {(\u0027host1\u0027, \u0027node1\u0027): \u0027-1.0 * 0.0\u0027, (\u0027host2\u0027, \u0027node2\u0027): \u0027-1.0 * 0.375\u0027, (\u0027host3\u0027, \u0027node3\u0027): \u0027-1.0 * 0.25\u0027, (\u0027host4\u0027, \u0027node4\u0027): \u0027-1.0 * 1.0\u0027}\n```","commit_id":"271b441bbc9f1f7306653cdf32fac0c1fe552dd7"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"1e7adee2377d679a66057d6342826068573ff258","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"96f7dced_865d62d2","updated":"2023-06-27 17:10:40.000000000","message":"A couple comments. I haven\u0027t seriously reviewed the code, but comments on the upgrade strategy and the negative/positive argument.","commit_id":"e77ffd1ae664bdb0a16bf238afc05f87d2cd657f"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"a76f1b198f85acaf4e2a2324ad11578c300cf925","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"aa86e008_50ad03b7","updated":"2023-06-28 14:41:29.000000000","message":"A quick +1 Dan\u0027s idea to default this to 0, i.e. off.","commit_id":"e77ffd1ae664bdb0a16bf238afc05f87d2cd657f"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"e17cb1da78543b185c128d31fa4dd77dae61d6cf","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"e01e0fcb_bf6e7ca6","updated":"2023-07-21 13:56:00.000000000","message":"Proxying Sean\u0027s +2 on here since it was just typo fixes.","commit_id":"ca3fbb4d1595011e87b011153942c8b204971389"},{"author":{"_account_id":34860,"name":"Amit Uniyal","email":"auniyal@redhat.com","username":"auniyal"},"change_message_id":"c5cf087b49f0ed58bf47d4bd99c9b3864afe6b4a","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"343b442a_30deee8f","updated":"2023-07-25 14:34:50.000000000","message":"few typos in docs and not in main code, lgtm.","commit_id":"ca3fbb4d1595011e87b011153942c8b204971389"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"6d96a4bc5e8d0e21d1ea07a6c3e91cdef1dfb5aa","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"65abb6e6_82378657","updated":"2023-07-31 07:40:00.000000000","message":"recheck again volume fsck issue","commit_id":"ca3fbb4d1595011e87b011153942c8b204971389"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"64da760942eefa3f4b1bc417c80fb2df8f77c639","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"6588bc9b_c825e497","updated":"2023-08-30 14:15:16.000000000","message":"recheck docs post failure, clearly unrelated","commit_id":"ca3fbb4d1595011e87b011153942c8b204971389"},{"author":{"_account_id":34860,"name":"Amit Uniyal","email":"auniyal@redhat.com","username":"auniyal"},"change_message_id":"1d2b83568027a9e4c47131716f5e6aff5a53465a","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"cbafc1b0_c39530ce","updated":"2023-08-18 03:37:55.000000000","message":"recheck gate is in better shape now also unrelated fail","commit_id":"ca3fbb4d1595011e87b011153942c8b204971389"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"b0b7968999b311d9723027324bc1820b68706873","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"89d89e5f_c5c2837f","updated":"2023-08-30 09:05:58.000000000","message":"recheck most jobs were failing to a virtualenv creation AttributeError, but after looking at all the Zuul builds, looks like it was a transient issue.","commit_id":"ca3fbb4d1595011e87b011153942c8b204971389"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"922d161b330a0fc5a6d83ef379e65594c377bdc8","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"c4220680_ca3207c2","updated":"2023-07-28 10:13:54.000000000","message":"recheck nova-ceph-multistore again same problem...","commit_id":"ca3fbb4d1595011e87b011153942c8b204971389"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"3ab117f80d10a0aa512396b65c3248684ccfd024","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"12c9b5fd_269ff71d","updated":"2023-07-27 16:52:07.000000000","message":"recheck nova-multi-cell is mean to me with this f*** mkfs call :\n\n[   10.975097] virtio_blk virtio2: [vda] 2097152 512-byte logical blocks (1.07 GB/1.00 GiB)\n[   11.016818] GPT:Primary header thinks Alt. header is not at the end of the disk.\n[   11.017383] GPT:229375 !\u003d 2097151\n[   11.017645] GPT:Alternate GPT header not at the end of the disk.\n[   11.017970] GPT:229375 !\u003d 2097151\n[   11.018212] GPT: Use GNU Parted to correct GPT errors.\n[   11.034401] virtio_blk virtio3: [vdb] 2097152 512-byte logical blocks (1.07 GB/1.00 GiB)\n[   11.718741] virtio_gpu virtio0: [drm] drm_plane_enable_fb_damage_clips() not called\n[   11.843891] random: crng init done","commit_id":"ca3fbb4d1595011e87b011153942c8b204971389"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"47e6445101576312375105f42bb26e17605701bb","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"ff410adb_f1a97870","updated":"2023-07-24 14:25:56.000000000","message":"recheck nova-next gives me serious headache with ssh request timeout on volume detach","commit_id":"ca3fbb4d1595011e87b011153942c8b204971389"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"712791fc06f7e8b5fe371d8cdca016e5fceb6c2a","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"e7c59904_e4a83783","updated":"2023-07-30 06:28:19.000000000","message":"recheck timeout","commit_id":"ca3fbb4d1595011e87b011153942c8b204971389"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"5fc325652a21cb9d559953d8670679669f2bd813","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"152f7940_371ee31a","updated":"2023-08-29 08:33:36.000000000","message":"recheck timeout on new scopes job","commit_id":"ca3fbb4d1595011e87b011153942c8b204971389"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"6cc3ccfbec328b37b49d434af50488447b7f4e6c","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"d0662616_b61f82e8","updated":"2023-08-29 15:51:27.000000000","message":"recheck volume detach test failed again due to probably some fsck","commit_id":"ca3fbb4d1595011e87b011153942c8b204971389"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"64a5d3d13a774f40d2513517b80e5f46c8b4d15f","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"9841e381_31cf49cb","updated":"2023-07-25 08:28:52.000000000","message":"recheck volume detach timeout again on nova-next with the same kind of console output error :\n\n\n[    8.878083] virtio_blk virtio2: [vda] 2097152 512-byte logical blocks (1.07 GB/1.00 GiB)\n[    8.915947] GPT:Primary header thinks Alt. header is not at the end of the disk.\n[    8.916750] GPT:229375 !\u003d 2097151\n[    8.917112] GPT:Alternate GPT header not at the end of the disk.\n[    8.917647] GPT:229375 !\u003d 2097151\n[    8.918013] GPT: Use GNU Parted to correct GPT errors.\n[    9.585562] virtio_gpu virtio0: [drm] drm_plane_enable_fb_damage_clips() not called\n[    9.709937] random: crng init done\n[   11.100396] scsi 0:0:0:0: CD-ROM            QEMU     QEMU DVD-ROM     2.5+ PQ: 0 ANSI: 5\n[   11.147583] sr 0:0:0:0: Attached scsi generic sg0 type 5","commit_id":"ca3fbb4d1595011e87b011153942c8b204971389"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"982385ba91dff370fa07168425b0ccbf09566d41","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"9708d9b4_b8c41721","updated":"2023-08-29 13:39:48.000000000","message":"recheck volume test failed","commit_id":"ca3fbb4d1595011e87b011153942c8b204971389"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"54e1c6e337a9c57f715fcf206d530f70870c9ce2","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"b932ed5e_c76335fe","in_reply_to":"89d89e5f_c5c2837f","updated":"2023-08-30 12:49:50.000000000","message":"yes you were hit by https://github.com/tox-dev/pyproject-api/issues/101","commit_id":"ca3fbb4d1595011e87b011153942c8b204971389"}],"doc/source/admin/scheduling.rst":[{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"eed87abc73c1dce7b74b88db44e1bf191b3ff308","unresolved":true,"context_lines":[{"line_number":1088,"context_line":".. versionadded:: 28.0.0 (Bobcat)"},{"line_number":1089,"context_line":""},{"line_number":1090,"context_line":"This weigher compares hosts and orders them based on their number of instances"},{"line_number":1091,"context_line":"respectively. By default the weigher will follow a spread strategy that will"},{"line_number":1092,"context_line":"favor hosts with the lesser number of instances (default being -1.0) but you"},{"line_number":1093,"context_line":"can change its behaviour by modifiying the value of"},{"line_number":1094,"context_line":":oslo.config:option:`filter_scheduler.num_instances_weight_multiplier`."},{"line_number":1095,"context_line":"A positive value will favor hosts with a maximum number of instances (packing"}],"source_content_type":"text/x-rst","patch_set":2,"id":"aa84d8ea_a76951da","line":1092,"range":{"start_line":1091,"start_character":13,"end_line":1092,"end_character":68},"updated":"2023-06-22 18:42:52.000000000","message":"i agree on spreading by default but this should not be -1.0 multiplire\n\nwe spread by default in our CPU/RAM/DISK weghers and use a positive mulitplere.\n\nso we shoudl modify the werigher so that positive continus to means spread and negitive multiplers mean packing.","commit_id":"e77ffd1ae664bdb0a16bf238afc05f87d2cd657f"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"b62a3408ed268474b1590c26862d3601d13c0926","unresolved":false,"context_lines":[{"line_number":1088,"context_line":".. versionadded:: 28.0.0 (Bobcat)"},{"line_number":1089,"context_line":""},{"line_number":1090,"context_line":"This weigher compares hosts and orders them based on their number of instances"},{"line_number":1091,"context_line":"respectively. By default the weigher will follow a spread strategy that will"},{"line_number":1092,"context_line":"favor hosts with the lesser number of instances (default being -1.0) but you"},{"line_number":1093,"context_line":"can change its behaviour by modifiying the value of"},{"line_number":1094,"context_line":":oslo.config:option:`filter_scheduler.num_instances_weight_multiplier`."},{"line_number":1095,"context_line":"A positive value will favor hosts with a maximum number of instances (packing"}],"source_content_type":"text/x-rst","patch_set":2,"id":"d5fc0ef4_cd1a10c1","line":1092,"range":{"start_line":1091,"start_character":13,"end_line":1092,"end_character":68},"in_reply_to":"1e0e460d_f9c25bbe","updated":"2023-07-21 12:59:06.000000000","message":"Ack","commit_id":"e77ffd1ae664bdb0a16bf238afc05f87d2cd657f"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"b2084a57688c5a7856d5a5d2ca32d2b252576f45","unresolved":false,"context_lines":[{"line_number":1088,"context_line":".. versionadded:: 28.0.0 (Bobcat)"},{"line_number":1089,"context_line":""},{"line_number":1090,"context_line":"This weigher compares hosts and orders them based on their number of instances"},{"line_number":1091,"context_line":"respectively. By default the weigher will follow a spread strategy that will"},{"line_number":1092,"context_line":"favor hosts with the lesser number of instances (default being -1.0) but you"},{"line_number":1093,"context_line":"can change its behaviour by modifiying the value of"},{"line_number":1094,"context_line":":oslo.config:option:`filter_scheduler.num_instances_weight_multiplier`."},{"line_number":1095,"context_line":"A positive value will favor hosts with a maximum number of instances (packing"}],"source_content_type":"text/x-rst","patch_set":2,"id":"f4ca8ee1_f8e9f8ac","line":1092,"range":{"start_line":1091,"start_character":13,"end_line":1092,"end_character":68},"in_reply_to":"1e0e460d_f9c25bbe","updated":"2023-07-21 13:43:02.000000000","message":"Ack","commit_id":"e77ffd1ae664bdb0a16bf238afc05f87d2cd657f"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"495f9b88404729b4205e35b0bc59dc89a20b18a2","unresolved":true,"context_lines":[{"line_number":1088,"context_line":".. versionadded:: 28.0.0 (Bobcat)"},{"line_number":1089,"context_line":""},{"line_number":1090,"context_line":"This weigher compares hosts and orders them based on their number of instances"},{"line_number":1091,"context_line":"respectively. By default the weigher will follow a spread strategy that will"},{"line_number":1092,"context_line":"favor hosts with the lesser number of instances (default being -1.0) but you"},{"line_number":1093,"context_line":"can change its behaviour by modifiying the value of"},{"line_number":1094,"context_line":":oslo.config:option:`filter_scheduler.num_instances_weight_multiplier`."},{"line_number":1095,"context_line":"A positive value will favor hosts with a maximum number of instances (packing"}],"source_content_type":"text/x-rst","patch_set":2,"id":"83d25596_8afb8590","line":1092,"range":{"start_line":1091,"start_character":13,"end_line":1092,"end_character":68},"in_reply_to":"31f86a98_eb24120e","updated":"2023-06-23 14:24:23.000000000","message":"Yeah, but in general, the maximum is depending on the host capacity...","commit_id":"e77ffd1ae664bdb0a16bf238afc05f87d2cd657f"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"acbada409c07359cdc8d8a52d1dcf8ee78b16dc2","unresolved":true,"context_lines":[{"line_number":1088,"context_line":".. versionadded:: 28.0.0 (Bobcat)"},{"line_number":1089,"context_line":""},{"line_number":1090,"context_line":"This weigher compares hosts and orders them based on their number of instances"},{"line_number":1091,"context_line":"respectively. By default the weigher will follow a spread strategy that will"},{"line_number":1092,"context_line":"favor hosts with the lesser number of instances (default being -1.0) but you"},{"line_number":1093,"context_line":"can change its behaviour by modifiying the value of"},{"line_number":1094,"context_line":":oslo.config:option:`filter_scheduler.num_instances_weight_multiplier`."},{"line_number":1095,"context_line":"A positive value will favor hosts with a maximum number of instances (packing"}],"source_content_type":"text/x-rst","patch_set":2,"id":"31f86a98_eb24120e","line":1092,"range":{"start_line":1091,"start_character":13,"end_line":1092,"end_character":68},"in_reply_to":"63d39b66_fe2f8bac","updated":"2023-06-23 10:53:42.000000000","message":"its defaulted to 50 so there is always a limit as there is a min vlaude of 1\nhttps://docs.openstack.org/nova/latest/configuration/config.html#filter_scheduler.max_instances_per_host","commit_id":"e77ffd1ae664bdb0a16bf238afc05f87d2cd657f"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"1e7adee2377d679a66057d6342826068573ff258","unresolved":true,"context_lines":[{"line_number":1088,"context_line":".. versionadded:: 28.0.0 (Bobcat)"},{"line_number":1089,"context_line":""},{"line_number":1090,"context_line":"This weigher compares hosts and orders them based on their number of instances"},{"line_number":1091,"context_line":"respectively. By default the weigher will follow a spread strategy that will"},{"line_number":1092,"context_line":"favor hosts with the lesser number of instances (default being -1.0) but you"},{"line_number":1093,"context_line":"can change its behaviour by modifiying the value of"},{"line_number":1094,"context_line":":oslo.config:option:`filter_scheduler.num_instances_weight_multiplier`."},{"line_number":1095,"context_line":"A positive value will favor hosts with a maximum number of instances (packing"}],"source_content_type":"text/x-rst","patch_set":2,"id":"1e0e460d_f9c25bbe","line":1092,"range":{"start_line":1091,"start_character":13,"end_line":1092,"end_character":68},"in_reply_to":"83d25596_8afb8590","updated":"2023-06-27 17:10:40.000000000","message":"I think this looks identical to the IO ops weigher:\n\nhttps://docs.openstack.org/nova/latest/admin/scheduling.html#ioopsweigher\n\nDefaults to -1 which implies choosing hosts with fewer of the things in the name of the weigher (i.e. IO ops). Negative means \"don\u0027t prefer hosts with the $subject\", which is a spread. In the case here, we\u0027re spreading if we\u0027re preferring hosts with fewer of $subject, which is \"number of instances\". So I think the negative value makes sense (to me at least). Since you can\u0027t have \"free instances\" (like free RAM or VCPU) having this \"prefer free instance (slots)\" wouldn\u0027t make sense and/or would be more confusing (IMHO) to reason about. The same would go for iops, without some absolute upper bound on the number of iops a host can do.\n\nYes, we could report max_iops (with as much accuracy as that brings) and max_instances and calculate \"free iops\" (possible, but inaccurate) or \"free instance (slots)\" (only possible for people with that configured, but wrong for the *vast* majority). But, I don\u0027t think those are very useful. For not-tightly-bounded resources like this, I think \"not preferring\" things with higher counts of existing usage makes the most sense.","commit_id":"e77ffd1ae664bdb0a16bf238afc05f87d2cd657f"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"a8a092c00b587e76ec33c4ba556c8c6ea8d76b24","unresolved":true,"context_lines":[{"line_number":1088,"context_line":".. versionadded:: 28.0.0 (Bobcat)"},{"line_number":1089,"context_line":""},{"line_number":1090,"context_line":"This weigher compares hosts and orders them based on their number of instances"},{"line_number":1091,"context_line":"respectively. By default the weigher will follow a spread strategy that will"},{"line_number":1092,"context_line":"favor hosts with the lesser number of instances (default being -1.0) but you"},{"line_number":1093,"context_line":"can change its behaviour by modifiying the value of"},{"line_number":1094,"context_line":":oslo.config:option:`filter_scheduler.num_instances_weight_multiplier`."},{"line_number":1095,"context_line":"A positive value will favor hosts with a maximum number of instances (packing"}],"source_content_type":"text/x-rst","patch_set":2,"id":"63d39b66_fe2f8bac","line":1092,"range":{"start_line":1091,"start_character":13,"end_line":1092,"end_character":68},"in_reply_to":"aa84d8ea_a76951da","updated":"2023-06-23 09:07:51.000000000","message":"Sorry, but I wonder why we should ask the operator to provide a specific max_instances_per_host just for this weigher ?","commit_id":"e77ffd1ae664bdb0a16bf238afc05f87d2cd657f"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"e3804969186377cc3bb943da3453d5332d919fff","unresolved":true,"context_lines":[{"line_number":1091,"context_line":"respectively. By default the weigher is doing nothing but you"},{"line_number":1092,"context_line":"can change its behaviour by modifiying the value of"},{"line_number":1093,"context_line":":oslo.config:option:`filter_scheduler.num_instances_weight_multiplier`."},{"line_number":1094,"context_line":"A positive value will favor hosts with a maximum number of instances (packing"},{"line_number":1095,"context_line":"strategy) while a negative value will follow a spread strategy that will"},{"line_number":1096,"context_line":"favor hosts with the lesser number of instances."},{"line_number":1097,"context_line":""}],"source_content_type":"text/x-rst","patch_set":3,"id":"ff68e58b_0abf9b23","line":1094,"range":{"start_line":1094,"start_character":41,"end_line":1094,"end_character":48},"updated":"2023-07-21 13:41:16.000000000","message":"This should probably be \"larger\"","commit_id":"19957a58c4cc12d7763429b1dcd607c1d645667c"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"e98c496361b88956743abd2102dd009c7d3f4906","unresolved":false,"context_lines":[{"line_number":1091,"context_line":"respectively. By default the weigher is doing nothing but you"},{"line_number":1092,"context_line":"can change its behaviour by modifiying the value of"},{"line_number":1093,"context_line":":oslo.config:option:`filter_scheduler.num_instances_weight_multiplier`."},{"line_number":1094,"context_line":"A positive value will favor hosts with a maximum number of instances (packing"},{"line_number":1095,"context_line":"strategy) while a negative value will follow a spread strategy that will"},{"line_number":1096,"context_line":"favor hosts with the lesser number of instances."},{"line_number":1097,"context_line":""}],"source_content_type":"text/x-rst","patch_set":3,"id":"6ea73219_03b0347c","line":1094,"range":{"start_line":1094,"start_character":41,"end_line":1094,"end_character":48},"in_reply_to":"ff68e58b_0abf9b23","updated":"2023-07-21 13:50:28.000000000","message":"Ack","commit_id":"19957a58c4cc12d7763429b1dcd607c1d645667c"},{"author":{"_account_id":34860,"name":"Amit Uniyal","email":"auniyal@redhat.com","username":"auniyal"},"change_message_id":"c5cf087b49f0ed58bf47d4bd99c9b3864afe6b4a","unresolved":true,"context_lines":[{"line_number":1089,"context_line":""},{"line_number":1090,"context_line":"This weigher compares hosts and orders them based on their number of instances"},{"line_number":1091,"context_line":"respectively. By default the weigher is doing nothing but you"},{"line_number":1092,"context_line":"can change its behaviour by modifiying the value of"},{"line_number":1093,"context_line":":oslo.config:option:`filter_scheduler.num_instances_weight_multiplier`."},{"line_number":1094,"context_line":"A positive value will favor hosts with a larger number of instances (packing"},{"line_number":1095,"context_line":"strategy) while a negative value will follow a spread strategy that will"}],"source_content_type":"text/x-rst","patch_set":4,"id":"dbfbf1d8_8b686a22","line":1092,"range":{"start_line":1092,"start_character":28,"end_line":1092,"end_character":38},"updated":"2023-07-25 14:34:50.000000000","message":"modifying","commit_id":"ca3fbb4d1595011e87b011153942c8b204971389"}],"nova/conf/scheduler.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"e3804969186377cc3bb943da3453d5332d919fff","unresolved":true,"context_lines":[{"line_number":514,"context_line":""},{"line_number":515,"context_line":"The multiplier is used for weighting hosts based on the reported"},{"line_number":516,"context_line":"number of instances they have."},{"line_number":517,"context_line":"Negative numbers indicate preferring hosts with less instances (ie. choosing to"},{"line_number":518,"context_line":"spread instances), while positive numbers mean preferring hosts with more hosts"},{"line_number":519,"context_line":"(ie. choosing to pack)."},{"line_number":520,"context_line":"The default is 0.0 which means that you have to choose a strategy if you want"}],"source_content_type":"text/x-python","patch_set":3,"id":"c7610dcf_d9cf3ebf","line":517,"range":{"start_line":517,"start_character":48,"end_line":517,"end_character":52},"updated":"2023-07-21 13:41:16.000000000","message":"\"fewer\" (since they\u0027re countable)","commit_id":"19957a58c4cc12d7763429b1dcd607c1d645667c"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"e3804969186377cc3bb943da3453d5332d919fff","unresolved":true,"context_lines":[{"line_number":514,"context_line":""},{"line_number":515,"context_line":"The multiplier is used for weighting hosts based on the reported"},{"line_number":516,"context_line":"number of instances they have."},{"line_number":517,"context_line":"Negative numbers indicate preferring hosts with less instances (ie. choosing to"},{"line_number":518,"context_line":"spread instances), while positive numbers mean preferring hosts with more hosts"},{"line_number":519,"context_line":"(ie. choosing to pack)."},{"line_number":520,"context_line":"The default is 0.0 which means that you have to choose a strategy if you want"}],"source_content_type":"text/x-python","patch_set":3,"id":"88d8cee3_87b5e80c","line":517,"range":{"start_line":517,"start_character":64,"end_line":517,"end_character":66},"updated":"2023-07-21 13:41:16.000000000","message":"\"i.e.\"","commit_id":"19957a58c4cc12d7763429b1dcd607c1d645667c"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"e98c496361b88956743abd2102dd009c7d3f4906","unresolved":false,"context_lines":[{"line_number":514,"context_line":""},{"line_number":515,"context_line":"The multiplier is used for weighting hosts based on the reported"},{"line_number":516,"context_line":"number of instances they have."},{"line_number":517,"context_line":"Negative numbers indicate preferring hosts with less instances (ie. choosing to"},{"line_number":518,"context_line":"spread instances), while positive numbers mean preferring hosts with more hosts"},{"line_number":519,"context_line":"(ie. choosing to pack)."},{"line_number":520,"context_line":"The default is 0.0 which means that you have to choose a strategy if you want"}],"source_content_type":"text/x-python","patch_set":3,"id":"1b696936_8d2b57aa","line":517,"range":{"start_line":517,"start_character":64,"end_line":517,"end_character":66},"in_reply_to":"88d8cee3_87b5e80c","updated":"2023-07-21 13:50:28.000000000","message":"Ack","commit_id":"19957a58c4cc12d7763429b1dcd607c1d645667c"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"e98c496361b88956743abd2102dd009c7d3f4906","unresolved":false,"context_lines":[{"line_number":514,"context_line":""},{"line_number":515,"context_line":"The multiplier is used for weighting hosts based on the reported"},{"line_number":516,"context_line":"number of instances they have."},{"line_number":517,"context_line":"Negative numbers indicate preferring hosts with less instances (ie. choosing to"},{"line_number":518,"context_line":"spread instances), while positive numbers mean preferring hosts with more hosts"},{"line_number":519,"context_line":"(ie. choosing to pack)."},{"line_number":520,"context_line":"The default is 0.0 which means that you have to choose a strategy if you want"}],"source_content_type":"text/x-python","patch_set":3,"id":"12d80cda_862e7f2a","line":517,"range":{"start_line":517,"start_character":48,"end_line":517,"end_character":52},"in_reply_to":"c7610dcf_d9cf3ebf","updated":"2023-07-21 13:50:28.000000000","message":"Ack","commit_id":"19957a58c4cc12d7763429b1dcd607c1d645667c"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"e17cb1da78543b185c128d31fa4dd77dae61d6cf","unresolved":true,"context_lines":[{"line_number":516,"context_line":"number of instances they have."},{"line_number":517,"context_line":"Negative numbers indicate preferring hosts with fewer instances (i.e. choosing"},{"line_number":518,"context_line":"to spread instances), while positive numbers mean preferring hosts with more"},{"line_number":519,"context_line":"hosts (ie. choosing to pack)."},{"line_number":520,"context_line":"The default is 0.0 which means that you have to choose a strategy if you want"},{"line_number":521,"context_line":"to use it."},{"line_number":522,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"7382d9ef_f45ff68f","line":519,"range":{"start_line":519,"start_character":7,"end_line":519,"end_character":9},"updated":"2023-07-21 13:56:00.000000000","message":"Ah, missed this one :)","commit_id":"ca3fbb4d1595011e87b011153942c8b204971389"}],"nova/scheduler/weights/num_instances.py":[{"author":{"_account_id":16207,"name":"ribaudr","display_name":"uggla","email":"rene.ribaud@gmail.com","username":"uggla","status":"Red Hat"},"change_message_id":"d3a8e3d4c52336cc0b996227acc9989ba84ac194","unresolved":true,"context_lines":[{"line_number":14,"context_line":"Num instances Weigher. Weigh hosts by their number of instances."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"The default is to select hosts with less instances.  If you prefer"},{"line_number":17,"context_line":"to invert the behavior set the \u0027num_instances_weight_multiplier\u0027 option"},{"line_number":18,"context_line":"to a negative number and the weighing has the opposite effect of the default."},{"line_number":19,"context_line":"\"\"\""},{"line_number":20,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"bbd5172f_1a27f8ea","line":17,"range":{"start_line":17,"start_character":9,"end_line":17,"end_character":14},"updated":"2023-06-21 14:13:21.000000000","message":"this","commit_id":"271b441bbc9f1f7306653cdf32fac0c1fe552dd7"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"2acf81d514a6eb1edbed4193c6170d6db8f2a1f0","unresolved":false,"context_lines":[{"line_number":14,"context_line":"Num instances Weigher. Weigh hosts by their number of instances."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"The default is to select hosts with less instances.  If you prefer"},{"line_number":17,"context_line":"to invert the behavior set the \u0027num_instances_weight_multiplier\u0027 option"},{"line_number":18,"context_line":"to a negative number and the weighing has the opposite effect of the default."},{"line_number":19,"context_line":"\"\"\""},{"line_number":20,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"7c056b19_23c4fd92","line":17,"range":{"start_line":17,"start_character":9,"end_line":17,"end_character":14},"in_reply_to":"bbd5172f_1a27f8ea","updated":"2023-06-22 09:34:51.000000000","message":"Ack","commit_id":"271b441bbc9f1f7306653cdf32fac0c1fe552dd7"},{"author":{"_account_id":16207,"name":"ribaudr","display_name":"uggla","email":"rene.ribaud@gmail.com","username":"uggla","status":"Red Hat"},"change_message_id":"d3a8e3d4c52336cc0b996227acc9989ba84ac194","unresolved":true,"context_lines":[{"line_number":15,"context_line":""},{"line_number":16,"context_line":"The default is to select hosts with less instances.  If you prefer"},{"line_number":17,"context_line":"to invert the behavior set the \u0027num_instances_weight_multiplier\u0027 option"},{"line_number":18,"context_line":"to a negative number and the weighing has the opposite effect of the default."},{"line_number":19,"context_line":"\"\"\""},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"import nova.conf"}],"source_content_type":"text/x-python","patch_set":1,"id":"77811e8b_a74c03be","line":18,"range":{"start_line":18,"start_character":5,"end_line":18,"end_character":13},"updated":"2023-06-21 14:13:21.000000000","message":"positive.\n\nHowever I would copy/paste the explanation from the config file that sounds clearer to me.","commit_id":"271b441bbc9f1f7306653cdf32fac0c1fe552dd7"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"2acf81d514a6eb1edbed4193c6170d6db8f2a1f0","unresolved":false,"context_lines":[{"line_number":15,"context_line":""},{"line_number":16,"context_line":"The default is to select hosts with less instances.  If you prefer"},{"line_number":17,"context_line":"to invert the behavior set the \u0027num_instances_weight_multiplier\u0027 option"},{"line_number":18,"context_line":"to a negative number and the weighing has the opposite effect of the default."},{"line_number":19,"context_line":"\"\"\""},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"import nova.conf"}],"source_content_type":"text/x-python","patch_set":1,"id":"72128a1f_166e93b4","line":18,"range":{"start_line":18,"start_character":5,"end_line":18,"end_character":13},"in_reply_to":"77811e8b_a74c03be","updated":"2023-06-22 09:34:51.000000000","message":"Ack","commit_id":"271b441bbc9f1f7306653cdf32fac0c1fe552dd7"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"eed87abc73c1dce7b74b88db44e1bf191b3ff308","unresolved":true,"context_lines":[{"line_number":38,"context_line":"        \"\"\"Higher weights win.  We want to chooose hosts with fewer instances"},{"line_number":39,"context_line":"           as the default, hence the negative value of the multiplier."},{"line_number":40,"context_line":"        \"\"\""},{"line_number":41,"context_line":"        return host_state.num_instances"}],"source_content_type":"text/x-python","patch_set":2,"id":"565abda0_70ab7fde","line":41,"range":{"start_line":41,"start_character":15,"end_line":41,"end_character":39},"updated":"2023-06-22 18:42:52.000000000","message":"we shoudl either multiple this by -1.0\nor compute this as CONF.filter_scheduler.max_instances_per_host -  host_state.num_instances\n\nbasically we shoudl be returning the numer of \"free\" instance slot we have remaing so that we can keep the multiplires consitent\n\nthe ram disk and cpu weighers all return the aviable capstiy so we shoudl be returnign the aviable instance capsity by takign the current instance form the max per host.","commit_id":"e77ffd1ae664bdb0a16bf238afc05f87d2cd657f"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"495f9b88404729b4205e35b0bc59dc89a20b18a2","unresolved":true,"context_lines":[{"line_number":38,"context_line":"        \"\"\"Higher weights win.  We want to chooose hosts with fewer instances"},{"line_number":39,"context_line":"           as the default, hence the negative value of the multiplier."},{"line_number":40,"context_line":"        \"\"\""},{"line_number":41,"context_line":"        return host_state.num_instances"}],"source_content_type":"text/x-python","patch_set":2,"id":"7b054a20_d62ad14c","line":41,"range":{"start_line":41,"start_character":15,"end_line":41,"end_character":39},"in_reply_to":"02006f27_ca7f73cd","updated":"2023-06-23 14:24:23.000000000","message":"You know what ? let\u0027s say we disagree, and given we need to accept the launchpad blueprint as a specless one, let\u0027s discuss about your concern in the next Nova meeting when I ask for it.","commit_id":"e77ffd1ae664bdb0a16bf238afc05f87d2cd657f"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"b2084a57688c5a7856d5a5d2ca32d2b252576f45","unresolved":false,"context_lines":[{"line_number":38,"context_line":"        \"\"\"Higher weights win.  We want to chooose hosts with fewer instances"},{"line_number":39,"context_line":"           as the default, hence the negative value of the multiplier."},{"line_number":40,"context_line":"        \"\"\""},{"line_number":41,"context_line":"        return host_state.num_instances"}],"source_content_type":"text/x-python","patch_set":2,"id":"a49a7d05_d49eb26e","line":41,"range":{"start_line":41,"start_character":15,"end_line":41,"end_character":39},"in_reply_to":"2730afb9_9855bef0","updated":"2023-07-21 13:43:02.000000000","message":"Seems we arrived to some consensus, closing this comment as resolved but feel free to reopen it if you disagree.","commit_id":"e77ffd1ae664bdb0a16bf238afc05f87d2cd657f"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"b62a3408ed268474b1590c26862d3601d13c0926","unresolved":false,"context_lines":[{"line_number":38,"context_line":"        \"\"\"Higher weights win.  We want to chooose hosts with fewer instances"},{"line_number":39,"context_line":"           as the default, hence the negative value of the multiplier."},{"line_number":40,"context_line":"        \"\"\""},{"line_number":41,"context_line":"        return host_state.num_instances"}],"source_content_type":"text/x-python","patch_set":2,"id":"d31fba0c_9b170218","line":41,"range":{"start_line":41,"start_character":15,"end_line":41,"end_character":39},"in_reply_to":"2730afb9_9855bef0","updated":"2023-07-21 12:59:06.000000000","message":"i think with the suggestio nto use 0.0 as the default i can live with the curren implemation so im going to resovle this thread","commit_id":"e77ffd1ae664bdb0a16bf238afc05f87d2cd657f"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"a8a092c00b587e76ec33c4ba556c8c6ea8d76b24","unresolved":true,"context_lines":[{"line_number":38,"context_line":"        \"\"\"Higher weights win.  We want to chooose hosts with fewer instances"},{"line_number":39,"context_line":"           as the default, hence the negative value of the multiplier."},{"line_number":40,"context_line":"        \"\"\""},{"line_number":41,"context_line":"        return host_state.num_instances"}],"source_content_type":"text/x-python","patch_set":2,"id":"e54fdeac_2feac56b","line":41,"range":{"start_line":41,"start_character":15,"end_line":41,"end_character":39},"in_reply_to":"565abda0_70ab7fde","updated":"2023-06-23 09:07:51.000000000","message":"Sounds honestly a bikeshed to me, we already have negative multipliers in other weighers : \n\nhttps://docs.openstack.org/nova/latest/configuration/config.html#filter_scheduler.io_ops_weight_multiplier\n\nAlso, we already have a filter using num_instances... So you would prefer to modify a small and simple number just for not having a negative defalut value ?","commit_id":"e77ffd1ae664bdb0a16bf238afc05f87d2cd657f"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"a76f1b198f85acaf4e2a2324ad11578c300cf925","unresolved":true,"context_lines":[{"line_number":38,"context_line":"        \"\"\"Higher weights win.  We want to chooose hosts with fewer instances"},{"line_number":39,"context_line":"           as the default, hence the negative value of the multiplier."},{"line_number":40,"context_line":"        \"\"\""},{"line_number":41,"context_line":"        return host_state.num_instances"}],"source_content_type":"text/x-python","patch_set":2,"id":"2730afb9_9855bef0","line":41,"range":{"start_line":41,"start_character":15,"end_line":41,"end_character":39},"in_reply_to":"7b054a20_d62ad14c","updated":"2023-06-28 14:41:29.000000000","message":"FWIW, I like the current version of the code, I can understand what it does.\n\nI think this is great for spreading out the number of instances, if you want to do that thing. I might use this with pack by RAM to prefer the hosts with less VMs, when all things are equal.\n\nNow if you want to pack, but not have too many on each node, you might want something like Sean is suggesting that involves some threshold where you want to really avoid a host at all costs if it has too many VMs, and only use that full host if there is no space left. But that seems like a totally different thing to me.","commit_id":"e77ffd1ae664bdb0a16bf238afc05f87d2cd657f"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"acbada409c07359cdc8d8a52d1dcf8ee78b16dc2","unresolved":true,"context_lines":[{"line_number":38,"context_line":"        \"\"\"Higher weights win.  We want to chooose hosts with fewer instances"},{"line_number":39,"context_line":"           as the default, hence the negative value of the multiplier."},{"line_number":40,"context_line":"        \"\"\""},{"line_number":41,"context_line":"        return host_state.num_instances"}],"source_content_type":"text/x-python","patch_set":2,"id":"02006f27_ca7f73cd","line":41,"range":{"start_line":41,"start_character":15,"end_line":41,"end_character":39},"in_reply_to":"e54fdeac_2feac56b","updated":"2023-06-23 10:53:42.000000000","message":"yes i would, i think consitancy in the way the default work is imporant and the current behavior is inconsitent.\n\n\n\nwe have one multipler that si negitive for spreadign but all the rest use positive multipelers.\n\ni cant fix the io_ops_weight_multiplier without breaking peopel but i can ask you not to add more exampels of this\n\nhttps://docs.openstack.org/nova/latest/configuration/config.html#filter_scheduler.io_ops_weight_multiplier \n\n\nmy perferncce is fo you to calulate this as \n\n        return CONF.filter_scheduler.max_instances_per_host - host_state.num_instances\n        \nand set num_instances_weight_multiplier to 1.0","commit_id":"e77ffd1ae664bdb0a16bf238afc05f87d2cd657f"}],"releasenotes/notes/bp-num_instances_weigher-bba342c82aac5509.yaml":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"1e7adee2377d679a66057d6342826068573ff258","unresolved":true,"context_lines":[{"line_number":8,"context_line":"    hardware. You can modify its behavior by changing the value of"},{"line_number":9,"context_line":"    ``[filter_scheduler]/num_instances_weight_multiplier`` config option where"},{"line_number":10,"context_line":"    a positive value will favor the host with the higher number of running"},{"line_number":11,"context_line":"    instances (ie. packing strategy)."},{"line_number":12,"context_line":"upgrade:"},{"line_number":13,"context_line":"  - |"},{"line_number":14,"context_line":"    Since by default the newly introduced"}],"source_content_type":"text/x-yaml","patch_set":2,"id":"a0927c96_c377888a","line":11,"updated":"2023-06-27 17:10:40.000000000","message":"Perhaps mention this includes all instances, even stopped and shelved (not offloaded) ones?","commit_id":"e77ffd1ae664bdb0a16bf238afc05f87d2cd657f"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"b2084a57688c5a7856d5a5d2ca32d2b252576f45","unresolved":false,"context_lines":[{"line_number":8,"context_line":"    hardware. You can modify its behavior by changing the value of"},{"line_number":9,"context_line":"    ``[filter_scheduler]/num_instances_weight_multiplier`` config option where"},{"line_number":10,"context_line":"    a positive value will favor the host with the higher number of running"},{"line_number":11,"context_line":"    instances (ie. packing strategy)."},{"line_number":12,"context_line":"upgrade:"},{"line_number":13,"context_line":"  - |"},{"line_number":14,"context_line":"    Since by default the newly introduced"}],"source_content_type":"text/x-yaml","patch_set":2,"id":"d9c35bf7_19f946ea","line":11,"in_reply_to":"a0927c96_c377888a","updated":"2023-07-21 13:43:02.000000000","message":"Ack","commit_id":"e77ffd1ae664bdb0a16bf238afc05f87d2cd657f"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"b62a3408ed268474b1590c26862d3601d13c0926","unresolved":false,"context_lines":[{"line_number":8,"context_line":"    hardware. You can modify its behavior by changing the value of"},{"line_number":9,"context_line":"    ``[filter_scheduler]/num_instances_weight_multiplier`` config option where"},{"line_number":10,"context_line":"    a positive value will favor the host with the higher number of running"},{"line_number":11,"context_line":"    instances (ie. packing strategy)."},{"line_number":12,"context_line":"upgrade:"},{"line_number":13,"context_line":"  - |"},{"line_number":14,"context_line":"    Since by default the newly introduced"}],"source_content_type":"text/x-yaml","patch_set":2,"id":"a985e767_a5d37cc3","line":11,"in_reply_to":"a0927c96_c377888a","updated":"2023-07-21 12:59:06.000000000","message":"Done","commit_id":"e77ffd1ae664bdb0a16bf238afc05f87d2cd657f"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"1e7adee2377d679a66057d6342826068573ff258","unresolved":true,"context_lines":[{"line_number":15,"context_line":"    ``[filter_scheduler]/num_instances_weight_multiplier`` config option"},{"line_number":16,"context_line":"    defaults to a negative value that makes the instances be spread across the"},{"line_number":17,"context_line":"    less charged hosts, we recommend you to either disable the weigher (by"},{"line_number":18,"context_line":"    putting its value to 0.0) or set it with a positive value if you already"},{"line_number":19,"context_line":"    have a packing strategy defined by the other existing weighers."}],"source_content_type":"text/x-yaml","patch_set":2,"id":"a1a803d6_9a0459d2","line":18,"updated":"2023-06-27 17:10:40.000000000","message":"Why are we defaulting this to anything anyway? I would think that defaulting to zero (i.e. no change) makes the most sense. If we don\u0027t have indication that there\u0027s a strong preference for one or the other default behavior, why not make this a no-op by default?\n\nSome people want pack, some want spread, and some probably don\u0027t want the number of instances to factor into the decision at all. Why pick a default we know will be wrong for two of the three groups?","commit_id":"e77ffd1ae664bdb0a16bf238afc05f87d2cd657f"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"b2084a57688c5a7856d5a5d2ca32d2b252576f45","unresolved":false,"context_lines":[{"line_number":15,"context_line":"    ``[filter_scheduler]/num_instances_weight_multiplier`` config option"},{"line_number":16,"context_line":"    defaults to a negative value that makes the instances be spread across the"},{"line_number":17,"context_line":"    less charged hosts, we recommend you to either disable the weigher (by"},{"line_number":18,"context_line":"    putting its value to 0.0) or set it with a positive value if you already"},{"line_number":19,"context_line":"    have a packing strategy defined by the other existing weighers."}],"source_content_type":"text/x-yaml","patch_set":2,"id":"1cf38391_11e8070f","line":18,"in_reply_to":"8829d92f_521290a8","updated":"2023-07-21 13:43:02.000000000","message":"Ack","commit_id":"e77ffd1ae664bdb0a16bf238afc05f87d2cd657f"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"b62a3408ed268474b1590c26862d3601d13c0926","unresolved":false,"context_lines":[{"line_number":15,"context_line":"    ``[filter_scheduler]/num_instances_weight_multiplier`` config option"},{"line_number":16,"context_line":"    defaults to a negative value that makes the instances be spread across the"},{"line_number":17,"context_line":"    less charged hosts, we recommend you to either disable the weigher (by"},{"line_number":18,"context_line":"    putting its value to 0.0) or set it with a positive value if you already"},{"line_number":19,"context_line":"    have a packing strategy defined by the other existing weighers."}],"source_content_type":"text/x-yaml","patch_set":2,"id":"b31efe6d_83754d8b","line":18,"in_reply_to":"8829d92f_521290a8","updated":"2023-07-21 12:59:06.000000000","message":"Done","commit_id":"e77ffd1ae664bdb0a16bf238afc05f87d2cd657f"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"c0c93907e5553d5eddc87d58d601743ec5981a11","unresolved":true,"context_lines":[{"line_number":15,"context_line":"    ``[filter_scheduler]/num_instances_weight_multiplier`` config option"},{"line_number":16,"context_line":"    defaults to a negative value that makes the instances be spread across the"},{"line_number":17,"context_line":"    less charged hosts, we recommend you to either disable the weigher (by"},{"line_number":18,"context_line":"    putting its value to 0.0) or set it with a positive value if you already"},{"line_number":19,"context_line":"    have a packing strategy defined by the other existing weighers."}],"source_content_type":"text/x-yaml","patch_set":2,"id":"b189301d_cdfb5b84","line":18,"in_reply_to":"a1a803d6_9a0459d2","updated":"2023-06-27 17:37:02.000000000","message":"ya thats a good poitn i would be ok with default to 0 and making this an opt in rather then having it take effect by default","commit_id":"e77ffd1ae664bdb0a16bf238afc05f87d2cd657f"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"a76f1b198f85acaf4e2a2324ad11578c300cf925","unresolved":true,"context_lines":[{"line_number":15,"context_line":"    ``[filter_scheduler]/num_instances_weight_multiplier`` config option"},{"line_number":16,"context_line":"    defaults to a negative value that makes the instances be spread across the"},{"line_number":17,"context_line":"    less charged hosts, we recommend you to either disable the weigher (by"},{"line_number":18,"context_line":"    putting its value to 0.0) or set it with a positive value if you already"},{"line_number":19,"context_line":"    have a packing strategy defined by the other existing weighers."}],"source_content_type":"text/x-yaml","patch_set":2,"id":"8829d92f_521290a8","line":18,"in_reply_to":"b189301d_cdfb5b84","updated":"2023-06-28 14:41:29.000000000","message":"+1 defaulting this to zero, top idea.","commit_id":"e77ffd1ae664bdb0a16bf238afc05f87d2cd657f"},{"author":{"_account_id":34860,"name":"Amit Uniyal","email":"auniyal@redhat.com","username":"auniyal"},"change_message_id":"c5cf087b49f0ed58bf47d4bd99c9b3864afe6b4a","unresolved":true,"context_lines":[{"line_number":8,"context_line":"    In order to use it, please change the value of"},{"line_number":9,"context_line":"    ``[filter_scheduler]/num_instances_weight_multiplier`` config option where"},{"line_number":10,"context_line":"    a positive value will favor the host with the higher number of instances"},{"line_number":11,"context_line":"    (ie. packing strategy) vs. a negative value that will spread instances"},{"line_number":12,"context_line":"    between hosts. As a side note, this weigher will count *all* of the existing"},{"line_number":13,"context_line":"    instances on the host, even the stopped or shelved ones."}],"source_content_type":"text/x-yaml","patch_set":4,"id":"b5c88441_c5bf5ed7","line":11,"range":{"start_line":11,"start_character":5,"end_line":11,"end_character":7},"updated":"2023-07-25 14:34:50.000000000","message":"i.e.","commit_id":"ca3fbb4d1595011e87b011153942c8b204971389"}]}
