)]}'
{"nova/scheduler/filters/affinity_filter.py":[{"author":{"_account_id":1501,"name":"Phil Day","email":"philip.day@hp.com","username":"philip-day"},"change_message_id":"c8fa9c91f4a697d45115649b7bbf5c13bba7a971","unresolved":false,"context_lines":[{"line_number":106,"context_line":"    # The hosts the instances in the group are running on doesn\u0027t change"},{"line_number":107,"context_line":"    # within a request"},{"line_number":108,"context_line":"    run_filter_once_per_request \u003d True"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"    def host_passes(self, host_state, filter_properties):"},{"line_number":111,"context_line":"        group_hosts \u003d filter_properties.get(\u0027group_hosts\u0027) or []"},{"line_number":112,"context_line":"        LOG.debug(_(\"Group anti affinity: check if %(host)s not \""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAASn%2F%2FOqs%3D","side":"PARENT","line":109,"updated":"2013-09-09 16:47:12.000000000","message":"Going on the commit message I don\u0027t think this needs / should be deleted.\n\nSetting it to true stops multiple calls to the filter each time the scheduler considers a request - i.e if you\u0027re creating 10 instances in a request the scheduler will only run this filter once.\n\nIf any of those instances come back to be re-schedules, then the filter will again be run only once (although there is only one instance in this case).\n\nSo removing this (and letting the filter run multiple times) is only needed if the contents of host_states.groups is going to change between invocations in a single scheduler pass.","commit_id":"f686d3aae1aaacb3776ec735216e614707f3aaba"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"50f0683bb498a8163da77235757d586233d2a7f2","unresolved":false,"context_lines":[{"line_number":106,"context_line":"    # The hosts the instances in the group are running on doesn\u0027t change"},{"line_number":107,"context_line":"    # within a request"},{"line_number":108,"context_line":"    run_filter_once_per_request \u003d True"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"    def host_passes(self, host_state, filter_properties):"},{"line_number":111,"context_line":"        group_hosts \u003d filter_properties.get(\u0027group_hosts\u0027) or []"},{"line_number":112,"context_line":"        LOG.debug(_(\"Group anti affinity: check if %(host)s not \""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAS3%2F%2F66Y%3D","side":"PARENT","line":109,"in_reply_to":"AAAAS3%2F%2F7Zk%3D","updated":"2013-09-17 07:26:14.000000000","message":"Done","commit_id":"f686d3aae1aaacb3776ec735216e614707f3aaba"},{"author":{"_account_id":7494,"name":"Guangya Liu","email":"gyliu513@gmail.com","username":"JayLau"},"change_message_id":"f7a08f04d644febf5e2ef855a062769ecdacbf3e","unresolved":false,"context_lines":[{"line_number":106,"context_line":"    # The hosts the instances in the group are running on doesn\u0027t change"},{"line_number":107,"context_line":"    # within a request"},{"line_number":108,"context_line":"    run_filter_once_per_request \u003d True"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"    def host_passes(self, host_state, filter_properties):"},{"line_number":111,"context_line":"        group_hosts \u003d filter_properties.get(\u0027group_hosts\u0027) or []"},{"line_number":112,"context_line":"        LOG.debug(_(\"Group anti affinity: check if %(host)s not \""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAS3%2F%2F7Zk%3D","side":"PARENT","line":109,"in_reply_to":"AAAASn%2F%2FLmk%3D","updated":"2013-09-17 03:16:00.000000000","message":"Gary, seems you also fixed bug 1206502, would propose that you update your commit log to reflect this. Thanks.","commit_id":"f686d3aae1aaacb3776ec735216e614707f3aaba"},{"author":{"_account_id":1501,"name":"Phil Day","email":"philip.day@hp.com","username":"philip-day"},"change_message_id":"daf641f11b8844291bde140bc841a57d6aa2f570","unresolved":false,"context_lines":[{"line_number":106,"context_line":"    # The hosts the instances in the group are running on doesn\u0027t change"},{"line_number":107,"context_line":"    # within a request"},{"line_number":108,"context_line":"    run_filter_once_per_request \u003d True"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"    def host_passes(self, host_state, filter_properties):"},{"line_number":111,"context_line":"        group_hosts \u003d filter_properties.get(\u0027group_hosts\u0027) or []"},{"line_number":112,"context_line":"        LOG.debug(_(\"Group anti affinity: check if %(host)s not \""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAASn%2F%2FLmk%3D","side":"PARENT","line":109,"in_reply_to":"AAAASn%2F%2FOho%3D","updated":"2013-09-10 14:18:13.000000000","message":"OK, then it that case I agree that this should be removed.   I\u0027d missed that group_hosts gets updated in the filter_properties for each iteration of _schedule()","commit_id":"f686d3aae1aaacb3776ec735216e614707f3aaba"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"39540ef393586994a890ac4894cbaae77b2c884a","unresolved":false,"context_lines":[{"line_number":106,"context_line":"    # The hosts the instances in the group are running on doesn\u0027t change"},{"line_number":107,"context_line":"    # within a request"},{"line_number":108,"context_line":"    run_filter_once_per_request \u003d True"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"    def host_passes(self, host_state, filter_properties):"},{"line_number":111,"context_line":"        group_hosts \u003d filter_properties.get(\u0027group_hosts\u0027) or []"},{"line_number":112,"context_line":"        LOG.debug(_(\"Group anti affinity: check if %(host)s not \""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAASn%2F%2FOho%3D","side":"PARENT","line":109,"in_reply_to":"AAAASn%2F%2FOjo%3D","updated":"2013-09-09 17:22:53.000000000","message":"say someone wants to deploy 3 instance and that have 3 hosts the the command will be:\nnova boot --image x --flavor 1 --num_instance 3 X\nthe first will be spawned on H1 the filter will have [] input\nthe second will be spawned on H2 the filter will have [H1] as input\nthe third will be spawned on H3 the filter wll have [H1, H2] as input]","commit_id":"f686d3aae1aaacb3776ec735216e614707f3aaba"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"e98972d6ba04f14f503827ef8988d06baa414ee2","unresolved":false,"context_lines":[{"line_number":106,"context_line":"    # The hosts the instances in the group are running on doesn\u0027t change"},{"line_number":107,"context_line":"    # within a request"},{"line_number":108,"context_line":"    run_filter_once_per_request \u003d True"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"    def host_passes(self, host_state, filter_properties):"},{"line_number":111,"context_line":"        group_hosts \u003d filter_properties.get(\u0027group_hosts\u0027) or []"},{"line_number":112,"context_line":"        LOG.debug(_(\"Group anti affinity: check if %(host)s not \""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAASn%2F%2FOjo%3D","side":"PARENT","line":109,"in_reply_to":"AAAASn%2F%2FOqs%3D","updated":"2013-09-09 17:15:47.000000000","message":"Thanks for the explanation. The filter need to be run each time for each instance. That is, if we have n instance request then the function should be called n times, this is due to the fact that the host list will be changed each time.","commit_id":"f686d3aae1aaacb3776ec735216e614707f3aaba"}]}
