Neutron try to register invalid host to nova aggregate for ironic routed network

Bug #1862611 reported by Yang Youseok on 2020-02-10
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Undecided
Unassigned

Bug Description

For stable/stein

Honestly, I do not sure this is bug or something that I am missing. At least it lacks of information so I report this.

When segment firstly set for a subnet, Neutron are trying to make 'host aggregate' in nova, 'resource provider' in placement, and add host to 'host aggregate'

I found when Neutorn add 'host' to 'host aggregate', the 'host' is came 'ironic node uuid' from networking-baremetal. But the problem is nova deos not know the 'host' since only thing that nova knows is host from ironic-nova-compute rather thant 'ironic node uuid'

From neutron/services/segments/plugin.py _create_nova_inventory(), self.n_client.aggregates.add_host(aggregate.id, mapping.host)

Nova emit the exception like below

2020-02-10 16:51:36.769 14048 DEBUG nova.api.openstack.wsgi [req-211fca1a-6d19-42b6-8d33-6f5b3d46e256 4931b135200f4b3d9e638d37aba85879 3f7b5c5c19a84d10984d49ab1226569f - default default] Action: 'action', calling method: <bound method AggregateController._add_host of <nova.api.openstack.compute.aggregates.AggregateController object at 0x7f91d7d1bf28>>, body: {"add_host": {"host": "27004f76-2606-4e4a-980e-a385a01f04de"}} _process_stack /opt/openstack/src/nova/nova/api/openstack/wsgi.py:520
2020-02-10 16:51:36.792 14048 DEBUG nova.compute.api [req-211fca1a-6d19-42b6-8d33-6f5b3d46e256 4931b135200f4b3d9e638d37aba85879 3f7b5c5c19a84d10984d49ab1226569f - default default] Found 2 cells: 84dd085e-770b-45d4-afbd-3744a34c23e0(cell1),00000000-0000-0000-0000-000000000000(cell0) load_cells /opt/openstack/src/nova/nova/compute/api.py:244
2020-02-10 16:51:36.793 14048 DEBUG oslo_concurrency.lockutils [req-211fca1a-6d19-42b6-8d33-6f5b3d46e256 4931b135200f4b3d9e638d37aba85879 3f7b5c5c19a84d10984d49ab1226569f - default default] Lock "84dd085e-770b-45d4-afbd-3744a34c23e0" acquired by "nova.context.set_target_cell.<locals>.get_or_set_cached_cell_and_set_connections" :: waited 0.000s inner /opt/openstack/lib/python3.6/site-packages/oslo_concurrency/lockutils.py:327
2020-02-10 16:51:36.793 14048 DEBUG oslo_concurrency.lockutils [req-211fca1a-6d19-42b6-8d33-6f5b3d46e256 4931b135200f4b3d9e638d37aba85879 3f7b5c5c19a84d10984d49ab1226569f - default default] Lock "84dd085e-770b-45d4-afbd-3744a34c23e0" released by "nova.context.set_target_cell.<locals>.get_or_set_cached_cell_and_set_connections" :: held 0.001s inner /opt/openstack/lib/python3.6/site-packages/oslo_concurrency/lockutils.py:339
2020-02-10 16:51:36.801 14048 DEBUG oslo_concurrency.lockutils [req-211fca1a-6d19-42b6-8d33-6f5b3d46e256 4931b135200f4b3d9e638d37aba85879 3f7b5c5c19a84d10984d49ab1226569f - default default] Lock "00000000-0000-0000-0000-000000000000" acquired by "nova.context.set_target_cell.<locals>.get_or_set_cached_cell_and_set_connections" :: waited 0.000s inner /opt/openstack/lib/python3.6/site-packages/oslo_concurrency/lockutils.py:327
2020-02-10 16:51:36.801 14048 DEBUG oslo_concurrency.lockutils [req-211fca1a-6d19-42b6-8d33-6f5b3d46e256 4931b135200f4b3d9e638d37aba85879 3f7b5c5c19a84d10984d49ab1226569f - default default] Lock "00000000-0000-0000-0000-000000000000" released by "nova.context.set_target_cell.<locals>.get_or_set_cached_cell_and_set_connections" :: held 0.001s inner /opt/openstack/lib/python3.6/site-packages/oslo_concurrency/lockutils.py:339
2020-02-10 16:51:36.812 14048 INFO nova.api.openstack.wsgi [req-211fca1a-6d19-42b6-8d33-6f5b3d46e256 4931b135200f4b3d9e638d37aba85879 3f7b5c5c19a84d10984d49ab1226569f - default default] HTTP exception thrown: Compute host 27004f76-2606-4e4a-980e-a385a01f04de could not be found.
2020-02-10 16:51:36.813 14048 DEBUG nova.api.openstack.wsgi [req-211fca1a-6d19-42b6-8d33-6f5b3d46e256 4931b135200f4b3d9e638d37aba85879 3f7b5c5c19a84d10984d49ab1226569f - default default] Returning 404 to user: Compute host 27004f76-2606-4e4a-980e-a385a01f04de could not be found. __call__ /opt/openstack/src/nova/nova/api/openstack/wsgi.py:943

Is it okay to ask Nova to register ironic node uuid for host aggregate?

Thanks.

Lajos Katona (lajos-katona) wrote :

For reference I add here the link for the mail discussion:
http://lists.openstack.org/pipermail/openstack-discuss/2020-February/012472.html

I am not sure if I fully understand the ironic usecase for routed provider nets, but I have a feeling that this is a similar issue like the one described here:
https://bugs.launchpad.net/neutron/+bug/1853840

So I suppose the solution merged for that can work for this bug as well (see: https://review.opendev.org/696600 )

Would be good to hear others' opinion as well.

tags: added: segments
Yang Youseok (ileixe) wrote :

@Lajos

I examined the PR and realize the case (https://bugs.launchpad.net/neutron/+bug/1853840) was not same for the ironic case.

Ironic-agent from networking-baremtal set node UUID and this is not 'hypervisor' which nova say. Further, even if we can specify hypervisors which a agent can control from 'resource_provider_hypervisors, it does not help ironic case since there is no hypervisor for ironic rather than 'ironic-compute-node'. So we cannot choose the right hypervisor either way.

I need some background to implement ironic usecase and normal routed network (https://blueprints.launchpad.net/nova/+spec/ip-aware-scheduling-placement), but seem that no one interested it.

Can we talk in IRC? I need some help to keep going on because it needs some knowledges to add codes several projects.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers