)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":10618,"name":"Pavel Kholkin","email":"p.v.holkin@mail.ru","username":"pkholkin"},"change_message_id":"3eded4147b9b7ff6ff3a0341e5624a089e1e9c55","unresolved":false,"context_lines":[{"line_number":25,"context_line":""},{"line_number":26,"context_line":"DocImpact"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"Co-Authored-By: Balazs Gibizer \u003cbalazs.gibizer@ericsson.com\u003e"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"Implements: blueprint soft-affinity-for-server-group"},{"line_number":31,"context_line":"Change-Id: I3f156d5e5df4d9642bb4b0ffac30a6288459ce61"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":9,"id":"1a930d6b_81cda5b9","line":28,"updated":"2015-01-26 14:00:37.000000000","message":"Some mistake here with authors","commit_id":"b356145a2a845ddc6a89d1e6284b96fade6ffeae"},{"author":{"_account_id":10618,"name":"Pavel Kholkin","email":"p.v.holkin@mail.ru","username":"pkholkin"},"change_message_id":"f21d038e9461dcc233ea079c8615ec8495e2b8b5","unresolved":false,"context_lines":[{"line_number":25,"context_line":""},{"line_number":26,"context_line":"DocImpact"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"Co-Authored-By: Balazs Gibizer \u003cbalazs.gibizer@ericsson.com\u003e"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"Implements: blueprint soft-affinity-for-server-group"},{"line_number":31,"context_line":"Change-Id: I3f156d5e5df4d9642bb4b0ffac30a6288459ce61"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":9,"id":"1a930d6b_0597f848","line":28,"in_reply_to":"1a930d6b_7115e2e3","updated":"2015-01-26 16:37:24.000000000","message":"I have not noticed the author of commit. By the way this seems strange to me) but this is my mistake I think","commit_id":"b356145a2a845ddc6a89d1e6284b96fade6ffeae"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"87e3bfb6e52388217919ccf33f1de77b69bc3437","unresolved":false,"context_lines":[{"line_number":25,"context_line":""},{"line_number":26,"context_line":"DocImpact"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"Co-Authored-By: Balazs Gibizer \u003cbalazs.gibizer@ericsson.com\u003e"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"Implements: blueprint soft-affinity-for-server-group"},{"line_number":31,"context_line":"Change-Id: I3f156d5e5df4d9642bb4b0ffac30a6288459ce61"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":9,"id":"1a930d6b_7115e2e3","line":28,"in_reply_to":"1a930d6b_81cda5b9","updated":"2015-01-26 15:20:34.000000000","message":"What is the mistake you see here? The header of the commit states that the author of the commit is Ildiko and we did this change together so we added the co-authored-by tag to the message according to the wiki https://wiki.openstack.org/wiki/GitCommitMessages","commit_id":"b356145a2a845ddc6a89d1e6284b96fade6ffeae"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"4274a53720f547dc520b08ee419665e0384d5781","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"ServerGroupSoftAffinityWeigher implements the soft-affinity"},{"line_number":10,"context_line":"policy for server groups as it orders the hosts by the number"},{"line_number":11,"context_line":"of instance running on them from the same group in decreasing"},{"line_number":12,"context_line":"order."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"ServerGroupSoftAntiAffinityWeigher implements the"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":41,"id":"3a50d1a3_83f91dcb","line":11,"updated":"2015-07-19 11:45:16.000000000","message":"instance \u003d\u003e instances","commit_id":"0254a7215090bb0fc1423605ea268d2da47f4748"},{"author":{"_account_id":9562,"name":"Ildiko Vancsa","email":"ildiko.vancsa@gmail.com","username":"ildikov"},"change_message_id":"a381e3669a396322459c985c246fd14e1b134bae","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"ServerGroupSoftAffinityWeigher implements the soft-affinity"},{"line_number":10,"context_line":"policy for server groups as it orders the hosts by the number"},{"line_number":11,"context_line":"of instance running on them from the same group in decreasing"},{"line_number":12,"context_line":"order."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"ServerGroupSoftAntiAffinityWeigher implements the"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":41,"id":"3a50d1a3_a63ea7b6","line":11,"in_reply_to":"3a50d1a3_83f91dcb","updated":"2015-07-19 12:43:37.000000000","message":"Done","commit_id":"0254a7215090bb0fc1423605ea268d2da47f4748"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"4274a53720f547dc520b08ee419665e0384d5781","unresolved":false,"context_lines":[{"line_number":23,"context_line":"name \u0027weigh_object\u0027 to \u0027_weight_object\u0027 in the Weights section"},{"line_number":24,"context_line":"to match the code."},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"DocImpact"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"Co-Authored-By: Balazs Gibizer \u003cbalazs.gibizer@ericsson.com\u003e"},{"line_number":29,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":41,"id":"3a50d1a3_03d3cd39","line":26,"updated":"2015-07-19 11:45:16.000000000","message":"It would be useful if you added the new configuration variables here, then whoever is doing the documentation can do the update from the commit message and not need to dig in the code","commit_id":"0254a7215090bb0fc1423605ea268d2da47f4748"},{"author":{"_account_id":9562,"name":"Ildiko Vancsa","email":"ildiko.vancsa@gmail.com","username":"ildikov"},"change_message_id":"a381e3669a396322459c985c246fd14e1b134bae","unresolved":false,"context_lines":[{"line_number":23,"context_line":"name \u0027weigh_object\u0027 to \u0027_weight_object\u0027 in the Weights section"},{"line_number":24,"context_line":"to match the code."},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"DocImpact"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"Co-Authored-By: Balazs Gibizer \u003cbalazs.gibizer@ericsson.com\u003e"},{"line_number":29,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":41,"id":"3a50d1a3_239a8915","line":26,"in_reply_to":"3a50d1a3_03d3cd39","updated":"2015-07-19 12:43:37.000000000","message":"The Config Guide is generated by scripts, which dig into the code anyway, but I will add so anyone can verify from the commit message if they want to.","commit_id":"0254a7215090bb0fc1423605ea268d2da47f4748"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"517a679abf20dee2aa7b07804853fc10e7e303f4","unresolved":false,"context_lines":[{"line_number":18,"context_line":""},{"line_number":19,"context_line":"Both weigher assumes the the RequestSpec object refers to a valid"},{"line_number":20,"context_line":"InstanceGroup object which has a populated members field. This"},{"line_number":21,"context_line":"will be provided by the subsequent patch."},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"New configuration options added:"},{"line_number":24,"context_line":" * soft_affinity_weight_multiplier"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":56,"id":"fa69d971_b72756b5","line":21,"updated":"2016-01-04 11:14:16.000000000","message":"Hmm, so this doesn\u0027t work until the patch after this is merged. \n\nThat seems a bit odd, but I don\u0027t want to block on that, given how close both are to merging.","commit_id":"7118f8ea34bd81b2d041526cf3ff152d0cc0faac"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"746f804607f8c3c187a386ed43df9e1e6dccecd3","unresolved":false,"context_lines":[{"line_number":18,"context_line":""},{"line_number":19,"context_line":"Both weigher assumes the the RequestSpec object refers to a valid"},{"line_number":20,"context_line":"InstanceGroup object which has a populated members field. This"},{"line_number":21,"context_line":"will be provided by the subsequent patch."},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"New configuration options added:"},{"line_number":24,"context_line":" * soft_affinity_weight_multiplier"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":56,"id":"fa69d971_9d483389","line":21,"in_reply_to":"fa69d971_b72756b5","updated":"2016-01-04 13:15:35.000000000","message":"Until the last patch (the API change) is merged this code path cannot be triggered so I don\u0027t think it is a problem. See https://review.openstack.org/#/c/147516/56/nova/scheduler/weights/affinity.py L42","commit_id":"7118f8ea34bd81b2d041526cf3ff152d0cc0faac"}],"doc/source/filter_scheduler.rst":[{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"4274a53720f547dc520b08ee419665e0384d5781","unresolved":false,"context_lines":[{"line_number":372,"context_line":"* |ServerGroupSoftAffinityWeigher| The weigher can compute the weight based"},{"line_number":373,"context_line":"  on the number of instances that run on the same server group. The largest"},{"line_number":374,"context_line":"  weight defines the preferred host for the new instance. For the multiplier"},{"line_number":375,"context_line":"  only positive value is meaningful for the calculation."},{"line_number":376,"context_line":""},{"line_number":377,"context_line":"* |ServerGroupSoftAntiAffinityWeigher| The weigher can compute the weight based"},{"line_number":378,"context_line":"  on the number of instances that run on the same server group as a negative"}],"source_content_type":"text/x-rst","patch_set":41,"id":"3a50d1a3_83203d4b","line":375,"range":{"start_line":375,"start_character":2,"end_line":375,"end_character":21},"updated":"2015-07-19 11:45:16.000000000","message":"only positive value \u003d\u003e only a positive value","commit_id":"0254a7215090bb0fc1423605ea268d2da47f4748"},{"author":{"_account_id":9562,"name":"Ildiko Vancsa","email":"ildiko.vancsa@gmail.com","username":"ildikov"},"change_message_id":"a381e3669a396322459c985c246fd14e1b134bae","unresolved":false,"context_lines":[{"line_number":372,"context_line":"* |ServerGroupSoftAffinityWeigher| The weigher can compute the weight based"},{"line_number":373,"context_line":"  on the number of instances that run on the same server group. The largest"},{"line_number":374,"context_line":"  weight defines the preferred host for the new instance. For the multiplier"},{"line_number":375,"context_line":"  only positive value is meaningful for the calculation."},{"line_number":376,"context_line":""},{"line_number":377,"context_line":"* |ServerGroupSoftAntiAffinityWeigher| The weigher can compute the weight based"},{"line_number":378,"context_line":"  on the number of instances that run on the same server group as a negative"}],"source_content_type":"text/x-rst","patch_set":41,"id":"3a50d1a3_a35bf953","line":375,"in_reply_to":"3a50d1a3_83203d4b","updated":"2015-07-19 12:43:37.000000000","message":"Done","commit_id":"0254a7215090bb0fc1423605ea268d2da47f4748"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"4274a53720f547dc520b08ee419665e0384d5781","unresolved":false,"context_lines":[{"line_number":377,"context_line":"* |ServerGroupSoftAntiAffinityWeigher| The weigher can compute the weight based"},{"line_number":378,"context_line":"  on the number of instances that run on the same server group as a negative"},{"line_number":379,"context_line":"  value. The largest weight defines the preferred host for the new instance. For"},{"line_number":380,"context_line":"  the multiplier only positive value is meaningful for the calculation."},{"line_number":381,"context_line":""},{"line_number":382,"context_line":"Filter Scheduler finds local list of acceptable hosts by repeated filtering and"},{"line_number":383,"context_line":"weighing. Each time it chooses a host, it virtually consumes resources on it,"}],"source_content_type":"text/x-rst","patch_set":41,"id":"3a50d1a3_a31d3911","line":380,"updated":"2015-07-19 11:45:16.000000000","message":"ditto","commit_id":"0254a7215090bb0fc1423605ea268d2da47f4748"},{"author":{"_account_id":9562,"name":"Ildiko Vancsa","email":"ildiko.vancsa@gmail.com","username":"ildikov"},"change_message_id":"a381e3669a396322459c985c246fd14e1b134bae","unresolved":false,"context_lines":[{"line_number":377,"context_line":"* |ServerGroupSoftAntiAffinityWeigher| The weigher can compute the weight based"},{"line_number":378,"context_line":"  on the number of instances that run on the same server group as a negative"},{"line_number":379,"context_line":"  value. The largest weight defines the preferred host for the new instance. For"},{"line_number":380,"context_line":"  the multiplier only positive value is meaningful for the calculation."},{"line_number":381,"context_line":""},{"line_number":382,"context_line":"Filter Scheduler finds local list of acceptable hosts by repeated filtering and"},{"line_number":383,"context_line":"weighing. Each time it chooses a host, it virtually consumes resources on it,"}],"source_content_type":"text/x-rst","patch_set":41,"id":"3a50d1a3_4358f556","line":380,"in_reply_to":"3a50d1a3_a31d3911","updated":"2015-07-19 12:43:37.000000000","message":"Done","commit_id":"0254a7215090bb0fc1423605ea268d2da47f4748"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"5842da1855d80a8400616bc088c820ecf87ab9c2","unresolved":false,"context_lines":[{"line_number":379,"context_line":""},{"line_number":380,"context_line":"* |ServerGroupSoftAffinityWeigher| The weigher can compute the weight based"},{"line_number":381,"context_line":"  on the number of instances that run on the same server group. The largest"},{"line_number":382,"context_line":"  weight defines the preferred host for the new instance. For the multiplier"},{"line_number":383,"context_line":"  only a positive value is meaningful for the calculation."},{"line_number":384,"context_line":""},{"line_number":385,"context_line":"* |ServerGroupSoftAntiAffinityWeigher| The weigher can compute the weight based"},{"line_number":386,"context_line":"  on the number of instances that run on the same server group as a negative"}],"source_content_type":"text/x-rst","patch_set":49,"id":"9a8ffd7b_62c09b2b","line":383,"range":{"start_line":382,"start_character":58,"end_line":383,"end_character":57},"updated":"2015-11-30 16:26:42.000000000","message":"It would be helpful to explain *why* only positive values are meaningful, or what would happen with a negative value. Same comment applies to the next section, too.","commit_id":"06e9f3f07ad19f9bdf43417e0693e69afdecd347"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"4955aa1615e68454159e44158127d6744e47421b","unresolved":false,"context_lines":[{"line_number":379,"context_line":""},{"line_number":380,"context_line":"* |ServerGroupSoftAffinityWeigher| The weigher can compute the weight based"},{"line_number":381,"context_line":"  on the number of instances that run on the same server group. The largest"},{"line_number":382,"context_line":"  weight defines the preferred host for the new instance. For the multiplier"},{"line_number":383,"context_line":"  only a positive value is meaningful for the calculation."},{"line_number":384,"context_line":""},{"line_number":385,"context_line":"* |ServerGroupSoftAntiAffinityWeigher| The weigher can compute the weight based"},{"line_number":386,"context_line":"  on the number of instances that run on the same server group as a negative"}],"source_content_type":"text/x-rst","patch_set":49,"id":"9a8ffd7b_9fe03698","line":383,"range":{"start_line":382,"start_character":58,"end_line":383,"end_character":57},"in_reply_to":"9a8ffd7b_62c09b2b","updated":"2015-12-01 16:02:07.000000000","message":"Done","commit_id":"06e9f3f07ad19f9bdf43417e0693e69afdecd347"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"9989181c054452f22f2b5201b2811452cb5a2fc4","unresolved":false,"context_lines":[{"line_number":388,"context_line":"  value. The largest weight defines the preferred host for the new instance."},{"line_number":389,"context_line":"  For the multiplier only a positive value is meaningful for the calculation as"},{"line_number":390,"context_line":"  a negative value would mean that the anti-affinity weigher would prefer"},{"line_number":391,"context_line":"  collocating placement."},{"line_number":392,"context_line":""},{"line_number":393,"context_line":"Filter Scheduler finds local list of acceptable hosts by repeated filtering and"},{"line_number":394,"context_line":"weighing. Each time it chooses a host, it virtually consumes resources on it,"}],"source_content_type":"text/x-rst","patch_set":52,"id":"7a740942_f64ed836","line":391,"updated":"2015-12-13 18:07:08.000000000","message":"Ship has sailed, but these seem like they are crying out to be single thing with a negative to positive scale instead of two things with postive values.","commit_id":"72157c1dc10160fbf970d621b12523b7913ddb3a"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"d1a1787c241b0fba71cc819da294851dd06d3e29","unresolved":false,"context_lines":[{"line_number":388,"context_line":"  value. The largest weight defines the preferred host for the new instance."},{"line_number":389,"context_line":"  For the multiplier only a positive value is meaningful for the calculation as"},{"line_number":390,"context_line":"  a negative value would mean that the anti-affinity weigher would prefer"},{"line_number":391,"context_line":"  collocating placement."},{"line_number":392,"context_line":""},{"line_number":393,"context_line":"Filter Scheduler finds local list of acceptable hosts by repeated filtering and"},{"line_number":394,"context_line":"weighing. Each time it chooses a host, it virtually consumes resources on it,"}],"source_content_type":"text/x-rst","patch_set":52,"id":"7a740942_4c05d043","line":391,"in_reply_to":"7a740942_f64ed836","updated":"2015-12-14 08:26:55.000000000","message":"These two weighers are not mutually exclusive in a deployment they can coexists as there can be a server group with soft-affinity and there can be another server group with soft-anti-affinity policy. I can imagine that the softness of the two group are different therefore a simple multiplier and a negation won\u0027t be enough.\n\nHonestly the current solution is still limiting as I can imaging two different soft-affinity group having a different softness which would need that the multiplier is set per server group not per deployment.\n\nThere is an initiative making the weigher-fitler system more reasonable. See https://review.openstack.org/#/c/256323/2/specs/backlog/approved/ordered-filter-scheduler.rst,cm","commit_id":"72157c1dc10160fbf970d621b12523b7913ddb3a"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"517a679abf20dee2aa7b07804853fc10e7e303f4","unresolved":false,"context_lines":[{"line_number":355,"context_line":"    weight \u003d w1_multiplier * norm(w1) + w2_multiplier * norm(w2) + ..."},{"line_number":356,"context_line":""},{"line_number":357,"context_line":"A weigher should be a subclass of ``weights.BaseHostWeigher`` and they must"},{"line_number":358,"context_line":"implement the ``weight_multiplier`` and ``_weigh_object`` methods. If the"},{"line_number":359,"context_line":"``weight_objects`` method is overridden it just return a list of weights, and not"},{"line_number":360,"context_line":"modify the weight of the object directly, since final weights are normalized and"},{"line_number":361,"context_line":"computed by ``weight.BaseWeightHandler``."}],"source_content_type":"text/x-rst","patch_set":56,"id":"fa69d971_d751aa0f","line":358,"updated":"2016-01-04 11:14:16.000000000","message":"Nit: ideally it would be a separate change, but its not worth it.","commit_id":"7118f8ea34bd81b2d041526cf3ff152d0cc0faac"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"4c5bdc6d77fcc78bda1e4813dca00fbf09bfaf2f","unresolved":false,"context_lines":[{"line_number":355,"context_line":"    weight \u003d w1_multiplier * norm(w1) + w2_multiplier * norm(w2) + ..."},{"line_number":356,"context_line":""},{"line_number":357,"context_line":"A weigher should be a subclass of ``weights.BaseHostWeigher`` and they must"},{"line_number":358,"context_line":"implement the ``weight_multiplier`` and ``_weigh_object`` methods. If the"},{"line_number":359,"context_line":"``weight_objects`` method is overridden it just return a list of weights, and not"},{"line_number":360,"context_line":"modify the weight of the object directly, since final weights are normalized and"},{"line_number":361,"context_line":"computed by ``weight.BaseWeightHandler``."}],"source_content_type":"text/x-rst","patch_set":56,"id":"fa69d971_543fbb23","line":358,"in_reply_to":"fa69d971_d5ae7f84","updated":"2016-01-05 13:58:09.000000000","message":"It\u0027s actually fixed here - I don\u0027t know if it\u0027s worth doing here https://review.openstack.org/#/c/229250/6","commit_id":"7118f8ea34bd81b2d041526cf3ff152d0cc0faac"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"746f804607f8c3c187a386ed43df9e1e6dccecd3","unresolved":false,"context_lines":[{"line_number":355,"context_line":"    weight \u003d w1_multiplier * norm(w1) + w2_multiplier * norm(w2) + ..."},{"line_number":356,"context_line":""},{"line_number":357,"context_line":"A weigher should be a subclass of ``weights.BaseHostWeigher`` and they must"},{"line_number":358,"context_line":"implement the ``weight_multiplier`` and ``_weigh_object`` methods. If the"},{"line_number":359,"context_line":"``weight_objects`` method is overridden it just return a list of weights, and not"},{"line_number":360,"context_line":"modify the weight of the object directly, since final weights are normalized and"},{"line_number":361,"context_line":"computed by ``weight.BaseWeightHandler``."}],"source_content_type":"text/x-rst","patch_set":56,"id":"fa69d971_d5ae7f84","line":358,"in_reply_to":"fa69d971_d751aa0f","updated":"2016-01-04 13:15:35.000000000","message":"Agree that it is not worth to split it.","commit_id":"7118f8ea34bd81b2d041526cf3ff152d0cc0faac"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"0645f289643842a7611cdd696b6bd8f921a2cf52","unresolved":false,"context_lines":[{"line_number":394,"context_line":"  on the number of instances that run on the same server group. The largest"},{"line_number":395,"context_line":"  weight defines the preferred host for the new instance. For the multiplier"},{"line_number":396,"context_line":"  only a positive value is meaningful for the calculation as a negative value"},{"line_number":397,"context_line":"  would mean that the affinity weigher would prefer non collocating placement."},{"line_number":398,"context_line":""},{"line_number":399,"context_line":"* |ServerGroupSoftAntiAffinityWeigher| The weigher can compute the weight based"},{"line_number":400,"context_line":"  on the number of instances that run on the same server group as a negative"}],"source_content_type":"text/x-rst","patch_set":59,"id":"fa69d971_6d6e5198","line":397,"range":{"start_line":397,"start_character":56,"end_line":397,"end_character":67},"updated":"2016-01-07 10:42:44.000000000","message":"nit: colocating I think","commit_id":"72ba18468e62370522e07df796f5ff74ae13e8c9"}],"nova/scheduler/weights/affinity.py":[{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"74a821b8993a90f9f4ffeb33ff44bfc5836fc533","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright (c) 2015 OpenStack Foundation"},{"line_number":2,"context_line":"# All Rights Reserved."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_61126efe","line":1,"updated":"2015-01-15 16:23:35.000000000","message":"I was told that we can\u0027t use Openstack Foundation\nunless you got pay from them, Use Ericssion maybe ..","commit_id":"7624d3a61f9d48f53742616e5877233ccaa4db26"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"cdb54b6daa619ac0f2e85a46bd3616774c788636","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright (c) 2015 OpenStack Foundation"},{"line_number":2,"context_line":"# All Rights Reserved."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_709e9355","line":1,"in_reply_to":"3a961159_61126efe","updated":"2015-01-16 15:05:15.000000000","message":"Ok. Let\u0027s do it that way.","commit_id":"7624d3a61f9d48f53742616e5877233ccaa4db26"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"b981559655a25dddc71e3309744fd5bba07e8cb7","unresolved":false,"context_lines":[{"line_number":31,"context_line":"                     default\u003d1.0,"},{"line_number":32,"context_line":"                     help\u003d\u0027Multiplier used for weighing hosts \u0027"},{"line_number":33,"context_line":"                          \u0027for group soft-affinity. Only \u0027"},{"line_number":34,"context_line":"                          \u0027positive value is meaningful.\u0027),"},{"line_number":35,"context_line":"]"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"soft_anti_affinity_weight_opts \u003d ["}],"source_content_type":"text/x-python","patch_set":3,"id":"1a930d6b_bff5ffcc","line":34,"updated":"2015-01-20 21:55:33.000000000","message":"I would prefer that you explain what doom would happen if an operator could provide a negative ratio","commit_id":"5d1782a75ba9a246a33d0f873c890db2e85fc6df"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"137db469ed91ef8d4aaf7a472eda2bb3540cf1db","unresolved":false,"context_lines":[{"line_number":31,"context_line":"                     default\u003d1.0,"},{"line_number":32,"context_line":"                     help\u003d\u0027Multiplier used for weighing hosts \u0027"},{"line_number":33,"context_line":"                          \u0027for group soft-affinity. Only \u0027"},{"line_number":34,"context_line":"                          \u0027positive value is meaningful.\u0027),"},{"line_number":35,"context_line":"]"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"soft_anti_affinity_weight_opts \u003d ["}],"source_content_type":"text/x-python","patch_set":3,"id":"1a930d6b_3cc82674","line":34,"in_reply_to":"1a930d6b_bff5ffcc","updated":"2015-01-21 13:48:03.000000000","message":"Fair point. I will update the messages.","commit_id":"5d1782a75ba9a246a33d0f873c890db2e85fc6df"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"b981559655a25dddc71e3309744fd5bba07e8cb7","unresolved":false,"context_lines":[{"line_number":61,"context_line":"        \"\"\"Higher weights win.\"\"\""},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"        policies \u003d weight_properties.get(\u0027group_policies\u0027, [])"},{"line_number":64,"context_line":"        num_per_host \u003d weight_properties.get(\u0027group_num_instances_per_host\u0027,"},{"line_number":65,"context_line":"                                             {})"},{"line_number":66,"context_line":"        val_per_policy \u003d {\u0027soft-affinity\u0027: self.minval,"},{"line_number":67,"context_line":"                          \u0027soft-anti-affinity\u0027: self.maxval}"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a930d6b_9f1f6309","line":64,"updated":"2015-01-20 21:55:33.000000000","message":"I will comment on the appropriate patch but I think it\u0027s a non-sense to provide the number of instances per host while we can get it other way","commit_id":"5d1782a75ba9a246a33d0f873c890db2e85fc6df"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"137db469ed91ef8d4aaf7a472eda2bb3540cf1db","unresolved":false,"context_lines":[{"line_number":61,"context_line":"        \"\"\"Higher weights win.\"\"\""},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"        policies \u003d weight_properties.get(\u0027group_policies\u0027, [])"},{"line_number":64,"context_line":"        num_per_host \u003d weight_properties.get(\u0027group_num_instances_per_host\u0027,"},{"line_number":65,"context_line":"                                             {})"},{"line_number":66,"context_line":"        val_per_policy \u003d {\u0027soft-affinity\u0027: self.minval,"},{"line_number":67,"context_line":"                          \u0027soft-anti-affinity\u0027: self.maxval}"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a930d6b_bcddf644","line":64,"in_reply_to":"1a930d6b_9f1f6309","updated":"2015-01-21 13:48:03.000000000","message":"I don\u0027t know what do you mean exactly by other way. Could you elaborate?\n\nThe group_num_instances_per_host is the number of instance on a given host from a given group. As far as I know the host_state only contains the total number of instances on the host regardless of the group membership. To know the group membership we have to ask the InstanceGroup object. However we want to avoid that here as this code runs in the scheduler that wants to be independent from the nova objects. Therefore we have to put calculate this info in the conductor, put it into the filter_properties and send it to the scheduler. This is exactly what this patch series id doing.","commit_id":"5d1782a75ba9a246a33d0f873c890db2e85fc6df"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"99372f46fe13e606a2719e68c16a2dd65a8c00cd","unresolved":false,"context_lines":[{"line_number":61,"context_line":"        \"\"\"Higher weights win.\"\"\""},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"        policies \u003d weight_properties.get(\u0027group_policies\u0027, [])"},{"line_number":64,"context_line":"        num_per_host \u003d weight_properties.get(\u0027group_num_instances_per_host\u0027,"},{"line_number":65,"context_line":"                                             {})"},{"line_number":66,"context_line":"        val_per_policy \u003d {\u0027soft-affinity\u0027: self.minval,"},{"line_number":67,"context_line":"                          \u0027soft-anti-affinity\u0027: self.maxval}"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a930d6b_849fb34f","line":64,"in_reply_to":"1a930d6b_bcddf644","updated":"2015-01-23 11:07:42.000000000","message":"I understand your goal, so I apologize if you think I missed it.\n\nI was actually thinking on why you should count per instance group if instance groups are not related to an host. It could consequently weight more an host compared to an other (because for example, if HostA and HostB run 10 instances each, HostA could be weighted more if these 10 instances are part of 3 groups while HostB could only have one group)\n\nHere I only see the assumption that there only one group per host but correct me if I\u0027m wrong, we can have multiple groups per host ?","commit_id":"5d1782a75ba9a246a33d0f873c890db2e85fc6df"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"b981559655a25dddc71e3309744fd5bba07e8cb7","unresolved":false,"context_lines":[{"line_number":78,"context_line":"        return weight"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"class ServerGroupSoftAffinityWeigher(_SoftAffinityWeigherBase):"},{"line_number":82,"context_line":"    minval \u003d 0"},{"line_number":83,"context_line":"    policy_name \u003d \u0027soft-affinity\u0027"},{"line_number":84,"context_line":"    multiplier \u003d CONF.soft_affinity_weight_multiplier"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a930d6b_ff5147d9","line":81,"updated":"2015-01-20 21:55:33.000000000","message":"nit: it\u0027s a weigher, so it\u0027s soft anyway... ServerGroupAffinityWeigher is good enough IMHO","commit_id":"5d1782a75ba9a246a33d0f873c890db2e85fc6df"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"137db469ed91ef8d4aaf7a472eda2bb3540cf1db","unresolved":false,"context_lines":[{"line_number":78,"context_line":"        return weight"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"class ServerGroupSoftAffinityWeigher(_SoftAffinityWeigherBase):"},{"line_number":82,"context_line":"    minval \u003d 0"},{"line_number":83,"context_line":"    policy_name \u003d \u0027soft-affinity\u0027"},{"line_number":84,"context_line":"    multiplier \u003d CONF.soft_affinity_weight_multiplier"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a930d6b_5ceed2ed","line":81,"in_reply_to":"1a930d6b_ff5147d9","updated":"2015-01-21 13:48:03.000000000","message":"I would stick to the original longer name for the extra clarity as \"soft\" is used in the name of the policy as well.","commit_id":"5d1782a75ba9a246a33d0f873c890db2e85fc6df"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"e15af7ecc1551941424f2536f83eae5190a68c28","unresolved":false,"context_lines":[{"line_number":65,"context_line":"        \"\"\"Higher weights win.\"\"\""},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"        policies \u003d weight_properties.get(\u0027group_policies\u0027, [])"},{"line_number":68,"context_line":"        num_per_host \u003d weight_properties.get(\u0027group_num_instances_per_host\u0027,"},{"line_number":69,"context_line":"                                             {})"},{"line_number":70,"context_line":"        val_per_policy \u003d {\u0027soft-affinity\u0027: self.minval,"},{"line_number":71,"context_line":"                          \u0027soft-anti-affinity\u0027: self.maxval}"}],"source_content_type":"text/x-python","patch_set":7,"id":"1a930d6b_e4deb710","line":68,"updated":"2015-01-23 11:09:59.000000000","message":"rephrasing my comment on a previous patchset : it sounds to me possible to have N groups per host, so how do you match this case ? Unittests only show me filter_properties returning a single group for this host","commit_id":"05bb6c91edbe2fed0445bf22f78401ec1216d13e"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"ab77352bf8da222d39b64f419371da525e95cc70","unresolved":false,"context_lines":[{"line_number":65,"context_line":"        \"\"\"Higher weights win.\"\"\""},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"        policies \u003d weight_properties.get(\u0027group_policies\u0027, [])"},{"line_number":68,"context_line":"        num_per_host \u003d weight_properties.get(\u0027group_num_instances_per_host\u0027,"},{"line_number":69,"context_line":"                                             {})"},{"line_number":70,"context_line":"        val_per_policy \u003d {\u0027soft-affinity\u0027: self.minval,"},{"line_number":71,"context_line":"                          \u0027soft-anti-affinity\u0027: self.maxval}"}],"source_content_type":"text/x-python","patch_set":7,"id":"1a930d6b_8b5dc47b","line":68,"in_reply_to":"1a930d6b_e4deb710","updated":"2015-01-26 13:26:25.000000000","message":"There can be N groups per hosts that is correct. But an instance can only belong to a single group.  This weigher only needs to consider that single group to implement soft-affinity policy of the group. So when we want to boot an instance to a group we have a single group that we need to consider during the scheduling of that instance. During the boot of the instance the conductor fills the filter_properties (and therefore the weight_properties) with the number of instances belonging to that single group per host. So here in the weigher we don\u0027t have to match the group because that has already been done in scheduler.utils._get_group_details function called by setup_instance_group in the same module.\n\nI hope this helps but you can catch me on irc to have a chat around it if needed.","commit_id":"05bb6c91edbe2fed0445bf22f78401ec1216d13e"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"4274a53720f547dc520b08ee419665e0384d5781","unresolved":false,"context_lines":[{"line_number":27,"context_line":"from nova.scheduler import weights"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"soft_affinity_weight_opts \u003d ["},{"line_number":30,"context_line":"        cfg.FloatOpt(\u0027soft_affinity_weight_multiplier\u0027,"},{"line_number":31,"context_line":"                     default\u003d1.0,"},{"line_number":32,"context_line":"                     help\u003d\u0027Multiplier used for weighing hosts \u0027"},{"line_number":33,"context_line":"                          \u0027for group soft-affinity. Only \u0027"}],"source_content_type":"text/x-python","patch_set":41,"id":"3a50d1a3_23d84953","line":30,"updated":"2015-07-19 11:45:16.000000000","message":"please use 4 spaces","commit_id":"0254a7215090bb0fc1423605ea268d2da47f4748"},{"author":{"_account_id":9562,"name":"Ildiko Vancsa","email":"ildiko.vancsa@gmail.com","username":"ildikov"},"change_message_id":"a381e3669a396322459c985c246fd14e1b134bae","unresolved":false,"context_lines":[{"line_number":27,"context_line":"from nova.scheduler import weights"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"soft_affinity_weight_opts \u003d ["},{"line_number":30,"context_line":"        cfg.FloatOpt(\u0027soft_affinity_weight_multiplier\u0027,"},{"line_number":31,"context_line":"                     default\u003d1.0,"},{"line_number":32,"context_line":"                     help\u003d\u0027Multiplier used for weighing hosts \u0027"},{"line_number":33,"context_line":"                          \u0027for group soft-affinity. Only \u0027"}],"source_content_type":"text/x-python","patch_set":41,"id":"3a50d1a3_c33ac5e7","line":30,"in_reply_to":"3a50d1a3_23d84953","updated":"2015-07-19 12:43:37.000000000","message":"Done","commit_id":"0254a7215090bb0fc1423605ea268d2da47f4748"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"4274a53720f547dc520b08ee419665e0384d5781","unresolved":false,"context_lines":[{"line_number":30,"context_line":"        cfg.FloatOpt(\u0027soft_affinity_weight_multiplier\u0027,"},{"line_number":31,"context_line":"                     default\u003d1.0,"},{"line_number":32,"context_line":"                     help\u003d\u0027Multiplier used for weighing hosts \u0027"},{"line_number":33,"context_line":"                          \u0027for group soft-affinity. Only \u0027"},{"line_number":34,"context_line":"                          \u0027positive value is meaningful. Negative\u0027"},{"line_number":35,"context_line":"                          \u0027means that the behavior will change to\u0027"},{"line_number":36,"context_line":"                          \u0027the opposite, which is soft-anti-affinity.\u0027),"}],"source_content_type":"text/x-python","patch_set":41,"id":"3a50d1a3_e3e10100","line":33,"updated":"2015-07-19 11:45:16.000000000","message":"Only \u003d\u003e Only a","commit_id":"0254a7215090bb0fc1423605ea268d2da47f4748"},{"author":{"_account_id":9562,"name":"Ildiko Vancsa","email":"ildiko.vancsa@gmail.com","username":"ildikov"},"change_message_id":"a381e3669a396322459c985c246fd14e1b134bae","unresolved":false,"context_lines":[{"line_number":30,"context_line":"        cfg.FloatOpt(\u0027soft_affinity_weight_multiplier\u0027,"},{"line_number":31,"context_line":"                     default\u003d1.0,"},{"line_number":32,"context_line":"                     help\u003d\u0027Multiplier used for weighing hosts \u0027"},{"line_number":33,"context_line":"                          \u0027for group soft-affinity. Only \u0027"},{"line_number":34,"context_line":"                          \u0027positive value is meaningful. Negative\u0027"},{"line_number":35,"context_line":"                          \u0027means that the behavior will change to\u0027"},{"line_number":36,"context_line":"                          \u0027the opposite, which is soft-anti-affinity.\u0027),"}],"source_content_type":"text/x-python","patch_set":41,"id":"3a50d1a3_e33fc1d4","line":33,"in_reply_to":"3a50d1a3_e3e10100","updated":"2015-07-19 12:43:37.000000000","message":"Done","commit_id":"0254a7215090bb0fc1423605ea268d2da47f4748"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"4274a53720f547dc520b08ee419665e0384d5781","unresolved":false,"context_lines":[{"line_number":31,"context_line":"                     default\u003d1.0,"},{"line_number":32,"context_line":"                     help\u003d\u0027Multiplier used for weighing hosts \u0027"},{"line_number":33,"context_line":"                          \u0027for group soft-affinity. Only \u0027"},{"line_number":34,"context_line":"                          \u0027positive value is meaningful. Negative\u0027"},{"line_number":35,"context_line":"                          \u0027means that the behavior will change to\u0027"},{"line_number":36,"context_line":"                          \u0027the opposite, which is soft-anti-affinity.\u0027),"},{"line_number":37,"context_line":"]"}],"source_content_type":"text/x-python","patch_set":41,"id":"3a50d1a3_a3e4590d","line":34,"updated":"2015-07-19 11:45:16.000000000","message":"missing spaces at end of line","commit_id":"0254a7215090bb0fc1423605ea268d2da47f4748"},{"author":{"_account_id":9562,"name":"Ildiko Vancsa","email":"ildiko.vancsa@gmail.com","username":"ildikov"},"change_message_id":"a381e3669a396322459c985c246fd14e1b134bae","unresolved":false,"context_lines":[{"line_number":31,"context_line":"                     default\u003d1.0,"},{"line_number":32,"context_line":"                     help\u003d\u0027Multiplier used for weighing hosts \u0027"},{"line_number":33,"context_line":"                          \u0027for group soft-affinity. Only \u0027"},{"line_number":34,"context_line":"                          \u0027positive value is meaningful. Negative\u0027"},{"line_number":35,"context_line":"                          \u0027means that the behavior will change to\u0027"},{"line_number":36,"context_line":"                          \u0027the opposite, which is soft-anti-affinity.\u0027),"},{"line_number":37,"context_line":"]"}],"source_content_type":"text/x-python","patch_set":41,"id":"3a50d1a3_83259dc3","line":34,"in_reply_to":"3a50d1a3_a3e4590d","updated":"2015-07-19 12:43:37.000000000","message":"Done","commit_id":"0254a7215090bb0fc1423605ea268d2da47f4748"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"4274a53720f547dc520b08ee419665e0384d5781","unresolved":false,"context_lines":[{"line_number":32,"context_line":"                     help\u003d\u0027Multiplier used for weighing hosts \u0027"},{"line_number":33,"context_line":"                          \u0027for group soft-affinity. Only \u0027"},{"line_number":34,"context_line":"                          \u0027positive value is meaningful. Negative\u0027"},{"line_number":35,"context_line":"                          \u0027means that the behavior will change to\u0027"},{"line_number":36,"context_line":"                          \u0027the opposite, which is soft-anti-affinity.\u0027),"},{"line_number":37,"context_line":"]"},{"line_number":38,"context_line":""}],"source_content_type":"text/x-python","patch_set":41,"id":"3a50d1a3_43f1d5cc","line":35,"updated":"2015-07-19 11:45:16.000000000","message":"ditto","commit_id":"0254a7215090bb0fc1423605ea268d2da47f4748"},{"author":{"_account_id":9562,"name":"Ildiko Vancsa","email":"ildiko.vancsa@gmail.com","username":"ildikov"},"change_message_id":"a381e3669a396322459c985c246fd14e1b134bae","unresolved":false,"context_lines":[{"line_number":32,"context_line":"                     help\u003d\u0027Multiplier used for weighing hosts \u0027"},{"line_number":33,"context_line":"                          \u0027for group soft-affinity. Only \u0027"},{"line_number":34,"context_line":"                          \u0027positive value is meaningful. Negative\u0027"},{"line_number":35,"context_line":"                          \u0027means that the behavior will change to\u0027"},{"line_number":36,"context_line":"                          \u0027the opposite, which is soft-anti-affinity.\u0027),"},{"line_number":37,"context_line":"]"},{"line_number":38,"context_line":""}],"source_content_type":"text/x-python","patch_set":41,"id":"3a50d1a3_a32219b8","line":35,"in_reply_to":"3a50d1a3_43f1d5cc","updated":"2015-07-19 12:43:37.000000000","message":"Done","commit_id":"0254a7215090bb0fc1423605ea268d2da47f4748"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"4274a53720f547dc520b08ee419665e0384d5781","unresolved":false,"context_lines":[{"line_number":37,"context_line":"]"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"soft_anti_affinity_weight_opts \u003d ["},{"line_number":40,"context_line":"        cfg.FloatOpt(\u0027soft_anti_affinity_weight_multiplier\u0027,"},{"line_number":41,"context_line":"                     default\u003d1.0,"},{"line_number":42,"context_line":"                     help\u003d\u0027Multiplier used for weighing hosts \u0027"},{"line_number":43,"context_line":"                          \u0027for group soft-anti-affinity. Only \u0027"}],"source_content_type":"text/x-python","patch_set":41,"id":"3a50d1a3_c3dc0549","line":40,"updated":"2015-07-19 11:45:16.000000000","message":"ditto","commit_id":"0254a7215090bb0fc1423605ea268d2da47f4748"},{"author":{"_account_id":9562,"name":"Ildiko Vancsa","email":"ildiko.vancsa@gmail.com","username":"ildikov"},"change_message_id":"a381e3669a396322459c985c246fd14e1b134bae","unresolved":false,"context_lines":[{"line_number":37,"context_line":"]"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"soft_anti_affinity_weight_opts \u003d ["},{"line_number":40,"context_line":"        cfg.FloatOpt(\u0027soft_anti_affinity_weight_multiplier\u0027,"},{"line_number":41,"context_line":"                     default\u003d1.0,"},{"line_number":42,"context_line":"                     help\u003d\u0027Multiplier used for weighing hosts \u0027"},{"line_number":43,"context_line":"                          \u0027for group soft-anti-affinity. Only \u0027"}],"source_content_type":"text/x-python","patch_set":41,"id":"3a50d1a3_0318ad83","line":40,"in_reply_to":"3a50d1a3_c3dc0549","updated":"2015-07-19 12:43:37.000000000","message":"Done","commit_id":"0254a7215090bb0fc1423605ea268d2da47f4748"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"4274a53720f547dc520b08ee419665e0384d5781","unresolved":false,"context_lines":[{"line_number":40,"context_line":"        cfg.FloatOpt(\u0027soft_anti_affinity_weight_multiplier\u0027,"},{"line_number":41,"context_line":"                     default\u003d1.0,"},{"line_number":42,"context_line":"                     help\u003d\u0027Multiplier used for weighing hosts \u0027"},{"line_number":43,"context_line":"                          \u0027for group soft-anti-affinity. Only \u0027"},{"line_number":44,"context_line":"                          \u0027positive value is meaningful. Negative\u0027"},{"line_number":45,"context_line":"                          \u0027means that the behavior will change to\u0027"},{"line_number":46,"context_line":"                          \u0027the opposite, which is soft-affinity.\u0027),"}],"source_content_type":"text/x-python","patch_set":41,"id":"3a50d1a3_83e7dd11","line":43,"updated":"2015-07-19 11:45:16.000000000","message":"ditto","commit_id":"0254a7215090bb0fc1423605ea268d2da47f4748"},{"author":{"_account_id":9562,"name":"Ildiko Vancsa","email":"ildiko.vancsa@gmail.com","username":"ildikov"},"change_message_id":"a381e3669a396322459c985c246fd14e1b134bae","unresolved":false,"context_lines":[{"line_number":40,"context_line":"        cfg.FloatOpt(\u0027soft_anti_affinity_weight_multiplier\u0027,"},{"line_number":41,"context_line":"                     default\u003d1.0,"},{"line_number":42,"context_line":"                     help\u003d\u0027Multiplier used for weighing hosts \u0027"},{"line_number":43,"context_line":"                          \u0027for group soft-anti-affinity. Only \u0027"},{"line_number":44,"context_line":"                          \u0027positive value is meaningful. Negative\u0027"},{"line_number":45,"context_line":"                          \u0027means that the behavior will change to\u0027"},{"line_number":46,"context_line":"                          \u0027the opposite, which is soft-affinity.\u0027),"}],"source_content_type":"text/x-python","patch_set":41,"id":"3a50d1a3_231da973","line":43,"in_reply_to":"3a50d1a3_83e7dd11","updated":"2015-07-19 12:43:37.000000000","message":"Done","commit_id":"0254a7215090bb0fc1423605ea268d2da47f4748"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"4274a53720f547dc520b08ee419665e0384d5781","unresolved":false,"context_lines":[{"line_number":41,"context_line":"                     default\u003d1.0,"},{"line_number":42,"context_line":"                     help\u003d\u0027Multiplier used for weighing hosts \u0027"},{"line_number":43,"context_line":"                          \u0027for group soft-anti-affinity. Only \u0027"},{"line_number":44,"context_line":"                          \u0027positive value is meaningful. Negative\u0027"},{"line_number":45,"context_line":"                          \u0027means that the behavior will change to\u0027"},{"line_number":46,"context_line":"                          \u0027the opposite, which is soft-affinity.\u0027),"},{"line_number":47,"context_line":"]"}],"source_content_type":"text/x-python","patch_set":41,"id":"3a50d1a3_63ee51ee","line":44,"updated":"2015-07-19 11:45:16.000000000","message":"missing spaces at end of line","commit_id":"0254a7215090bb0fc1423605ea268d2da47f4748"},{"author":{"_account_id":9562,"name":"Ildiko Vancsa","email":"ildiko.vancsa@gmail.com","username":"ildikov"},"change_message_id":"a381e3669a396322459c985c246fd14e1b134bae","unresolved":false,"context_lines":[{"line_number":41,"context_line":"                     default\u003d1.0,"},{"line_number":42,"context_line":"                     help\u003d\u0027Multiplier used for weighing hosts \u0027"},{"line_number":43,"context_line":"                          \u0027for group soft-anti-affinity. Only \u0027"},{"line_number":44,"context_line":"                          \u0027positive value is meaningful. Negative\u0027"},{"line_number":45,"context_line":"                          \u0027means that the behavior will change to\u0027"},{"line_number":46,"context_line":"                          \u0027the opposite, which is soft-affinity.\u0027),"},{"line_number":47,"context_line":"]"}],"source_content_type":"text/x-python","patch_set":41,"id":"3a50d1a3_c311655f","line":44,"in_reply_to":"3a50d1a3_63ee51ee","updated":"2015-07-19 12:43:37.000000000","message":"Done","commit_id":"0254a7215090bb0fc1423605ea268d2da47f4748"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"4274a53720f547dc520b08ee419665e0384d5781","unresolved":false,"context_lines":[{"line_number":42,"context_line":"                     help\u003d\u0027Multiplier used for weighing hosts \u0027"},{"line_number":43,"context_line":"                          \u0027for group soft-anti-affinity. Only \u0027"},{"line_number":44,"context_line":"                          \u0027positive value is meaningful. Negative\u0027"},{"line_number":45,"context_line":"                          \u0027means that the behavior will change to\u0027"},{"line_number":46,"context_line":"                          \u0027the opposite, which is soft-affinity.\u0027),"},{"line_number":47,"context_line":"]"},{"line_number":48,"context_line":""}],"source_content_type":"text/x-python","patch_set":41,"id":"3a50d1a3_03baede1","line":45,"updated":"2015-07-19 11:45:16.000000000","message":"ditto","commit_id":"0254a7215090bb0fc1423605ea268d2da47f4748"},{"author":{"_account_id":9562,"name":"Ildiko Vancsa","email":"ildiko.vancsa@gmail.com","username":"ildikov"},"change_message_id":"a381e3669a396322459c985c246fd14e1b134bae","unresolved":false,"context_lines":[{"line_number":42,"context_line":"                     help\u003d\u0027Multiplier used for weighing hosts \u0027"},{"line_number":43,"context_line":"                          \u0027for group soft-anti-affinity. Only \u0027"},{"line_number":44,"context_line":"                          \u0027positive value is meaningful. Negative\u0027"},{"line_number":45,"context_line":"                          \u0027means that the behavior will change to\u0027"},{"line_number":46,"context_line":"                          \u0027the opposite, which is soft-affinity.\u0027),"},{"line_number":47,"context_line":"]"},{"line_number":48,"context_line":""}],"source_content_type":"text/x-python","patch_set":41,"id":"3a50d1a3_e316e154","line":45,"in_reply_to":"3a50d1a3_03baede1","updated":"2015-07-19 12:43:37.000000000","message":"Done","commit_id":"0254a7215090bb0fc1423605ea268d2da47f4748"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"4274a53720f547dc520b08ee419665e0384d5781","unresolved":false,"context_lines":[{"line_number":61,"context_line":"        \"\"\"Override the weight multiplier.\"\"\""},{"line_number":62,"context_line":"        return self.multiplier"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"    def _weigh_object(self, host_state, weight_properties):"},{"line_number":65,"context_line":"        \"\"\"Higher weights win.\"\"\""},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"        policies \u003d weight_properties.get(\u0027group_policies\u0027, [])"}],"source_content_type":"text/x-python","patch_set":41,"id":"3a50d1a3_e3b821e8","line":64,"updated":"2015-07-19 11:45:16.000000000","message":"out of interest why not _weight_object?","commit_id":"0254a7215090bb0fc1423605ea268d2da47f4748"},{"author":{"_account_id":9562,"name":"Ildiko Vancsa","email":"ildiko.vancsa@gmail.com","username":"ildikov"},"change_message_id":"a381e3669a396322459c985c246fd14e1b134bae","unresolved":false,"context_lines":[{"line_number":61,"context_line":"        \"\"\"Override the weight multiplier.\"\"\""},{"line_number":62,"context_line":"        return self.multiplier"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"    def _weigh_object(self, host_state, weight_properties):"},{"line_number":65,"context_line":"        \"\"\"Higher weights win.\"\"\""},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"        policies \u003d weight_properties.get(\u0027group_policies\u0027, [])"}],"source_content_type":"text/x-python","patch_set":41,"id":"3a50d1a3_e624afb0","line":64,"in_reply_to":"3a50d1a3_e3b821e8","updated":"2015-07-19 12:43:37.000000000","message":"Here is the abstract method: https://github.com/openstack/nova/blob/master/nova/weights.py#L89","commit_id":"0254a7215090bb0fc1423605ea268d2da47f4748"},{"author":{"_account_id":18247,"name":"Mark Doffman","email":"mdoffman@linux.vnet.ibm.com","username":"doffm"},"change_message_id":"dfa57dd5d1dd2b732dc774ee7fd923a9b680a846","unresolved":false,"context_lines":[{"line_number":34,"context_line":"                      \u0027positive value is meaningful. Negative \u0027"},{"line_number":35,"context_line":"                      \u0027means that the behavior will change to \u0027"},{"line_number":36,"context_line":"                      \u0027the opposite, which is soft-anti-affinity.\u0027),"},{"line_number":37,"context_line":"]"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"soft_anti_affinity_weight_opts \u003d ["},{"line_number":40,"context_line":"    cfg.FloatOpt(\u0027soft_anti_affinity_weight_multiplier\u0027,"}],"source_content_type":"text/x-python","patch_set":50,"id":"9a8ffd7b_7c0ebb33","line":37,"updated":"2015-12-01 16:46:30.000000000","message":"Isn\u0027t there any way to just disallow negative values in the configuration options? If not shouldn\u0027t this just say that only positive values are allowed rather than documenting strange behavior?","commit_id":"c2d492b9a494d06e2e644333bf35a845d2a9a171"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"77de4ed419ac5a2c6416968e6cb129ee544d1c9c","unresolved":false,"context_lines":[{"line_number":34,"context_line":"                      \u0027positive value is meaningful. Negative \u0027"},{"line_number":35,"context_line":"                      \u0027means that the behavior will change to \u0027"},{"line_number":36,"context_line":"                      \u0027the opposite, which is soft-anti-affinity.\u0027),"},{"line_number":37,"context_line":"]"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"soft_anti_affinity_weight_opts \u003d ["},{"line_number":40,"context_line":"    cfg.FloatOpt(\u0027soft_anti_affinity_weight_multiplier\u0027,"}],"source_content_type":"text/x-python","patch_set":50,"id":"7a740942_9321e9fd","line":37,"in_reply_to":"7a740942_1b00e700","updated":"2015-12-07 14:43:30.000000000","message":"Making the multiplier dependent on other weights seems hackish for me as it means the deployer cannot set priority between weights but we, by code set the priority of this weight higher that any other weights in the system. This is currently good for my use case but it might not what other wants from soft policy. Basically the priority between weights defines the softness of the soft policy against other weights.\nFor example a deployer might want that soft-affinity only puts instance to the same host if that does not make the memory usage of the host too unbalanced, so (s)he might select memory and soft-affinity multipliers to the same value, while (s)he sets other weight multipliers to a lower value. Anyhow I can accept the reasoning that we can add the configuration parameter later if somebody needs it.","commit_id":"c2d492b9a494d06e2e644333bf35a845d2a9a171"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"d18ca6e1682b07d9eb95b6a64b04d54ecf35bd38","unresolved":false,"context_lines":[{"line_number":34,"context_line":"                      \u0027positive value is meaningful. Negative \u0027"},{"line_number":35,"context_line":"                      \u0027means that the behavior will change to \u0027"},{"line_number":36,"context_line":"                      \u0027the opposite, which is soft-anti-affinity.\u0027),"},{"line_number":37,"context_line":"]"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"soft_anti_affinity_weight_opts \u003d ["},{"line_number":40,"context_line":"    cfg.FloatOpt(\u0027soft_anti_affinity_weight_multiplier\u0027,"}],"source_content_type":"text/x-python","patch_set":50,"id":"7a740942_f3c25484","line":37,"in_reply_to":"7a740942_9321e9fd","updated":"2015-12-08 17:01:36.000000000","message":"Yeah agreed the multiplier is really a bad name (and type) chosen for something that should really be weight... well weight :).","commit_id":"c2d492b9a494d06e2e644333bf35a845d2a9a171"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"54aab1d7501e8c0bade231b19312114789ed17c9","unresolved":false,"context_lines":[{"line_number":34,"context_line":"                      \u0027positive value is meaningful. Negative \u0027"},{"line_number":35,"context_line":"                      \u0027means that the behavior will change to \u0027"},{"line_number":36,"context_line":"                      \u0027the opposite, which is soft-anti-affinity.\u0027),"},{"line_number":37,"context_line":"]"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"soft_anti_affinity_weight_opts \u003d ["},{"line_number":40,"context_line":"    cfg.FloatOpt(\u0027soft_anti_affinity_weight_multiplier\u0027,"}],"source_content_type":"text/x-python","patch_set":50,"id":"7a740942_88ef6886","line":37,"in_reply_to":"9a8ffd7b_7c0ebb33","updated":"2015-12-11 13:38:45.000000000","message":"@Mark: Unfortunately FloatOpt does not have a min, max parameter as the IntOpt. So at the moment there is no way to force that the config option is non negative.","commit_id":"c2d492b9a494d06e2e644333bf35a845d2a9a171"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"360c5ed790f4e29214be9de8181a295ae0436e0c","unresolved":false,"context_lines":[{"line_number":34,"context_line":"                      \u0027positive value is meaningful. Negative \u0027"},{"line_number":35,"context_line":"                      \u0027means that the behavior will change to \u0027"},{"line_number":36,"context_line":"                      \u0027the opposite, which is soft-anti-affinity.\u0027),"},{"line_number":37,"context_line":"]"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"soft_anti_affinity_weight_opts \u003d ["},{"line_number":40,"context_line":"    cfg.FloatOpt(\u0027soft_anti_affinity_weight_multiplier\u0027,"}],"source_content_type":"text/x-python","patch_set":50,"id":"7a740942_1b00e700","line":37,"in_reply_to":"9a8ffd7b_7c0ebb33","updated":"2015-12-04 17:51:42.000000000","message":"Actually if I think about this more - I don\u0027t think we want to expose this as a config option at all. When would a cloud administrator ever have the need to set this?\n\nAll other things being equal, any none value larger than one would place a host that gets multiplied ahead of the host that does not so let\u0027s just use a single fixed value (maybe max of a number of other multipliers so that we don\u0027t get lost since this is mostly unrelated on anything else in tree at the moment at least).\n\nI don\u0027t think this is a useful knob to have TBH - and if it turns out to be useful - we can add it later.","commit_id":"c2d492b9a494d06e2e644333bf35a845d2a9a171"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"360c5ed790f4e29214be9de8181a295ae0436e0c","unresolved":false,"context_lines":[{"line_number":44,"context_line":"                      \u0027positive value is meaningful. Negative \u0027"},{"line_number":45,"context_line":"                      \u0027means that the behavior will change to \u0027"},{"line_number":46,"context_line":"                      \u0027the opposite, which is soft-affinity.\u0027),"},{"line_number":47,"context_line":"]"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"CONF \u003d cfg.CONF"},{"line_number":50,"context_line":"CONF.register_opts(soft_affinity_weight_opts)"}],"source_content_type":"text/x-python","patch_set":50,"id":"7a740942_8d8fbacb","line":47,"updated":"2015-12-04 17:51:42.000000000","message":"same here","commit_id":"c2d492b9a494d06e2e644333bf35a845d2a9a171"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"77de4ed419ac5a2c6416968e6cb129ee544d1c9c","unresolved":false,"context_lines":[{"line_number":44,"context_line":"                      \u0027positive value is meaningful. Negative \u0027"},{"line_number":45,"context_line":"                      \u0027means that the behavior will change to \u0027"},{"line_number":46,"context_line":"                      \u0027the opposite, which is soft-affinity.\u0027),"},{"line_number":47,"context_line":"]"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"CONF \u003d cfg.CONF"},{"line_number":50,"context_line":"CONF.register_opts(soft_affinity_weight_opts)"}],"source_content_type":"text/x-python","patch_set":50,"id":"7a740942_09138867","line":47,"in_reply_to":"7a740942_8d8fbacb","updated":"2015-12-07 14:43:30.000000000","message":"Done","commit_id":"c2d492b9a494d06e2e644333bf35a845d2a9a171"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"360c5ed790f4e29214be9de8181a295ae0436e0c","unresolved":false,"context_lines":[{"line_number":67,"context_line":"            return 0"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"        policies \u003d request_spec.instance_group.policies"},{"line_number":70,"context_line":"        val_per_policy \u003d {\u0027soft-affinity\u0027: self.minval,"},{"line_number":71,"context_line":"                          \u0027soft-anti-affinity\u0027: self.maxval}"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"        if self.policy_name not in policies:"},{"line_number":74,"context_line":"            return val_per_policy[self.policy_name]"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"        instances \u003d set(host_state.instances.keys())"},{"line_number":77,"context_line":"        members \u003d set(request_spec.instance_group.members)"}],"source_content_type":"text/x-python","patch_set":50,"id":"7a740942_d0e31904","line":74,"range":{"start_line":70,"start_character":8,"end_line":74,"end_character":51},"updated":"2015-12-04 17:51:42.000000000","message":"could we skip this dance by just doing:\n\n  if self.policy_name not in policies:\n      return 0\n\nSeems a bit roundabout","commit_id":"c2d492b9a494d06e2e644333bf35a845d2a9a171"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"77de4ed419ac5a2c6416968e6cb129ee544d1c9c","unresolved":false,"context_lines":[{"line_number":67,"context_line":"            return 0"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"        policies \u003d request_spec.instance_group.policies"},{"line_number":70,"context_line":"        val_per_policy \u003d {\u0027soft-affinity\u0027: self.minval,"},{"line_number":71,"context_line":"                          \u0027soft-anti-affinity\u0027: self.maxval}"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"        if self.policy_name not in policies:"},{"line_number":74,"context_line":"            return val_per_policy[self.policy_name]"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"        instances \u003d set(host_state.instances.keys())"},{"line_number":77,"context_line":"        members \u003d set(request_spec.instance_group.members)"}],"source_content_type":"text/x-python","patch_set":50,"id":"7a740942_49199087","line":74,"range":{"start_line":70,"start_character":8,"end_line":74,"end_character":51},"in_reply_to":"7a740942_d0e31904","updated":"2015-12-07 14:43:30.000000000","message":"Done","commit_id":"c2d492b9a494d06e2e644333bf35a845d2a9a171"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"52ecaca1d9a1c4c22c307f9e037b4dff399e2363","unresolved":false,"context_lines":[{"line_number":77,"context_line":"        members \u003d set(request_spec.instance_group.members)"},{"line_number":78,"context_line":"        member_on_host \u003d len(instances.intersection(members))"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"        if self.policy_name \u003d\u003d \u0027soft-anti-affinity\u0027:"},{"line_number":81,"context_line":"            member_on_host *\u003d -1"},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"        return member_on_host"}],"source_content_type":"text/x-python","patch_set":50,"id":"7a740942_43644148","line":80,"updated":"2015-12-04 18:18:16.000000000","message":"This doesn\u0027t belong in a base (abstract) class. It should be in the anti-affinity subclass:\n\n    def _weigh_object(self, host_state, request_spec):\n        return -1 * super(ServerGroupSoftAntiAffinityWeigher, self)._weigh_object(host_state, request_spec)\n\nOr better yet: build on Nikola\u0027s suggestion about getting rid of the multiplier, and just have a \u0027sign\u0027 attribute, with 0 for the base, 1 for the affinity, and -1 for the anti-affinity subclasses. Then just return that sign * number of members on the host for the weight.","commit_id":"c2d492b9a494d06e2e644333bf35a845d2a9a171"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"77de4ed419ac5a2c6416968e6cb129ee544d1c9c","unresolved":false,"context_lines":[{"line_number":77,"context_line":"        members \u003d set(request_spec.instance_group.members)"},{"line_number":78,"context_line":"        member_on_host \u003d len(instances.intersection(members))"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"        if self.policy_name \u003d\u003d \u0027soft-anti-affinity\u0027:"},{"line_number":81,"context_line":"            member_on_host *\u003d -1"},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"        return member_on_host"}],"source_content_type":"text/x-python","patch_set":50,"id":"7a740942_c926e0cd","line":80,"in_reply_to":"7a740942_43644148","updated":"2015-12-07 14:43:30.000000000","message":"Done","commit_id":"c2d492b9a494d06e2e644333bf35a845d2a9a171"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"28cb6a96f77e7e6b018931d1bb97b401ca59b3ff","unresolved":false,"context_lines":[{"line_number":39,"context_line":""},{"line_number":40,"context_line":"    def weight_multiplier(self):"},{"line_number":41,"context_line":"        \"\"\"Override the weight multiplier.\"\"\""},{"line_number":42,"context_line":"        # Note(gibi): This puts the soft policy weights to the top of the"},{"line_number":43,"context_line":"        # priority list of the in tree weights. This might not what the"},{"line_number":44,"context_line":"        # deployer wants so we might want to add configurability of soft"},{"line_number":45,"context_line":"        # policy weights later."},{"line_number":46,"context_line":"        return max(CONF.io_ops_weight_multiplier,"},{"line_number":47,"context_line":"                   CONF.metrics.weight_multiplier,"},{"line_number":48,"context_line":"                   CONF.ram_weight_multiplier)"}],"source_content_type":"text/x-python","patch_set":51,"id":"7a740942_f3f7b4d0","line":45,"range":{"start_line":42,"start_character":7,"end_line":45,"end_character":30},"updated":"2015-12-08 17:02:58.000000000","message":"After considering your comment a bit more - it does make sense to keep them actually. Sorry about that.","commit_id":"10afe621d539d3d33c525c9c639d7f0051b72bcb"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"7e49c1bbeb5d002c9023ab7b0fa2cbceac001f45","unresolved":false,"context_lines":[{"line_number":39,"context_line":""},{"line_number":40,"context_line":"    def weight_multiplier(self):"},{"line_number":41,"context_line":"        \"\"\"Override the weight multiplier.\"\"\""},{"line_number":42,"context_line":"        # Note(gibi): This puts the soft policy weights to the top of the"},{"line_number":43,"context_line":"        # priority list of the in tree weights. This might not what the"},{"line_number":44,"context_line":"        # deployer wants so we might want to add configurability of soft"},{"line_number":45,"context_line":"        # policy weights later."},{"line_number":46,"context_line":"        return max(CONF.io_ops_weight_multiplier,"},{"line_number":47,"context_line":"                   CONF.metrics.weight_multiplier,"},{"line_number":48,"context_line":"                   CONF.ram_weight_multiplier)"}],"source_content_type":"text/x-python","patch_set":51,"id":"7a740942_68855ccd","line":45,"range":{"start_line":42,"start_character":7,"end_line":45,"end_character":30},"in_reply_to":"7a740942_f3f7b4d0","updated":"2015-12-11 13:38:51.000000000","message":"OK, I put back the multiplier config options","commit_id":"10afe621d539d3d33c525c9c639d7f0051b72bcb"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"517a679abf20dee2aa7b07804853fc10e7e303f4","unresolved":false,"context_lines":[{"line_number":53,"context_line":"    policy_name \u003d \u0027soft-affinity\u0027"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"    def weight_multiplier(self):"},{"line_number":56,"context_line":"        return CONF.soft_affinity_weight_multiplier"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"class ServerGroupSoftAntiAffinityWeigher(_SoftAffinityWeigherBase):"}],"source_content_type":"text/x-python","patch_set":56,"id":"fa69d971_57fffa33","line":56,"updated":"2016-01-04 11:14:16.000000000","message":"Its tempting to log a warning (probably only once per class load) for either of these two classes where the multiplier is negative.\n\nEven better if oslo.config had a min value for a float option (like it does for int), but it doesn\u0027t, sadly.\n\nI might be overthinking this, its a nit really.","commit_id":"7118f8ea34bd81b2d041526cf3ff152d0cc0faac"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"746f804607f8c3c187a386ed43df9e1e6dccecd3","unresolved":false,"context_lines":[{"line_number":53,"context_line":"    policy_name \u003d \u0027soft-affinity\u0027"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"    def weight_multiplier(self):"},{"line_number":56,"context_line":"        return CONF.soft_affinity_weight_multiplier"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"class ServerGroupSoftAntiAffinityWeigher(_SoftAffinityWeigherBase):"}],"source_content_type":"text/x-python","patch_set":56,"id":"fa69d971_55e84fb4","line":56,"in_reply_to":"fa69d971_57fffa33","updated":"2016-01-04 13:15:35.000000000","message":"I added a warning here to avoid confusions. I try to propose a patch to oslo.config later to support min, max value for float.","commit_id":"7118f8ea34bd81b2d041526cf3ff152d0cc0faac"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"f61b681f451a562aaad3ba6a8e8ca5b1cada3f6d","unresolved":false,"context_lines":[{"line_number":47,"context_line":"            return 0"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"        instances \u003d set(host_state.instances.keys())"},{"line_number":50,"context_line":"        members \u003d set(request_spec.instance_group.members)"},{"line_number":51,"context_line":"        member_on_host \u003d instances.intersection(members)"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"        return len(member_on_host)"}],"source_content_type":"text/x-python","patch_set":59,"id":"fa69d971_d08d942b","line":50,"range":{"start_line":50,"start_character":22,"end_line":50,"end_character":58},"updated":"2016-01-07 10:57:00.000000000","message":"To be clear, it will raise an AttributeError until https://review.openstack.org/#/c/148277/ merges but since both of them are approved, we just need to make sure they land nearly at the same time.","commit_id":"72ba18468e62370522e07df796f5ff74ae13e8c9"}]}
