)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"9dd1676cf38dd5b8b8ee39a0112bb4e8f0e1da26","unresolved":false,"context_lines":[{"line_number":13,"context_line":"thereby bypassing a lot of the extra logic needed by the old code."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Change-Id: I514e63ce863f2c77dcd47af3e3674019033a77de"},{"line_number":16,"context_line":"Closes-Bug: #1419115"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"da86d52c_36b725f7","line":16,"updated":"2015-02-17 08:23:45.000000000","message":"This patch will also fix bug #1419605.\nSo could you add \u0027Closes-Bug: #1419605\u0027?","commit_id":"61d8f087c8bfa0a6ac786e4cc8c558a8ff535e0d"},{"author":{"_account_id":6450,"name":"Hans Lindgren","email":"hanlind@kth.se","username":"hanlind"},"change_message_id":"fd3823439beb95843c30dd5a91b63f3a48dfcae7","unresolved":false,"context_lines":[{"line_number":13,"context_line":"thereby bypassing a lot of the extra logic needed by the old code."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Change-Id: I514e63ce863f2c77dcd47af3e3674019033a77de"},{"line_number":16,"context_line":"Closes-Bug: #1419115"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"da86d52c_6ccb8a4a","line":16,"in_reply_to":"da86d52c_36b725f7","updated":"2015-02-17 14:35:32.000000000","message":"Done","commit_id":"61d8f087c8bfa0a6ac786e4cc8c558a8ff535e0d"}],"nova/compute/api.py":[{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"9dd1676cf38dd5b8b8ee39a0112bb4e8f0e1da26","unresolved":false,"context_lines":[{"line_number":3562,"context_line":"        if \u0027availability_zone\u0027 in metadata:"},{"line_number":3563,"context_line":"            _hosts \u003d hosts or aggregate.hosts"},{"line_number":3564,"context_line":"            host_aggregates \u003d objects.AggregateList.get_by_metadata_key("},{"line_number":3565,"context_line":"                context, \u0027availability_zone\u0027, hosts\u003d_hosts)"},{"line_number":3566,"context_line":"            conflicting_azs \u003d ["},{"line_number":3567,"context_line":"                agg.availability_zone for agg in host_aggregates"},{"line_number":3568,"context_line":"                if agg.availability_zone !\u003d metadata[\u0027availability_zone\u0027]"}],"source_content_type":"text/x-python","patch_set":2,"id":"da86d52c_76343ddf","line":3565,"updated":"2015-02-17 08:23:45.000000000","message":"It does not work properly in case that a host aggregate who has no hosts is updated\nand there is another host aggregate who has an availability zone.\nIn update case, \u0027hosts\u0027 is None.\nAnd aggregate.hosts would be [](an empty list) if the host aggregate has no hosts.\nIn calling get_by_metadata_key method, hosts\u003d[] is specified.\nThe \u0027hosts\u003d[]\u0027 means all hosts(not be filtered by hosts).","commit_id":"61d8f087c8bfa0a6ac786e4cc8c558a8ff535e0d"},{"author":{"_account_id":6450,"name":"Hans Lindgren","email":"hanlind@kth.se","username":"hanlind"},"change_message_id":"fd3823439beb95843c30dd5a91b63f3a48dfcae7","unresolved":false,"context_lines":[{"line_number":3562,"context_line":"        if \u0027availability_zone\u0027 in metadata:"},{"line_number":3563,"context_line":"            _hosts \u003d hosts or aggregate.hosts"},{"line_number":3564,"context_line":"            host_aggregates \u003d objects.AggregateList.get_by_metadata_key("},{"line_number":3565,"context_line":"                context, \u0027availability_zone\u0027, hosts\u003d_hosts)"},{"line_number":3566,"context_line":"            conflicting_azs \u003d ["},{"line_number":3567,"context_line":"                agg.availability_zone for agg in host_aggregates"},{"line_number":3568,"context_line":"                if agg.availability_zone !\u003d metadata[\u0027availability_zone\u0027]"}],"source_content_type":"text/x-python","patch_set":2,"id":"da86d52c_994d62c7","line":3565,"in_reply_to":"da86d52c_76343ddf","updated":"2015-02-17 14:35:32.000000000","message":"To me it looks like the check for whether to filter by hosts or not in get_by_metadata_key() has an error in saying\n\n if hosts:\n     ...\n\nI think it should be\n\n if hosts is not None:\n     ...\n\nThen if hosts\u003d[], no aggregates will be returned.","commit_id":"61d8f087c8bfa0a6ac786e4cc8c558a8ff535e0d"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"9dd1676cf38dd5b8b8ee39a0112bb4e8f0e1da26","unresolved":false,"context_lines":[{"line_number":3565,"context_line":"                context, \u0027availability_zone\u0027, hosts\u003d_hosts)"},{"line_number":3566,"context_line":"            conflicting_azs \u003d ["},{"line_number":3567,"context_line":"                agg.availability_zone for agg in host_aggregates"},{"line_number":3568,"context_line":"                if agg.availability_zone !\u003d metadata[\u0027availability_zone\u0027]"},{"line_number":3569,"context_line":"                and agg.id !\u003d aggregate.id]"},{"line_number":3570,"context_line":"            if conflicting_azs:"},{"line_number":3571,"context_line":"                msg \u003d _(\"One or more hosts already in availability zone(s) \""}],"source_content_type":"text/x-python","patch_set":2,"id":"da86d52c_365ac52a","line":3568,"updated":"2015-02-17 08:23:45.000000000","message":"metadata[\u0027availability_zone\u0027]\u0027s type is set(not string) when adding a host to a host aggregate\n(See add_host_to_aggregate method)\nbecause db.aggregate_metadata_get_by_metadata_key returns set.\nIf metadata[\u0027availability_zone\u0027]\u0027type is set, this comparison is not correct.","commit_id":"61d8f087c8bfa0a6ac786e4cc8c558a8ff535e0d"},{"author":{"_account_id":6450,"name":"Hans Lindgren","email":"hanlind@kth.se","username":"hanlind"},"change_message_id":"fd3823439beb95843c30dd5a91b63f3a48dfcae7","unresolved":false,"context_lines":[{"line_number":3565,"context_line":"                context, \u0027availability_zone\u0027, hosts\u003d_hosts)"},{"line_number":3566,"context_line":"            conflicting_azs \u003d ["},{"line_number":3567,"context_line":"                agg.availability_zone for agg in host_aggregates"},{"line_number":3568,"context_line":"                if agg.availability_zone !\u003d metadata[\u0027availability_zone\u0027]"},{"line_number":3569,"context_line":"                and agg.id !\u003d aggregate.id]"},{"line_number":3570,"context_line":"            if conflicting_azs:"},{"line_number":3571,"context_line":"                msg \u003d _(\"One or more hosts already in availability zone(s) \""}],"source_content_type":"text/x-python","patch_set":2,"id":"da86d52c_e47b0af2","line":3568,"in_reply_to":"da86d52c_365ac52a","updated":"2015-02-17 14:35:32.000000000","message":"Fixed by eliminating the call to db.aggregate_metadata_get_by_metadata_key() entirely.","commit_id":"61d8f087c8bfa0a6ac786e4cc8c558a8ff535e0d"}],"nova/tests/unit/compute/test_compute.py":[{"author":{"_account_id":1849,"name":"Joe Gordon","email":"joe.gordon0@gmail.com","username":"jogo"},"change_message_id":"edf0a7c7c5f2be7ec69c5552d546ed9eefc98b13","unresolved":false,"context_lines":[{"line_number":9964,"context_line":"                          self.api.update_aggregate,"},{"line_number":9965,"context_line":"                          self.context, aggr2[\u0027id\u0027], metadata)"},{"line_number":9966,"context_line":""},{"line_number":9967,"context_line":"    def test_update_aggregate_az_fails_with_same_az(self):"},{"line_number":9968,"context_line":"        # Ensure aggregate\u0027s availability zone can\u0027t be updated"},{"line_number":9969,"context_line":"        # to another availability zone, when aggregates"},{"line_number":9970,"context_line":"        # in same availability zone have same host."}],"source_content_type":"text/x-python","patch_set":4,"id":"ba7be1f8_362ae890","line":9967,"updated":"2015-02-28 00:52:23.000000000","message":"So this test, and related bug doesn\u0027t make sense. Furthermore, this is actually a valid behavior IMHO.\n\nI don\u0027t see why a host can\u0027t be part of two AZs.\n\nAZs are internally defined as a special metadata key/value in  an aggregate (availability_zone key in metadata). \n\nThe bug says \"Two host aggregates in same AZ(availability zone) have same compute node.\" This doesn\u0027t make sense. host aggregates with the availability_zone key set in metadata are AZs and cannot \u0027belong to an AZ\u0027.\n\nSo this test, and the related bug are actually creating two host_aggregates that represent the same AZ. Which is a bad idea. And then changing one of the AZs.","commit_id":"54bb170f982c1c5afeb348082a763ec753f2691e"}]}
