)]}'
{"blazar/plugins/oshosts/host_plugin.py":[{"author":{"_account_id":8878,"name":"Masahito Muroi","email":"masahito.muroi@g.softbank.co.jp","username":"masa"},"change_message_id":"9ab466b77b70d39321db8f947f3dfd450adcd950","unresolved":false,"context_lines":[{"line_number":664,"context_line":"                    reservation_flags \u003d self._handle_failures(failed_hosts)"},{"line_number":665,"context_line":"            else:"},{"line_number":666,"context_line":"                recovered_hosts \u003d db_api.host_get_all_by_queries("},{"line_number":667,"context_line":"                    [\u0027reservable \u003d\u003d 0\u0027,"},{"line_number":668,"context_line":"                     \u0027hypervisor_hostname \u003d\u003d \u0027 + data[\u0027host\u0027]])"},{"line_number":669,"context_line":"                if recovered_hosts:"},{"line_number":670,"context_line":"                    db_api.host_update(recovered_hosts[0][\u0027id\u0027],"}],"source_content_type":"text/x-python","patch_set":6,"id":"7f96bb07_75cda764","line":667,"range":{"start_line":667,"start_character":22,"end_line":667,"end_character":37},"updated":"2018-01-16 07:56:40.000000000","message":"I noticed the reservable field is not 1 or 0. It\u0027s a boolean.\n\noslo.db (sqlalchemy) works with both type?","commit_id":"9b197e560984b33521b7347ba85dbbbcc0cf2bb4"},{"author":{"_account_id":23840,"name":"Hiroaki Kobayashi","email":"kobayashi.hiroaki@lab.ntt.co.jp","username":"hiro-kobayashi"},"change_message_id":"c475f24717c12b09e8a7b7bf904533eabea25867","unresolved":false,"context_lines":[{"line_number":664,"context_line":"                    reservation_flags \u003d self._handle_failures(failed_hosts)"},{"line_number":665,"context_line":"            else:"},{"line_number":666,"context_line":"                recovered_hosts \u003d db_api.host_get_all_by_queries("},{"line_number":667,"context_line":"                    [\u0027reservable \u003d\u003d 0\u0027,"},{"line_number":668,"context_line":"                     \u0027hypervisor_hostname \u003d\u003d \u0027 + data[\u0027host\u0027]])"},{"line_number":669,"context_line":"                if recovered_hosts:"},{"line_number":670,"context_line":"                    db_api.host_update(recovered_hosts[0][\u0027id\u0027],"}],"source_content_type":"text/x-python","patch_set":6,"id":"7f96bb07_d326a1ce","line":667,"range":{"start_line":667,"start_character":22,"end_line":667,"end_character":37},"in_reply_to":"7f96bb07_75cda764","updated":"2018-01-19 04:23:34.000000000","message":"Yes, I tested and it worked. However, now that I think it\u0027s better to set \u0027reservable \u003d\u003d False\u0027 and convert the str type of \u0027False\u0027 to boolean type of False in the host_get_all_by_queries() because it\u0027s easier to read.\n\nHowever, other part like the reservable_host_get_all_by_queries() (which is not a part of this patch) uses the same expression \u0027reservable \u003d\u003d 1\u0027. So, I\u0027ll push other patch to change \u0027reservable \u003d\u003d 0/1\u0027 to \u0027reservable \u003d\u003d True/False\u0027 for entire codebase.","commit_id":"9b197e560984b33521b7347ba85dbbbcc0cf2bb4"},{"author":{"_account_id":8878,"name":"Masahito Muroi","email":"masahito.muroi@g.softbank.co.jp","username":"masa"},"change_message_id":"9ab466b77b70d39321db8f947f3dfd450adcd950","unresolved":false,"context_lines":[{"line_number":667,"context_line":"                    [\u0027reservable \u003d\u003d 0\u0027,"},{"line_number":668,"context_line":"                     \u0027hypervisor_hostname \u003d\u003d \u0027 + data[\u0027host\u0027]])"},{"line_number":669,"context_line":"                if recovered_hosts:"},{"line_number":670,"context_line":"                    db_api.host_update(recovered_hosts[0][\u0027id\u0027],"},{"line_number":671,"context_line":"                                       {\u0027reservable\u0027: True})"},{"line_number":672,"context_line":"                    LOG.warn(\u0027%s recovered.\u0027,"},{"line_number":673,"context_line":"                             recovered_hosts[0][\u0027hypervisor_hostname\u0027])"},{"line_number":674,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"7f96bb07_1521c3b0","line":671,"range":{"start_line":670,"start_character":0,"end_line":671,"end_character":60},"updated":"2018-01-16 07:56:40.000000000","message":"PhysicalHostPlugin should be in charge of updating the flag like heal_reservation doing.  The monitor plugin just does monitor Nova\u0027s status and notifies the result.\n\n_handl_recover() is good isn\u0027t it?","commit_id":"9b197e560984b33521b7347ba85dbbbcc0cf2bb4"},{"author":{"_account_id":23840,"name":"Hiroaki Kobayashi","email":"kobayashi.hiroaki@lab.ntt.co.jp","username":"hiro-kobayashi"},"change_message_id":"c475f24717c12b09e8a7b7bf904533eabea25867","unresolved":false,"context_lines":[{"line_number":667,"context_line":"                    [\u0027reservable \u003d\u003d 0\u0027,"},{"line_number":668,"context_line":"                     \u0027hypervisor_hostname \u003d\u003d \u0027 + data[\u0027host\u0027]])"},{"line_number":669,"context_line":"                if recovered_hosts:"},{"line_number":670,"context_line":"                    db_api.host_update(recovered_hosts[0][\u0027id\u0027],"},{"line_number":671,"context_line":"                                       {\u0027reservable\u0027: True})"},{"line_number":672,"context_line":"                    LOG.warn(\u0027%s recovered.\u0027,"},{"line_number":673,"context_line":"                             recovered_hosts[0][\u0027hypervisor_hostname\u0027])"},{"line_number":674,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"7f96bb07_d30f8134","line":671,"range":{"start_line":670,"start_character":0,"end_line":671,"end_character":60},"in_reply_to":"7f96bb07_1521c3b0","updated":"2018-01-19 04:23:34.000000000","message":"Do you propose also move L745 to PhysicalHostPlugin?","commit_id":"9b197e560984b33521b7347ba85dbbbcc0cf2bb4"},{"author":{"_account_id":23840,"name":"Hiroaki Kobayashi","email":"kobayashi.hiroaki@lab.ntt.co.jp","username":"hiro-kobayashi"},"change_message_id":"690798a1b0fc4525aed4bf3ccd07b0dbaa8fff8d","unresolved":false,"context_lines":[{"line_number":667,"context_line":"                    [\u0027reservable \u003d\u003d 0\u0027,"},{"line_number":668,"context_line":"                     \u0027hypervisor_hostname \u003d\u003d \u0027 + data[\u0027host\u0027]])"},{"line_number":669,"context_line":"                if recovered_hosts:"},{"line_number":670,"context_line":"                    db_api.host_update(recovered_hosts[0][\u0027id\u0027],"},{"line_number":671,"context_line":"                                       {\u0027reservable\u0027: True})"},{"line_number":672,"context_line":"                    LOG.warn(\u0027%s recovered.\u0027,"},{"line_number":673,"context_line":"                             recovered_hosts[0][\u0027hypervisor_hostname\u0027])"},{"line_number":674,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"7f96bb07_0e0dbee6","line":671,"range":{"start_line":670,"start_character":0,"end_line":671,"end_character":60},"in_reply_to":"7f96bb07_d30f8134","updated":"2018-01-19 04:43:26.000000000","message":"I think PhysicalHostMonitorPlugin is good to update the \u0027reservable\u0027 field because the logic which judges the host failure/recovery is in the PhysicalHostMonitorPlugin. The PhysicalHostMonitorPlugin says the host failed/recovered, then it actually failed/recovered.\n\nOn the other hands, effect of the failure is out of scope of the PhysicalHostMonitorPlugin. So, it calls heal_reservations() of resource plugins.","commit_id":"9b197e560984b33521b7347ba85dbbbcc0cf2bb4"},{"author":{"_account_id":8878,"name":"Masahito Muroi","email":"masahito.muroi@g.softbank.co.jp","username":"masa"},"change_message_id":"9ab466b77b70d39321db8f947f3dfd450adcd950","unresolved":false,"context_lines":[{"line_number":699,"context_line":"            reservation_flags \u003d self._handle_failures(failed_hosts)"},{"line_number":700,"context_line":"        if recovered_hosts:"},{"line_number":701,"context_line":"            for host in recovered_hosts:"},{"line_number":702,"context_line":"                db_api.host_update(host[\u0027id\u0027], {\u0027reservable\u0027: True})"},{"line_number":703,"context_line":"                LOG.warn(\u0027%s recovered.\u0027, host[\u0027hypervisor_hostname\u0027])"},{"line_number":704,"context_line":""},{"line_number":705,"context_line":"        return reservation_flags"}],"source_content_type":"text/x-python","patch_set":6,"id":"7f96bb07_950cf341","line":702,"range":{"start_line":702,"start_character":0,"end_line":702,"end_character":68},"updated":"2018-01-16 07:56:40.000000000","message":"same as above.","commit_id":"9b197e560984b33521b7347ba85dbbbcc0cf2bb4"},{"author":{"_account_id":8878,"name":"Masahito Muroi","email":"masahito.muroi@g.softbank.co.jp","username":"masa"},"change_message_id":"9ab466b77b70d39321db8f947f3dfd450adcd950","unresolved":false,"context_lines":[{"line_number":709,"context_line":""},{"line_number":710,"context_line":"        :return: a list of failed hosts, a list of recovered hosts."},{"line_number":711,"context_line":"        \"\"\""},{"line_number":712,"context_line":"        hosts \u003d db_api.host_get_all_by_filters({})"},{"line_number":713,"context_line":"        reservable_hosts \u003d [h for h in hosts if h[\u0027reservable\u0027] is True]"},{"line_number":714,"context_line":"        unreservable_hosts \u003d [h for h in hosts if h[\u0027reservable\u0027] is False]"},{"line_number":715,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"7f96bb07_55c0ab2a","line":712,"range":{"start_line":712,"start_character":47,"end_line":712,"end_character":49},"updated":"2018-01-16 07:56:40.000000000","message":"[ ] is correct?","commit_id":"9b197e560984b33521b7347ba85dbbbcc0cf2bb4"},{"author":{"_account_id":23840,"name":"Hiroaki Kobayashi","email":"kobayashi.hiroaki@lab.ntt.co.jp","username":"hiro-kobayashi"},"change_message_id":"c475f24717c12b09e8a7b7bf904533eabea25867","unresolved":false,"context_lines":[{"line_number":709,"context_line":""},{"line_number":710,"context_line":"        :return: a list of failed hosts, a list of recovered hosts."},{"line_number":711,"context_line":"        \"\"\""},{"line_number":712,"context_line":"        hosts \u003d db_api.host_get_all_by_filters({})"},{"line_number":713,"context_line":"        reservable_hosts \u003d [h for h in hosts if h[\u0027reservable\u0027] is True]"},{"line_number":714,"context_line":"        unreservable_hosts \u003d [h for h in hosts if h[\u0027reservable\u0027] is False]"},{"line_number":715,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"7f96bb07_2317be47","line":712,"range":{"start_line":712,"start_character":47,"end_line":712,"end_character":49},"in_reply_to":"7f96bb07_55c0ab2a","updated":"2018-01-19 04:23:34.000000000","message":"The host_get_all_by_filters accepts a dictionary while the host_get_all_by_queries accepts a list.","commit_id":"9b197e560984b33521b7347ba85dbbbcc0cf2bb4"}]}
