)]}'
{"nova/filters.py":[{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"e498252591aec1bc890e8b6a131789dff888e3c5","unresolved":false,"context_lines":[{"line_number":77,"context_line":"                    return"},{"line_number":78,"context_line":"                list_objs \u003d list(objs)"},{"line_number":79,"context_line":"                if not list_objs:"},{"line_number":80,"context_line":"                    LOG.info(_LI(\"Filter %s returned 0 hosts\"), cls_name)"},{"line_number":81,"context_line":"                    break"},{"line_number":82,"context_line":"                LOG.debug(\"Filter %(cls_name)s returned \""},{"line_number":83,"context_line":"                          \"%(obj_len)d host(s)\","}],"source_content_type":"text/x-python","patch_set":2,"id":"fa32b979_80c31257","side":"PARENT","line":80,"updated":"2015-06-22 10:42:51.000000000","message":"I think we should find out what this log is not good enough.","commit_id":"e1613d1bbe80be6fd76e74381eeecbc088fea1a8"},{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"7f7becdb5c2577431b95bacad6e2bd134e9c9167","unresolved":false,"context_lines":[{"line_number":75,"context_line":"                objs \u003d filter_.filter_all(list_objs, filter_properties)"},{"line_number":76,"context_line":"                if objs is None:"},{"line_number":77,"context_line":"                    LOG.debug(\"Filter %s says to stop filtering\", cls_name)"},{"line_number":78,"context_line":"                    return"},{"line_number":79,"context_line":"                list_objs \u003d list(objs)"},{"line_number":80,"context_line":"                if list_objs:"},{"line_number":81,"context_line":"                    remaining \u003d [(getattr(obj, \"host\", obj),"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba3cc151_2f4659c0","line":78,"updated":"2015-07-08 14:30:10.000000000","message":"will we return here if no objects exists? should we add in this routine?","commit_id":"36f7df78fb28ff2d993b5b3ef2321a5418a59120"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"4579dcf350b9c2d1de88f127498428951b8c94ea","unresolved":false,"context_lines":[{"line_number":75,"context_line":"                objs \u003d filter_.filter_all(list_objs, filter_properties)"},{"line_number":76,"context_line":"                if objs is None:"},{"line_number":77,"context_line":"                    LOG.debug(\"Filter %s says to stop filtering\", cls_name)"},{"line_number":78,"context_line":"                    return"},{"line_number":79,"context_line":"                list_objs \u003d list(objs)"},{"line_number":80,"context_line":"                if list_objs:"},{"line_number":81,"context_line":"                    remaining \u003d [(getattr(obj, \"host\", obj),"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a41bdd9_8ff3389e","line":78,"in_reply_to":"9a41bdd9_d4fa35bd","updated":"2015-07-13 15:54:42.000000000","message":"If the filter takes it upon itself to abort the filtering process, it should record the information that an operator would need. It transmits this intention to stop filtering by returning None instead of a list of zero or more hosts.\n\nAlso, please keep in mind that this is not part of the change that is being made here. If you think that this part of the code also needs improvement, that should be a separate bug/bp. It should not hold up this patch.","commit_id":"36f7df78fb28ff2d993b5b3ef2321a5418a59120"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"e246cc41c7750afb230da9ee393ecd89f62fdf59","unresolved":false,"context_lines":[{"line_number":75,"context_line":"                objs \u003d filter_.filter_all(list_objs, filter_properties)"},{"line_number":76,"context_line":"                if objs is None:"},{"line_number":77,"context_line":"                    LOG.debug(\"Filter %s says to stop filtering\", cls_name)"},{"line_number":78,"context_line":"                    return"},{"line_number":79,"context_line":"                list_objs \u003d list(objs)"},{"line_number":80,"context_line":"                if list_objs:"},{"line_number":81,"context_line":"                    remaining \u003d [(getattr(obj, \"host\", obj),"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba3cc151_52526036","line":78,"in_reply_to":"ba3cc151_2f4659c0","updated":"2015-07-08 14:49:50.000000000","message":"Yes, that is the current behavior. This is the way that filters were designed: returning None signals that the process should terminate. I don\u0027t believe that it is used anywhere, but it is not part of this spec to change this.","commit_id":"36f7df78fb28ff2d993b5b3ef2321a5418a59120"},{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"0a04be411027d8a6eb513ba48e8570a00c95ad61","unresolved":false,"context_lines":[{"line_number":75,"context_line":"                objs \u003d filter_.filter_all(list_objs, filter_properties)"},{"line_number":76,"context_line":"                if objs is None:"},{"line_number":77,"context_line":"                    LOG.debug(\"Filter %s says to stop filtering\", cls_name)"},{"line_number":78,"context_line":"                    return"},{"line_number":79,"context_line":"                list_objs \u003d list(objs)"},{"line_number":80,"context_line":"                if list_objs:"},{"line_number":81,"context_line":"                    remaining \u003d [(getattr(obj, \"host\", obj),"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba3cc151_c6d9d257","line":78,"in_reply_to":"ba3cc151_52526036","updated":"2015-07-08 15:38:14.000000000","message":"I mean will this need log if previous filter has info but we don\u0027t have chance to print it?","commit_id":"36f7df78fb28ff2d993b5b3ef2321a5418a59120"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"efee1f6c4c15cc74a9f09a61eaa2efdcc03edfe3","unresolved":false,"context_lines":[{"line_number":75,"context_line":"                objs \u003d filter_.filter_all(list_objs, filter_properties)"},{"line_number":76,"context_line":"                if objs is None:"},{"line_number":77,"context_line":"                    LOG.debug(\"Filter %s says to stop filtering\", cls_name)"},{"line_number":78,"context_line":"                    return"},{"line_number":79,"context_line":"                list_objs \u003d list(objs)"},{"line_number":80,"context_line":"                if list_objs:"},{"line_number":81,"context_line":"                    remaining \u003d [(getattr(obj, \"host\", obj),"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba3cc151_d388af24","line":78,"in_reply_to":"ba3cc151_c6d9d257","updated":"2015-07-08 16:09:30.000000000","message":"No, no change of behavior in this case. If a filter aborts the process, we record that and move on.","commit_id":"36f7df78fb28ff2d993b5b3ef2321a5418a59120"},{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"12f4e5a32fa3b759cea8acc0843978a35cf4b565","unresolved":false,"context_lines":[{"line_number":75,"context_line":"                objs \u003d filter_.filter_all(list_objs, filter_properties)"},{"line_number":76,"context_line":"                if objs is None:"},{"line_number":77,"context_line":"                    LOG.debug(\"Filter %s says to stop filtering\", cls_name)"},{"line_number":78,"context_line":"                    return"},{"line_number":79,"context_line":"                list_objs \u003d list(objs)"},{"line_number":80,"context_line":"                if list_objs:"},{"line_number":81,"context_line":"                    remaining \u003d [(getattr(obj, \"host\", obj),"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a41bdd9_d4fa35bd","line":78,"in_reply_to":"ba3cc151_d388af24","updated":"2015-07-13 15:22:19.000000000","message":"maybe I need dig more , but I don\u0027t understand why \nthe \u0027return\u0027 here can make me \u0027record and move on\u0027?\nis this function a recursion?\nthanks a lot","commit_id":"36f7df78fb28ff2d993b5b3ef2321a5418a59120"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"91e689a9b66bed4cf02ab3a1b0e894f67608ef1f","unresolved":false,"context_lines":[{"line_number":83,"context_line":"                                 for obj in list_objs]"},{"line_number":84,"context_line":"                    filter_results.append((cls_name, remaining))"},{"line_number":85,"context_line":"                else:"},{"line_number":86,"context_line":"                    LOG.info(_LI(\"Filter %s returned 0 hosts\"), cls_name)"},{"line_number":87,"context_line":"                    filter_results.append((cls_name, None))"},{"line_number":88,"context_line":"                    break"},{"line_number":89,"context_line":"                LOG.debug(\"Filter %(cls_name)s returned \""}],"source_content_type":"text/x-python","patch_set":4,"id":"1a4dcd0f_4d64f2b7","line":86,"updated":"2015-08-12 12:54:36.000000000","message":"Maybe this is where we should log something about filter_results[-1]?\n\nWe could log the list of hosts we had before this filter removed them all, I think thats the bit people want to know?","commit_id":"36f7df78fb28ff2d993b5b3ef2321a5418a59120"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"91e689a9b66bed4cf02ab3a1b0e894f67608ef1f","unresolved":false,"context_lines":[{"line_number":95,"context_line":"            inst_props \u003d rspec.get(\"instance_properties\", {})"},{"line_number":96,"context_line":"            msg_dict \u003d {\"res_id\": inst_props.get(\"reservation_id\", \"\"),"},{"line_number":97,"context_line":"                        \"inst_uuid\": inst_props.get(\"uuid\", \"\"),"},{"line_number":98,"context_line":"                        \"str_results\": str(filter_results),"},{"line_number":99,"context_line":"                       }"},{"line_number":100,"context_line":"            msg \u003d _LI(\"Filtering removed all hosts for the request with \""},{"line_number":101,"context_line":"                      \"reservation ID \u0027%(res_id)s\u0027 and instance ID \""}],"source_content_type":"text/x-python","patch_set":4,"id":"1a4dcd0f_6db68e3f","line":98,"updated":"2015-08-12 12:54:36.000000000","message":"I am worried this would be massive.\n\nIs it worth just doing a count for everything apart from the one before you run out of hosts?\n\nMaybe thats overkill.","commit_id":"36f7df78fb28ff2d993b5b3ef2321a5418a59120"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"c660a1fc3c535a586f9c4fd3362c2eaf72d22459","unresolved":false,"context_lines":[{"line_number":95,"context_line":"            inst_props \u003d rspec.get(\"instance_properties\", {})"},{"line_number":96,"context_line":"            msg_dict \u003d {\"res_id\": inst_props.get(\"reservation_id\", \"\"),"},{"line_number":97,"context_line":"                        \"inst_uuid\": inst_props.get(\"uuid\", \"\"),"},{"line_number":98,"context_line":"                        \"str_results\": str(filter_results),"},{"line_number":99,"context_line":"                       }"},{"line_number":100,"context_line":"            msg \u003d _LI(\"Filtering removed all hosts for the request with \""},{"line_number":101,"context_line":"                      \"reservation ID \u0027%(res_id)s\u0027 and instance ID \""}],"source_content_type":"text/x-python","patch_set":4,"id":"1a4dcd0f_29e5d107","line":98,"in_reply_to":"1a4dcd0f_03431b14","updated":"2015-08-12 15:17:35.000000000","message":"OK, I think I see what you mean now.\n\nIts just in my experience its the filter that gets you to zero thats the one you care about the most. I get thats not always true.","commit_id":"36f7df78fb28ff2d993b5b3ef2321a5418a59120"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"7698417f48f5715e93566ff5a329477bd950babc","unresolved":false,"context_lines":[{"line_number":95,"context_line":"            inst_props \u003d rspec.get(\"instance_properties\", {})"},{"line_number":96,"context_line":"            msg_dict \u003d {\"res_id\": inst_props.get(\"reservation_id\", \"\"),"},{"line_number":97,"context_line":"                        \"inst_uuid\": inst_props.get(\"uuid\", \"\"),"},{"line_number":98,"context_line":"                        \"str_results\": str(filter_results),"},{"line_number":99,"context_line":"                       }"},{"line_number":100,"context_line":"            msg \u003d _LI(\"Filtering removed all hosts for the request with \""},{"line_number":101,"context_line":"                      \"reservation ID \u0027%(res_id)s\u0027 and instance ID \""}],"source_content_type":"text/x-python","patch_set":4,"id":"1a4dcd0f_03431b14","line":98,"in_reply_to":"1a4dcd0f_6db68e3f","updated":"2015-08-12 13:33:54.000000000","message":"The problem, as it was explained to me, is that an operator thinks a host should have been able to accommodate a request, but the scheduler doesn\u0027t select it (or any other host). Unless the last filter is the one that removed it from consideration, they won\u0027t know why it was removed.","commit_id":"36f7df78fb28ff2d993b5b3ef2321a5418a59120"},{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"7f7becdb5c2577431b95bacad6e2bd134e9c9167","unresolved":false,"context_lines":[{"line_number":101,"context_line":"                      \"reservation ID \u0027%(res_id)s\u0027 and instance ID \""},{"line_number":102,"context_line":"                      \"\u0027%(inst_uuid)s\u0027. Filter results: %(str_results)s\""},{"line_number":103,"context_line":"                      ) % msg_dict"},{"line_number":104,"context_line":"            LOG.info(msg)"},{"line_number":105,"context_line":"        return list_objs"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba3cc151_321a3c70","line":104,"updated":"2015-07-08 14:30:10.000000000","message":"if we got lots of host here, this log will be huge given we have a lot of filters\ncan we think about \u0027debug level\u0027 ?","commit_id":"36f7df78fb28ff2d993b5b3ef2321a5418a59120"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"c660a1fc3c535a586f9c4fd3362c2eaf72d22459","unresolved":false,"context_lines":[{"line_number":101,"context_line":"                      \"reservation ID \u0027%(res_id)s\u0027 and instance ID \""},{"line_number":102,"context_line":"                      \"\u0027%(inst_uuid)s\u0027. Filter results: %(str_results)s\""},{"line_number":103,"context_line":"                      ) % msg_dict"},{"line_number":104,"context_line":"            LOG.info(msg)"},{"line_number":105,"context_line":"        return list_objs"}],"source_content_type":"text/x-python","patch_set":4,"id":"1a4dcd0f_297ab124","line":104,"in_reply_to":"1a4dcd0f_43a7e3bc","updated":"2015-08-12 15:17:35.000000000","message":"true, it should be rare.","commit_id":"36f7df78fb28ff2d993b5b3ef2321a5418a59120"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"7698417f48f5715e93566ff5a329477bd950babc","unresolved":false,"context_lines":[{"line_number":101,"context_line":"                      \"reservation ID \u0027%(res_id)s\u0027 and instance ID \""},{"line_number":102,"context_line":"                      \"\u0027%(inst_uuid)s\u0027. Filter results: %(str_results)s\""},{"line_number":103,"context_line":"                      ) % msg_dict"},{"line_number":104,"context_line":"            LOG.info(msg)"},{"line_number":105,"context_line":"        return list_objs"}],"source_content_type":"text/x-python","patch_set":4,"id":"1a4dcd0f_43a7e3bc","line":104,"in_reply_to":"1a4dcd0f_4d3dd28d","updated":"2015-08-12 13:33:54.000000000","message":"So do a LOG.info for the last batch removed, and a LOG.debug with the full host list? I would like to hear from operators how they feel about that: would they want to switch logging levels and re-run a request, and then switch them back?\n\nAnother question is how often a true NoValidHost happens (as opposed to a create request failing because max retries was exceeded). If this is a rare event, it won\u0027t make much of a difference in the overall log size, will it?","commit_id":"36f7df78fb28ff2d993b5b3ef2321a5418a59120"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"91e689a9b66bed4cf02ab3a1b0e894f67608ef1f","unresolved":false,"context_lines":[{"line_number":101,"context_line":"                      \"reservation ID \u0027%(res_id)s\u0027 and instance ID \""},{"line_number":102,"context_line":"                      \"\u0027%(inst_uuid)s\u0027. Filter results: %(str_results)s\""},{"line_number":103,"context_line":"                      ) % msg_dict"},{"line_number":104,"context_line":"            LOG.info(msg)"},{"line_number":105,"context_line":"        return list_objs"}],"source_content_type":"text/x-python","patch_set":4,"id":"1a4dcd0f_4d3dd28d","line":104,"in_reply_to":"9a41bdd9_4a9c3ec0","updated":"2015-08-12 12:54:36.000000000","message":"What about a middle ground?\n\nFor the info, just do a list of host counts for everything apart from the one before you run out of hosts?\n\nMaybe add an extra debug log with the full list.","commit_id":"36f7df78fb28ff2d993b5b3ef2321a5418a59120"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"4579dcf350b9c2d1de88f127498428951b8c94ea","unresolved":false,"context_lines":[{"line_number":101,"context_line":"                      \"reservation ID \u0027%(res_id)s\u0027 and instance ID \""},{"line_number":102,"context_line":"                      \"\u0027%(inst_uuid)s\u0027. Filter results: %(str_results)s\""},{"line_number":103,"context_line":"                      ) % msg_dict"},{"line_number":104,"context_line":"            LOG.info(msg)"},{"line_number":105,"context_line":"        return list_objs"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a41bdd9_4a9c3ec0","line":104,"in_reply_to":"9a41bdd9_d4b0f545","updated":"2015-07-13 15:54:42.000000000","message":"Setting up the filters in the way you describe will make the whole process slower. Part of the design of this process is that only successful hosts are passed to later filters. Remember, that this ordering will affect the efficiency of every single request. The log will only be used in the rare situation that no host can meet the requested requirements.\n\nOperators can tell which filter removed a particular host by looking at the first entry in which the host does not appear. Neither the current design nor your design are better in that regard.","commit_id":"36f7df78fb28ff2d993b5b3ef2321a5418a59120"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"efee1f6c4c15cc74a9f09a61eaa2efdcc03edfe3","unresolved":false,"context_lines":[{"line_number":101,"context_line":"                      \"reservation ID \u0027%(res_id)s\u0027 and instance ID \""},{"line_number":102,"context_line":"                      \"\u0027%(inst_uuid)s\u0027. Filter results: %(str_results)s\""},{"line_number":103,"context_line":"                      ) % msg_dict"},{"line_number":104,"context_line":"            LOG.info(msg)"},{"line_number":105,"context_line":"        return list_objs"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba3cc151_f365b344","line":104,"in_reply_to":"ba3cc151_0689fa25","updated":"2015-07-08 16:09:30.000000000","message":"Filters are typically ordered so that the most restrictive ones are first, leaving fewer hosts for the rest of the filters to consider. Consider this case: there are 1000 hosts, and the first filter removes 800, the second filter removes 150, and the third removes the final 50. The current design would record 200+50+0 hosts, or 300 entries. Switching it to record the filtered hosts would record 800+150+50, or the full 1000 hosts.","commit_id":"36f7df78fb28ff2d993b5b3ef2321a5418a59120"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"e246cc41c7750afb230da9ee393ecd89f62fdf59","unresolved":false,"context_lines":[{"line_number":101,"context_line":"                      \"reservation ID \u0027%(res_id)s\u0027 and instance ID \""},{"line_number":102,"context_line":"                      \"\u0027%(inst_uuid)s\u0027. Filter results: %(str_results)s\""},{"line_number":103,"context_line":"                      ) % msg_dict"},{"line_number":104,"context_line":"            LOG.info(msg)"},{"line_number":105,"context_line":"        return list_objs"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba3cc151_9538d2d4","line":104,"in_reply_to":"ba3cc151_321a3c70","updated":"2015-07-08 14:49:50.000000000","message":"True, but the request from operators was to have this information recorded when all hosts are filtered out. I can\u0027t think of a more compact way of recording it, but I\u0027m open to suggestions that will improve this.","commit_id":"36f7df78fb28ff2d993b5b3ef2321a5418a59120"},{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"0a04be411027d8a6eb513ba48e8570a00c95ad61","unresolved":false,"context_lines":[{"line_number":101,"context_line":"                      \"reservation ID \u0027%(res_id)s\u0027 and instance ID \""},{"line_number":102,"context_line":"                      \"\u0027%(inst_uuid)s\u0027. Filter results: %(str_results)s\""},{"line_number":103,"context_line":"                      ) % msg_dict"},{"line_number":104,"context_line":"            LOG.info(msg)"},{"line_number":105,"context_line":"        return list_objs"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba3cc151_0689fa25","line":104,"in_reply_to":"ba3cc151_9538d2d4","updated":"2015-07-08 15:38:14.000000000","message":"ok, can we only report the filtered instead of remaining ?I know it is harder to implement, this would eliminate some logs","commit_id":"36f7df78fb28ff2d993b5b3ef2321a5418a59120"},{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"12f4e5a32fa3b759cea8acc0843978a35cf4b565","unresolved":false,"context_lines":[{"line_number":101,"context_line":"                      \"reservation ID \u0027%(res_id)s\u0027 and instance ID \""},{"line_number":102,"context_line":"                      \"\u0027%(inst_uuid)s\u0027. Filter results: %(str_results)s\""},{"line_number":103,"context_line":"                      ) % msg_dict"},{"line_number":104,"context_line":"            LOG.info(msg)"},{"line_number":105,"context_line":"        return list_objs"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a41bdd9_d4b0f545","line":104,"in_reply_to":"ba3cc151_f365b344","updated":"2015-07-13 15:22:19.000000000","message":"ok, this is based on the assumption that first filter will filter a lot of instances, otherwise, given your example, it might be \n\nif all host are 1000, \nthe first one returns 800, \nthe seconds returens  700\nthe third returns 200\n\ntotal is 1700\n\nwhile the filters will always report 1000\n\nand I would think operator more care about where the host and why the host was filtered","commit_id":"36f7df78fb28ff2d993b5b3ef2321a5418a59120"},{"author":{"_account_id":8688,"name":"Alexis Lee","email":"openstack@lxsli.co.uk","username":"lxsli"},"change_message_id":"8aaeb80a135a94cf44eaf1902d1c1bae34e4980c","unresolved":false,"context_lines":[{"line_number":99,"context_line":"                else:"},{"line_number":100,"context_line":"                    LOG.info(_LI(\"Filter %s returned 0 hosts\"), cls_name)"},{"line_number":101,"context_line":"                    full_filter_results.append((cls_name, None))"},{"line_number":102,"context_line":"                    part_filter_results.append((cls_name, start_hosts))"},{"line_number":103,"context_line":"                    break"},{"line_number":104,"context_line":"                LOG.debug(\"Filter %(cls_name)s returned \""},{"line_number":105,"context_line":"                          \"%(obj_len)d host(s)\","}],"source_content_type":"text/x-python","patch_set":5,"id":"fa1b9901_7eca37a3","line":102,"updated":"2015-08-18 09:45:52.000000000","message":"The log logic has turned a simple function into a long one, please could you extract as much as possible into helpers?","commit_id":"7d0015a4331fd0489aab9ff8afab5d3bdd98f749"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"bba31eaa9d2e83ae21c0394b21646445f507cab3","unresolved":false,"context_lines":[{"line_number":119,"context_line":"            msg_dict[\"str_results\"] \u003d str(part_filter_results)"},{"line_number":120,"context_line":"            part_msg \u003d _LI(\"Filtering removed all hosts for the request with \""},{"line_number":121,"context_line":"                           \"reservation ID \u0027%(res_id)s\u0027 and instance ID \""},{"line_number":122,"context_line":"                           \"\u0027%(inst_uuid)s\u0027. Filter results: %(str_results)s\""},{"line_number":123,"context_line":"                           ) % msg_dict"},{"line_number":124,"context_line":"            LOG.debug(full_msg)"},{"line_number":125,"context_line":"            LOG.info(part_msg)"}],"source_content_type":"text/x-python","patch_set":5,"id":"fa1b9901_75311fec","line":122,"updated":"2015-08-17 14:27:14.000000000","message":"I actually think including the start count and end count would be a better idea than just showing the filtered count. My reasoning is that the log message would give a little more information about the number of hosts being considered at the start of the filtering run. So, for example, you would see something like:\n\n FilterA (start: 10, end: 7); FilterB (start: 7, end: 6); FilterC (start: 6, end: 0)","commit_id":"7d0015a4331fd0489aab9ff8afab5d3bdd98f749"},{"author":{"_account_id":8688,"name":"Alexis Lee","email":"openstack@lxsli.co.uk","username":"lxsli"},"change_message_id":"8aaeb80a135a94cf44eaf1902d1c1bae34e4980c","unresolved":false,"context_lines":[{"line_number":122,"context_line":"                           \"\u0027%(inst_uuid)s\u0027. Filter results: %(str_results)s\""},{"line_number":123,"context_line":"                           ) % msg_dict"},{"line_number":124,"context_line":"            LOG.debug(full_msg)"},{"line_number":125,"context_line":"            LOG.info(part_msg)"},{"line_number":126,"context_line":"        return list_objs"}],"source_content_type":"text/x-python","patch_set":5,"id":"fa1b9901_d336dc02","line":125,"updated":"2015-08-18 09:45:52.000000000","message":"If DEBUG is loggable, we get both messages right now. Does the part_msg add anything in this scenario or just bloat logs?","commit_id":"7d0015a4331fd0489aab9ff8afab5d3bdd98f749"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"26814b101ee5d275cf05c030790e7ab3852aa52f","unresolved":false,"context_lines":[{"line_number":122,"context_line":"                           \"\u0027%(inst_uuid)s\u0027. Filter results: %(str_results)s\""},{"line_number":123,"context_line":"                           ) % msg_dict"},{"line_number":124,"context_line":"            LOG.debug(full_msg)"},{"line_number":125,"context_line":"            LOG.info(part_msg)"},{"line_number":126,"context_line":"        return list_objs"}],"source_content_type":"text/x-python","patch_set":5,"id":"fa1b9901_e50f88df","line":125,"in_reply_to":"fa1b9901_d336dc02","updated":"2015-08-18 13:37:24.000000000","message":"That was my objection to the log level approach, but apparently it isn\u0027t considered an issue. If they\u0027re running in DEBUG mode, slim logs are not the concern.","commit_id":"7d0015a4331fd0489aab9ff8afab5d3bdd98f749"}],"nova/tests/unit/scheduler/test_filters.py":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"bba31eaa9d2e83ae21c0394b21646445f507cab3","unresolved":false,"context_lines":[{"line_number":224,"context_line":"                return []"},{"line_number":225,"context_line":""},{"line_number":226,"context_line":"        filterA \u003d FilterA()"},{"line_number":227,"context_line":"        filterB \u003d FilterB()"},{"line_number":228,"context_line":"        all_filters \u003d [filterA, filterB]"},{"line_number":229,"context_line":"        hosts \u003d [\"Host0\", \"Host1\", \"Host2\"]"},{"line_number":230,"context_line":"        fake_res_id \u003d \"reservation\""}],"source_content_type":"text/x-python","patch_set":5,"id":"fa1b9901_fabbde73","line":227,"updated":"2015-08-17 14:27:14.000000000","message":"nit: variables should really be lower_with_underscore, not camelCased :)","commit_id":"7d0015a4331fd0489aab9ff8afab5d3bdd98f749"}]}
