)]}'
{"nova/compute/manager.py":[{"author":{"_account_id":1501,"name":"Phil Day","email":"philip.day@hp.com","username":"philip-day"},"change_message_id":"2711768f157919c0c06c4879017c4f67a30780e1","unresolved":false,"context_lines":[{"line_number":416,"context_line":"        # to brute force."},{"line_number":417,"context_line":"        driver_instances \u003d self.driver.list_instances()"},{"line_number":418,"context_line":"        instances \u003d self.conductor_api.instance_get_all_by_filters("},{"line_number":419,"context_line":"            context, filters, columns_to_join\u003d[])"},{"line_number":420,"context_line":"        name_map \u003d dict((instance[\u0027name\u0027], instance) for instance in instances)"},{"line_number":421,"context_line":"        local_instances \u003d []"},{"line_number":422,"context_line":"        for driver_instance in driver_instances:"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAOn%2F%2Fs38%3D","line":419,"updated":"2013-04-26 23:58:04.000000000","message":"Doesn\u0027t look like this is equivalent - it seems that your now filtering on the list of driver_uuids from above rather than the host ?","commit_id":"b0a2ad23ba66b9f1114bec8ef29f75f90de32d5b"},{"author":{"_account_id":6450,"name":"Hans Lindgren","email":"hanlind@kth.se","username":"hanlind"},"change_message_id":"bf3424f49eda8579c6433432e523bc0d3c12c28b","unresolved":false,"context_lines":[{"line_number":416,"context_line":"        # to brute force."},{"line_number":417,"context_line":"        driver_instances \u003d self.driver.list_instances()"},{"line_number":418,"context_line":"        instances \u003d self.conductor_api.instance_get_all_by_filters("},{"line_number":419,"context_line":"            context, filters, columns_to_join\u003d[])"},{"line_number":420,"context_line":"        name_map \u003d dict((instance[\u0027name\u0027], instance) for instance in instances)"},{"line_number":421,"context_line":"        local_instances \u003d []"},{"line_number":422,"context_line":"        for driver_instance in driver_instances:"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAOn%2F%2Fscc%3D","line":419,"in_reply_to":"AAAAOn%2F%2Fs38%3D","updated":"2013-04-27 19:49:24.000000000","message":"Correct, it\u0027s not equivalent, this actually solves a bug I found (explained below).\n\nNo, it is not using driver_uuids since filters would only include them if the driver supports uuids (we shouldn\u0027t end up here if that is the case).\n\nIf we end up here, filters should hold whatever it was set to when the method was called. There are currently two uses of this method, one that (with my modifications) sets a host filter (L4038) and one that don\u0027t (L442).\n\nWhile working on this patch, I realized the second one had a bug for the case where the driver don\u0027t support uuids since it looks for instances no longer associated with the host (also see comment below). Maybe I should include this the commit message.","commit_id":"b0a2ad23ba66b9f1114bec8ef29f75f90de32d5b"},{"author":{"_account_id":1501,"name":"Phil Day","email":"philip.day@hp.com","username":"philip-day"},"change_message_id":"6de69b77cd43f981c4a9b44b8aa734e03869c854","unresolved":false,"context_lines":[{"line_number":416,"context_line":"        # to brute force."},{"line_number":417,"context_line":"        driver_instances \u003d self.driver.list_instances()"},{"line_number":418,"context_line":"        instances \u003d self.conductor_api.instance_get_all_by_filters("},{"line_number":419,"context_line":"            context, filters, columns_to_join\u003d[])"},{"line_number":420,"context_line":"        name_map \u003d dict((instance[\u0027name\u0027], instance) for instance in instances)"},{"line_number":421,"context_line":"        local_instances \u003d []"},{"line_number":422,"context_line":"        for driver_instance in driver_instances:"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAOn%2F%2FkRU%3D","line":419,"in_reply_to":"AAAAOn%2F%2Fs38%3D","updated":"2013-05-03 16:41:36.000000000","message":"Done","commit_id":"b0a2ad23ba66b9f1114bec8ef29f75f90de32d5b"},{"author":{"_account_id":1501,"name":"Phil Day","email":"philip.day@hp.com","username":"philip-day"},"change_message_id":"2711768f157919c0c06c4879017c4f67a30780e1","unresolved":false,"context_lines":[{"line_number":439,"context_line":"        \"\"\""},{"line_number":440,"context_line":"        our_host \u003d self.host"},{"line_number":441,"context_line":"        filters \u003d {\u0027deleted\u0027: False}"},{"line_number":442,"context_line":"        local_instances \u003d self._get_instances_on_driver(context, filters)"},{"line_number":443,"context_line":"        for instance in local_instances:"},{"line_number":444,"context_line":"            instance_host \u003d instance[\u0027host\u0027]"},{"line_number":445,"context_line":"            if instance_host !\u003d our_host:"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAOn%2F%2Fs3w%3D","line":442,"updated":"2013-04-26 23:58:04.000000000","message":"Shouldn\u0027t host be included in the filters here ?","commit_id":"b0a2ad23ba66b9f1114bec8ef29f75f90de32d5b"},{"author":{"_account_id":1501,"name":"Phil Day","email":"philip.day@hp.com","username":"philip-day"},"change_message_id":"6de69b77cd43f981c4a9b44b8aa734e03869c854","unresolved":false,"context_lines":[{"line_number":439,"context_line":"        \"\"\""},{"line_number":440,"context_line":"        our_host \u003d self.host"},{"line_number":441,"context_line":"        filters \u003d {\u0027deleted\u0027: False}"},{"line_number":442,"context_line":"        local_instances \u003d self._get_instances_on_driver(context, filters)"},{"line_number":443,"context_line":"        for instance in local_instances:"},{"line_number":444,"context_line":"            instance_host \u003d instance[\u0027host\u0027]"},{"line_number":445,"context_line":"            if instance_host !\u003d our_host:"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAOn%2F%2FkRQ%3D","line":442,"in_reply_to":"AAAAOn%2F%2Fs3w%3D","updated":"2013-05-03 16:41:36.000000000","message":"Done","commit_id":"b0a2ad23ba66b9f1114bec8ef29f75f90de32d5b"},{"author":{"_account_id":6450,"name":"Hans Lindgren","email":"hanlind@kth.se","username":"hanlind"},"change_message_id":"bf3424f49eda8579c6433432e523bc0d3c12c28b","unresolved":false,"context_lines":[{"line_number":439,"context_line":"        \"\"\""},{"line_number":440,"context_line":"        our_host \u003d self.host"},{"line_number":441,"context_line":"        filters \u003d {\u0027deleted\u0027: False}"},{"line_number":442,"context_line":"        local_instances \u003d self._get_instances_on_driver(context, filters)"},{"line_number":443,"context_line":"        for instance in local_instances:"},{"line_number":444,"context_line":"            instance_host \u003d instance[\u0027host\u0027]"},{"line_number":445,"context_line":"            if instance_host !\u003d our_host:"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAOn%2F%2Fsco%3D","line":442,"in_reply_to":"AAAAOn%2F%2Fs3w%3D","updated":"2013-04-27 19:49:24.000000000","message":"No, the instances we want are those that are no longer associated with our_host. A filter to exclude host would be what we want, but db.instance_get_all_by_filter doesn\u0027t support negative filters currently.","commit_id":"b0a2ad23ba66b9f1114bec8ef29f75f90de32d5b"},{"author":{"_account_id":1849,"name":"Joe Gordon","email":"joe.gordon0@gmail.com","username":"jogo"},"change_message_id":"fa369e1df1ffe4c8dc171bea8acbe634bf4456a7","unresolved":false,"context_lines":[{"line_number":4111,"context_line":"        # count, and then this logic should be pushed up the stack."},{"line_number":4112,"context_line":"        filters \u003d {\u0027deleted\u0027: False,"},{"line_number":4113,"context_line":"                   \u0027soft_deleted\u0027: True,"},{"line_number":4114,"context_line":"                   \u0027host\u0027: nodes}"},{"line_number":4115,"context_line":"        filtered_instances \u003d self.conductor_api.instance_get_all_by_filters("},{"line_number":4116,"context_line":"            context, filters, columns_to_join\u003d[])"},{"line_number":4117,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAOn%2F%2FkH0%3D","line":4114,"updated":"2013-05-03 17:50:19.000000000","message":"Where is the host filter used?","commit_id":"b0a2ad23ba66b9f1114bec8ef29f75f90de32d5b"},{"author":{"_account_id":6450,"name":"Hans Lindgren","email":"hanlind@kth.se","username":"hanlind"},"change_message_id":"a84af4e89cb970e83f8f4cda80dfbf24159f4dd9","unresolved":false,"context_lines":[{"line_number":4111,"context_line":"        # count, and then this logic should be pushed up the stack."},{"line_number":4112,"context_line":"        filters \u003d {\u0027deleted\u0027: False,"},{"line_number":4113,"context_line":"                   \u0027soft_deleted\u0027: True,"},{"line_number":4114,"context_line":"                   \u0027host\u0027: nodes}"},{"line_number":4115,"context_line":"        filtered_instances \u003d self.conductor_api.instance_get_all_by_filters("},{"line_number":4116,"context_line":"            context, filters, columns_to_join\u003d[])"},{"line_number":4117,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAOn%2F%2Fe%2Fc%3D","line":4114,"in_reply_to":"AAAAOn%2F%2FkH0%3D","updated":"2013-05-08 08:13:25.000000000","message":"Ok, I see the problem I think.\n\nCurrently host filter goes through regex matching and this won\u0027t work for a list of hosts.\n\nFrom what I can see, the existing use of this filter is exclusively  for doing exact matching of a single host, like {\u0027host\u0027: self.host} so changing this to use exact_filter instead should be fine (probably even faster).\n\nThe only side-effect of this change would be for listing instances filtered by host (eg. nova list --host \u003chostname\u003e) that currently allows for doing partial name matching, something I really believe is a bug.\n\nSay you have two hosts named \u0027host\u0027 and \u0027hostwithalongername\u0027, issuing \u0027nova list --host host\u0027 will in its current form return instances for both hosts.","commit_id":"b0a2ad23ba66b9f1114bec8ef29f75f90de32d5b"}],"nova/db/sqlalchemy/api.py":[{"author":{"_account_id":1849,"name":"Joe Gordon","email":"joe.gordon0@gmail.com","username":"jogo"},"change_message_id":"fa369e1df1ffe4c8dc171bea8acbe634bf4456a7","unresolved":false,"context_lines":[{"line_number":1618,"context_line":"    return _instances_fill_metadata(context, instances, manual_joins)"},{"line_number":1619,"context_line":""},{"line_number":1620,"context_line":""},{"line_number":1621,"context_line":"@require_context"},{"line_number":1622,"context_line":"def instance_get_all_by_filters(context, filters, sort_key, sort_dir,"},{"line_number":1623,"context_line":"                                limit\u003dNone, marker\u003dNone, columns_to_join\u003dNone,"},{"line_number":1624,"context_line":"                                session\u003dNone):"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAOn%2F%2FkHs%3D","line":1621,"updated":"2013-05-03 17:50:19.000000000","message":"The filters dictionary is getting pretty big, can you expand the docstring to list what options it includes.","commit_id":"b0a2ad23ba66b9f1114bec8ef29f75f90de32d5b"},{"author":{"_account_id":6450,"name":"Hans Lindgren","email":"hanlind@kth.se","username":"hanlind"},"change_message_id":"a84af4e89cb970e83f8f4cda80dfbf24159f4dd9","unresolved":false,"context_lines":[{"line_number":1618,"context_line":"    return _instances_fill_metadata(context, instances, manual_joins)"},{"line_number":1619,"context_line":""},{"line_number":1620,"context_line":""},{"line_number":1621,"context_line":"@require_context"},{"line_number":1622,"context_line":"def instance_get_all_by_filters(context, filters, sort_key, sort_dir,"},{"line_number":1623,"context_line":"                                limit\u003dNone, marker\u003dNone, columns_to_join\u003dNone,"},{"line_number":1624,"context_line":"                                session\u003dNone):"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAOn%2F%2Fe%2FY%3D","line":1621,"in_reply_to":"AAAAOn%2F%2FkHs%3D","updated":"2013-05-08 08:13:25.000000000","message":"will do","commit_id":"b0a2ad23ba66b9f1114bec8ef29f75f90de32d5b"}]}
