)]}'
{"nova/compute/api.py":[{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"0d3b191fbc6c4d091f237c557ef6febac8bfc659","unresolved":false,"context_lines":[{"line_number":6032,"context_line":"        aggregate.add_host(host_name)"},{"line_number":6033,"context_line":"        self.query_client.update_aggregates(context, [aggregate])"},{"line_number":6034,"context_line":"        nodes \u003d objects.ComputeNodeList.get_all_by_host(context, host_name)"},{"line_number":6035,"context_line":"        node_name \u003d nodes[0].hypervisor_hostname"},{"line_number":6036,"context_line":"        try:"},{"line_number":6037,"context_line":"            self.placement_client.aggregate_add_host("},{"line_number":6038,"context_line":"                context, aggregate.uuid, host_name\u003dnode_name)"}],"source_content_type":"text/x-python","patch_set":1,"id":"1f493fa4_dd19b588","line":6035,"updated":"2020-05-26 12:24:27.000000000","message":"So the original code did not worked for ironic either where the host in a host aggregate is a compute host but the ironic node has the node uuid as the name of the placement compute RP. In case of ironic the new code will add the first node of the host to the aggregate instead of failing.\n\nFor non ironic case I think the fix is good. The RP in placement is named after the hypervisor_hostname by the resource tracker [1].\n\n\n[1] https://github.com/openstack/nova/blob/6a4e8b24678267d9a4e72e3b77268b08cad85f18/nova/compute/resource_tracker.py#L1110","commit_id":"eb433bf17e84ccba899e025fe3004e7d63c3f19e"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"0d3b191fbc6c4d091f237c557ef6febac8bfc659","unresolved":false,"context_lines":[{"line_number":6088,"context_line":"        # first we can\u0027t re-attempt this from the compute API if cleaning up"},{"line_number":6089,"context_line":"        # placement fails."},{"line_number":6090,"context_line":"        nodes \u003d objects.ComputeNodeList.get_all_by_host(context, host_name)"},{"line_number":6091,"context_line":"        node_name \u003d nodes[0].hypervisor_hostname"},{"line_number":6092,"context_line":"        try:"},{"line_number":6093,"context_line":"            # Anything else this raises is handled in the route handler as"},{"line_number":6094,"context_line":"            # either a 409 (ResourceProviderUpdateConflict) or 500."}],"source_content_type":"text/x-python","patch_set":1,"id":"1f493fa4_7d298199","line":6091,"updated":"2020-05-26 12:24:27.000000000","message":"I\u0027m not sure what will happen here in case of Ironic after a compute node re-balance. If the rebalance moved the previously added nodes[0] to other compute service. Then we are trying to remove a node from the aggregate that is was not added before.","commit_id":"eb433bf17e84ccba899e025fe3004e7d63c3f19e"}]}
