)]}'
{"nova/tests/functional/test_server_group.py":[{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"55084baf6af6522f4f107cec6c7ddff0f8f06789","unresolved":false,"context_lines":[{"line_number":964,"context_line":""},{"line_number":965,"context_line":"        host_uuid \u003d self._get_provider_uuid_by_host(host)"},{"line_number":966,"context_line":""},{"line_number":967,"context_line":"        # Make sure we have a view of the provider we\u0027re about to mess with"},{"line_number":968,"context_line":"        # FIXME(efried): This should be a thing we can do without internals"},{"line_number":969,"context_line":"        self.report_client._ensure_resource_provider("},{"line_number":970,"context_line":"            self.context, host_uuid, name\u003dhost)"},{"line_number":971,"context_line":"        self.report_client.aggregate_add_host(self.context, agg[\u0027uuid\u0027], host)"},{"line_number":972,"context_line":""},{"line_number":973,"context_line":"    def _set_az_aggregate(self, agg, az):"},{"line_number":974,"context_line":"        \"\"\"Set the availability_zone of an aggregate"}],"source_content_type":"text/x-python","patch_set":1,"id":"5f7c97a3_098d74d3","line":971,"range":{"start_line":967,"start_character":0,"end_line":971,"end_character":78},"updated":"2018-07-25 08:05:50.000000000","message":"an we just simply call placement REST API instead of this internals?","commit_id":"0341bf9701d36cfef3c03128825665830fb012ab"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"59d302a07c4fe78240fa9c257430eaf149f34192","unresolved":false,"context_lines":[{"line_number":908,"context_line":"    def setUp(self):"},{"line_number":909,"context_line":"        super(ServerGroupTestMultiCell, self).setUp()"},{"line_number":910,"context_line":""},{"line_number":911,"context_line":"        # TODO(sbauza): Remove that once there is a way to have a custom"},{"line_number":912,"context_line":"        # FakeDriver supporting different resources. Note that we can\u0027t also"},{"line_number":913,"context_line":"        # simply change the config option for choosing our custom fake driver"},{"line_number":914,"context_line":"        # as the mocked method only accepts to load drivers in the nova.virt"}],"source_content_type":"text/x-python","patch_set":2,"id":"3f79a3b5_fc4c489f","line":911,"range":{"start_line":911,"start_character":31,"end_line":911,"end_character":35},"updated":"2018-08-09 21:04:19.000000000","message":"oh Sylvain and his this and that. :)","commit_id":"9babb05d19a3ef372aff7ed6849e682ed339f6a9"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"59d302a07c4fe78240fa9c257430eaf149f34192","unresolved":false,"context_lines":[{"line_number":932,"context_line":"        # _get_instance method in the compute/api for details."},{"line_number":933,"context_line":"        self.useFixture(nova_fixtures.AllServicesCurrent())"},{"line_number":934,"context_line":""},{"line_number":935,"context_line":"        # NOTE(melwitt): The aggregate-related methods are copied from the"},{"line_number":936,"context_line":"        # AggregateRequestFiltersTest."},{"line_number":937,"context_line":"        self.report_client \u003d report.SchedulerReportClient()"},{"line_number":938,"context_line":"        self.aggregates \u003d {}"},{"line_number":939,"context_line":"        self.context \u003d context.get_admin_context()"}],"source_content_type":"text/x-python","patch_set":2,"id":"3f79a3b5_4f182074","line":936,"range":{"start_line":935,"start_character":0,"end_line":936,"end_character":38},"updated":"2018-08-09 21:04:19.000000000","message":"might be good to put the aggregate-related methods into a base class in a followup patch.","commit_id":"9babb05d19a3ef372aff7ed6849e682ed339f6a9"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"deb9025bcb1d67e8fd46d6b7686cf5dee3961d05","unresolved":false,"context_lines":[{"line_number":932,"context_line":"        # _get_instance method in the compute/api for details."},{"line_number":933,"context_line":"        self.useFixture(nova_fixtures.AllServicesCurrent())"},{"line_number":934,"context_line":""},{"line_number":935,"context_line":"        # NOTE(melwitt): The aggregate-related methods are copied from the"},{"line_number":936,"context_line":"        # AggregateRequestFiltersTest."},{"line_number":937,"context_line":"        self.report_client \u003d report.SchedulerReportClient()"},{"line_number":938,"context_line":"        self.aggregates \u003d {}"},{"line_number":939,"context_line":"        self.context \u003d context.get_admin_context()"}],"source_content_type":"text/x-python","patch_set":2,"id":"3f79a3b5_ef956ce5","line":936,"range":{"start_line":935,"start_character":0,"end_line":936,"end_character":38},"in_reply_to":"3f79a3b5_4f182074","updated":"2018-08-09 22:44:26.000000000","message":"Yeah, I should do that.","commit_id":"9babb05d19a3ef372aff7ed6849e682ed339f6a9"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"59d302a07c4fe78240fa9c257430eaf149f34192","unresolved":false,"context_lines":[{"line_number":988,"context_line":"        # creating a server group."},{"line_number":989,"context_line":"        affinity \u003d {\u0027name\u0027: \u0027fake-name-2\u0027, \u0027policy\u0027: \u0027affinity\u0027}"},{"line_number":990,"context_line":"        created_group \u003d self.api.post_server_groups(affinity)"},{"line_number":991,"context_line":"        # Create aggregates for cell1 and cell2"},{"line_number":992,"context_line":"        self._create_aggregate(\u0027cell1\u0027)"},{"line_number":993,"context_line":"        self._create_aggregate(\u0027cell2\u0027)"},{"line_number":994,"context_line":"        # Add each cell to a separate aggregate"},{"line_number":995,"context_line":"        self._add_host_to_aggregate(\u0027cell1\u0027, \u0027host1\u0027)"},{"line_number":996,"context_line":"        self._add_host_to_aggregate(\u0027cell2\u0027, \u0027host2\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"3f79a3b5_8fc15883","line":993,"range":{"start_line":991,"start_character":2,"end_line":993,"end_character":39},"updated":"2018-08-09 21:04:19.000000000","message":"would be useful to name the aggregates something different than \"cell1\" and \"cell2\". Something like \"agg1_cell1\" and \"agg2_cell2\" might be better.","commit_id":"9babb05d19a3ef372aff7ed6849e682ed339f6a9"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"deb9025bcb1d67e8fd46d6b7686cf5dee3961d05","unresolved":false,"context_lines":[{"line_number":988,"context_line":"        # creating a server group."},{"line_number":989,"context_line":"        affinity \u003d {\u0027name\u0027: \u0027fake-name-2\u0027, \u0027policy\u0027: \u0027affinity\u0027}"},{"line_number":990,"context_line":"        created_group \u003d self.api.post_server_groups(affinity)"},{"line_number":991,"context_line":"        # Create aggregates for cell1 and cell2"},{"line_number":992,"context_line":"        self._create_aggregate(\u0027cell1\u0027)"},{"line_number":993,"context_line":"        self._create_aggregate(\u0027cell2\u0027)"},{"line_number":994,"context_line":"        # Add each cell to a separate aggregate"},{"line_number":995,"context_line":"        self._add_host_to_aggregate(\u0027cell1\u0027, \u0027host1\u0027)"},{"line_number":996,"context_line":"        self._add_host_to_aggregate(\u0027cell2\u0027, \u0027host2\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"3f79a3b5_c82506ad","line":993,"range":{"start_line":991,"start_character":2,"end_line":993,"end_character":39},"in_reply_to":"3f79a3b5_8fc15883","updated":"2018-08-09 22:44:26.000000000","message":"Okay, can do.","commit_id":"9babb05d19a3ef372aff7ed6849e682ed339f6a9"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"1d1f770672453c91f655f1d2f2239829083f1604","unresolved":false,"context_lines":[{"line_number":908,"context_line":"    def setUp(self):"},{"line_number":909,"context_line":"        super(ServerGroupTestMultiCell, self).setUp()"},{"line_number":910,"context_line":""},{"line_number":911,"context_line":"        # TODO(sbauza): Remove that once there is a way to have a custom"},{"line_number":912,"context_line":"        # FakeDriver supporting different resources. Note that we can\u0027t also"},{"line_number":913,"context_line":"        # simply change the config option for choosing our custom fake driver"},{"line_number":914,"context_line":"        # as the mocked method only accepts to load drivers in the nova.virt"},{"line_number":915,"context_line":"        # tree."},{"line_number":916,"context_line":"        self.stub_out(\u0027nova.virt.driver.load_compute_driver\u0027,"},{"line_number":917,"context_line":"                      _fake_load_compute_driver)"},{"line_number":918,"context_line":"        fake.set_nodes([\u0027host1\u0027])"},{"line_number":919,"context_line":"        self.addCleanup(fake.restore_nodes)"},{"line_number":920,"context_line":"        self.compute1 \u003d self.start_service(\u0027compute\u0027, host\u003d\u0027host1\u0027,"}],"source_content_type":"text/x-python","patch_set":3,"id":"3f79a3b5_4f4d5298","line":917,"range":{"start_line":911,"start_character":8,"end_line":917,"end_character":48},"updated":"2018-08-13 07:26:53.000000000","message":"Do we really need this? Can\u0027t we just use the normal fake.FakeDriver? See:\n\nhttps://review.openstack.org/#/c/588935/1/nova/tests/functional/test_server_group.py","commit_id":"f289a5c49a5af34d092f2d48d689d3b42ca2027c"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"f952d4ee60bdd2552eb92ee3aa69e4a1f702fa9b","unresolved":false,"context_lines":[{"line_number":908,"context_line":"    def setUp(self):"},{"line_number":909,"context_line":"        super(ServerGroupTestMultiCell, self).setUp()"},{"line_number":910,"context_line":""},{"line_number":911,"context_line":"        # TODO(sbauza): Remove that once there is a way to have a custom"},{"line_number":912,"context_line":"        # FakeDriver supporting different resources. Note that we can\u0027t also"},{"line_number":913,"context_line":"        # simply change the config option for choosing our custom fake driver"},{"line_number":914,"context_line":"        # as the mocked method only accepts to load drivers in the nova.virt"},{"line_number":915,"context_line":"        # tree."},{"line_number":916,"context_line":"        self.stub_out(\u0027nova.virt.driver.load_compute_driver\u0027,"},{"line_number":917,"context_line":"                      _fake_load_compute_driver)"},{"line_number":918,"context_line":"        fake.set_nodes([\u0027host1\u0027])"},{"line_number":919,"context_line":"        self.addCleanup(fake.restore_nodes)"},{"line_number":920,"context_line":"        self.compute1 \u003d self.start_service(\u0027compute\u0027, host\u003d\u0027host1\u0027,"}],"source_content_type":"text/x-python","patch_set":3,"id":"3f79a3b5_54207648","line":917,"range":{"start_line":911,"start_character":8,"end_line":917,"end_character":48},"in_reply_to":"3f79a3b5_4f4d5298","updated":"2018-08-13 17:03:38.000000000","message":"It came from copy/pasting ServerGroupTestV2:\n\nhttps://github.com/openstack/nova/blob/master/nova/tests/functional/test_server_group.py#L135-L141","commit_id":"f289a5c49a5af34d092f2d48d689d3b42ca2027c"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"8f4b4fd433cb2dfbfdbe0f6ae55039002f19dce7","unresolved":false,"context_lines":[{"line_number":908,"context_line":"    def setUp(self):"},{"line_number":909,"context_line":"        super(ServerGroupTestMultiCell, self).setUp()"},{"line_number":910,"context_line":""},{"line_number":911,"context_line":"        # TODO(sbauza): Remove that once there is a way to have a custom"},{"line_number":912,"context_line":"        # FakeDriver supporting different resources. Note that we can\u0027t also"},{"line_number":913,"context_line":"        # simply change the config option for choosing our custom fake driver"},{"line_number":914,"context_line":"        # as the mocked method only accepts to load drivers in the nova.virt"},{"line_number":915,"context_line":"        # tree."},{"line_number":916,"context_line":"        self.stub_out(\u0027nova.virt.driver.load_compute_driver\u0027,"},{"line_number":917,"context_line":"                      _fake_load_compute_driver)"},{"line_number":918,"context_line":"        fake.set_nodes([\u0027host1\u0027])"},{"line_number":919,"context_line":"        self.addCleanup(fake.restore_nodes)"},{"line_number":920,"context_line":"        self.compute1 \u003d self.start_service(\u0027compute\u0027, host\u003d\u0027host1\u0027,"}],"source_content_type":"text/x-python","patch_set":3,"id":"3f79a3b5_8bbfc85f","line":917,"range":{"start_line":911,"start_character":8,"end_line":917,"end_character":48},"in_reply_to":"3f79a3b5_54207648","updated":"2018-08-14 02:10:39.000000000","message":"Yeah I realize there is a bunch of copy/paste gorp in here, and I\u0027d like to avoid that since this is going to be backported, and a lot of the gorp is unnecessary.","commit_id":"f289a5c49a5af34d092f2d48d689d3b42ca2027c"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"1d1f770672453c91f655f1d2f2239829083f1604","unresolved":false,"context_lines":[{"line_number":927,"context_line":"        self.addCleanup(fake.restore_nodes)"},{"line_number":928,"context_line":"        self.compute2 \u003d self.start_service(\u0027compute\u0027, host\u003d\u0027host2\u0027,"},{"line_number":929,"context_line":"                                           cell\u003d\u0027cell2\u0027)"},{"line_number":930,"context_line":"        # This is needed to find a server that is still booting with multiple"},{"line_number":931,"context_line":"        # cells, while waiting for the state change to ACTIVE. See the"},{"line_number":932,"context_line":"        # _get_instance method in the compute/api for details."},{"line_number":933,"context_line":"        self.useFixture(nova_fixtures.AllServicesCurrent())"},{"line_number":934,"context_line":""},{"line_number":935,"context_line":"        # NOTE(melwitt): The aggregate-related methods are copied from the"},{"line_number":936,"context_line":"        # AggregateRequestFiltersTest."}],"source_content_type":"text/x-python","patch_set":3,"id":"3f79a3b5_b2ed69b8","line":933,"range":{"start_line":930,"start_character":8,"end_line":933,"end_character":59},"updated":"2018-08-13 07:26:53.000000000","message":"Do we still need this? With the OSAPIFixture using wsgi-intercept I don\u0027t think we actually need this anymore.","commit_id":"f289a5c49a5af34d092f2d48d689d3b42ca2027c"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"6e7a93a6e3295efed95199039e95707affe26207","unresolved":false,"context_lines":[{"line_number":927,"context_line":"        self.addCleanup(fake.restore_nodes)"},{"line_number":928,"context_line":"        self.compute2 \u003d self.start_service(\u0027compute\u0027, host\u003d\u0027host2\u0027,"},{"line_number":929,"context_line":"                                           cell\u003d\u0027cell2\u0027)"},{"line_number":930,"context_line":"        # This is needed to find a server that is still booting with multiple"},{"line_number":931,"context_line":"        # cells, while waiting for the state change to ACTIVE. See the"},{"line_number":932,"context_line":"        # _get_instance method in the compute/api for details."},{"line_number":933,"context_line":"        self.useFixture(nova_fixtures.AllServicesCurrent())"},{"line_number":934,"context_line":""},{"line_number":935,"context_line":"        # NOTE(melwitt): The aggregate-related methods are copied from the"},{"line_number":936,"context_line":"        # AggregateRequestFiltersTest."}],"source_content_type":"text/x-python","patch_set":3,"id":"3f79a3b5_9777eda0","line":933,"range":{"start_line":930,"start_character":8,"end_line":933,"end_character":59},"in_reply_to":"3f79a3b5_b2ed69b8","updated":"2018-08-13 20:05:19.000000000","message":"Without this, I get this error and the test fails by being interrupted during the wait for server ACTIVE:\n\n    2018-08-13 19:22:20,285 DEBUG [nova.api.openstack.wsgi] Calling method \u0027\u003cbound method ServersController.show of \u003cnova.api.openstack.compute.servers.ServersController object at 0x7f11199c0690\u003e\u003e\u0027\n    2018-08-13 19:22:20,286 DEBUG [nova.compute.api] Fetching instance by UUID\n    2018-08-13 19:22:20,290 WARNING [nova.compute.api] The nova-osapi_compute service version is from before Ocata and may cause problems looking up instances in a cells v2 setup. Check your nova-api service configuration and cell mappings. You may need to remove stale nova-osapi_compute service records from the cell database.\n    2018-08-13 19:22:20,365 INFO [nova.api.openstack.wsgi] HTTP exception thrown: Instance 6b4660ba-144c-43cd-8d63-81c43490305b could not be found.\n    2018-08-13 19:22:20,366 DEBUG [nova.api.openstack.wsgi] Returning 404 to user: Instance 6b4660ba-144c-43cd-8d63-81c43490305b could not be found.\n    2018-08-13 19:22:20,367 INFO [nova.api.openstack.requestlog] 127.0.0.1 \"GET /v2.1/6f70656e737461636b20342065766572/servers/6b4660ba-144c-43cd-8d63-81c43490305b\" status: 404 len: 111 microversion: 2.65 time: 0.084228\n    2018-08-13 19:22:20,368 DEBUG [nova.tests.functional.api.client] /servers/6b4660ba-144c-43cd-8d63-81c43490305b \u003d\u003e code 404","commit_id":"f289a5c49a5af34d092f2d48d689d3b42ca2027c"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"1d1f770672453c91f655f1d2f2239829083f1604","unresolved":false,"context_lines":[{"line_number":932,"context_line":"        # _get_instance method in the compute/api for details."},{"line_number":933,"context_line":"        self.useFixture(nova_fixtures.AllServicesCurrent())"},{"line_number":934,"context_line":""},{"line_number":935,"context_line":"        # NOTE(melwitt): The aggregate-related methods are copied from the"},{"line_number":936,"context_line":"        # AggregateRequestFiltersTest."},{"line_number":937,"context_line":"        self.report_client \u003d report.SchedulerReportClient()"},{"line_number":938,"context_line":"        self.aggregates \u003d {}"},{"line_number":939,"context_line":"        self.context \u003d context.get_admin_context()"}],"source_content_type":"text/x-python","patch_set":3,"id":"3f79a3b5_7231115a","line":936,"range":{"start_line":935,"start_character":8,"end_line":936,"end_character":38},"updated":"2018-08-13 07:26:53.000000000","message":"Don\u0027t really need to mention this - it could get stale over time if those tests change.","commit_id":"f289a5c49a5af34d092f2d48d689d3b42ca2027c"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"1d1f770672453c91f655f1d2f2239829083f1604","unresolved":false,"context_lines":[{"line_number":942,"context_line":"        agg \u003d self.admin_api.post_aggregate({\u0027aggregate\u0027: {\u0027name\u0027: name}})"},{"line_number":943,"context_line":"        self.aggregates[name] \u003d agg"},{"line_number":944,"context_line":""},{"line_number":945,"context_line":"    def _get_provider_uuid_by_host(self, host):"},{"line_number":946,"context_line":"        \"\"\"Return the compute node uuid for a named compute host.\"\"\""},{"line_number":947,"context_line":"        # NOTE(gibi): the compute node id is the same as the compute node"},{"line_number":948,"context_line":"        # provider uuid on that compute"}],"source_content_type":"text/x-python","patch_set":3,"id":"3f79a3b5_9245cdb6","line":945,"range":{"start_line":945,"start_character":8,"end_line":945,"end_character":34},"updated":"2018-08-13 07:26:53.000000000","message":"Why do we care about placement for this test? Is it because you\u0027re using the scheduler client? As I think gibi noted earlier, do we really need to use the scheduler report client in these tests? Why not just use the actual APIs directly when dealing with aggregates and such?","commit_id":"f289a5c49a5af34d092f2d48d689d3b42ca2027c"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"3b0472e583d4b132aeb8fdd42832f3e5f0a1c3f4","unresolved":false,"context_lines":[{"line_number":962,"context_line":"        host_uuid \u003d self._get_provider_uuid_by_host(host)"},{"line_number":963,"context_line":""},{"line_number":964,"context_line":"        # Make sure we have a view of the provider we\u0027re about to mess with"},{"line_number":965,"context_line":"        self.report_client.get_provider_tree_and_ensure_root("},{"line_number":966,"context_line":"            self.context, host_uuid, name\u003dhost)"},{"line_number":967,"context_line":"        self.report_client.aggregate_add_host(self.context, agg[\u0027uuid\u0027], host)"},{"line_number":968,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"3f79a3b5_f201a139","line":965,"updated":"2018-08-13 07:28:38.000000000","message":"Also, this bug applies to pike right? Which means you\u0027d need to backport this test and this mirrored placement aggregate stuff won\u0027t be available before rocky, so it\u0027s best not to write the test this way - functional tests should really be about the end user\u0027s API interaction, so should rely on the API as much as possible, not internal helper functions. Plus backports would have to change all of this.","commit_id":"f289a5c49a5af34d092f2d48d689d3b42ca2027c"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"1d1f770672453c91f655f1d2f2239829083f1604","unresolved":false,"context_lines":[{"line_number":962,"context_line":"        host_uuid \u003d self._get_provider_uuid_by_host(host)"},{"line_number":963,"context_line":""},{"line_number":964,"context_line":"        # Make sure we have a view of the provider we\u0027re about to mess with"},{"line_number":965,"context_line":"        self.report_client.get_provider_tree_and_ensure_root("},{"line_number":966,"context_line":"            self.context, host_uuid, name\u003dhost)"},{"line_number":967,"context_line":"        self.report_client.aggregate_add_host(self.context, agg[\u0027uuid\u0027], host)"},{"line_number":968,"context_line":""},{"line_number":969,"context_line":"    def _set_az_aggregate(self, agg, az):"},{"line_number":970,"context_line":"        \"\"\"Set the availability_zone of an aggregate"}],"source_content_type":"text/x-python","patch_set":3,"id":"3f79a3b5_527ad5f0","line":967,"range":{"start_line":965,"start_character":8,"end_line":967,"end_character":78},"updated":"2018-08-13 07:26:53.000000000","message":"We shouldn\u0027t be using this. When you add hosts to an aggregate via the compute API, we\u0027ll automatically add that same host to a compute resource provider aggregate in placement - but I\u0027m not sure why this test cares about placement aggregates because is it even setting the config options to enable the pre-placement request filters for using placement aggregates?\n\nLooks like no, placement aggregates aren\u0027t used at all during scheduling in this test so we shouldn\u0027t bypass the compute API to create placement aggregates (which get created automatically anyway, as noted above).\n\nhttps://docs.openstack.org/nova/latest/configuration/config.html#scheduler.query_placement_for_availability_zone","commit_id":"f289a5c49a5af34d092f2d48d689d3b42ca2027c"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"a59a15c13c00d9a11adda39bcfc1295fab8e11e4","unresolved":false,"context_lines":[{"line_number":962,"context_line":"        host_uuid \u003d self._get_provider_uuid_by_host(host)"},{"line_number":963,"context_line":""},{"line_number":964,"context_line":"        # Make sure we have a view of the provider we\u0027re about to mess with"},{"line_number":965,"context_line":"        self.report_client.get_provider_tree_and_ensure_root("},{"line_number":966,"context_line":"            self.context, host_uuid, name\u003dhost)"},{"line_number":967,"context_line":"        self.report_client.aggregate_add_host(self.context, agg[\u0027uuid\u0027], host)"},{"line_number":968,"context_line":""},{"line_number":969,"context_line":"    def _set_az_aggregate(self, agg, az):"},{"line_number":970,"context_line":"        \"\"\"Set the availability_zone of an aggregate"}],"source_content_type":"text/x-python","patch_set":3,"id":"3f79a3b5_b461caab","line":967,"range":{"start_line":965,"start_character":8,"end_line":967,"end_character":78},"in_reply_to":"3f79a3b5_527ad5f0","updated":"2018-08-13 16:58:58.000000000","message":"It\u0027s pretty clear all this code came from AggregateRequestFiltersTest. We should either clean up that test to not use the reportclient or have this test case inherit from AggregateRequestFiltersTest directly.","commit_id":"f289a5c49a5af34d092f2d48d689d3b42ca2027c"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"4a3881a5f4705e638099eeed31af764b34167e40","unresolved":false,"context_lines":[{"line_number":962,"context_line":"        host_uuid \u003d self._get_provider_uuid_by_host(host)"},{"line_number":963,"context_line":""},{"line_number":964,"context_line":"        # Make sure we have a view of the provider we\u0027re about to mess with"},{"line_number":965,"context_line":"        self.report_client.get_provider_tree_and_ensure_root("},{"line_number":966,"context_line":"            self.context, host_uuid, name\u003dhost)"},{"line_number":967,"context_line":"        self.report_client.aggregate_add_host(self.context, agg[\u0027uuid\u0027], host)"},{"line_number":968,"context_line":""},{"line_number":969,"context_line":"    def _set_az_aggregate(self, agg, az):"},{"line_number":970,"context_line":"        \"\"\"Set the availability_zone of an aggregate"}],"source_content_type":"text/x-python","patch_set":3,"id":"3f79a3b5_54ce3682","line":967,"range":{"start_line":965,"start_character":8,"end_line":967,"end_character":78},"in_reply_to":"3f79a3b5_b461caab","updated":"2018-08-13 17:04:26.000000000","message":"Okay, my bad. I found AggregateRequestFiltersTest as an example of how to use aggregates in a functional test and didn\u0027t realize I didn\u0027t need to do anything with placement aggregates for this. I\u0027ll remove those bits.","commit_id":"f289a5c49a5af34d092f2d48d689d3b42ca2027c"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"71e038fb68348bad98d1c9b27b4fd784147b53c0","unresolved":false,"context_lines":[{"line_number":918,"context_line":""},{"line_number":919,"context_line":"        self.aggregates \u003d {}"},{"line_number":920,"context_line":""},{"line_number":921,"context_line":"    def _create_aggregate(self, name):"},{"line_number":922,"context_line":"        agg \u003d self.admin_api.post_aggregate({\u0027aggregate\u0027: {\u0027name\u0027: name}})"},{"line_number":923,"context_line":"        self.aggregates[name] \u003d agg"},{"line_number":924,"context_line":""},{"line_number":925,"context_line":"    def _add_host_to_aggregate(self, agg, host):"},{"line_number":926,"context_line":"        \"\"\"Add a compute host to nova aggregates."},{"line_number":927,"context_line":""},{"line_number":928,"context_line":"        :param agg: Name of the nova aggregate"},{"line_number":929,"context_line":"        :param host: Name of the compute host"},{"line_number":930,"context_line":"        \"\"\""},{"line_number":931,"context_line":"        agg \u003d self.aggregates[agg]"},{"line_number":932,"context_line":"        self.admin_api.add_host_to_aggregate(agg[\u0027id\u0027], host)"},{"line_number":933,"context_line":""},{"line_number":934,"context_line":"    def _set_az_aggregate(self, agg, az):"},{"line_number":935,"context_line":"        \"\"\"Set the availability_zone of an aggregate"}],"source_content_type":"text/x-python","patch_set":4,"id":"3f79a3b5_66594133","line":932,"range":{"start_line":921,"start_character":4,"end_line":932,"end_character":61},"updated":"2018-08-14 02:34:45.000000000","message":"Is this all just to get the servers on specific hosts? You could just pass az\u003d\u0027nova:host1\u0027 as admin and that will force the server onto the specified host and you don\u0027t need to mess with aggregates.","commit_id":"4f2c4993b1748d679bce8de6ffc672490ef3fa49"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"a3b788e13210e1573a38961de76c9194f52dbd15","unresolved":false,"context_lines":[{"line_number":918,"context_line":""},{"line_number":919,"context_line":"        self.aggregates \u003d {}"},{"line_number":920,"context_line":""},{"line_number":921,"context_line":"    def _create_aggregate(self, name):"},{"line_number":922,"context_line":"        agg \u003d self.admin_api.post_aggregate({\u0027aggregate\u0027: {\u0027name\u0027: name}})"},{"line_number":923,"context_line":"        self.aggregates[name] \u003d agg"},{"line_number":924,"context_line":""},{"line_number":925,"context_line":"    def _add_host_to_aggregate(self, agg, host):"},{"line_number":926,"context_line":"        \"\"\"Add a compute host to nova aggregates."},{"line_number":927,"context_line":""},{"line_number":928,"context_line":"        :param agg: Name of the nova aggregate"},{"line_number":929,"context_line":"        :param host: Name of the compute host"},{"line_number":930,"context_line":"        \"\"\""},{"line_number":931,"context_line":"        agg \u003d self.aggregates[agg]"},{"line_number":932,"context_line":"        self.admin_api.add_host_to_aggregate(agg[\u0027id\u0027], host)"},{"line_number":933,"context_line":""},{"line_number":934,"context_line":"    def _set_az_aggregate(self, agg, az):"},{"line_number":935,"context_line":"        \"\"\"Set the availability_zone of an aggregate"}],"source_content_type":"text/x-python","patch_set":4,"id":"3f79a3b5_5a5aae82","line":932,"range":{"start_line":921,"start_character":4,"end_line":932,"end_character":61},"in_reply_to":"3f79a3b5_3b06e621","updated":"2018-08-15 17:51:50.000000000","message":"OK, looks like by default force host bypasses scheduler filters:\n\nhttps://github.com/openstack/nova/blob/89470970474357b23ab691ee534b34806fdf40af/nova/scheduler/host_manager.py#L580-L586\n\nunless the _nova_check_type scheduler hint has been set, and it\u0027s only set for rebuild:\n\nhttps://github.com/openstack/nova/blob/89470970474357b23ab691ee534b34806fdf40af/nova/compute/api.py#L3259-L3264\n\nSo, since we want to test affinity, we need to use aggregates OR be able to pass the _nova_check_type scheduler hint with the boot request. But I assume _nova_check_type is supposed to be private since it\u0027s prepended with an underscore.","commit_id":"4f2c4993b1748d679bce8de6ffc672490ef3fa49"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"fd82d9fdcaa5949bb7309c47b43f54c8ce35704f","unresolved":false,"context_lines":[{"line_number":918,"context_line":""},{"line_number":919,"context_line":"        self.aggregates \u003d {}"},{"line_number":920,"context_line":""},{"line_number":921,"context_line":"    def _create_aggregate(self, name):"},{"line_number":922,"context_line":"        agg \u003d self.admin_api.post_aggregate({\u0027aggregate\u0027: {\u0027name\u0027: name}})"},{"line_number":923,"context_line":"        self.aggregates[name] \u003d agg"},{"line_number":924,"context_line":""},{"line_number":925,"context_line":"    def _add_host_to_aggregate(self, agg, host):"},{"line_number":926,"context_line":"        \"\"\"Add a compute host to nova aggregates."},{"line_number":927,"context_line":""},{"line_number":928,"context_line":"        :param agg: Name of the nova aggregate"},{"line_number":929,"context_line":"        :param host: Name of the compute host"},{"line_number":930,"context_line":"        \"\"\""},{"line_number":931,"context_line":"        agg \u003d self.aggregates[agg]"},{"line_number":932,"context_line":"        self.admin_api.add_host_to_aggregate(agg[\u0027id\u0027], host)"},{"line_number":933,"context_line":""},{"line_number":934,"context_line":"    def _set_az_aggregate(self, agg, az):"},{"line_number":935,"context_line":"        \"\"\"Set the availability_zone of an aggregate"}],"source_content_type":"text/x-python","patch_set":4,"id":"3f79a3b5_11f7308d","line":932,"range":{"start_line":921,"start_character":4,"end_line":932,"end_character":61},"in_reply_to":"3f79a3b5_5a5aae82","updated":"2018-08-19 03:02:51.000000000","message":"Ah, OK, thanks for digging into that. Aggregates it is then.","commit_id":"4f2c4993b1748d679bce8de6ffc672490ef3fa49"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"0cfbc9ac53b9aaf7781c73a5b59e050b0b504527","unresolved":false,"context_lines":[{"line_number":918,"context_line":""},{"line_number":919,"context_line":"        self.aggregates \u003d {}"},{"line_number":920,"context_line":""},{"line_number":921,"context_line":"    def _create_aggregate(self, name):"},{"line_number":922,"context_line":"        agg \u003d self.admin_api.post_aggregate({\u0027aggregate\u0027: {\u0027name\u0027: name}})"},{"line_number":923,"context_line":"        self.aggregates[name] \u003d agg"},{"line_number":924,"context_line":""},{"line_number":925,"context_line":"    def _add_host_to_aggregate(self, agg, host):"},{"line_number":926,"context_line":"        \"\"\"Add a compute host to nova aggregates."},{"line_number":927,"context_line":""},{"line_number":928,"context_line":"        :param agg: Name of the nova aggregate"},{"line_number":929,"context_line":"        :param host: Name of the compute host"},{"line_number":930,"context_line":"        \"\"\""},{"line_number":931,"context_line":"        agg \u003d self.aggregates[agg]"},{"line_number":932,"context_line":"        self.admin_api.add_host_to_aggregate(agg[\u0027id\u0027], host)"},{"line_number":933,"context_line":""},{"line_number":934,"context_line":"    def _set_az_aggregate(self, agg, az):"},{"line_number":935,"context_line":"        \"\"\"Set the availability_zone of an aggregate"}],"source_content_type":"text/x-python","patch_set":4,"id":"3f79a3b5_51e848b1","line":932,"range":{"start_line":921,"start_character":4,"end_line":932,"end_character":61},"in_reply_to":"3f79a3b5_5a5aae82","updated":"2018-08-16 07:08:35.000000000","message":"Ah, OK, thanks for digging into that. Aggregates it is then.","commit_id":"4f2c4993b1748d679bce8de6ffc672490ef3fa49"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"c6734e9775e55cd7b91475adef65de4e4bde5a4c","unresolved":false,"context_lines":[{"line_number":918,"context_line":""},{"line_number":919,"context_line":"        self.aggregates \u003d {}"},{"line_number":920,"context_line":""},{"line_number":921,"context_line":"    def _create_aggregate(self, name):"},{"line_number":922,"context_line":"        agg \u003d self.admin_api.post_aggregate({\u0027aggregate\u0027: {\u0027name\u0027: name}})"},{"line_number":923,"context_line":"        self.aggregates[name] \u003d agg"},{"line_number":924,"context_line":""},{"line_number":925,"context_line":"    def _add_host_to_aggregate(self, agg, host):"},{"line_number":926,"context_line":"        \"\"\"Add a compute host to nova aggregates."},{"line_number":927,"context_line":""},{"line_number":928,"context_line":"        :param agg: Name of the nova aggregate"},{"line_number":929,"context_line":"        :param host: Name of the compute host"},{"line_number":930,"context_line":"        \"\"\""},{"line_number":931,"context_line":"        agg \u003d self.aggregates[agg]"},{"line_number":932,"context_line":"        self.admin_api.add_host_to_aggregate(agg[\u0027id\u0027], host)"},{"line_number":933,"context_line":""},{"line_number":934,"context_line":"    def _set_az_aggregate(self, agg, az):"},{"line_number":935,"context_line":"        \"\"\"Set the availability_zone of an aggregate"}],"source_content_type":"text/x-python","patch_set":4,"id":"3f79a3b5_8d0ca794","line":932,"range":{"start_line":921,"start_character":4,"end_line":932,"end_character":61},"in_reply_to":"3f79a3b5_66594133","updated":"2018-08-14 23:39:39.000000000","message":"Yes. That does the same thing without any aggregates or AZs? GUH, I did not know that. I can fix it.","commit_id":"4f2c4993b1748d679bce8de6ffc672490ef3fa49"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"3d716624f84e67bcc0a9b616f166d4e8fb6fcb5c","unresolved":false,"context_lines":[{"line_number":918,"context_line":""},{"line_number":919,"context_line":"        self.aggregates \u003d {}"},{"line_number":920,"context_line":""},{"line_number":921,"context_line":"    def _create_aggregate(self, name):"},{"line_number":922,"context_line":"        agg \u003d self.admin_api.post_aggregate({\u0027aggregate\u0027: {\u0027name\u0027: name}})"},{"line_number":923,"context_line":"        self.aggregates[name] \u003d agg"},{"line_number":924,"context_line":""},{"line_number":925,"context_line":"    def _add_host_to_aggregate(self, agg, host):"},{"line_number":926,"context_line":"        \"\"\"Add a compute host to nova aggregates."},{"line_number":927,"context_line":""},{"line_number":928,"context_line":"        :param agg: Name of the nova aggregate"},{"line_number":929,"context_line":"        :param host: Name of the compute host"},{"line_number":930,"context_line":"        \"\"\""},{"line_number":931,"context_line":"        agg \u003d self.aggregates[agg]"},{"line_number":932,"context_line":"        self.admin_api.add_host_to_aggregate(agg[\u0027id\u0027], host)"},{"line_number":933,"context_line":""},{"line_number":934,"context_line":"    def _set_az_aggregate(self, agg, az):"},{"line_number":935,"context_line":"        \"\"\"Set the availability_zone of an aggregate"}],"source_content_type":"text/x-python","patch_set":4,"id":"3f79a3b5_e59a0f60","line":932,"range":{"start_line":921,"start_character":4,"end_line":932,"end_character":61},"in_reply_to":"3f79a3b5_8d0ca794","updated":"2018-08-15 03:53:48.000000000","message":"Sigh ... spoke too soon. Force host won\u0027t work for this (in the top patch) because then it will ignore all affinity policy set by the server group. So the second server won\u0027t fall into ERROR status for failing affinity policy because force host will always succeed.\n\nSo I think we have to use aggregates here, right?","commit_id":"4f2c4993b1748d679bce8de6ffc672490ef3fa49"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"963565fcff3e5fb083aa484683732c8eed8f602a","unresolved":false,"context_lines":[{"line_number":918,"context_line":""},{"line_number":919,"context_line":"        self.aggregates \u003d {}"},{"line_number":920,"context_line":""},{"line_number":921,"context_line":"    def _create_aggregate(self, name):"},{"line_number":922,"context_line":"        agg \u003d self.admin_api.post_aggregate({\u0027aggregate\u0027: {\u0027name\u0027: name}})"},{"line_number":923,"context_line":"        self.aggregates[name] \u003d agg"},{"line_number":924,"context_line":""},{"line_number":925,"context_line":"    def _add_host_to_aggregate(self, agg, host):"},{"line_number":926,"context_line":"        \"\"\"Add a compute host to nova aggregates."},{"line_number":927,"context_line":""},{"line_number":928,"context_line":"        :param agg: Name of the nova aggregate"},{"line_number":929,"context_line":"        :param host: Name of the compute host"},{"line_number":930,"context_line":"        \"\"\""},{"line_number":931,"context_line":"        agg \u003d self.aggregates[agg]"},{"line_number":932,"context_line":"        self.admin_api.add_host_to_aggregate(agg[\u0027id\u0027], host)"},{"line_number":933,"context_line":""},{"line_number":934,"context_line":"    def _set_az_aggregate(self, agg, az):"},{"line_number":935,"context_line":"        \"\"\"Set the availability_zone of an aggregate"}],"source_content_type":"text/x-python","patch_set":4,"id":"3f79a3b5_3b06e621","line":932,"range":{"start_line":921,"start_character":4,"end_line":932,"end_character":61},"in_reply_to":"3f79a3b5_e59a0f60","updated":"2018-08-15 07:38:56.000000000","message":"Force host shouldn\u0027t bypass the filters though, right? It just means bypassing getting all computes as potential candidates and then we should run the filters on the specified (forced) host. Maybe I need to dig into this, but the filters should be run either way.","commit_id":"4f2c4993b1748d679bce8de6ffc672490ef3fa49"}]}
