)]}'
{"cinder/scheduler/host_manager.py":[{"author":{"_account_id":2759,"name":"Huang Zhiteng","email":"winston.d@gmail.com","username":"zhiteng-huang"},"change_message_id":"e74ec8b9c07b7bfc1d25ed9f0c4be17ac027678c","unresolved":false,"context_lines":[{"line_number":483,"context_line":"                LOG.warn(_LW(\"volume service is down. (host: %s)\") % host)"},{"line_number":484,"context_line":"                continue"},{"line_number":485,"context_line":"            capabilities \u003d self.service_states.get(host, None)"},{"line_number":486,"context_line":"            if capabilities is None:"},{"line_number":487,"context_line":"                no_capabilities_hosts.add(host)"},{"line_number":488,"context_line":""},{"line_number":489,"context_line":"            host_state \u003d self.host_state_map.get(host)"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a80dd14_8347fa4a","line":486,"updated":"2015-03-11 02:26:54.000000000","message":"In my PoC, I also check the timestamp of capabilities see if that\u0027s recent enough (time delta \u003c\u003d CONF.service_down_time).","commit_id":"c3b8a7354396172a8c645d0daebf7f576042e36e"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"c7e3ec58ffb4080502eabfdb1ba3c7b9658766b5","unresolved":false,"context_lines":[{"line_number":483,"context_line":"                LOG.warn(_LW(\"volume service is down. (host: %s)\") % host)"},{"line_number":484,"context_line":"                continue"},{"line_number":485,"context_line":"            capabilities \u003d self.service_states.get(host, None)"},{"line_number":486,"context_line":"            if capabilities is None:"},{"line_number":487,"context_line":"                no_capabilities_hosts.add(host)"},{"line_number":488,"context_line":""},{"line_number":489,"context_line":"            host_state \u003d self.host_state_map.get(host)"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a80dd14_6c8cae80","line":486,"in_reply_to":"9a80dd14_8347fa4a","updated":"2015-03-11 08:21:00.000000000","message":"True, I\u0027ve omitted that intentionally - at service startup there\u0027s simply no capabilities for hosts (so capabilities variable is None in this line). If we have outdated capabilities then something went wrong, but it\u0027s not a scheduler fault that some c-vol failed to send update in time.","commit_id":"c3b8a7354396172a8c645d0daebf7f576042e36e"},{"author":{"_account_id":2759,"name":"Huang Zhiteng","email":"winston.d@gmail.com","username":"zhiteng-huang"},"change_message_id":"e74ec8b9c07b7bfc1d25ed9f0c4be17ac027678c","unresolved":false,"context_lines":[{"line_number":484,"context_line":"                continue"},{"line_number":485,"context_line":"            capabilities \u003d self.service_states.get(host, None)"},{"line_number":486,"context_line":"            if capabilities is None:"},{"line_number":487,"context_line":"                no_capabilities_hosts.add(host)"},{"line_number":488,"context_line":""},{"line_number":489,"context_line":"            host_state \u003d self.host_state_map.get(host)"},{"line_number":490,"context_line":"            if not host_state:"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a80dd14_03730ab2","line":487,"updated":"2015-03-11 02:26:54.000000000","message":"we can skip adding host without capabilities or doesn\u0027t have up-to-date caps to self.host_state_map().","commit_id":"c3b8a7354396172a8c645d0daebf7f576042e36e"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"c7e3ec58ffb4080502eabfdb1ba3c7b9658766b5","unresolved":false,"context_lines":[{"line_number":484,"context_line":"                continue"},{"line_number":485,"context_line":"            capabilities \u003d self.service_states.get(host, None)"},{"line_number":486,"context_line":"            if capabilities is None:"},{"line_number":487,"context_line":"                no_capabilities_hosts.add(host)"},{"line_number":488,"context_line":""},{"line_number":489,"context_line":"            host_state \u003d self.host_state_map.get(host)"},{"line_number":490,"context_line":"            if not host_state:"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a80dd14_6ce3ce33","line":487,"in_reply_to":"9a80dd14_03730ab2","updated":"2015-03-11 08:21:00.000000000","message":"Okay.","commit_id":"c3b8a7354396172a8c645d0daebf7f576042e36e"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"6c7013450e00a8b68286f62971b71ed6b7b8e947","unresolved":false,"context_lines":[{"line_number":374,"context_line":"            # Do nothing when some other scheduler is configured"},{"line_number":375,"context_line":"            pass"},{"line_number":376,"context_line":""},{"line_number":377,"context_line":"        self._no_capabilities_hosts \u003d set()  # Hosts having no capabilities"},{"line_number":378,"context_line":"        self._update_host_state_map(cinder_context.get_admin_context())"},{"line_number":379,"context_line":""},{"line_number":380,"context_line":"    def _choose_host_filters(self, filter_cls_names):"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a80dd14_23ac41a0","line":377,"updated":"2015-03-12 12:43:03.000000000","message":"Doesn\u0027t this get already initialized in _update_host_state_map?","commit_id":"434327baecb74ec90c302e7c1c0ff707e9353d2a"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"d322021a6a0e8da671fe7461fc0ab1c8aa4ea61a","unresolved":false,"context_lines":[{"line_number":374,"context_line":"            # Do nothing when some other scheduler is configured"},{"line_number":375,"context_line":"            pass"},{"line_number":376,"context_line":""},{"line_number":377,"context_line":"        self._no_capabilities_hosts \u003d set()  # Hosts having no capabilities"},{"line_number":378,"context_line":"        self._update_host_state_map(cinder_context.get_admin_context())"},{"line_number":379,"context_line":""},{"line_number":380,"context_line":"    def _choose_host_filters(self, filter_cls_names):"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a80dd14_1db4f5cf","line":377,"updated":"2015-03-12 13:55:47.000000000","message":"Ok, and it never hurts to see it here that we\u0027ll have such an attribute.","commit_id":"434327baecb74ec90c302e7c1c0ff707e9353d2a"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"b5cb0c1aec5e707771c2914894133aa4ed35f863","unresolved":false,"context_lines":[{"line_number":374,"context_line":"            # Do nothing when some other scheduler is configured"},{"line_number":375,"context_line":"            pass"},{"line_number":376,"context_line":""},{"line_number":377,"context_line":"        self._no_capabilities_hosts \u003d set()  # Hosts having no capabilities"},{"line_number":378,"context_line":"        self._update_host_state_map(cinder_context.get_admin_context())"},{"line_number":379,"context_line":""},{"line_number":380,"context_line":"    def _choose_host_filters(self, filter_cls_names):"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a80dd14_7e35ecd9","line":377,"in_reply_to":"9a80dd14_23ac41a0","updated":"2015-03-12 13:37:32.000000000","message":"I prefer to indicate here that this property will be of set type.","commit_id":"434327baecb74ec90c302e7c1c0ff707e9353d2a"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"6c7013450e00a8b68286f62971b71ed6b7b8e947","unresolved":false,"context_lines":[{"line_number":466,"context_line":"                  {\u0027service_name\u0027: service_name, \u0027host\u0027: host,"},{"line_number":467,"context_line":"                   \u0027cap\u0027: capabilities})"},{"line_number":468,"context_line":""},{"line_number":469,"context_line":"        if host in self._no_capabilities_hosts:"},{"line_number":470,"context_line":"            self._no_capabilities_hosts.remove(host)"},{"line_number":471,"context_line":""},{"line_number":472,"context_line":"    def has_all_capabilities(self):"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a80dd14_43af7594","line":469,"updated":"2015-03-12 12:43:03.000000000","message":"We could simply use discard instead so we don\u0027t need to check if it\u0027s there.","commit_id":"434327baecb74ec90c302e7c1c0ff707e9353d2a"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"b5cb0c1aec5e707771c2914894133aa4ed35f863","unresolved":false,"context_lines":[{"line_number":466,"context_line":"                  {\u0027service_name\u0027: service_name, \u0027host\u0027: host,"},{"line_number":467,"context_line":"                   \u0027cap\u0027: capabilities})"},{"line_number":468,"context_line":""},{"line_number":469,"context_line":"        if host in self._no_capabilities_hosts:"},{"line_number":470,"context_line":"            self._no_capabilities_hosts.remove(host)"},{"line_number":471,"context_line":""},{"line_number":472,"context_line":"    def has_all_capabilities(self):"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a80dd14_3e39b441","line":469,"in_reply_to":"9a80dd14_43af7594","updated":"2015-03-12 13:37:32.000000000","message":"Done.","commit_id":"434327baecb74ec90c302e7c1c0ff707e9353d2a"}],"cinder/tests/scheduler/test_host_manager.py":[{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"6c7013450e00a8b68286f62971b71ed6b7b8e947","unresolved":false,"context_lines":[{"line_number":261,"context_line":""},{"line_number":262,"context_line":"        # Second test: Now service_is_up returns False for host3"},{"line_number":263,"context_line":"        _mock_service_is_up.reset_mock()"},{"line_number":264,"context_line":"        _mock_service_is_up.side_effect \u003d [True, True, False, True]"},{"line_number":265,"context_line":"        _mock_service_get_all_by_topic.reset_mock()"},{"line_number":266,"context_line":"        _mock_warning.reset_mock()"},{"line_number":267,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"9a80dd14_c3c36555","line":264,"updated":"2015-03-12 12:43:03.000000000","message":"Wouldn\u0027t this list only need be length 3?","commit_id":"434327baecb74ec90c302e7c1c0ff707e9353d2a"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"d322021a6a0e8da671fe7461fc0ab1c8aa4ea61a","unresolved":false,"context_lines":[{"line_number":261,"context_line":""},{"line_number":262,"context_line":"        # Second test: Now service_is_up returns False for host3"},{"line_number":263,"context_line":"        _mock_service_is_up.reset_mock()"},{"line_number":264,"context_line":"        _mock_service_is_up.side_effect \u003d [True, True, False, True]"},{"line_number":265,"context_line":"        _mock_service_get_all_by_topic.reset_mock()"},{"line_number":266,"context_line":"        _mock_warning.reset_mock()"},{"line_number":267,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"9a80dd14_ddb97dcc","line":264,"updated":"2015-03-12 13:55:47.000000000","message":"You are right. :)","commit_id":"434327baecb74ec90c302e7c1c0ff707e9353d2a"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"b5cb0c1aec5e707771c2914894133aa4ed35f863","unresolved":false,"context_lines":[{"line_number":261,"context_line":""},{"line_number":262,"context_line":"        # Second test: Now service_is_up returns False for host3"},{"line_number":263,"context_line":"        _mock_service_is_up.reset_mock()"},{"line_number":264,"context_line":"        _mock_service_is_up.side_effect \u003d [True, True, False, True]"},{"line_number":265,"context_line":"        _mock_service_get_all_by_topic.reset_mock()"},{"line_number":266,"context_line":"        _mock_warning.reset_mock()"},{"line_number":267,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"9a80dd14_fe855c59","line":264,"in_reply_to":"9a80dd14_c3c36555","updated":"2015-03-12 13:37:32.000000000","message":"We still have 4 non-disabled services. This line should be correct then.","commit_id":"434327baecb74ec90c302e7c1c0ff707e9353d2a"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"6c7013450e00a8b68286f62971b71ed6b7b8e947","unresolved":false,"context_lines":[{"line_number":275,"context_line":"            expected.append(mock.call(service))"},{"line_number":276,"context_line":"        self.assertEqual(expected, _mock_service_is_up.call_args_list)"},{"line_number":277,"context_line":"        expected \u003d []"},{"line_number":278,"context_line":"        for num in [\u00273\u0027]:"},{"line_number":279,"context_line":"            expected.append(mock.call(\"volume service is down. \""},{"line_number":280,"context_line":"                                      \"(host: host\" + num + \")\"))"},{"line_number":281,"context_line":"        self.assertEqual(expected, _mock_warning.call_args_list)"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a80dd14_e3a149aa","line":278,"updated":"2015-03-12 12:43:03.000000000","message":"Why do we create a list this way?\nexpected \u003d [mock.call(\"...\")]","commit_id":"434327baecb74ec90c302e7c1c0ff707e9353d2a"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"d322021a6a0e8da671fe7461fc0ab1c8aa4ea61a","unresolved":false,"context_lines":[{"line_number":275,"context_line":"            expected.append(mock.call(service))"},{"line_number":276,"context_line":"        self.assertEqual(expected, _mock_service_is_up.call_args_list)"},{"line_number":277,"context_line":"        expected \u003d []"},{"line_number":278,"context_line":"        for num in [\u00273\u0027]:"},{"line_number":279,"context_line":"            expected.append(mock.call(\"volume service is down. \""},{"line_number":280,"context_line":"                                      \"(host: host\" + num + \")\"))"},{"line_number":281,"context_line":"        self.assertEqual(expected, _mock_warning.call_args_list)"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a80dd14_fdb001df","line":278,"updated":"2015-03-12 13:55:47.000000000","message":"Yes, but this has probably changed over time from a time where it made sense... But now it just hurts my eyes.\nWell, I\u0027ll just close them, after all it\u0027s just a test. ;)","commit_id":"434327baecb74ec90c302e7c1c0ff707e9353d2a"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"b5cb0c1aec5e707771c2914894133aa4ed35f863","unresolved":false,"context_lines":[{"line_number":275,"context_line":"            expected.append(mock.call(service))"},{"line_number":276,"context_line":"        self.assertEqual(expected, _mock_service_is_up.call_args_list)"},{"line_number":277,"context_line":"        expected \u003d []"},{"line_number":278,"context_line":"        for num in [\u00273\u0027]:"},{"line_number":279,"context_line":"            expected.append(mock.call(\"volume service is down. \""},{"line_number":280,"context_line":"                                      \"(host: host\" + num + \")\"))"},{"line_number":281,"context_line":"        self.assertEqual(expected, _mock_warning.call_args_list)"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a80dd14_1e7dd06e","line":278,"in_reply_to":"9a80dd14_e3a149aa","updated":"2015-03-12 13:37:32.000000000","message":"Well, I\u0027m just changing code that was already there.","commit_id":"434327baecb74ec90c302e7c1c0ff707e9353d2a"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"6c7013450e00a8b68286f62971b71ed6b7b8e947","unresolved":false,"context_lines":[{"line_number":280,"context_line":"                                      \"(host: host\" + num + \")\"))"},{"line_number":281,"context_line":"        self.assertEqual(expected, _mock_warning.call_args_list)"},{"line_number":282,"context_line":""},{"line_number":283,"context_line":"        # Get host_state_map and make sure we have the first 3 hosts (host3 is"},{"line_number":284,"context_line":"        # down, host4 is missing capabilities)"},{"line_number":285,"context_line":"        host_state_map \u003d self.host_manager.host_state_map"},{"line_number":286,"context_line":"        self.assertEqual(len(host_state_map), 2)"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a80dd14_03a57db4","line":283,"updated":"2015-03-12 12:43:03.000000000","message":"s/3 hosts/2 hosts","commit_id":"434327baecb74ec90c302e7c1c0ff707e9353d2a"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"b5cb0c1aec5e707771c2914894133aa4ed35f863","unresolved":false,"context_lines":[{"line_number":280,"context_line":"                                      \"(host: host\" + num + \")\"))"},{"line_number":281,"context_line":"        self.assertEqual(expected, _mock_warning.call_args_list)"},{"line_number":282,"context_line":""},{"line_number":283,"context_line":"        # Get host_state_map and make sure we have the first 3 hosts (host3 is"},{"line_number":284,"context_line":"        # down, host4 is missing capabilities)"},{"line_number":285,"context_line":"        host_state_map \u003d self.host_manager.host_state_map"},{"line_number":286,"context_line":"        self.assertEqual(len(host_state_map), 2)"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a80dd14_1ea6b010","line":283,"in_reply_to":"9a80dd14_03a57db4","updated":"2015-03-12 13:37:32.000000000","message":"Done.","commit_id":"434327baecb74ec90c302e7c1c0ff707e9353d2a"}],"cinder/tests/scheduler/test_scheduler.py":[{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"6c7013450e00a8b68286f62971b71ed6b7b8e947","unresolved":false,"context_lines":[{"line_number":258,"context_line":"    @mock.patch(\u0027cinder.scheduler.host_manager.HostManager.\u0027"},{"line_number":259,"context_line":"                \u0027has_all_capabilities\u0027)"},{"line_number":260,"context_line":"    def test_is_ready(self, _mock_has_caps):"},{"line_number":261,"context_line":"        _mock_has_caps.return_value \u003d False"},{"line_number":262,"context_line":"        ready \u003d self.driver.is_ready()"},{"line_number":263,"context_line":"        _mock_has_caps.assert_called_once_with()"},{"line_number":264,"context_line":"        self.assertFalse(ready)"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a80dd14_6395593f","line":261,"updated":"2015-03-12 12:43:03.000000000","message":"We could set the return_value on the decorator","commit_id":"434327baecb74ec90c302e7c1c0ff707e9353d2a"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"b5cb0c1aec5e707771c2914894133aa4ed35f863","unresolved":false,"context_lines":[{"line_number":258,"context_line":"    @mock.patch(\u0027cinder.scheduler.host_manager.HostManager.\u0027"},{"line_number":259,"context_line":"                \u0027has_all_capabilities\u0027)"},{"line_number":260,"context_line":"    def test_is_ready(self, _mock_has_caps):"},{"line_number":261,"context_line":"        _mock_has_caps.return_value \u003d False"},{"line_number":262,"context_line":"        ready \u003d self.driver.is_ready()"},{"line_number":263,"context_line":"        _mock_has_caps.assert_called_once_with()"},{"line_number":264,"context_line":"        self.assertFalse(ready)"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a80dd14_9e9380f9","line":261,"in_reply_to":"9a80dd14_6395593f","updated":"2015-03-12 13:37:32.000000000","message":"Done","commit_id":"434327baecb74ec90c302e7c1c0ff707e9353d2a"}]}
