)]}'
{"neutron/services/placement_report/plugin.py":[{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"f54446a089138011f991792b9e1d43e7240a0faf","unresolved":false,"context_lines":[{"line_number":67,"context_line":"        rps \u003d self._placement_client.list_resource_providers("},{"line_number":68,"context_line":"            name\u003dname)[\u0027resource_providers\u0027]"},{"line_number":69,"context_line":"        # RP names are unique, therefore we can get 0 or 1. But not many."},{"line_number":70,"context_line":"        return rps[0]"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"    def _sync_placement_state(self, agent, agent_db):"},{"line_number":73,"context_line":"        configurations \u003d agent[\u0027configurations\u0027]"}],"source_content_type":"text/x-python","patch_set":1,"id":"5fc1f717_7be1a1fe","line":70,"range":{"start_line":70,"start_character":15,"end_line":70,"end_character":21},"updated":"2019-03-06 08:21:24.000000000","message":"if there is no resource provider returned then I guess rps is an empty list and then this indexing will fail.","commit_id":"5a33c00f6e0f4e0b50e6905983faec876e272d66"},{"author":{"_account_id":15554,"name":"Bence Romsics","email":"bence.romsics@gmail.com","username":"ebenrom","status":"inactive contributor"},"change_message_id":"95b4b55e33b9047521fd7d0a240f24c5b8cae542","unresolved":false,"context_lines":[{"line_number":67,"context_line":"        rps \u003d self._placement_client.list_resource_providers("},{"line_number":68,"context_line":"            name\u003dname)[\u0027resource_providers\u0027]"},{"line_number":69,"context_line":"        # RP names are unique, therefore we can get 0 or 1. But not many."},{"line_number":70,"context_line":"        return rps[0]"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"    def _sync_placement_state(self, agent, agent_db):"},{"line_number":73,"context_line":"        configurations \u003d agent[\u0027configurations\u0027]"}],"source_content_type":"text/x-python","patch_set":1,"id":"5fc1f717_416634f0","line":70,"range":{"start_line":70,"start_character":15,"end_line":70,"end_character":21},"in_reply_to":"5fc1f717_7be1a1fe","updated":"2019-03-06 10:17:22.000000000","message":"That\u0027s intentional, as you found below.","commit_id":"5a33c00f6e0f4e0b50e6905983faec876e272d66"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"f54446a089138011f991792b9e1d43e7240a0faf","unresolved":false,"context_lines":[{"line_number":80,"context_line":"        try:"},{"line_number":81,"context_line":"            agent_host_rp_uuid \u003d self._get_rp_by_name("},{"line_number":82,"context_line":"                name\u003dagent[\u0027host\u0027])[\u0027uuid\u0027]"},{"line_number":83,"context_line":"        except (IndexError, ks_exc.HttpError):"},{"line_number":84,"context_line":"            agent_db.resources_synced \u003d False"},{"line_number":85,"context_line":"            agent_db.update()"},{"line_number":86,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"5fc1f717_5bb5c5ed","line":83,"range":{"start_line":83,"start_character":16,"end_line":83,"end_character":26},"updated":"2019-03-06 08:21:24.000000000","message":"... ok so the above indexing problem is caught here.","commit_id":"5a33c00f6e0f4e0b50e6905983faec876e272d66"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"f54446a089138011f991792b9e1d43e7240a0faf","unresolved":false,"context_lines":[{"line_number":80,"context_line":"        try:"},{"line_number":81,"context_line":"            agent_host_rp_uuid \u003d self._get_rp_by_name("},{"line_number":82,"context_line":"                name\u003dagent[\u0027host\u0027])[\u0027uuid\u0027]"},{"line_number":83,"context_line":"        except (IndexError, ks_exc.HttpError):"},{"line_number":84,"context_line":"            agent_db.resources_synced \u003d False"},{"line_number":85,"context_line":"            agent_db.update()"},{"line_number":86,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"5fc1f717_9bb7add9","line":83,"range":{"start_line":83,"start_character":28,"end_line":83,"end_character":44},"updated":"2019-03-06 08:21:24.000000000","message":"As far as I know there are two base types of ks exception that we can get. ClientException (as a base for e.g. EndpointNotFound, MissingAuthPlugin, DiscoveryFailure, ConnectFailure) for things when the client cannot really start to talk to placement. And HttpError (e.g. base for Unauthorized) for things when 4xx or 5xx http response codes are received from placement.\n\nSo I guess if placement service is down then we get ConnectFailure that is unhandled here.","commit_id":"5a33c00f6e0f4e0b50e6905983faec876e272d66"},{"author":{"_account_id":15554,"name":"Bence Romsics","email":"bence.romsics@gmail.com","username":"ebenrom","status":"inactive contributor"},"change_message_id":"95b4b55e33b9047521fd7d0a240f24c5b8cae542","unresolved":false,"context_lines":[{"line_number":80,"context_line":"        try:"},{"line_number":81,"context_line":"            agent_host_rp_uuid \u003d self._get_rp_by_name("},{"line_number":82,"context_line":"                name\u003dagent[\u0027host\u0027])[\u0027uuid\u0027]"},{"line_number":83,"context_line":"        except (IndexError, ks_exc.HttpError):"},{"line_number":84,"context_line":"            agent_db.resources_synced \u003d False"},{"line_number":85,"context_line":"            agent_db.update()"},{"line_number":86,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"5fc1f717_c118e4d4","line":83,"range":{"start_line":83,"start_character":28,"end_line":83,"end_character":44},"in_reply_to":"5fc1f717_9bb7add9","updated":"2019-03-06 10:17:22.000000000","message":"If placement is simply down then we get ks_exc.ServiceUnavailable which is still an HttpError. But I don\u0027t see any problem in catching ClientExceptions here too. I guess some of those could be triggered by various keystone misconfigurations.","commit_id":"5a33c00f6e0f4e0b50e6905983faec876e272d66"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"f54446a089138011f991792b9e1d43e7240a0faf","unresolved":false,"context_lines":[{"line_number":84,"context_line":"            agent_db.resources_synced \u003d False"},{"line_number":85,"context_line":"            agent_db.update()"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"            LOG.debug("},{"line_number":88,"context_line":"                \u0027Synchronization of resources\u0027"},{"line_number":89,"context_line":"                \u0027 of agent type %(type)s\u0027"},{"line_number":90,"context_line":"                \u0027 at host %(host)s\u0027"}],"source_content_type":"text/x-python","patch_set":1,"id":"5fc1f717_5be625eb","line":87,"range":{"start_line":87,"start_character":16,"end_line":87,"end_character":21},"updated":"2019-03-06 08:21:24.000000000","message":"hm it could be a warning if no warning is emitted on higher level for this problem. As far as I see some part of this problem was logged as warning in the baseline.","commit_id":"5a33c00f6e0f4e0b50e6905983faec876e272d66"},{"author":{"_account_id":15554,"name":"Bence Romsics","email":"bence.romsics@gmail.com","username":"ebenrom","status":"inactive contributor"},"change_message_id":"95b4b55e33b9047521fd7d0a240f24c5b8cae542","unresolved":false,"context_lines":[{"line_number":84,"context_line":"            agent_db.resources_synced \u003d False"},{"line_number":85,"context_line":"            agent_db.update()"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"            LOG.debug("},{"line_number":88,"context_line":"                \u0027Synchronization of resources\u0027"},{"line_number":89,"context_line":"                \u0027 of agent type %(type)s\u0027"},{"line_number":90,"context_line":"                \u0027 at host %(host)s\u0027"}],"source_content_type":"text/x-python","patch_set":1,"id":"5fc1f717_4185d4ac","line":87,"range":{"start_line":87,"start_character":16,"end_line":87,"end_character":21},"in_reply_to":"5fc1f717_5be625eb","updated":"2019-03-06 10:17:22.000000000","message":"I changed the logic here and below to:\n\n* sync failed -\u003e LOG.warning()\n* sync succeeded -\u003e LOG.debug()","commit_id":"5a33c00f6e0f4e0b50e6905983faec876e272d66"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"e3ebbfdbcc775eff56dbded0898c8103884143ba","unresolved":false,"context_lines":[{"line_number":79,"context_line":""},{"line_number":80,"context_line":"        log_msg \u003d ("},{"line_number":81,"context_line":"            \u0027Synchronization of resources\u0027"},{"line_number":82,"context_line":"            \u0027 of agent type %(type)s\u0027"},{"line_number":83,"context_line":"            \u0027 at host %(host)s\u0027"},{"line_number":84,"context_line":"            \u0027 to placement %(result)s.\u0027)"},{"line_number":85,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"5fc1f717_80511165","line":82,"range":{"start_line":82,"start_character":13,"end_line":82,"end_character":14},"updated":"2019-03-11 22:01:33.000000000","message":"nitty nit: in general we are putting such space at the end of above line","commit_id":"0d85496cfbf5453a1b03ba91b7b72f5d4c62819a"},{"author":{"_account_id":15554,"name":"Bence Romsics","email":"bence.romsics@gmail.com","username":"ebenrom","status":"inactive contributor"},"change_message_id":"130c6de2bdfbc339a268699e9aa2a5acb7e97a8a","unresolved":false,"context_lines":[{"line_number":79,"context_line":""},{"line_number":80,"context_line":"        log_msg \u003d ("},{"line_number":81,"context_line":"            \u0027Synchronization of resources\u0027"},{"line_number":82,"context_line":"            \u0027 of agent type %(type)s\u0027"},{"line_number":83,"context_line":"            \u0027 at host %(host)s\u0027"},{"line_number":84,"context_line":"            \u0027 to placement %(result)s.\u0027)"},{"line_number":85,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"5fc1f717_40fd60af","line":82,"range":{"start_line":82,"start_character":13,"end_line":82,"end_character":14},"in_reply_to":"5fc1f717_80511165","updated":"2019-03-12 09:07:22.000000000","message":"Done","commit_id":"0d85496cfbf5453a1b03ba91b7b72f5d4c62819a"},{"author":{"_account_id":27654,"name":"Hongbin Lu","email":"kira034@163.com","username":"hongbin.lu"},"change_message_id":"74704add73055b65e89134f8989d3f701df9a2e3","unresolved":false,"context_lines":[{"line_number":77,"context_line":"        supported_vnic_types \u003d mech_driver.supported_vnic_types"},{"line_number":78,"context_line":"        device_mappings \u003d mech_driver.get_standard_device_mappings(agent)"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"        log_msg \u003d ("},{"line_number":81,"context_line":"            \u0027Synchronization of resources \u0027"},{"line_number":82,"context_line":"            \u0027of agent type %(type)s \u0027"},{"line_number":83,"context_line":"            \u0027at host %(host)s \u0027"},{"line_number":84,"context_line":"            \u0027to placement %(result)s.\u0027)"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"        try:"},{"line_number":87,"context_line":"            agent_host_rp_uuid \u003d self._get_rp_by_name("}],"source_content_type":"text/x-python","patch_set":3,"id":"5fc1f717_3eecb028","line":84,"range":{"start_line":80,"start_character":0,"end_line":84,"end_character":39},"updated":"2019-03-15 02:22:33.000000000","message":"nit: The indentation is a bit odd. How about:\n\n        log_msg \u003d (\n            \u0027Synchronization of resources of agent type %(type)s \u0027\n            \u0027at host %(host)s to placement %(result)s.\u0027)","commit_id":"732dbdaf5e1ccf5a592131447927e66b9202e534"}]}
