)]}'
{"zun/scheduler/filter_scheduler.py":[{"author":{"_account_id":11536,"name":"hongbin","email":"hongbin034@gmail.com","username":"hongbin"},"change_message_id":"a5b7cbde30298ccd42d77f4382d4fed44169bc49","unresolved":false,"context_lines":[{"line_number":43,"context_line":""},{"line_number":44,"context_line":"    def _schedule(self, context, container, extra_spec):"},{"line_number":45,"context_line":"        \"\"\"Picks a host according to filters.\"\"\""},{"line_number":46,"context_line":"        hosts \u003d self.hosts_up(context)"},{"line_number":47,"context_line":"        services \u003d self._get_services_by_host(context)"},{"line_number":48,"context_line":"        nodes \u003d objects.ComputeNode.list(context)"},{"line_number":49,"context_line":"        nodes \u003d [node for node in nodes if node.hostname in hosts]"}],"source_content_type":"text/x-python","patch_set":3,"id":"1f485f77_18d275d3","line":46,"range":{"start_line":46,"start_character":21,"end_line":46,"end_character":29},"updated":"2017-11-14 16:54:30.000000000","message":"Nit: This looks duplicated with ComputeFilter. Here will filter all hosts whose service is not up. ComputeFilter does the same check. I think it is unnecessary to double the status check in two places.","commit_id":"f2c4c50d2ed10586b440643be964e94ab7f1ae1f"},{"author":{"_account_id":22406,"name":"Kien Nguyen","email":"kiennt2609@gmail.com","username":"kiennt"},"change_message_id":"e280b6e5e03a09dc828ab7d9f49b3dd9608e951d","unresolved":false,"context_lines":[{"line_number":43,"context_line":""},{"line_number":44,"context_line":"    def _schedule(self, context, container, extra_spec):"},{"line_number":45,"context_line":"        \"\"\"Picks a host according to filters.\"\"\""},{"line_number":46,"context_line":"        hosts \u003d self.hosts_up(context)"},{"line_number":47,"context_line":"        services \u003d self._get_services_by_host(context)"},{"line_number":48,"context_line":"        nodes \u003d objects.ComputeNode.list(context)"},{"line_number":49,"context_line":"        nodes \u003d [node for node in nodes if node.hostname in hosts]"}],"source_content_type":"text/x-python","patch_set":3,"id":"1f485f77_ada8aeda","line":46,"range":{"start_line":46,"start_character":21,"end_line":46,"end_character":29},"in_reply_to":"1f485f77_18d275d3","updated":"2017-11-15 07:48:22.000000000","message":"Done","commit_id":"f2c4c50d2ed10586b440643be964e94ab7f1ae1f"}],"zun/scheduler/filters/compute_filter.py":[{"author":{"_account_id":11536,"name":"hongbin","email":"hongbin034@gmail.com","username":"hongbin"},"change_message_id":"d676c48aaf6faaa0999e5de11b5b0495084700cc","unresolved":false,"context_lines":[{"line_number":33,"context_line":""},{"line_number":34,"context_line":"    def host_passes(self, host_state, container, extra_spec):"},{"line_number":35,"context_line":"        \"\"\"Returns True for only active compute nodes\"\"\""},{"line_number":36,"context_line":"        service \u003d host_state.service"},{"line_number":37,"context_line":"        if service.get(\u0027disabled\u0027):"},{"line_number":38,"context_line":"            LOG.debug(\u0027%(host_state)s is disabled, reason: %(reason)s\u0027,"},{"line_number":39,"context_line":"                      {\u0027host_state\u0027: host_state,"}],"source_content_type":"text/x-python","patch_set":2,"id":"1f485f77_a64fd632","line":36,"range":{"start_line":36,"start_character":29,"end_line":36,"end_character":36},"updated":"2017-11-14 04:37:45.000000000","message":"Keep in mind that host_state.service is a ReadOnlyDict.","commit_id":"fee1a32d1b756ab590c4df764fea616b703951c4"},{"author":{"_account_id":22406,"name":"Kien Nguyen","email":"kiennt2609@gmail.com","username":"kiennt"},"change_message_id":"36ea382d43230448653be123c3ad03ea3cd2a9b2","unresolved":false,"context_lines":[{"line_number":33,"context_line":""},{"line_number":34,"context_line":"    def host_passes(self, host_state, container, extra_spec):"},{"line_number":35,"context_line":"        \"\"\"Returns True for only active compute nodes\"\"\""},{"line_number":36,"context_line":"        service \u003d host_state.service"},{"line_number":37,"context_line":"        if service.get(\u0027disabled\u0027):"},{"line_number":38,"context_line":"            LOG.debug(\u0027%(host_state)s is disabled, reason: %(reason)s\u0027,"},{"line_number":39,"context_line":"                      {\u0027host_state\u0027: host_state,"}],"source_content_type":"text/x-python","patch_set":2,"id":"1f485f77_c9d53ee7","line":36,"range":{"start_line":36,"start_character":29,"end_line":36,"end_character":36},"in_reply_to":"1f485f77_a64fd632","updated":"2017-11-14 09:32:59.000000000","message":"Done. Thank you! My bad copy \u0026 paste!","commit_id":"fee1a32d1b756ab590c4df764fea616b703951c4"},{"author":{"_account_id":11536,"name":"hongbin","email":"hongbin034@gmail.com","username":"hongbin"},"change_message_id":"d676c48aaf6faaa0999e5de11b5b0495084700cc","unresolved":false,"context_lines":[{"line_number":40,"context_line":"                       \u0027reason\u0027: service.get(\u0027disable_reason\u0027)})"},{"line_number":41,"context_line":"            return False"},{"line_number":42,"context_line":"        else:"},{"line_number":43,"context_line":"            if not self.servicegroup_api.service_is_up(service):"},{"line_number":44,"context_line":"                LOG.warning(\u0027%(host_state)s has not been heard from in \u0027"},{"line_number":45,"context_line":"                            \u0027a while\u0027, {\u0027host_state\u0027: host_state})"},{"line_number":46,"context_line":"                return False"}],"source_content_type":"text/x-python","patch_set":2,"id":"1f485f77_465a62f3","line":43,"range":{"start_line":43,"start_character":55,"end_line":43,"end_character":62},"updated":"2017-11-14 04:37:45.000000000","message":"Here will throw exception because \u0027service_is_up\u0027 requires \u0027service\u0027 to be of type objects.ZunService, but the passed parameter is a ReadOnlyDict.","commit_id":"fee1a32d1b756ab590c4df764fea616b703951c4"},{"author":{"_account_id":11536,"name":"hongbin","email":"hongbin034@gmail.com","username":"hongbin"},"change_message_id":"a5b7cbde30298ccd42d77f4382d4fed44169bc49","unresolved":false,"context_lines":[{"line_number":40,"context_line":"                       \u0027reason\u0027: service.disabled_reason or \u0027Unknow\u0027})"},{"line_number":41,"context_line":"            return False"},{"line_number":42,"context_line":"        else:"},{"line_number":43,"context_line":"            if not self.servicegroup_api.service_is_up(service):"},{"line_number":44,"context_line":"                LOG.warning(\u0027%(host_state)s has not been heard from in \u0027"},{"line_number":45,"context_line":"                            \u0027a while\u0027, {\u0027host_state\u0027: host_state})"},{"line_number":46,"context_line":"                return False"}],"source_content_type":"text/x-python","patch_set":3,"id":"1f485f77_18a03543","line":43,"range":{"start_line":43,"start_character":41,"end_line":43,"end_character":54},"updated":"2017-11-14 16:54:30.000000000","message":"Nit: This looks duplicated with FilterScheduler (line #46). Here will check if service is up. FilterScheduler does the same check (self.hosts_up). I think it is unnecessary to double the status check in two places.","commit_id":"f2c4c50d2ed10586b440643be964e94ab7f1ae1f"}],"zun/scheduler/host_state.py":[{"author":{"_account_id":11536,"name":"hongbin","email":"hongbin034@gmail.com","username":"hongbin"},"change_message_id":"d676c48aaf6faaa0999e5de11b5b0495084700cc","unresolved":false,"context_lines":[{"line_number":83,"context_line":"                self._update_from_compute_node(compute_node)"},{"line_number":84,"context_line":"            if service is not None:"},{"line_number":85,"context_line":"                LOG.debug(\u0027Update host stae with service dict: %s\u0027, service)"},{"line_number":86,"context_line":"                self.service \u003d ReadOnlyDict(service)"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"        return _locked_update(self, compute_node, service)"},{"line_number":89,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"1f485f77_663afe98","line":86,"range":{"start_line":86,"start_character":16,"end_line":86,"end_character":28},"updated":"2017-11-14 04:37:45.000000000","message":"Keep in mind that \u0027service\u0027 is of type objects.ZunService. However, self.service is of a different type.","commit_id":"fee1a32d1b756ab590c4df764fea616b703951c4"}]}
