)]}'
{"nova/scheduler/base_scheduler.py":[{"author":{"_account_id":688,"name":"Sandy Walsh","email":"sandy.walsh@rackspace.com","username":"sandy-walsh"},"change_message_id":"84a2c2dd0a2694368ed9a58b8d1adb513d7ddbce","unresolved":false,"context_lines":[{"line_number":57,"context_line":"        scheduling objectives"},{"line_number":58,"context_line":"        \"\"\""},{"line_number":59,"context_line":"        # Make sure if there are compute hosts to serve the request."},{"line_number":60,"context_line":"        if not hosts:"},{"line_number":61,"context_line":"            return []"},{"line_number":62,"context_line":"        # NOTE(sirp): The default logic is the same as the NoopCostFunction"},{"line_number":63,"context_line":"        hosts \u003d [dict(weight\u003d1, hostname\u003dhostname, capabilities\u003dcapabilities)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAACX%2F%2F%2BUQ%3D","line":60,"updated":"2011-09-28 12:52:24.000000000","message":"not sure how not having this would have resulted in an endless loop. \n\nThe only thing I can imagine is if hosts \u003d None and it was exceptioning out in the list comprehension?\n\nI guess the bigger question is, why would throwing an exception cause the scheduler to die completely? Perhaps that\u0027s the bug that needs to be fixed?","commit_id":"d4729ac2d9c71a06eaf080ae909b13af773453cb"},{"author":{"_account_id":551,"name":"Sateesh","username":"sateesh-chodapuneedi"},"change_message_id":"464146e8c4fb53fd6e9f754dcf85eeeed8075552","unresolved":false,"context_lines":[{"line_number":57,"context_line":"        scheduling objectives"},{"line_number":58,"context_line":"        \"\"\""},{"line_number":59,"context_line":"        # Make sure if there are compute hosts to serve the request."},{"line_number":60,"context_line":"        if not hosts:"},{"line_number":61,"context_line":"            return []"},{"line_number":62,"context_line":"        # NOTE(sirp): The default logic is the same as the NoopCostFunction"},{"line_number":63,"context_line":"        hosts \u003d [dict(weight\u003d1, hostname\u003dhostname, capabilities\u003dcapabilities)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAACX%2F%2F%2BGE%3D","line":60,"in_reply_to":"AAAACX%2F%2F%2BUQ%3D","updated":"2011-09-29 06:15:38.000000000","message":"@Sandy: Thanks for the review.\n\u003e\u003enot sure how not having this would have resulted in an endless loop.\n\nEmpty list of \u0027hosts\u0027 results into endless loop because of the following 3 lines. num_instances stays non-zero forever.\n\n70 while num_instances \u003e len(hosts):\n\n71               instances.extend(hosts)\n\n72               num_instances -\u003d len(hosts)","commit_id":"d4729ac2d9c71a06eaf080ae909b13af773453cb"}]}
