)]}'
{"vitrage/datasources/prometheus/driver.py":[{"author":{"_account_id":26339,"name":"Muhamad Najjar","email":"muhamad.najjar@nokia.com","username":"7mode3294"},"change_message_id":"5765b3f38ed8adf912bfdb063b185a86343cd4dd","unresolved":false,"context_lines":[{"line_number":159,"context_line":"                    try:"},{"line_number":160,"context_line":"                        instance_host \u003d socket.gethostbyaddr(instance_id)[0]"},{"line_number":161,"context_line":"                        if instance_host:"},{"line_number":162,"context_line":"                            nova_host \u003d self.nova_client.services.list("},{"line_number":163,"context_line":"                                host\u003dinstance_host, binary\u003d\u0027nova-compute\u0027)"},{"line_number":164,"context_line":"                            if nova_host:"},{"line_number":165,"context_line":"                                instance_id \u003d instance_host"},{"line_number":166,"context_line":"                    except Exception:"}],"source_content_type":"text/x-python","patch_set":2,"id":"dfd5e7cf_23e2cb02","line":163,"range":{"start_line":162,"start_character":28,"end_line":163,"end_character":74},"updated":"2019-01-10 10:09:40.000000000","message":"The return value is something is ListWithMeta.\ni guess you need to \u0027nova_host.request_ids[0]\u0027 \nor \u0027nova_host.x_openstack_request_ids[0]\u0027.\n\ngetting \u0027nova_host\u0027 as is won\u0027t work.\nmoreover, instance_id is mapped to \u0027id\u0027 entity field, and in vitrage this field is just the hostname (in case of host entity). so maybe all this call is redundant.\n\nin the next few days i going to push a more generic solution involving configuration file for mapping alert labels to vitrage entity fields:\nhttps://specs.openstack.org/openstack/vitrage-specs/specs/stein/approved/prometheus-datasource.html\n\n(another minor changes will be in this specs)","commit_id":"237c9089a54fba53faed226e3976cceaa7ff7e18"},{"author":{"_account_id":26339,"name":"Muhamad Najjar","email":"muhamad.najjar@nokia.com","username":"7mode3294"},"change_message_id":"5765b3f38ed8adf912bfdb063b185a86343cd4dd","unresolved":false,"context_lines":[{"line_number":163,"context_line":"                                host\u003dinstance_host, binary\u003d\u0027nova-compute\u0027)"},{"line_number":164,"context_line":"                            if nova_host:"},{"line_number":165,"context_line":"                                instance_id \u003d instance_host"},{"line_number":166,"context_line":"                    except Exception:"},{"line_number":167,"context_line":"                        pass"},{"line_number":168,"context_line":"                    # NOTE(kiennt): If instance_id is not re-set."},{"line_number":169,"context_line":"                    if instance_id !\u003d instance_host:"}],"source_content_type":"text/x-python","patch_set":2,"id":"dfd5e7cf_20c16181","line":166,"range":{"start_line":166,"start_character":27,"end_line":166,"end_character":36},"updated":"2019-01-10 10:09:40.000000000","message":"socket.error","commit_id":"237c9089a54fba53faed226e3976cceaa7ff7e18"},{"author":{"_account_id":22406,"name":"Kien Nguyen","email":"kiennt2609@gmail.com","username":"kiennt"},"change_message_id":"8983d8c47cfc14f4cbfb98b06aa77bc1ce722230","unresolved":false,"context_lines":[{"line_number":163,"context_line":"                                host\u003dinstance_host, binary\u003d\u0027nova-compute\u0027)"},{"line_number":164,"context_line":"                            if nova_host:"},{"line_number":165,"context_line":"                                instance_id \u003d instance_host"},{"line_number":166,"context_line":"                    except Exception:"},{"line_number":167,"context_line":"                        pass"},{"line_number":168,"context_line":"                    # NOTE(kiennt): If instance_id is not re-set."},{"line_number":169,"context_line":"                    if instance_id !\u003d instance_host:"}],"source_content_type":"text/x-python","patch_set":2,"id":"bfdaf3ff_ec99441f","line":166,"range":{"start_line":166,"start_character":27,"end_line":166,"end_character":36},"in_reply_to":"dfd5e7cf_20c16181","updated":"2019-01-14 03:17:32.000000000","message":"I changed to socket.error but it threw an AttributeError exception: \u0027NoneType\u0027 object has no attribute \u0027select\u0027. Seems like we should use Exception to catch all possible exceptions.","commit_id":"237c9089a54fba53faed226e3976cceaa7ff7e18"}]}
