)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"b02c11949bc9e456ac54eb191c8e2e3b69f3eabb","unresolved":false,"context_lines":[{"line_number":11,"context_line":"differently based on the demands of the instance. If the instance"},{"line_number":12,"context_line":"requests a PCI device, then the the first of these hosts should be"},{"line_number":13,"context_line":"prefered. If the instance does not request a PCI device, then the"},{"line_number":14,"context_line":"last of these hosts should be prefered."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"This change ensures (a) an instance with PCI requirements has the best"},{"line_number":17,"context_line":"possible change of scheduling successfully and (b) an instance without"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"ba5da102_cbfa1943","line":14,"updated":"2016-11-01 12:24:21.000000000","message":"I don\u0027t think this is sensible default behaviour - it badly suffers from fragmentation.\n\nConsider if every compute host has 2 assignable PCI devices initially. If you always pick a host with the most PCI devices then eventually you\u0027ll get a situation where all hosts only have 1 assignable PCI device. Now try to launch a guest requiring 2 PCI devices. You can have 1000\u0027s of free PCI devices in the cloud, but no single compute host has two available.\n\nThe current NUMA placement policy is to fill nodes, rather than spreading across nodes, to avoid this same fragmentation problem. IMHO the default PCI policy should do the same - we should try to fill hosts, so if a later request comes in for a guest with multiple NICs we have maximum chance of being able to satisfy it.","commit_id":"2e7e7c6157ca0935112fb6f1245fff50e9a21681"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"3120c3d8e3bc9a88b1243d2ed72cfac280a7489a","unresolved":false,"context_lines":[{"line_number":11,"context_line":"differently based on the demands of the instance. If the instance"},{"line_number":12,"context_line":"requests a PCI device, then the the first of these hosts should be"},{"line_number":13,"context_line":"prefered. If the instance does not request a PCI device, then the"},{"line_number":14,"context_line":"last of these hosts should be prefered."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"This change ensures (a) an instance with PCI requirements has the best"},{"line_number":17,"context_line":"possible change of scheduling successfully and (b) an instance without"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"9a629dbe_be482b5d","line":14,"in_reply_to":"ba5da102_cbfa1943","updated":"2016-11-07 16:21:13.000000000","message":"Good catch. I\u0027ve stopped weighting hosts with varying amounts of PCI devices differently. Hosts either have PCI devices, or they do not.","commit_id":"2e7e7c6157ca0935112fb6f1245fff50e9a21681"},{"author":{"_account_id":13404,"name":"Alberto Planas","email":"aplanas@gmail.com","username":"aplanas"},"change_message_id":"db63f60c597701f943c33979f41b6c07371a0b33","unresolved":false,"context_lines":[{"line_number":9,"context_line":"Take three hosts, one with many PCI device(s), one with a single PCI"},{"line_number":10,"context_line":"device, and one with no PCI devices. nova should prioritise these"},{"line_number":11,"context_line":"differently based on the demands of the instance. If the instance"},{"line_number":12,"context_line":"requests a PCI device, then the the first of these hosts should be"},{"line_number":13,"context_line":"prefered. If the instance does not request a PCI device, then the"},{"line_number":14,"context_line":"last of these hosts should be prefered."},{"line_number":15,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"9a629dbe_9309792f","line":12,"updated":"2016-11-08 12:19:19.000000000","message":"double `the`","commit_id":"8b62941e8a15bd6a76753a2241fb8e642fcb5a4f"},{"author":{"_account_id":14511,"name":"Maciej Szankin","email":"maciej+review@szankin.pl","username":"mszankin"},"change_message_id":"b211e32a17982ec53915f23ccf166c37b3f06060","unresolved":false,"context_lines":[{"line_number":14,"context_line":"of these hosts should be prefered."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"This change ensures (a) an instance with PCI requirements has the best"},{"line_number":17,"context_line":"possible change of scheduling successfully and (b) an instance without"},{"line_number":18,"context_line":"these requirements won\u0027t clogg up hosts that have these valuable"},{"line_number":19,"context_line":"resources."},{"line_number":20,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":13,"id":"3a461143_4302330b","line":17,"range":{"start_line":17,"start_character":9,"end_line":17,"end_character":15},"updated":"2017-01-31 15:26:47.000000000","message":"Chance, perhaps?","commit_id":"7a0bccf271986cf57febe0aac51864944bb1089c"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"e7c9895c6cd38d94adc383ce150475fb2be04954","unresolved":false,"context_lines":[{"line_number":14,"context_line":"of these hosts should be prefered."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"This change ensures (a) an instance with PCI requirements has the best"},{"line_number":17,"context_line":"possible change of scheduling successfully and (b) an instance without"},{"line_number":18,"context_line":"these requirements won\u0027t clogg up hosts that have these valuable"},{"line_number":19,"context_line":"resources."},{"line_number":20,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":18,"id":"df140735_88fb9a77","line":17,"range":{"start_line":17,"start_character":9,"end_line":17,"end_character":15},"updated":"2017-06-02 00:58:51.000000000","message":"chance","commit_id":"0b6b310626b38495700496e65a27c52af3570eff"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"28aee42ebd6fea9e6c15f2ecf73177fa80840e12","unresolved":false,"context_lines":[{"line_number":14,"context_line":"of these hosts should be prefered."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"This change ensures (a) an instance with PCI requirements has the best"},{"line_number":17,"context_line":"possible change of scheduling successfully and (b) an instance without"},{"line_number":18,"context_line":"these requirements won\u0027t clogg up hosts that have these valuable"},{"line_number":19,"context_line":"resources."},{"line_number":20,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":18,"id":"df140735_913dfe2c","line":17,"range":{"start_line":17,"start_character":9,"end_line":17,"end_character":15},"in_reply_to":"df140735_88fb9a77","updated":"2017-06-02 14:08:18.000000000","message":"Done","commit_id":"0b6b310626b38495700496e65a27c52af3570eff"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"e7c9895c6cd38d94adc383ce150475fb2be04954","unresolved":false,"context_lines":[{"line_number":15,"context_line":""},{"line_number":16,"context_line":"This change ensures (a) an instance with PCI requirements has the best"},{"line_number":17,"context_line":"possible change of scheduling successfully and (b) an instance without"},{"line_number":18,"context_line":"these requirements won\u0027t clogg up hosts that have these valuable"},{"line_number":19,"context_line":"resources."},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"Change-Id: I04bf7e6b8324dcac6c93b0cb69c38c30fb05be56"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":18,"id":"df140735_68f8467a","line":18,"range":{"start_line":18,"start_character":25,"end_line":18,"end_character":30},"updated":"2017-06-02 00:58:51.000000000","message":"clog","commit_id":"0b6b310626b38495700496e65a27c52af3570eff"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"28aee42ebd6fea9e6c15f2ecf73177fa80840e12","unresolved":false,"context_lines":[{"line_number":15,"context_line":""},{"line_number":16,"context_line":"This change ensures (a) an instance with PCI requirements has the best"},{"line_number":17,"context_line":"possible change of scheduling successfully and (b) an instance without"},{"line_number":18,"context_line":"these requirements won\u0027t clogg up hosts that have these valuable"},{"line_number":19,"context_line":"resources."},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"Change-Id: I04bf7e6b8324dcac6c93b0cb69c38c30fb05be56"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":18,"id":"df140735_5143e6af","line":18,"range":{"start_line":18,"start_character":25,"end_line":18,"end_character":30},"in_reply_to":"df140735_68f8467a","updated":"2017-06-02 14:08:18.000000000","message":"Done","commit_id":"0b6b310626b38495700496e65a27c52af3570eff"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"bf595b45d8993bf4999b7974d2294ddba90e6d6d","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Add PCIWeigher"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Take three hosts, one with many PCI device(s), one with a single PCI"},{"line_number":10,"context_line":"device and one with no PCI devices. nova should prioritise these"},{"line_number":11,"context_line":"differently based on the demands of the instance. If the instance"},{"line_number":12,"context_line":"requests a PCI device, then the first of these hosts should be"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":19,"id":"df140735_99a2b7ad","line":9,"updated":"2017-06-02 15:55:48.000000000","message":"this is ambiguous. I assume you mean devices free, but it\u0027s not clear.","commit_id":"1873658c3c11d8d59d53407a94886a04a65abb1b"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"d3366dd5b3599ce3c8dcf2addde74f53c4f0fd90","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Add PCIWeigher"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Take three hosts, one with many PCI device(s), one with a single PCI"},{"line_number":10,"context_line":"device and one with no PCI devices. nova should prioritise these"},{"line_number":11,"context_line":"differently based on the demands of the instance. If the instance"},{"line_number":12,"context_line":"requests a PCI device, then the first of these hosts should be"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":19,"id":"df140735_200b232a","line":9,"in_reply_to":"df140735_99a2b7ad","updated":"2017-06-06 08:59:30.000000000","message":"Yup - I\u0027ll clarify this","commit_id":"1873658c3c11d8d59d53407a94886a04a65abb1b"}],"doc/source/filter_scheduler.rst":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"e7c9895c6cd38d94adc383ce150475fb2be04954","unresolved":false,"context_lines":[{"line_number":434,"context_line":"  workload compute hosts, the weighing has the opposite effect of the default."},{"line_number":435,"context_line":""},{"line_number":436,"context_line":"* |PCIWeigher| Compute a weighting based on the the PCI availability per host"},{"line_number":437,"context_line":"  compared to the PCI requirements of the instance. The largest weight defines"},{"line_number":438,"context_line":"  the best match given the instances requirements. Only positive values are"},{"line_number":439,"context_line":"  allowed for the multiplier as a negative value would force non-PCI instances"},{"line_number":440,"context_line":"  away from non-PCI hosts, thus, causing future scheduling issues."},{"line_number":441,"context_line":""}],"source_content_type":"text/x-rst","patch_set":18,"id":"df140735_487ea2af","line":438,"range":{"start_line":437,"start_character":52,"end_line":438,"end_character":50},"updated":"2017-06-02 00:58:51.000000000","message":"Reading this and the config option help would be a lot more clear if there was an example, like you have in the commit message.","commit_id":"0b6b310626b38495700496e65a27c52af3570eff"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"28aee42ebd6fea9e6c15f2ecf73177fa80840e12","unresolved":false,"context_lines":[{"line_number":434,"context_line":"  workload compute hosts, the weighing has the opposite effect of the default."},{"line_number":435,"context_line":""},{"line_number":436,"context_line":"* |PCIWeigher| Compute a weighting based on the the PCI availability per host"},{"line_number":437,"context_line":"  compared to the PCI requirements of the instance. The largest weight defines"},{"line_number":438,"context_line":"  the best match given the instances requirements. Only positive values are"},{"line_number":439,"context_line":"  allowed for the multiplier as a negative value would force non-PCI instances"},{"line_number":440,"context_line":"  away from non-PCI hosts, thus, causing future scheduling issues."},{"line_number":441,"context_line":""}],"source_content_type":"text/x-rst","patch_set":18,"id":"df140735_714dcac2","line":438,"range":{"start_line":437,"start_character":52,"end_line":438,"end_character":50},"in_reply_to":"df140735_487ea2af","updated":"2017-06-02 14:08:18.000000000","message":"Yup, done. I was trying to keep it similar to the existing docs without good reason","commit_id":"0b6b310626b38495700496e65a27c52af3570eff"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"8a5bbc42109b6ecc927f269ce4553322a1ae5d8d","unresolved":false,"context_lines":[{"line_number":438,"context_line":"  given three hosts - one with a single PCI device, one with many PCI devices,"},{"line_number":439,"context_line":"  and one with no PCI devices - nova should prioritise these differently based"},{"line_number":440,"context_line":"  on the demands of the instance. If the instance requests a single PCI device,"},{"line_number":441,"context_line":"  then the first of the hosts should be preferred.  Similarly, if the instance"},{"line_number":442,"context_line":"  requests multiple PCI devices, then the second of these hosts would be"},{"line_number":443,"context_line":"  preferred. Finally, if the instance does not request a PCI device, then the"},{"line_number":444,"context_line":"  last of these hosts should be preferred."}],"source_content_type":"text/x-rst","patch_set":20,"id":"df140735_755acd2a","line":441,"range":{"start_line":441,"start_character":50,"end_line":441,"end_character":52},"updated":"2017-06-07 11:40:25.000000000","message":"Your inconsistency with single and double spaces is killing kittens.","commit_id":"f47d03e5076311949fde6b9c785aa314f8f53831"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"a3b5a83be29e29101e899783b446b8ecf6cf8ef2","unresolved":false,"context_lines":[{"line_number":438,"context_line":"  given three hosts - one with a single PCI device, one with many PCI devices,"},{"line_number":439,"context_line":"  and one with no PCI devices - nova should prioritise these differently based"},{"line_number":440,"context_line":"  on the demands of the instance. If the instance requests a single PCI device,"},{"line_number":441,"context_line":"  then the first of the hosts should be preferred.  Similarly, if the instance"},{"line_number":442,"context_line":"  requests multiple PCI devices, then the second of these hosts would be"},{"line_number":443,"context_line":"  preferred. Finally, if the instance does not request a PCI device, then the"},{"line_number":444,"context_line":"  last of these hosts should be preferred."}],"source_content_type":"text/x-rst","patch_set":20,"id":"df140735_359e9554","line":441,"range":{"start_line":441,"start_character":50,"end_line":441,"end_character":52},"in_reply_to":"df140735_755acd2a","updated":"2017-06-07 12:26:11.000000000","message":"It\u0027s vim\u0027s autowrapping and I don\u0027t know how to fix it :(","commit_id":"f47d03e5076311949fde6b9c785aa314f8f53831"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"8a5bbc42109b6ecc927f269ce4553322a1ae5d8d","unresolved":false,"context_lines":[{"line_number":443,"context_line":"  preferred. Finally, if the instance does not request a PCI device, then the"},{"line_number":444,"context_line":"  last of these hosts should be preferred."},{"line_number":445,"context_line":""},{"line_number":446,"context_line":"  Only positive values are allowed for the multiplier as a negative value would"},{"line_number":447,"context_line":"  force non-PCI instances away from non-PCI hosts, thus, causing future"},{"line_number":448,"context_line":"  scheduling issues."},{"line_number":449,"context_line":""}],"source_content_type":"text/x-rst","patch_set":20,"id":"df140735_b5ece529","line":446,"range":{"start_line":446,"start_character":43,"end_line":446,"end_character":53},"updated":"2017-06-07 11:40:25.000000000","message":"Maybe note somewhere in here that the multiplier is configurable via the [filter_scheduler]/pci_weight_multiplier option to tie things together.","commit_id":"f47d03e5076311949fde6b9c785aa314f8f53831"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"a3b5a83be29e29101e899783b446b8ecf6cf8ef2","unresolved":false,"context_lines":[{"line_number":443,"context_line":"  preferred. Finally, if the instance does not request a PCI device, then the"},{"line_number":444,"context_line":"  last of these hosts should be preferred."},{"line_number":445,"context_line":""},{"line_number":446,"context_line":"  Only positive values are allowed for the multiplier as a negative value would"},{"line_number":447,"context_line":"  force non-PCI instances away from non-PCI hosts, thus, causing future"},{"line_number":448,"context_line":"  scheduling issues."},{"line_number":449,"context_line":""}],"source_content_type":"text/x-rst","patch_set":20,"id":"df140735_d8078d18","line":446,"range":{"start_line":446,"start_character":43,"end_line":446,"end_character":53},"in_reply_to":"df140735_b5ece529","updated":"2017-06-07 12:26:11.000000000","message":"Done","commit_id":"f47d03e5076311949fde6b9c785aa314f8f53831"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"3cad50547d25fe857f3d92289aa5e13833d3bbdc","unresolved":false,"context_lines":[{"line_number":433,"context_line":"  hosts. If the multiplier is positive, the weigher prefer choosing heavy"},{"line_number":434,"context_line":"  workload compute hosts, the weighing has the opposite effect of the default."},{"line_number":435,"context_line":""},{"line_number":436,"context_line":"* |PCIWeigher| Compute a weighting based on the number of PCI devices on the"},{"line_number":437,"context_line":"  host and the number of PCI devices requested by the instance. For example,"},{"line_number":438,"context_line":"  given three hosts - one with a single PCI device, one with many PCI devices,"},{"line_number":439,"context_line":"  and one with no PCI devices - nova should prioritise these differently based"}],"source_content_type":"text/x-rst","patch_set":21,"id":"df140735_f82ed1f8","line":436,"range":{"start_line":436,"start_character":3,"end_line":436,"end_character":13},"updated":"2017-06-07 12:36:21.000000000","message":"As noted in PS20, we should mention that NUMATopologyFilter should be enabled when relying on this weigher.","commit_id":"386cbc6d006313afb3c6f72040350b63884029a6"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"66dc8c4e01f8ce42aafd1a397b3fd5b5b0426319","unresolved":false,"context_lines":[{"line_number":433,"context_line":"  hosts. If the multiplier is positive, the weigher prefer choosing heavy"},{"line_number":434,"context_line":"  workload compute hosts, the weighing has the opposite effect of the default."},{"line_number":435,"context_line":""},{"line_number":436,"context_line":"* |PCIWeigher| Compute a weighting based on the number of PCI devices on the"},{"line_number":437,"context_line":"  host and the number of PCI devices requested by the instance. For example,"},{"line_number":438,"context_line":"  given three hosts - one with a single PCI device, one with many PCI devices,"},{"line_number":439,"context_line":"  and one with no PCI devices - nova should prioritise these differently based"}],"source_content_type":"text/x-rst","patch_set":21,"id":"df140735_5e9da564","line":436,"range":{"start_line":436,"start_character":3,"end_line":436,"end_character":13},"in_reply_to":"df140735_f82ed1f8","updated":"2017-06-07 13:22:42.000000000","message":"Done","commit_id":"386cbc6d006313afb3c6f72040350b63884029a6"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"16313f3c344fad24b3b7ef6d8ec260f23f39c117","unresolved":false,"context_lines":[{"line_number":443,"context_line":"  preferred. Finally, if the instance does not request a PCI device, then the"},{"line_number":444,"context_line":"  last of these hosts should be preferred."},{"line_number":445,"context_line":""},{"line_number":446,"context_line":"  For this to be of any value, the |NUMATopologyFilter| must be enabled."},{"line_number":447,"context_line":""},{"line_number":448,"context_line":"  :Configuration Option: ``[filter_scheduler] pci_weight_multiplier``. Only"},{"line_number":449,"context_line":"    positive values are allowed for the multiplier as a negative value would"}],"source_content_type":"text/x-rst","patch_set":22,"id":"df140735_328d7d7b","line":446,"range":{"start_line":446,"start_character":36,"end_line":446,"end_character":54},"updated":"2017-06-07 17:11:12.000000000","message":"Random question, but why is the PCIWeigher dependent on the NUMATopologyFilter rather than the PciPassthroughFilter? I see that the NUMATopologyFilter also looks at PCI requests, but is the difference that the NUMA filter also checks available numa cells and the PCI pass through filter is just checking PCI, with nothing related to NUMA?","commit_id":"6773c3aeb08b02acdcc561d057b362242a776837"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"45a6b1ea07efd5bcc2527ebe1cbd4fc34dc5ed44","unresolved":false,"context_lines":[{"line_number":443,"context_line":"  preferred. Finally, if the instance does not request a PCI device, then the"},{"line_number":444,"context_line":"  last of these hosts should be preferred."},{"line_number":445,"context_line":""},{"line_number":446,"context_line":"  For this to be of any value, the |NUMATopologyFilter| must be enabled."},{"line_number":447,"context_line":""},{"line_number":448,"context_line":"  :Configuration Option: ``[filter_scheduler] pci_weight_multiplier``. Only"},{"line_number":449,"context_line":"    positive values are allowed for the multiplier as a negative value would"}],"source_content_type":"text/x-rst","patch_set":22,"id":"bf091321_9e358bfa","line":446,"range":{"start_line":446,"start_character":36,"end_line":446,"end_character":54},"in_reply_to":"df140735_328d7d7b","updated":"2017-06-08 08:44:55.000000000","message":"This took me a bit to figure out. It would appear that both filters make calls to the nova.pci.stats.PciDeviceStats.support_requests method, the only difference being that the NumaTopologyFilter call passes in a list of NUMA cells that the PCI device must be affined to while the PciPassthroughFilter does no such thing. I guess this means at least one of the two filters must be enabled","commit_id":"6773c3aeb08b02acdcc561d057b362242a776837"}],"nova/conf/scheduler.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"e7c9895c6cd38d94adc383ce150475fb2be04954","unresolved":false,"context_lines":[{"line_number":445,"context_line":"PCI device affinity weight multiplier."},{"line_number":446,"context_line":""},{"line_number":447,"context_line":"Possible values:"},{"line_number":448,"context_line":"* A positive integer or float value, where the value corresponds to weight"},{"line_number":449,"context_line":"  multipler for hosts without PCI devices when an instance doesn\u0027t require"},{"line_number":450,"context_line":"  PCI devices."},{"line_number":451,"context_line":"\"\"\"),"}],"source_content_type":"text/x-python","patch_set":18,"id":"df140735_082d4afd","line":448,"updated":"2017-06-02 00:58:51.000000000","message":"If this were rst you\u0027d normally need a blank line before this right?","commit_id":"0b6b310626b38495700496e65a27c52af3570eff"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"e7c9895c6cd38d94adc383ce150475fb2be04954","unresolved":false,"context_lines":[{"line_number":445,"context_line":"PCI device affinity weight multiplier."},{"line_number":446,"context_line":""},{"line_number":447,"context_line":"Possible values:"},{"line_number":448,"context_line":"* A positive integer or float value, where the value corresponds to weight"},{"line_number":449,"context_line":"  multipler for hosts without PCI devices when an instance doesn\u0027t require"},{"line_number":450,"context_line":"  PCI devices."},{"line_number":451,"context_line":"\"\"\"),"}],"source_content_type":"text/x-python","patch_set":18,"id":"df140735_e81a16ca","line":448,"range":{"start_line":448,"start_character":13,"end_line":448,"end_character":20},"updated":"2017-06-02 00:58:51.000000000","message":"Since it\u0027s a FloatOpt doesn\u0027t it have to be a float? Or will oslo.config cast it to a float if you specify an int?","commit_id":"0b6b310626b38495700496e65a27c52af3570eff"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"28aee42ebd6fea9e6c15f2ecf73177fa80840e12","unresolved":false,"context_lines":[{"line_number":445,"context_line":"PCI device affinity weight multiplier."},{"line_number":446,"context_line":""},{"line_number":447,"context_line":"Possible values:"},{"line_number":448,"context_line":"* A positive integer or float value, where the value corresponds to weight"},{"line_number":449,"context_line":"  multipler for hosts without PCI devices when an instance doesn\u0027t require"},{"line_number":450,"context_line":"  PCI devices."},{"line_number":451,"context_line":"\"\"\"),"}],"source_content_type":"text/x-python","patch_set":18,"id":"df140735_6c196d20","line":448,"in_reply_to":"df140735_082d4afd","updated":"2017-06-02 14:08:18.000000000","message":"Yup. Done.","commit_id":"0b6b310626b38495700496e65a27c52af3570eff"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"28aee42ebd6fea9e6c15f2ecf73177fa80840e12","unresolved":false,"context_lines":[{"line_number":445,"context_line":"PCI device affinity weight multiplier."},{"line_number":446,"context_line":""},{"line_number":447,"context_line":"Possible values:"},{"line_number":448,"context_line":"* A positive integer or float value, where the value corresponds to weight"},{"line_number":449,"context_line":"  multipler for hosts without PCI devices when an instance doesn\u0027t require"},{"line_number":450,"context_line":"  PCI devices."},{"line_number":451,"context_line":"\"\"\"),"}],"source_content_type":"text/x-python","patch_set":18,"id":"df140735_6cf16d95","line":448,"range":{"start_line":448,"start_character":13,"end_line":448,"end_character":20},"in_reply_to":"df140735_e81a16ca","updated":"2017-06-02 14:08:18.000000000","message":"Yeah, it\u0027ll cast for you. This is copy-pasted from the other \u0027_multiplier\u0027 opts in here","commit_id":"0b6b310626b38495700496e65a27c52af3570eff"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"e7c9895c6cd38d94adc383ce150475fb2be04954","unresolved":false,"context_lines":[{"line_number":446,"context_line":""},{"line_number":447,"context_line":"Possible values:"},{"line_number":448,"context_line":"* A positive integer or float value, where the value corresponds to weight"},{"line_number":449,"context_line":"  multipler for hosts without PCI devices when an instance doesn\u0027t require"},{"line_number":450,"context_line":"  PCI devices."},{"line_number":451,"context_line":"\"\"\"),"},{"line_number":452,"context_line":"    # TODO(sfinucan): Add \u0027min\u0027 parameter and remove warning in \u0027affinity.py\u0027"}],"source_content_type":"text/x-python","patch_set":18,"id":"df140735_28a6ce54","line":449,"range":{"start_line":449,"start_character":59,"end_line":449,"end_character":66},"updated":"2017-06-02 00:58:51.000000000","message":"nit: does not\n\nFor docs I generally avoid contractions.","commit_id":"0b6b310626b38495700496e65a27c52af3570eff"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"28aee42ebd6fea9e6c15f2ecf73177fa80840e12","unresolved":false,"context_lines":[{"line_number":446,"context_line":""},{"line_number":447,"context_line":"Possible values:"},{"line_number":448,"context_line":"* A positive integer or float value, where the value corresponds to weight"},{"line_number":449,"context_line":"  multipler for hosts without PCI devices when an instance doesn\u0027t require"},{"line_number":450,"context_line":"  PCI devices."},{"line_number":451,"context_line":"\"\"\"),"},{"line_number":452,"context_line":"    # TODO(sfinucan): Add \u0027min\u0027 parameter and remove warning in \u0027affinity.py\u0027"}],"source_content_type":"text/x-python","patch_set":18,"id":"df140735_8c260115","line":449,"range":{"start_line":449,"start_character":59,"end_line":449,"end_character":66},"in_reply_to":"df140735_28a6ce54","updated":"2017-06-02 14:08:18.000000000","message":"Done","commit_id":"0b6b310626b38495700496e65a27c52af3570eff"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"bf595b45d8993bf4999b7974d2294ddba90e6d6d","unresolved":false,"context_lines":[{"line_number":448,"context_line":""},{"line_number":449,"context_line":"* A positive integer or float value, where the value corresponds to weight"},{"line_number":450,"context_line":"  multipler for hosts without PCI devices when an instance does not require"},{"line_number":451,"context_line":"  PCI devices."},{"line_number":452,"context_line":"\"\"\"),"},{"line_number":453,"context_line":"    # TODO(sfinucan): Add \u0027min\u0027 parameter and remove warning in \u0027affinity.py\u0027"},{"line_number":454,"context_line":"    cfg.FloatOpt(\"soft_affinity_weight_multiplier\","}],"source_content_type":"text/x-python","patch_set":19,"id":"df140735_59809fbf","line":451,"updated":"2017-06-02 15:55:48.000000000","message":"The description sounds like it is a describing a config with a name of \"not_pci_weight_multiplier\"?","commit_id":"1873658c3c11d8d59d53407a94886a04a65abb1b"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"d3366dd5b3599ce3c8dcf2addde74f53c4f0fd90","unresolved":false,"context_lines":[{"line_number":448,"context_line":""},{"line_number":449,"context_line":"* A positive integer or float value, where the value corresponds to weight"},{"line_number":450,"context_line":"  multipler for hosts without PCI devices when an instance does not require"},{"line_number":451,"context_line":"  PCI devices."},{"line_number":452,"context_line":"\"\"\"),"},{"line_number":453,"context_line":"    # TODO(sfinucan): Add \u0027min\u0027 parameter and remove warning in \u0027affinity.py\u0027"},{"line_number":454,"context_line":"    cfg.FloatOpt(\"soft_affinity_weight_multiplier\","}],"source_content_type":"text/x-python","patch_set":19,"id":"df140735_bb01a607","line":451,"in_reply_to":"df140735_59809fbf","updated":"2017-06-06 08:59:30.000000000","message":"Done","commit_id":"1873658c3c11d8d59d53407a94886a04a65abb1b"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"8a5bbc42109b6ecc927f269ce4553322a1ae5d8d","unresolved":false,"context_lines":[{"line_number":442,"context_line":"        default\u003d1.0,"},{"line_number":443,"context_line":"        min\u003d0.0,"},{"line_number":444,"context_line":"        help\u003d\"\"\""},{"line_number":445,"context_line":"PCI device affinity weight multiplier."},{"line_number":446,"context_line":""},{"line_number":447,"context_line":"Possible values:"},{"line_number":448,"context_line":""}],"source_content_type":"text/x-python","patch_set":20,"id":"df140735_15903195","line":445,"updated":"2017-06-07 11:40:25.000000000","message":"Could be nice to have a detailed description like in https://review.openstack.org/#/c/379524/18..20/doc/source/filter_scheduler.rst since I don\u0027t know if people are cross-checking both or just the config. I generally assume that, for better or worse, the config is the first exposure to things for people.","commit_id":"f47d03e5076311949fde6b9c785aa314f8f53831"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"a3b5a83be29e29101e899783b446b8ecf6cf8ef2","unresolved":false,"context_lines":[{"line_number":442,"context_line":"        default\u003d1.0,"},{"line_number":443,"context_line":"        min\u003d0.0,"},{"line_number":444,"context_line":"        help\u003d\"\"\""},{"line_number":445,"context_line":"PCI device affinity weight multiplier."},{"line_number":446,"context_line":""},{"line_number":447,"context_line":"Possible values:"},{"line_number":448,"context_line":""}],"source_content_type":"text/x-python","patch_set":20,"id":"df140735_b85a9927","line":445,"in_reply_to":"df140735_15903195","updated":"2017-06-07 12:26:11.000000000","message":"Done","commit_id":"f47d03e5076311949fde6b9c785aa314f8f53831"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"3cad50547d25fe857f3d92289aa5e13833d3bbdc","unresolved":false,"context_lines":[{"line_number":446,"context_line":""},{"line_number":447,"context_line":"The PCI device affinity weighter computes a weighting based on the number of"},{"line_number":448,"context_line":"PCI devices on the host and the number of PCI devices requested by the"},{"line_number":449,"context_line":"instance. For more information, refer to the filter documentation."},{"line_number":450,"context_line":""},{"line_number":451,"context_line":"Possible values:"},{"line_number":452,"context_line":""}],"source_content_type":"text/x-python","patch_set":21,"id":"df140735_381d69bd","line":449,"range":{"start_line":449,"start_character":10,"end_line":449,"end_character":65},"updated":"2017-06-07 12:36:21.000000000","message":"Eww, where is the filter documentation, one might ask. :)\n\nWe should also mention that NUMATopologyFilter should be enabled when relying on this weigher or changing this value.","commit_id":"386cbc6d006313afb3c6f72040350b63884029a6"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"a4bffabda61d89d44a961d0eb99ed713d1ab7633","unresolved":false,"context_lines":[{"line_number":446,"context_line":""},{"line_number":447,"context_line":"The PCI device affinity weighter computes a weighting based on the number of"},{"line_number":448,"context_line":"PCI devices on the host and the number of PCI devices requested by the"},{"line_number":449,"context_line":"instance. For more information, refer to the filter documentation."},{"line_number":450,"context_line":""},{"line_number":451,"context_line":"Possible values:"},{"line_number":452,"context_line":""}],"source_content_type":"text/x-python","patch_set":21,"id":"df140735_fb65ab46","line":449,"range":{"start_line":449,"start_character":10,"end_line":449,"end_character":65},"in_reply_to":"df140735_381d69bd","updated":"2017-06-07 13:04:29.000000000","message":"Can we at least link to the docs in here?\n\nhttps://docs.openstack.org/developer/nova/filter_scheduler.html","commit_id":"386cbc6d006313afb3c6f72040350b63884029a6"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"66dc8c4e01f8ce42aafd1a397b3fd5b5b0426319","unresolved":false,"context_lines":[{"line_number":446,"context_line":""},{"line_number":447,"context_line":"The PCI device affinity weighter computes a weighting based on the number of"},{"line_number":448,"context_line":"PCI devices on the host and the number of PCI devices requested by the"},{"line_number":449,"context_line":"instance. For more information, refer to the filter documentation."},{"line_number":450,"context_line":""},{"line_number":451,"context_line":"Possible values:"},{"line_number":452,"context_line":""}],"source_content_type":"text/x-python","patch_set":21,"id":"df140735_fea479bb","line":449,"range":{"start_line":449,"start_character":10,"end_line":449,"end_character":65},"in_reply_to":"df140735_fb65ab46","updated":"2017-06-07 13:22:42.000000000","message":"Done","commit_id":"386cbc6d006313afb3c6f72040350b63884029a6"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"3cad50547d25fe857f3d92289aa5e13833d3bbdc","unresolved":false,"context_lines":[{"line_number":451,"context_line":"Possible values:"},{"line_number":452,"context_line":""},{"line_number":453,"context_line":"* A positive integer or float value, where the value corresponds to the"},{"line_number":454,"context_line":"  multipler ratio for this weigher."},{"line_number":455,"context_line":"\"\"\"),"},{"line_number":456,"context_line":"    # TODO(sfinucan): Add \u0027min\u0027 parameter and remove warning in \u0027affinity.py\u0027"},{"line_number":457,"context_line":"    cfg.FloatOpt(\"soft_affinity_weight_multiplier\","}],"source_content_type":"text/x-python","patch_set":21,"id":"df140735_f87c91ec","line":454,"range":{"start_line":454,"start_character":2,"end_line":454,"end_character":11},"updated":"2017-06-07 12:36:21.000000000","message":"multiplier - I know it\u0027s copied from above which also has the typo.","commit_id":"386cbc6d006313afb3c6f72040350b63884029a6"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"66dc8c4e01f8ce42aafd1a397b3fd5b5b0426319","unresolved":false,"context_lines":[{"line_number":451,"context_line":"Possible values:"},{"line_number":452,"context_line":""},{"line_number":453,"context_line":"* A positive integer or float value, where the value corresponds to the"},{"line_number":454,"context_line":"  multipler ratio for this weigher."},{"line_number":455,"context_line":"\"\"\"),"},{"line_number":456,"context_line":"    # TODO(sfinucan): Add \u0027min\u0027 parameter and remove warning in \u0027affinity.py\u0027"},{"line_number":457,"context_line":"    cfg.FloatOpt(\"soft_affinity_weight_multiplier\","}],"source_content_type":"text/x-python","patch_set":21,"id":"df140735_1ebbade5","line":454,"range":{"start_line":454,"start_character":2,"end_line":454,"end_character":11},"in_reply_to":"df140735_f87c91ec","updated":"2017-06-07 13:22:42.000000000","message":"Done","commit_id":"386cbc6d006313afb3c6f72040350b63884029a6"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"16313f3c344fad24b3b7ef6d8ec260f23f39c117","unresolved":false,"context_lines":[{"line_number":447,"context_line":"The PCI device affinity weighter computes a weighting based on the number of"},{"line_number":448,"context_line":"PCI devices on the host and the number of PCI devices requested by the"},{"line_number":449,"context_line":"instance. The ``NUMATopologyFilter`` filter must be enabled for this to have"},{"line_number":450,"context_line":"any significance. For more information, refer to the `filter documentation"},{"line_number":451,"context_line":"\u003chttps://docs.openstack.org/developer/nova/filter_scheduler.html\u003e`__."},{"line_number":452,"context_line":""},{"line_number":453,"context_line":"Possible values:"},{"line_number":454,"context_line":""}],"source_content_type":"text/x-python","patch_set":22,"id":"df140735_72f415d0","line":451,"range":{"start_line":450,"start_character":53,"end_line":451,"end_character":68},"updated":"2017-06-07 17:11:12.000000000","message":"This isn\u0027t really formatted in rst:\n\nhttp://docs-draft.openstack.org/24/379524/22/check/gate-nova-docs-ubuntu-xenial/e296255//doc/build/html/sample_config.html\n\nSo you could just do something like:\n\nFor more information, refer to the filter documentation: https://docs.openstack.org/developer/nova/filter_scheduler.html","commit_id":"6773c3aeb08b02acdcc561d057b362242a776837"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"45a6b1ea07efd5bcc2527ebe1cbd4fc34dc5ed44","unresolved":false,"context_lines":[{"line_number":447,"context_line":"The PCI device affinity weighter computes a weighting based on the number of"},{"line_number":448,"context_line":"PCI devices on the host and the number of PCI devices requested by the"},{"line_number":449,"context_line":"instance. The ``NUMATopologyFilter`` filter must be enabled for this to have"},{"line_number":450,"context_line":"any significance. For more information, refer to the `filter documentation"},{"line_number":451,"context_line":"\u003chttps://docs.openstack.org/developer/nova/filter_scheduler.html\u003e`__."},{"line_number":452,"context_line":""},{"line_number":453,"context_line":"Possible values:"},{"line_number":454,"context_line":""}],"source_content_type":"text/x-python","patch_set":22,"id":"bf091321_7e13d767","line":451,"range":{"start_line":450,"start_character":53,"end_line":451,"end_character":68},"in_reply_to":"df140735_72f415d0","updated":"2017-06-08 08:44:55.000000000","message":"It\u0027s not formatted as rST here, but it is when parsed by the config-reference tooling [1]. I probably don\u0027t need to cater for that though, so I\u0027ll strip this out here.\n\n[1] https://docs.openstack.org/newton/config-reference/compute/config-options.html","commit_id":"6773c3aeb08b02acdcc561d057b362242a776837"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"d9d2644529793e633c32ad16cf5875b3bdbdcaf1","unresolved":false,"context_lines":[{"line_number":446,"context_line":""},{"line_number":447,"context_line":"The PCI device affinity weighter computes a weighting based on the number of"},{"line_number":448,"context_line":"PCI devices on the host and the number of PCI devices requested by the"},{"line_number":449,"context_line":"instance. The ``NUMATopologyFilter`` filter must be enabled for this to have"},{"line_number":450,"context_line":"any significance. For more information, refer to the filter documentation:"},{"line_number":451,"context_line":""},{"line_number":452,"context_line":"    https://docs.openstack.org/developer/nova/filter_scheduler.html"}],"source_content_type":"text/x-python","patch_set":23,"id":"bf091321_a0cb85a3","line":449,"range":{"start_line":449,"start_character":16,"end_line":449,"end_character":34},"updated":"2017-06-08 12:36:22.000000000","message":"nit: or PciPassthroughFilter - if you need to respin.","commit_id":"ec74cc688e1bbfc2f16cfe9473551fd261c6e78e"}],"nova/scheduler/weights/pci.py":[{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"2a2c196b47c754cd2e11d7df5863197b046b270a","unresolved":false,"context_lines":[{"line_number":60,"context_line":"            host B ratio: 1.00  # winner"},{"line_number":61,"context_line":"            host C ratio: 0.60"},{"line_number":62,"context_line":"        \"\"\""},{"line_number":63,"context_line":"        total \u003d sum([pool[\u0027count\u0027] for pool in host_state.pci_stats.pools])"},{"line_number":64,"context_line":"        ratio \u003d (self.max_pci_devices - total) / self.max_pci_devices"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"        if request_spec.pci_requests:"},{"line_number":67,"context_line":"            # if instance has requested PCI devices, then hosts with lower"},{"line_number":68,"context_line":"            # ratios (i.e. more PCI devices) should be prefered. Reverse values"},{"line_number":69,"context_line":"            ratio \u003d 1.0 - ratio"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"        return ratio"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a98d1f4_29b10390","line":71,"range":{"start_line":63,"start_character":0,"end_line":71,"end_character":20},"updated":"2016-09-29 15:41:23.000000000","message":"Actually, the BaseHostWeigher class does this normalization for us. I\u0027ll respin with this removed.","commit_id":"28553805c45a277da58542fd65f6d907cac3ef06"},{"author":{"_account_id":9569,"name":"Sergey Nikitin","email":"nikitinserv@gmail.com","username":"snikitin"},"change_message_id":"a41aa952d7e578b87fde8cc80821b944dbfb18e2","unresolved":false,"context_lines":[{"line_number":34,"context_line":"        return CONF.pci_weight_multiplier"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"    def _weigh_object(self, host_state, request_spec):"},{"line_number":37,"context_line":"        \"\"\"Higher weights win.  We want to keep PCI hosts free unless needed."},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"        If PCI device(s) are requested, prefer hosts with more PCI devices. If"},{"line_number":40,"context_line":"        PCI device(s) are not requested, prefer hosts with fewer (ideally none)"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a98d1f4_ec448975","line":37,"range":{"start_line":37,"start_character":30,"end_line":37,"end_character":32},"updated":"2016-09-29 16:09:19.000000000","message":"two spaces","commit_id":"e291059cf87617fd0cee4af2d43120efab6bb440"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"0e949738e1d5364593bdcd90e0548b47adaad4bb","unresolved":false,"context_lines":[{"line_number":34,"context_line":"        return CONF.pci_weight_multiplier"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"    def _weigh_object(self, host_state, request_spec):"},{"line_number":37,"context_line":"        \"\"\"Higher weights win.  We want to keep PCI hosts free unless needed."},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"        If PCI device(s) are requested, prefer hosts with more PCI devices. If"},{"line_number":40,"context_line":"        PCI device(s) are not requested, prefer hosts with fewer (ideally none)"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a98d1f4_4d2654cf","line":37,"range":{"start_line":37,"start_character":30,"end_line":37,"end_character":32},"in_reply_to":"3a98d1f4_ec448975","updated":"2016-09-29 17:41:35.000000000","message":"Yeah, all the weighers (weighters?) use this so I was being consistent","commit_id":"e291059cf87617fd0cee4af2d43120efab6bb440"},{"author":{"_account_id":9569,"name":"Sergey Nikitin","email":"nikitinserv@gmail.com","username":"snikitin"},"change_message_id":"a41aa952d7e578b87fde8cc80821b944dbfb18e2","unresolved":false,"context_lines":[{"line_number":46,"context_line":"            # if instance has not requested PCI devices, then hosts with less"},{"line_number":47,"context_line":"            # PCI devices should be prefered. Reverse values"},{"line_number":48,"context_line":"            total \u003d -total"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"        return total"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a98d1f4_8f45b7b4","line":49,"updated":"2016-09-29 16:09:19.000000000","message":"Just an idea. We do *not* obliged to implement this idea.\n\nAs you know if NUMA topology information isn\u0027t exposed then a PCI device is set as belonging to all nodes. These PCI devices \"without\" NUMA nodes are low performance than PCI associated with NUMA nodes. What if we will consider it in weigh calculation? \n\nFor example we have two hosts. First host has 5 PCI devices \"without\" NUMA nodes and second host has just 2 PCI devices associated with NUMA nodes. Obviously VMs with PCI devices booted on second host will have better performance.\n\nWhat if we will calculate \u0027total\u0027 something like:\n\n\n total \u003d pci_with_numa_count * K + pci_without_numa_count\n\nwhere \u0027K\u0027 is magic coefficient which will guarantee us that host, which has at least one PCI device associated with NUMA node, more valuable than any host without such devices (this host may have a lot of PCI devices \"without\" NUMA nodes but have *no* PCI devices associated with NUMA nodes)\n\nFor example K can be equal 100.\n\nWhat do you think?","commit_id":"e291059cf87617fd0cee4af2d43120efab6bb440"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"0e949738e1d5364593bdcd90e0548b47adaad4bb","unresolved":false,"context_lines":[{"line_number":46,"context_line":"            # if instance has not requested PCI devices, then hosts with less"},{"line_number":47,"context_line":"            # PCI devices should be prefered. Reverse values"},{"line_number":48,"context_line":"            total \u003d -total"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"        return total"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a98d1f4_100a9f21","line":49,"in_reply_to":"3a98d1f4_8f45b7b4","updated":"2016-09-29 17:41:35.000000000","message":"Let me think on it :)","commit_id":"e291059cf87617fd0cee4af2d43120efab6bb440"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"439ff4a8fd40c5f8268390618884a0e42d3c7126","unresolved":false,"context_lines":[{"line_number":41,"context_line":"        devices."},{"line_number":42,"context_line":"        \"\"\""},{"line_number":43,"context_line":"        stats \u003d host_state.pci_stats"},{"line_number":44,"context_line":"        total \u003d sum([pool[\u0027count\u0027] for pool in stats.pools]) if stats else 0"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"        if not request_spec.pci_requests:"},{"line_number":47,"context_line":"            # if instance has not requested PCI devices, then hosts with less"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa6399be_92c75e97","line":44,"updated":"2016-10-20 15:41:28.000000000","message":"So we are adding a time complexity which is going to grow here... I\u0027m little bit mitigate. I don\u0027t know if we should only verify whether the host have or not pools. May be it\u0027s not needed to compute the number of devices.","commit_id":"2e7e7c6157ca0935112fb6f1245fff50e9a21681"},{"author":{"_account_id":8802,"name":"Vladik Romanovsky","email":"vromanso@redhat.com","username":"vladikr"},"change_message_id":"ff2d49b3eef2d249f94530f83c6ee812c81ec7f2","unresolved":false,"context_lines":[{"line_number":41,"context_line":"        devices."},{"line_number":42,"context_line":"        \"\"\""},{"line_number":43,"context_line":"        stats \u003d host_state.pci_stats"},{"line_number":44,"context_line":"        total \u003d sum([pool[\u0027count\u0027] for pool in stats.pools]) if stats else 0"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"        if not request_spec.pci_requests:"},{"line_number":47,"context_line":"            # if instance has not requested PCI devices, then hosts with less"}],"source_content_type":"text/x-python","patch_set":7,"id":"da6895a0_d8e184d2","line":44,"in_reply_to":"fa6399be_92c75e97","updated":"2016-10-21 00:37:30.000000000","message":"The goal here is to weight the hosts according to the number of relevant pci devices, so just to know if pools exist is not enough, imo.\n\nMoreover, I just can\u0027t believe that there can possible be a large number of different pools on a given host.\nI wouldn\u0027t be concern about this sum.","commit_id":"2e7e7c6157ca0935112fb6f1245fff50e9a21681"},{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"85b6f3191028d40c7d840c74244794ff78877e64","unresolved":false,"context_lines":[{"line_number":44,"context_line":"        # NOTE(sfinucan): We don\u0027t actually distinguish between varying amounts"},{"line_number":45,"context_line":"        # of PCI devices as we simply don\u0027t care. We only care if a node has"},{"line_number":46,"context_line":"        # PCI devices or not."},{"line_number":47,"context_line":"        total \u003d 1 if total else 0"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"        if not request_spec.pci_requests:"},{"line_number":50,"context_line":"            # if instance has not requested PCI devices, then hosts with no PCI"}],"source_content_type":"text/x-python","patch_set":8,"id":"9a629dbe_e6d85920","line":47,"updated":"2016-11-07 18:03:32.000000000","message":"So instead of preferring hosts with the largest number of available PCI devices, we now just arbitrarily pick any host with PCI devices. This still suffers from the problem I described before whereby we end up with fragmentation - its just that instead of always causing fragmentation, we now just randomly cause framgmentation. \n\nIMHO we should be preferring hosts with the smallest available number of PCI devices.  ie, if the guest required 1 PCI device, we should prefer hosts with 1 PCI device available, leaving host with 2 PCI devices free for later guest which may require 2 PCI devices.","commit_id":"e3b436d469ab2cea8e0b26b35d807f7913407b73"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"bc8b4b3bf912dd2c680774e9f4235d6602c38b9b","unresolved":false,"context_lines":[{"line_number":44,"context_line":"        # NOTE(sfinucan): We don\u0027t actually distinguish between varying amounts"},{"line_number":45,"context_line":"        # of PCI devices as we simply don\u0027t care. We only care if a node has"},{"line_number":46,"context_line":"        # PCI devices or not."},{"line_number":47,"context_line":"        total \u003d 1 if total else 0"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"        if not request_spec.pci_requests:"},{"line_number":50,"context_line":"            # if instance has not requested PCI devices, then hosts with no PCI"}],"source_content_type":"text/x-python","patch_set":8,"id":"9a629dbe_7105c5c0","line":47,"in_reply_to":"9a629dbe_b4b67088","updated":"2016-11-08 10:31:35.000000000","message":"I was nervous to introduce \"magic\" values like the 100 above. I guess the benefits outweigh this con though...","commit_id":"e3b436d469ab2cea8e0b26b35d807f7913407b73"},{"author":{"_account_id":9569,"name":"Sergey Nikitin","email":"nikitinserv@gmail.com","username":"snikitin"},"change_message_id":"b5bf9e54f420f6421bde8cf0ba75f2f86bee7bb1","unresolved":false,"context_lines":[{"line_number":44,"context_line":"        # NOTE(sfinucan): We don\u0027t actually distinguish between varying amounts"},{"line_number":45,"context_line":"        # of PCI devices as we simply don\u0027t care. We only care if a node has"},{"line_number":46,"context_line":"        # PCI devices or not."},{"line_number":47,"context_line":"        total \u003d 1 if total else 0"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"        if not request_spec.pci_requests:"},{"line_number":50,"context_line":"            # if instance has not requested PCI devices, then hosts with no PCI"}],"source_content_type":"text/x-python","patch_set":8,"id":"9a629dbe_b4b67088","line":47,"in_reply_to":"9a629dbe_e6d85920","updated":"2016-11-08 09:34:20.000000000","message":"agree with Daniel. Here you can do something like this:\n\n  total \u003d 100.0 / total\n\nhere host with larger number of PCI devices got low priority. We will fix the problem with fragmentation.","commit_id":"e3b436d469ab2cea8e0b26b35d807f7913407b73"},{"author":{"_account_id":9569,"name":"Sergey Nikitin","email":"nikitinserv@gmail.com","username":"snikitin"},"change_message_id":"bfeef56320a5b9b56088cf1a11c9d1f7e1d39441","unresolved":false,"context_lines":[{"line_number":31,"context_line":""},{"line_number":32,"context_line":"    # NOTE(sfinucan): This is an arbitrary number. You will need to increase"},{"line_number":33,"context_line":"    # this if you have more than 100 devices on a single host"},{"line_number":34,"context_line":"    max_devs \u003d 100"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"    def weight_multiplier(self):"},{"line_number":37,"context_line":"        \"\"\"Override the weight multiplier.\"\"\""}],"source_content_type":"text/x-python","patch_set":9,"id":"9a629dbe_a7cabf9f","line":34,"updated":"2016-11-08 11:11:21.000000000","message":"nit: You also can make it \"more constant\". For example move it out from class and use upper case:\n\n  MAX_DEVS \u003d 100\n\nlike: https://github.com/openstack/nova/blob/master/nova/objects/instance.py#L69-L70\n\nbut it\u0027s optional","commit_id":"940418dbd839f34f9cc2db97dce3c9c37e7a1671"},{"author":{"_account_id":13404,"name":"Alberto Planas","email":"aplanas@gmail.com","username":"aplanas"},"change_message_id":"db63f60c597701f943c33979f41b6c07371a0b33","unresolved":false,"context_lines":[{"line_number":45,"context_line":"        devices."},{"line_number":46,"context_line":"        \"\"\""},{"line_number":47,"context_line":"        stats \u003d host_state.pci_stats"},{"line_number":48,"context_line":"        total \u003d sum([pool[\u0027count\u0027] for pool in stats.pools]) if stats else 0"},{"line_number":49,"context_line":"        # reverse the \"has PCI\" values. This is necessary to prevent"},{"line_number":50,"context_line":"        # fragmentation. If we didn\u0027t do this, hosts with the most PCI devices"},{"line_number":51,"context_line":"        # would be weighted highest and would be used first. This would prevent"}],"source_content_type":"text/x-python","patch_set":10,"id":"9a629dbe_532601bb","line":48,"updated":"2016-11-08 12:19:19.000000000","message":"you can skip `[]` to use the generator inside the `sum`","commit_id":"8b62941e8a15bd6a76753a2241fb8e642fcb5a4f"},{"author":{"_account_id":13404,"name":"Alberto Planas","email":"aplanas@gmail.com","username":"aplanas"},"change_message_id":"db63f60c597701f943c33979f41b6c07371a0b33","unresolved":false,"context_lines":[{"line_number":51,"context_line":"        # would be weighted highest and would be used first. This would prevent"},{"line_number":52,"context_line":"        # instances requesting a larger number of PCI devices from launching"},{"line_number":53,"context_line":"        # successfully."},{"line_number":54,"context_line":"        total \u003d MAX_DEVS - total if total else total"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"        if not request_spec.pci_requests:"},{"line_number":57,"context_line":"            # if instance has not requested PCI devices, then hosts with less"}],"source_content_type":"text/x-python","patch_set":10,"id":"9a629dbe_33326df2","line":54,"updated":"2016-11-08 12:19:19.000000000","message":"this can be negative, not sure about the proper solution but you can add `total \u003d max(0, total)` and the end.","commit_id":"8b62941e8a15bd6a76753a2241fb8e642fcb5a4f"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"2f9b3dfb86984cfa622733e2b0450d93022082a3","unresolved":false,"context_lines":[{"line_number":49,"context_line":"        # would be weighted highest and would be used first. This would prevent"},{"line_number":50,"context_line":"        # instances requesting a larger number of PCI devices from launching"},{"line_number":51,"context_line":"        # successfully."},{"line_number":52,"context_line":"        total \u003d MAX_DEVS - min(total, MAX_DEVS - 1) if total else total"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"        if not request_spec.pci_requests:"},{"line_number":55,"context_line":"            # if instance has not requested PCI devices, then hosts with less"}],"source_content_type":"text/x-python","patch_set":16,"id":"df140735_8563d3dc","line":52,"updated":"2017-05-30 19:23:14.000000000","message":"This means hosts with \u003e 100 PCI devices would get lumped at the end in no particular order. That is, a host with 1000 devs might possibly be ordered after a host with 2000 devs. I assume having \u003e 100 PCI devices isn\u0027t really a thing, else we should make the MAX_DEVS higher.","commit_id":"673ccdd245a44ba9b91bb0e20812c24a3ab06304"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"3cbbf080f575645055d22db181180cd9ac76b96d","unresolved":false,"context_lines":[{"line_number":49,"context_line":"        # would be weighted highest and would be used first. This would prevent"},{"line_number":50,"context_line":"        # instances requesting a larger number of PCI devices from launching"},{"line_number":51,"context_line":"        # successfully."},{"line_number":52,"context_line":"        total \u003d MAX_DEVS - min(total, MAX_DEVS - 1) if total else total"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"        if not request_spec.pci_requests:"},{"line_number":55,"context_line":"            # if instance has not requested PCI devices, then hosts with less"}],"source_content_type":"text/x-python","patch_set":16,"id":"df140735_edc70812","line":52,"in_reply_to":"df140735_8563d3dc","updated":"2017-05-31 09:29:44.000000000","message":"\u003e This means hosts with \u003e 100 PCI devices would get lumped at the end in no particular order. That is, a host with 1000 devs might possibly be ordered after a host with 2000 devs.\n\nYup\n\n\u003e I assume having \u003e 100 PCI devices isn\u0027t really a thing, else we should make the MAX_DEVS higher.\n\nThat\u0027s my assessment too. I\u0027ve yet to see a board with \u003e 6 PCI slots, and even if such a board existed, the value of this filter is really in the scarcity case where there are limited PCI resources remaining and we want to preserve the ones that are there. This handles that case as expected.\n\nI\u0027ve put a variant of this comment into the code","commit_id":"673ccdd245a44ba9b91bb0e20812c24a3ab06304"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"2f9b3dfb86984cfa622733e2b0450d93022082a3","unresolved":false,"context_lines":[{"line_number":54,"context_line":"        if not request_spec.pci_requests:"},{"line_number":55,"context_line":"            # if instance has not requested PCI devices, then hosts with less"},{"line_number":56,"context_line":"            # PCI devices should be prefered. Reverse values"},{"line_number":57,"context_line":"            total \u003d -total"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"        return total"}],"source_content_type":"text/x-python","patch_set":16,"id":"df140735_023b39eb","line":57,"updated":"2017-05-30 19:23:14.000000000","message":"So hosts without PCI devices would get weight 0 and hosts with PCI devices would get negative weights, so hosts without win.","commit_id":"673ccdd245a44ba9b91bb0e20812c24a3ab06304"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"3cbbf080f575645055d22db181180cd9ac76b96d","unresolved":false,"context_lines":[{"line_number":54,"context_line":"        if not request_spec.pci_requests:"},{"line_number":55,"context_line":"            # if instance has not requested PCI devices, then hosts with less"},{"line_number":56,"context_line":"            # PCI devices should be prefered. Reverse values"},{"line_number":57,"context_line":"            total \u003d -total"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"        return total"}],"source_content_type":"text/x-python","patch_set":16,"id":"df140735_0d2a3c8f","line":57,"in_reply_to":"df140735_023b39eb","updated":"2017-05-31 09:29:44.000000000","message":"...and this is why we do code reviews. The intention here was to reverse the number of PCI devices we have, so a host with 10 free devices would get a -10 weight, 20 free devices would get -20 etc. The weigher class ultimately normalizes all of these for us, so hosts with less PCI devices would have a higher (less negative) weight.\n\n*However*, this made sense before the comments on PS8 [1], but don\u0027t make sense now. Now, because of the code on line 52, a host with 10 free devices would get a -90 weight, while a host with 20 free devices would get a -80 weight. This is incorrect and we don\u0027t need to reverse this. I\u0027ve fixed this and clarified the text.\n\n[1] https://review.openstack.org/#/c/379524/8/nova/scheduler/weights/pci.py","commit_id":"673ccdd245a44ba9b91bb0e20812c24a3ab06304"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"e7c9895c6cd38d94adc383ce150475fb2be04954","unresolved":false,"context_lines":[{"line_number":27,"context_line":"CONF \u003d nova.conf.CONF"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"# An arbitrary value used to ensure PCI-requesting instances are stacked rather"},{"line_number":30,"context_line":"# than spread on host with PCI devices. The actual value of this filter is in"},{"line_number":31,"context_line":"# the scarcity case, where there are very few PCI devices left in the cloud and"},{"line_number":32,"context_line":"# we want to preserve the ones that do exist. To this end, we don\u0027t really mind"},{"line_number":33,"context_line":"# if a host with 2000 PCI devices is weighted the same as one with 500 devices,"}],"source_content_type":"text/x-python","patch_set":18,"id":"df140735_a8489e86","line":30,"range":{"start_line":30,"start_character":17,"end_line":30,"end_character":21},"updated":"2017-06-02 00:58:51.000000000","message":"hosts?","commit_id":"0b6b310626b38495700496e65a27c52af3570eff"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"28aee42ebd6fea9e6c15f2ecf73177fa80840e12","unresolved":false,"context_lines":[{"line_number":27,"context_line":"CONF \u003d nova.conf.CONF"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"# An arbitrary value used to ensure PCI-requesting instances are stacked rather"},{"line_number":30,"context_line":"# than spread on host with PCI devices. The actual value of this filter is in"},{"line_number":31,"context_line":"# the scarcity case, where there are very few PCI devices left in the cloud and"},{"line_number":32,"context_line":"# we want to preserve the ones that do exist. To this end, we don\u0027t really mind"},{"line_number":33,"context_line":"# if a host with 2000 PCI devices is weighted the same as one with 500 devices,"}],"source_content_type":"text/x-python","patch_set":18,"id":"df140735_0c69d11f","line":30,"range":{"start_line":30,"start_character":17,"end_line":30,"end_character":21},"in_reply_to":"df140735_a8489e86","updated":"2017-06-02 14:08:18.000000000","message":"Done","commit_id":"0b6b310626b38495700496e65a27c52af3570eff"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"e7c9895c6cd38d94adc383ce150475fb2be04954","unresolved":false,"context_lines":[{"line_number":29,"context_line":"# An arbitrary value used to ensure PCI-requesting instances are stacked rather"},{"line_number":30,"context_line":"# than spread on host with PCI devices. The actual value of this filter is in"},{"line_number":31,"context_line":"# the scarcity case, where there are very few PCI devices left in the cloud and"},{"line_number":32,"context_line":"# we want to preserve the ones that do exist. To this end, we don\u0027t really mind"},{"line_number":33,"context_line":"# if a host with 2000 PCI devices is weighted the same as one with 500 devices,"},{"line_number":34,"context_line":"# as there\u0027s clearly no shortage there."},{"line_number":35,"context_line":"MAX_DEVS \u003d 100"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"df140735_0b9d44bb","line":34,"range":{"start_line":32,"start_character":46,"end_line":34,"end_character":39},"updated":"2017-06-02 00:58:51.000000000","message":"Is this tested somehow? I don\u0027t see anything with more than 100 devices in your tests.","commit_id":"0b6b310626b38495700496e65a27c52af3570eff"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"28aee42ebd6fea9e6c15f2ecf73177fa80840e12","unresolved":false,"context_lines":[{"line_number":29,"context_line":"# An arbitrary value used to ensure PCI-requesting instances are stacked rather"},{"line_number":30,"context_line":"# than spread on host with PCI devices. The actual value of this filter is in"},{"line_number":31,"context_line":"# the scarcity case, where there are very few PCI devices left in the cloud and"},{"line_number":32,"context_line":"# we want to preserve the ones that do exist. To this end, we don\u0027t really mind"},{"line_number":33,"context_line":"# if a host with 2000 PCI devices is weighted the same as one with 500 devices,"},{"line_number":34,"context_line":"# as there\u0027s clearly no shortage there."},{"line_number":35,"context_line":"MAX_DEVS \u003d 100"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"df140735_4c4a29ac","line":34,"range":{"start_line":32,"start_character":46,"end_line":34,"end_character":39},"in_reply_to":"df140735_0b9d44bb","updated":"2017-06-02 14:08:18.000000000","message":"Good point","commit_id":"0b6b310626b38495700496e65a27c52af3570eff"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"e7c9895c6cd38d94adc383ce150475fb2be04954","unresolved":false,"context_lines":[{"line_number":52,"context_line":"        free \u003d sum(pool[\u0027count\u0027] for pool in stats.pools) if stats else 0"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"        # reverse the \"has PCI\" values. This is necessary to prevent"},{"line_number":55,"context_line":"        # fragmentation. If we didn\u0027t do this, hosts with the most PCI devices"},{"line_number":56,"context_line":"        # would be weighted highest and would be used first. This would prevent"},{"line_number":57,"context_line":"        # instances requesting a larger number of PCI devices from launching"},{"line_number":58,"context_line":"        # successfully."},{"line_number":59,"context_line":"        weight \u003d MAX_DEVS - min(free, MAX_DEVS - 1)"}],"source_content_type":"text/x-python","patch_set":18,"id":"df140735_cb062c1d","line":56,"range":{"start_line":55,"start_character":47,"end_line":56,"end_character":59},"updated":"2017-06-02 00:58:51.000000000","message":"I\u0027m confused, the comment above says \"If PCI device(s) are requested, prefer hosts with more PCI devices.\".","commit_id":"0b6b310626b38495700496e65a27c52af3570eff"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"28aee42ebd6fea9e6c15f2ecf73177fa80840e12","unresolved":false,"context_lines":[{"line_number":52,"context_line":"        free \u003d sum(pool[\u0027count\u0027] for pool in stats.pools) if stats else 0"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"        # reverse the \"has PCI\" values. This is necessary to prevent"},{"line_number":55,"context_line":"        # fragmentation. If we didn\u0027t do this, hosts with the most PCI devices"},{"line_number":56,"context_line":"        # would be weighted highest and would be used first. This would prevent"},{"line_number":57,"context_line":"        # instances requesting a larger number of PCI devices from launching"},{"line_number":58,"context_line":"        # successfully."},{"line_number":59,"context_line":"        weight \u003d MAX_DEVS - min(free, MAX_DEVS - 1)"}],"source_content_type":"text/x-python","patch_set":18,"id":"df140735_2c65b51e","line":56,"range":{"start_line":55,"start_character":47,"end_line":56,"end_character":59},"in_reply_to":"df140735_6bce0083","updated":"2017-06-02 14:08:18.000000000","message":"The comments lie. Yet more leftovers from PS8 and prior","commit_id":"0b6b310626b38495700496e65a27c52af3570eff"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"84419c3992b382969c0628e1c18210e9ae5389b8","unresolved":false,"context_lines":[{"line_number":52,"context_line":"        free \u003d sum(pool[\u0027count\u0027] for pool in stats.pools) if stats else 0"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"        # reverse the \"has PCI\" values. This is necessary to prevent"},{"line_number":55,"context_line":"        # fragmentation. If we didn\u0027t do this, hosts with the most PCI devices"},{"line_number":56,"context_line":"        # would be weighted highest and would be used first. This would prevent"},{"line_number":57,"context_line":"        # instances requesting a larger number of PCI devices from launching"},{"line_number":58,"context_line":"        # successfully."},{"line_number":59,"context_line":"        weight \u003d MAX_DEVS - min(free, MAX_DEVS - 1)"}],"source_content_type":"text/x-python","patch_set":18,"id":"df140735_6bce0083","line":56,"range":{"start_line":55,"start_character":47,"end_line":56,"end_character":59},"in_reply_to":"df140735_cb062c1d","updated":"2017-06-02 01:12:37.000000000","message":"Hm, good point. It seems like the comment on L47 should say \"prefer hosts with fewer PCI devices\" in both cases, right?","commit_id":"0b6b310626b38495700496e65a27c52af3570eff"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"e7c9895c6cd38d94adc383ce150475fb2be04954","unresolved":false,"context_lines":[{"line_number":56,"context_line":"        # would be weighted highest and would be used first. This would prevent"},{"line_number":57,"context_line":"        # instances requesting a larger number of PCI devices from launching"},{"line_number":58,"context_line":"        # successfully."},{"line_number":59,"context_line":"        weight \u003d MAX_DEVS - min(free, MAX_DEVS - 1)"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"        # if we\u0027re actually requesting devices, then we need to special case"},{"line_number":62,"context_line":"        # the 0 free devices case. This is due to the reversing we\u0027re doing"}],"source_content_type":"text/x-python","patch_set":18,"id":"df140735_2b3008e8","line":59,"updated":"2017-06-02 00:58:51.000000000","message":"So if free is 1 that means this host has 1 pci device available, right? So that would mean the weight would be 99, and it would mean with the high weight we\u0027d pick that host? But I thought we wanted to pick hosts with lots of PCI devices available first, or that\u0027s what I took from the commit message - but here it seems we\u0027re packing, which aligns with the comment block around MAX_DEVS.","commit_id":"0b6b310626b38495700496e65a27c52af3570eff"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"28aee42ebd6fea9e6c15f2ecf73177fa80840e12","unresolved":false,"context_lines":[{"line_number":56,"context_line":"        # would be weighted highest and would be used first. This would prevent"},{"line_number":57,"context_line":"        # instances requesting a larger number of PCI devices from launching"},{"line_number":58,"context_line":"        # successfully."},{"line_number":59,"context_line":"        weight \u003d MAX_DEVS - min(free, MAX_DEVS - 1)"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"        # if we\u0027re actually requesting devices, then we need to special case"},{"line_number":62,"context_line":"        # the 0 free devices case. This is due to the reversing we\u0027re doing"}],"source_content_type":"text/x-python","patch_set":18,"id":"df140735_ac2665cd","line":59,"in_reply_to":"df140735_2b3008e8","updated":"2017-06-02 14:08:18.000000000","message":"\u003e So if free is 1 that means this host has 1 pci device available, right? \n\nYup\n\n\u003e So that would mean the weight would be 99, and it would mean with the high weight we\u0027d pick that host?\n\nYup\n\n\u003e But I thought we wanted to pick hosts with lots of PCI devices available first, or that\u0027s what I took from the commit message - but here it seems we\u0027re packing, which aligns with the comment block around MAX_DEVS.\n\nIt\u0027s the latter (packing). I originally went with a spreading implementation, but danpb correctly pointed out in PS8 (?) that this would cause more and more issues for scheduling instances with a large number of PCI devices as the hosts filled up. I\u0027ve corrected both the comment above and the commit message","commit_id":"0b6b310626b38495700496e65a27c52af3570eff"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"1054fe4f5a2f06b2801e2c32d4087c3a62d22af8","unresolved":false,"context_lines":[{"line_number":56,"context_line":"        # would be weighted highest and would be used first. This would prevent"},{"line_number":57,"context_line":"        # instances requesting a larger number of PCI devices from launching"},{"line_number":58,"context_line":"        # successfully."},{"line_number":59,"context_line":"        weight \u003d MAX_DEVS - min(free, MAX_DEVS - 1)"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"        # if we\u0027re actually requesting devices, then we need to special case"},{"line_number":62,"context_line":"        # the 0 free devices case. This is due to the reversing we\u0027re doing"}],"source_content_type":"text/x-python","patch_set":18,"id":"df140735_66b63741","line":59,"in_reply_to":"df140735_2b3008e8","updated":"2017-06-02 01:46:11.000000000","message":"yeah, the equation seems incorrect to me too","commit_id":"0b6b310626b38495700496e65a27c52af3570eff"},{"author":{"_account_id":24777,"name":"Steven Webster","email":"steven.webster@windriver.com","username":"swebster"},"change_message_id":"1f3e34733cfaff19ab2da837da1e16b6714e7b2e","unresolved":false,"context_lines":[{"line_number":54,"context_line":"        requests \u003d (request_spec.pci_requests.requests"},{"line_number":55,"context_line":"                    if request_spec.pci_requests else [])"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"        free \u003d sum(pool[\u0027count\u0027] for pool in pools) or 0"},{"line_number":58,"context_line":"        required \u003d sum(req[\u0027count\u0027] for req in requests) or 0"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"        # reverse the \"has PCI\" values. This is necessary to prevent"}],"source_content_type":"text/x-python","patch_set":19,"id":"df140735_3d0caeea","line":57,"updated":"2017-06-02 21:11:28.000000000","message":"Have you considered matching the request spec to the pool spec(s) when determining the free count?\n\nI\u0027m thinking of a case like:\n\nHost 1: vendor A: 1 device, vendor B: 2 devices\nHost 2: vendor A: 2 devices, vendor B: 0 devices\n\nIn this case a request for an instance with 1 vendor A PCI device would end up picking Host 2 based on the total count.","commit_id":"1873658c3c11d8d59d53407a94886a04a65abb1b"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"d3366dd5b3599ce3c8dcf2addde74f53c4f0fd90","unresolved":false,"context_lines":[{"line_number":54,"context_line":"        requests \u003d (request_spec.pci_requests.requests"},{"line_number":55,"context_line":"                    if request_spec.pci_requests else [])"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"        free \u003d sum(pool[\u0027count\u0027] for pool in pools) or 0"},{"line_number":58,"context_line":"        required \u003d sum(req[\u0027count\u0027] for req in requests) or 0"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"        # reverse the \"has PCI\" values. This is necessary to prevent"}],"source_content_type":"text/x-python","patch_set":19,"id":"df140735_40b4d77f","line":57,"in_reply_to":"df140735_3d0caeea","updated":"2017-06-06 08:59:30.000000000","message":"Good point but this isn\u0027t necessary. Weighers are invoked after filters and the NUMA topology filter already makes sure that there are enough PCI devices and that they\u0027re the correct type. All we\u0027re doing here is comparing the suitable devices","commit_id":"1873658c3c11d8d59d53407a94886a04a65abb1b"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"8a5bbc42109b6ecc927f269ce4553322a1ae5d8d","unresolved":false,"context_lines":[{"line_number":44,"context_line":"    def _weigh_object(self, host_state, request_spec):"},{"line_number":45,"context_line":"        \"\"\"Higher weights win. We want to keep PCI hosts free unless needed."},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"        Prefer hosts with the least number of PCI devices. If the instance"},{"line_number":48,"context_line":"        requests PCI devices, this will ensure a stacking behavior and reserve"},{"line_number":49,"context_line":"        as many totally free PCI hosts as possible. If PCI devices are are not"},{"line_number":50,"context_line":"        requested, this will ensure hosts with PCI devices are avoided"},{"line_number":51,"context_line":"        completely, if possible."}],"source_content_type":"text/x-python","patch_set":20,"id":"df140735_d5bab9df","line":48,"range":{"start_line":47,"start_character":59,"end_line":48,"end_character":28},"updated":"2017-06-07 11:40:25.000000000","message":"Where are you checking this now? You were doing \"if request_spec.pci_requests:\" in PS18 but now I don\u0027t see you checking the request spec for PCI requests at all, so aren\u0027t we ignoring the case that the request is not requesting any PCI devices, and therefore shouldn\u0027t land on a host that has free PCI devices?","commit_id":"f47d03e5076311949fde6b9c785aa314f8f53831"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"18ef7e47abe690e5dcf8c77d62cfeb01115a54d4","unresolved":false,"context_lines":[{"line_number":44,"context_line":"    def _weigh_object(self, host_state, request_spec):"},{"line_number":45,"context_line":"        \"\"\"Higher weights win. We want to keep PCI hosts free unless needed."},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"        Prefer hosts with the least number of PCI devices. If the instance"},{"line_number":48,"context_line":"        requests PCI devices, this will ensure a stacking behavior and reserve"},{"line_number":49,"context_line":"        as many totally free PCI hosts as possible. If PCI devices are are not"},{"line_number":50,"context_line":"        requested, this will ensure hosts with PCI devices are avoided"},{"line_number":51,"context_line":"        completely, if possible."}],"source_content_type":"text/x-python","patch_set":20,"id":"df140735_f8e011cf","line":48,"range":{"start_line":47,"start_character":59,"end_line":48,"end_character":28},"in_reply_to":"df140735_35f9f44c","updated":"2017-06-07 12:33:09.000000000","message":"We should mention in the filter scheduler doc for this weigher that you should also be enabling NUMATopologyFilter, which isn\u0027t in the default list of enabled_filters.","commit_id":"f47d03e5076311949fde6b9c785aa314f8f53831"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"a3b5a83be29e29101e899783b446b8ecf6cf8ef2","unresolved":false,"context_lines":[{"line_number":44,"context_line":"    def _weigh_object(self, host_state, request_spec):"},{"line_number":45,"context_line":"        \"\"\"Higher weights win. We want to keep PCI hosts free unless needed."},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"        Prefer hosts with the least number of PCI devices. If the instance"},{"line_number":48,"context_line":"        requests PCI devices, this will ensure a stacking behavior and reserve"},{"line_number":49,"context_line":"        as many totally free PCI hosts as possible. If PCI devices are are not"},{"line_number":50,"context_line":"        requested, this will ensure hosts with PCI devices are avoided"},{"line_number":51,"context_line":"        completely, if possible."}],"source_content_type":"text/x-python","patch_set":20,"id":"df140735_35f9f44c","line":48,"range":{"start_line":47,"start_character":59,"end_line":48,"end_character":28},"in_reply_to":"df140735_d5bab9df","updated":"2017-06-07 12:26:11.000000000","message":"Turns out it wasn\u0027t necessary. I was trying to handle the case where we would be comparing some hosts that did not have enough PCI devices and wanted to avoid giving them maximum weighting. However, this can\u0027t happen because the NUMATopologyFilter ensures we have both the correct number and type of PCI devices on the host, and filters run before weighers. As such, \u0027free\u0027 below will never be less than the total number of PCI devices required by the host and the inverse ordering works for both types of requests.","commit_id":"f47d03e5076311949fde6b9c785aa314f8f53831"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"8a5bbc42109b6ecc927f269ce4553322a1ae5d8d","unresolved":false,"context_lines":[{"line_number":46,"context_line":""},{"line_number":47,"context_line":"        Prefer hosts with the least number of PCI devices. If the instance"},{"line_number":48,"context_line":"        requests PCI devices, this will ensure a stacking behavior and reserve"},{"line_number":49,"context_line":"        as many totally free PCI hosts as possible. If PCI devices are are not"},{"line_number":50,"context_line":"        requested, this will ensure hosts with PCI devices are avoided"},{"line_number":51,"context_line":"        completely, if possible."},{"line_number":52,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":20,"id":"df140735_55c46992","line":49,"range":{"start_line":49,"start_character":67,"end_line":49,"end_character":74},"updated":"2017-06-07 11:40:25.000000000","message":"are","commit_id":"f47d03e5076311949fde6b9c785aa314f8f53831"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"a3b5a83be29e29101e899783b446b8ecf6cf8ef2","unresolved":false,"context_lines":[{"line_number":46,"context_line":""},{"line_number":47,"context_line":"        Prefer hosts with the least number of PCI devices. If the instance"},{"line_number":48,"context_line":"        requests PCI devices, this will ensure a stacking behavior and reserve"},{"line_number":49,"context_line":"        as many totally free PCI hosts as possible. If PCI devices are are not"},{"line_number":50,"context_line":"        requested, this will ensure hosts with PCI devices are avoided"},{"line_number":51,"context_line":"        completely, if possible."},{"line_number":52,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":20,"id":"df140735_9868f5ba","line":49,"range":{"start_line":49,"start_character":67,"end_line":49,"end_character":74},"in_reply_to":"df140735_55c46992","updated":"2017-06-07 12:26:11.000000000","message":"Done","commit_id":"f47d03e5076311949fde6b9c785aa314f8f53831"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"8a5bbc42109b6ecc927f269ce4553322a1ae5d8d","unresolved":false,"context_lines":[{"line_number":55,"context_line":""},{"line_number":56,"context_line":"        # reverse the \"has PCI\" values. This is necessary to prevent"},{"line_number":57,"context_line":"        # fragmentation. If we didn\u0027t do this, hosts with the most PCI devices"},{"line_number":58,"context_line":"        # would be weighted highest and would be used first. This would prevent"},{"line_number":59,"context_line":"        # instances requesting a larger number of PCI devices from launching"},{"line_number":60,"context_line":"        # successfully."},{"line_number":61,"context_line":"        weight \u003d MAX_DEVS - min(free, MAX_DEVS - 1)"}],"source_content_type":"text/x-python","patch_set":20,"id":"df140735_356fb593","line":58,"range":{"start_line":58,"start_character":59,"end_line":58,"end_character":65},"updated":"2017-06-07 11:40:25.000000000","message":"s/. This/, which/\n\nThen I don\u0027t have to think about what \"This\" is.","commit_id":"f47d03e5076311949fde6b9c785aa314f8f53831"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"a3b5a83be29e29101e899783b446b8ecf6cf8ef2","unresolved":false,"context_lines":[{"line_number":55,"context_line":""},{"line_number":56,"context_line":"        # reverse the \"has PCI\" values. This is necessary to prevent"},{"line_number":57,"context_line":"        # fragmentation. If we didn\u0027t do this, hosts with the most PCI devices"},{"line_number":58,"context_line":"        # would be weighted highest and would be used first. This would prevent"},{"line_number":59,"context_line":"        # instances requesting a larger number of PCI devices from launching"},{"line_number":60,"context_line":"        # successfully."},{"line_number":61,"context_line":"        weight \u003d MAX_DEVS - min(free, MAX_DEVS - 1)"}],"source_content_type":"text/x-python","patch_set":20,"id":"df140735_9896b594","line":58,"range":{"start_line":58,"start_character":59,"end_line":58,"end_character":65},"in_reply_to":"df140735_356fb593","updated":"2017-06-07 12:26:11.000000000","message":"Done","commit_id":"f47d03e5076311949fde6b9c785aa314f8f53831"}],"nova/tests/unit/scheduler/weights/test_weights_pci.py":[{"author":{"_account_id":14511,"name":"Maciej Szankin","email":"maciej+review@szankin.pl","username":"mszankin"},"change_message_id":"0343c478e5859bb56b4d91409b35f8ba33d98d97","unresolved":false,"context_lines":[{"line_number":92,"context_line":"        hostinfo_list \u003d self._get_all_hosts()"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"        request \u003d objects.InstancePCIRequest(count\u003d1,"},{"line_number":95,"context_line":"            spec\u003d[{\u0027vendor_id\u0027: \u00278086\u0027}])"},{"line_number":96,"context_line":"        requests \u003d objects.InstancePCIRequests(requests\u003d[request])"},{"line_number":97,"context_line":"        spec_obj \u003d objects.RequestSpec(pci_requests\u003drequests)"},{"line_number":98,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"1a1ced50_44c103e4","line":95,"range":{"start_line":95,"start_character":33,"end_line":95,"end_character":37},"updated":"2017-03-17 17:02:13.000000000","message":"Ah, i like this piece.","commit_id":"ca22524ad2e96b5f8f8a19bb6b5a6fa41ecadf3b"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"b1d19ac73e6e2eb28450e4475b873df9c3824676","unresolved":false,"context_lines":[{"line_number":70,"context_line":"        # host1, which has the least PCI devices, should win"},{"line_number":71,"context_line":"        weighed_host \u003d self._get_weighed_host(hostinfo_list, spec_obj)"},{"line_number":72,"context_line":"        self.assertEqual(1.0, weighed_host.weight)"},{"line_number":73,"context_line":"        self.assertEqual(\u0027host1\u0027, weighed_host.obj.host)"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"    def test_multiplier_with_pci(self):"},{"line_number":76,"context_line":"        hostinfo_list \u003d self._get_all_hosts()"}],"source_content_type":"text/x-python","patch_set":17,"id":"df140735_d11611f2","line":73,"updated":"2017-05-31 17:19:41.000000000","message":"I was thinking about why none of the tests failed on PS16 where hosts with fewer free PCI devices weren\u0027t being ordered properly when no PCI was requested and realized it\u0027s because we don\u0027t have a test that 1) requests no pci 2) has no hosts with 0 devs free. So I think we should add a test that uses the set above minus host1 and host5, requests no PCI, and then verifies that host2 is chosen.\n\nOr, even better, if we can verify the order in this test. If you change _get_weighed_host() to _get_weighed_hosts() and return the whole list instead of only the first item, then you could verify the ordering of the list. Just an idea.","commit_id":"464452fee9caaaf3fcf447702aea23a24d9524bd"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"2fe9b0a31b0af8f68ab551b7c8452e62c335bc62","unresolved":false,"context_lines":[{"line_number":70,"context_line":"        # host1, which has the least PCI devices, should win"},{"line_number":71,"context_line":"        weighed_host \u003d self._get_weighed_host(hostinfo_list, spec_obj)"},{"line_number":72,"context_line":"        self.assertEqual(1.0, weighed_host.weight)"},{"line_number":73,"context_line":"        self.assertEqual(\u0027host1\u0027, weighed_host.obj.host)"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"    def test_multiplier_with_pci(self):"},{"line_number":76,"context_line":"        hostinfo_list \u003d self._get_all_hosts()"}],"source_content_type":"text/x-python","patch_set":17,"id":"df140735_3e50565d","line":73,"in_reply_to":"df140735_7aff0334","updated":"2017-06-01 17:01:46.000000000","message":"Hah, funny coincidence, I watched that movie for the first time a couple of days ago.","commit_id":"464452fee9caaaf3fcf447702aea23a24d9524bd"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"85cb0afebf746068f29170a1abd648690dd80dfe","unresolved":false,"context_lines":[{"line_number":70,"context_line":"        # host1, which has the least PCI devices, should win"},{"line_number":71,"context_line":"        weighed_host \u003d self._get_weighed_host(hostinfo_list, spec_obj)"},{"line_number":72,"context_line":"        self.assertEqual(1.0, weighed_host.weight)"},{"line_number":73,"context_line":"        self.assertEqual(\u0027host1\u0027, weighed_host.obj.host)"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"    def test_multiplier_with_pci(self):"},{"line_number":76,"context_line":"        hostinfo_list \u003d self._get_all_hosts()"}],"source_content_type":"text/x-python","patch_set":17,"id":"df140735_7aff0334","line":73,"in_reply_to":"df140735_d11611f2","updated":"2017-06-01 13:03:09.000000000","message":"\u003e I was thinking about why none of the tests failed on PS16 where hosts with fewer free PCI devices weren\u0027t being ordered properly when no PCI was requested and realized it\u0027s because we don\u0027t have a test that 1) requests no pci 2) has no hosts with 0 devs free. So I think we should add a test that uses the set above minus host1 and host5, requests no PCI, and then verifies that host2 is chosen.\n\nhttps://cdn.meme.am/cache/instances/folder387/55395387.jpg\n\nDone now","commit_id":"464452fee9caaaf3fcf447702aea23a24d9524bd"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"e7c9895c6cd38d94adc383ce150475fb2be04954","unresolved":false,"context_lines":[{"line_number":62,"context_line":"        \"\"\""},{"line_number":63,"context_line":"        hosts \u003d ["},{"line_number":64,"context_line":"            (\u0027host1\u0027, \u0027node1\u0027, [3, 1]),  # 4 devs"},{"line_number":65,"context_line":"            (\u0027host2\u0027, \u0027node2\u0027, []),  # 0 devs"},{"line_number":66,"context_line":"        ]"},{"line_number":67,"context_line":"        hostinfo_list \u003d self._get_all_hosts(hosts)"},{"line_number":68,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"df140735_cb6d0ccd","line":65,"range":{"start_line":65,"start_character":37,"end_line":65,"end_character":45},"updated":"2017-06-02 00:58:51.000000000","message":"Does this mean 0 available? If so, then I\u0027m again confused because the comment above says \"Ensure that the host with no PCI devices receives the highest\n        weighting.\" but below it says \"# host1, which has the least PCI devices, should win\".","commit_id":"0b6b310626b38495700496e65a27c52af3570eff"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"28aee42ebd6fea9e6c15f2ecf73177fa80840e12","unresolved":false,"context_lines":[{"line_number":62,"context_line":"        \"\"\""},{"line_number":63,"context_line":"        hosts \u003d ["},{"line_number":64,"context_line":"            (\u0027host1\u0027, \u0027node1\u0027, [3, 1]),  # 4 devs"},{"line_number":65,"context_line":"            (\u0027host2\u0027, \u0027node2\u0027, []),  # 0 devs"},{"line_number":66,"context_line":"        ]"},{"line_number":67,"context_line":"        hostinfo_list \u003d self._get_all_hosts(hosts)"},{"line_number":68,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"df140735_000cf538","line":65,"range":{"start_line":65,"start_character":37,"end_line":65,"end_character":45},"in_reply_to":"df140735_2b992878","updated":"2017-06-02 14:08:18.000000000","message":"Dammit. The comments lie, yet again :(","commit_id":"0b6b310626b38495700496e65a27c52af3570eff"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"84419c3992b382969c0628e1c18210e9ae5389b8","unresolved":false,"context_lines":[{"line_number":62,"context_line":"        \"\"\""},{"line_number":63,"context_line":"        hosts \u003d ["},{"line_number":64,"context_line":"            (\u0027host1\u0027, \u0027node1\u0027, [3, 1]),  # 4 devs"},{"line_number":65,"context_line":"            (\u0027host2\u0027, \u0027node2\u0027, []),  # 0 devs"},{"line_number":66,"context_line":"        ]"},{"line_number":67,"context_line":"        hostinfo_list \u003d self._get_all_hosts(hosts)"},{"line_number":68,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"df140735_2b992878","line":65,"range":{"start_line":65,"start_character":37,"end_line":65,"end_character":45},"in_reply_to":"df140735_cb6d0ccd","updated":"2017-06-02 01:12:37.000000000","message":"Yeah, I think that\u0027s just a copy-paste error from an earlier PS, the comment should say \"host2\"","commit_id":"0b6b310626b38495700496e65a27c52af3570eff"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"8a5bbc42109b6ecc927f269ce4553322a1ae5d8d","unresolved":false,"context_lines":[{"line_number":69,"context_line":"        # we don\u0027t request PCI devices"},{"line_number":70,"context_line":"        spec_obj \u003d objects.RequestSpec(pci_requests\u003dNone)"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"        # host1, which has the least PCI devices, should win"},{"line_number":73,"context_line":"        weighed_host \u003d self._get_weighed_hosts(hostinfo_list, spec_obj)[0]"},{"line_number":74,"context_line":"        self.assertEqual(1.0, weighed_host.weight)"},{"line_number":75,"context_line":"        self.assertEqual(\u0027host2\u0027, weighed_host.obj.host)"}],"source_content_type":"text/x-python","patch_set":20,"id":"df140735_15c83172","line":72,"range":{"start_line":72,"start_character":10,"end_line":72,"end_character":15},"updated":"2017-06-07 11:40:25.000000000","message":"host2?","commit_id":"f47d03e5076311949fde6b9c785aa314f8f53831"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"a3b5a83be29e29101e899783b446b8ecf6cf8ef2","unresolved":false,"context_lines":[{"line_number":69,"context_line":"        # we don\u0027t request PCI devices"},{"line_number":70,"context_line":"        spec_obj \u003d objects.RequestSpec(pci_requests\u003dNone)"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"        # host1, which has the least PCI devices, should win"},{"line_number":73,"context_line":"        weighed_host \u003d self._get_weighed_hosts(hostinfo_list, spec_obj)[0]"},{"line_number":74,"context_line":"        self.assertEqual(1.0, weighed_host.weight)"},{"line_number":75,"context_line":"        self.assertEqual(\u0027host2\u0027, weighed_host.obj.host)"}],"source_content_type":"text/x-python","patch_set":20,"id":"df140735_b85df9ea","line":72,"range":{"start_line":72,"start_character":10,"end_line":72,"end_character":15},"in_reply_to":"df140735_15c83172","updated":"2017-06-07 12:26:11.000000000","message":"yup","commit_id":"f47d03e5076311949fde6b9c785aa314f8f53831"}],"releasenotes/notes/add-pci-weigher-4a7e0a7b8e908975.yaml":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"e7c9895c6cd38d94adc383ce150475fb2be04954","unresolved":false,"context_lines":[{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    Add ``PCIWeigher`` weigher. This can be used to ensure non-PCI instances"},{"line_number":5,"context_line":"    don\u0027t occupy resources on hosts with PCI devices. This can be configured"},{"line_number":6,"context_line":"    using the ``pci_weight_multiplier`` configuration option."}],"source_content_type":"text/x-yaml","patch_set":18,"id":"df140735_8bb03445","line":6,"range":{"start_line":6,"start_character":16,"end_line":6,"end_character":37},"updated":"2017-06-02 00:58:51.000000000","message":"``[filter_scheduler]/pci_weight_multiplier``","commit_id":"0b6b310626b38495700496e65a27c52af3570eff"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"28aee42ebd6fea9e6c15f2ecf73177fa80840e12","unresolved":false,"context_lines":[{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    Add ``PCIWeigher`` weigher. This can be used to ensure non-PCI instances"},{"line_number":5,"context_line":"    don\u0027t occupy resources on hosts with PCI devices. This can be configured"},{"line_number":6,"context_line":"    using the ``pci_weight_multiplier`` configuration option."}],"source_content_type":"text/x-yaml","patch_set":18,"id":"df140735_c88e1b78","line":6,"range":{"start_line":6,"start_character":16,"end_line":6,"end_character":37},"in_reply_to":"df140735_8bb03445","updated":"2017-06-02 14:08:18.000000000","message":"Done","commit_id":"0b6b310626b38495700496e65a27c52af3570eff"}]}
