)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"8fd3c030752131900bad8f23172cb77936c11cd7","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Davanum Srinivas \u003cdavanum@gmail.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2015-08-25 09:04:53 -0400"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"default_schedule_zone should be a list of AZ(s)"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Operator may have more than one AZ that they would like their"},{"line_number":10,"context_line":"users to boot to by default. This also helps in the case as"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"fa1b9901_2a22efa3","line":7,"updated":"2015-08-25 13:50:58.000000000","message":"so strong -1 here. There is a common misunderstand of what\u0027s a default schedule zone, and while I think there are bugs, I think providing a list of Opts could be worst case to do.\n\n\nLet me explain : by default, if no AZ is specified on the boot request, it takes the default_schedule_zone opt to say \"hey, this user asked for this AZ\" but it actually means nothing but what\u0027s provided in the opt (by default None)\nhttps://github.com/openstack/nova/blob/master/nova/compute/api.py#L587-L588\n\nWhen showing the list of AZs (either by nova-manage or thru the API), you can see that it will check all the aggregates (because AZ is just a specific metadata for an Aggregate) and if the host is having no aggregate with AZ specified, it will be defaulted to default_availability_zone (default: \u0027nova\u0027)\nhttps://github.com/openstack/nova/blob/master/nova/availability_zones.py#L88-L92\n\nWhen a request comes to the scheduler for picking an host, then the AZFilter does the mapping and checks between the asked AZ (so defaulted to default_schedule_zone) and the host AZ (defaulted to default_availability_zone)\nhttps://github.com/openstack/nova/blob/master/nova/scheduler/filters/availability_zone_filter.py\n\nTo answer the problem (here, I want to scheduler anywhere *but* a specific AZ), it already works by specifying default_schedule_zone\u003d\u0027nova\u0027. That way, all the hosts belonging to the aggregate will be excluded while the others having no aggregates will be accepted.\nIf the operator has multiple AZs, he accepts that he has to call explicitely the defined AZ using --az hint or he would have to write an out-of-tree filter for excluding the ones he wishes.\n\nI don\u0027t really see a benefit here of changing that, because it would create more problems than it would resolve, just for a specific usecase which can be easily workarounded by using either other filters, or a specific deployment.","commit_id":"fb9409051f41bf6e082a4920a5bfe4fe01f64498"}],"nova/compute/api.py":[{"author":{"_account_id":10224,"name":"Feodor Tersin","email":"ftersin@hotmail.com","username":"ftersin"},"change_message_id":"b6608d12ea40fc5bc121a1fa2d1063b464565919","unresolved":false,"context_lines":[{"line_number":589,"context_line":"                        reason\u003d\"Unable to parse availability_zone\")"},{"line_number":590,"context_line":""},{"line_number":591,"context_line":"        if not availability_zone and CONF.default_schedule_zones:"},{"line_number":592,"context_line":"            availability_zone \u003d random.choice(CONF.default_schedule_zones)"},{"line_number":593,"context_line":""},{"line_number":594,"context_line":"        return availability_zone, forced_host, forced_node"},{"line_number":595,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"fa1b9901_cb4dd1c5","line":592,"updated":"2015-08-23 12:06:23.000000000","message":"I think you should choice available zones only.\n\nThe reason is that if a user has az1, az2, az3, and az1, az2 are marked as default, but az2 is down, Nova must boot an instance on az1 by default. But this code will randomly select az2, which will lead to fail the launch.","commit_id":"301b8663b9f2270556ecd4cda9c30ea32d1bb1b0"},{"author":{"_account_id":5638,"name":"Davanum Srinivas","email":"davanum@gmail.com","username":"dims-v"},"change_message_id":"b3885eee377c58db4ee4a6bd31dac1f26b7dd04d","unresolved":false,"context_lines":[{"line_number":589,"context_line":"                        reason\u003d\"Unable to parse availability_zone\")"},{"line_number":590,"context_line":""},{"line_number":591,"context_line":"        if not availability_zone and CONF.default_schedule_zones:"},{"line_number":592,"context_line":"            availability_zone \u003d random.choice(CONF.default_schedule_zones)"},{"line_number":593,"context_line":""},{"line_number":594,"context_line":"        return availability_zone, forced_host, forced_node"},{"line_number":595,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"fa1b9901_f3207d4b","line":592,"in_reply_to":"fa1b9901_cb4dd1c5","updated":"2015-08-25 11:17:29.000000000","message":"Done","commit_id":"301b8663b9f2270556ecd4cda9c30ea32d1bb1b0"},{"author":{"_account_id":10224,"name":"Feodor Tersin","email":"ftersin@hotmail.com","username":"ftersin"},"change_message_id":"bc0d3b31c67eb924092375f3f31815fca3fabf38","unresolved":false,"context_lines":[{"line_number":597,"context_line":"                context.elevated(), True)"},{"line_number":598,"context_line":"            available_zones \u003d [zone for zone in available_zones"},{"line_number":599,"context_line":"                               if zone in CONF.default_schedule_zones]"},{"line_number":600,"context_line":"            availability_zone \u003d random.choice(available_zones)"},{"line_number":601,"context_line":""},{"line_number":602,"context_line":"        return availability_zone, forced_host, forced_node"},{"line_number":603,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"fa1b9901_e972cc7b","line":600,"updated":"2015-08-25 12:05:55.000000000","message":"But if no one default az is available, you\u0027ll get IndexError here.\n\nAlso i expected that you consolidate this choose of az with a check of it (L876-883) to do not call get_availability_zones twice.","commit_id":"d7afd3adcce59db7ca3edd5bb72617fe0213715f"},{"author":{"_account_id":5638,"name":"Davanum Srinivas","email":"davanum@gmail.com","username":"dims-v"},"change_message_id":"4b5127c08838ec1f3f822a05655cfc655f5704e9","unresolved":false,"context_lines":[{"line_number":597,"context_line":"                context.elevated(), True)"},{"line_number":598,"context_line":"            available_zones \u003d [zone for zone in available_zones"},{"line_number":599,"context_line":"                               if zone in CONF.default_schedule_zones]"},{"line_number":600,"context_line":"            availability_zone \u003d random.choice(available_zones)"},{"line_number":601,"context_line":""},{"line_number":602,"context_line":"        return availability_zone, forced_host, forced_node"},{"line_number":603,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"fa1b9901_822e85f8","line":600,"in_reply_to":"fa1b9901_e972cc7b","updated":"2015-08-25 13:06:13.000000000","message":"I can fix the IndexError, but not comfortable so late in the cycle to do more surgery than that.","commit_id":"d7afd3adcce59db7ca3edd5bb72617fe0213715f"}]}
