Comment 2 for bug 1788115

Revision history for this message
Surya Seetharaman (tssurya) wrote : Re: nova-manage db online_data_migrations hangs with deleted instances

While it is true that populate_missing_availability_zone does not check for deleted instances; I don't see how it can go into infinite loop unless there is no CONF.default_availability_zone set (https://github.com/openstack/nova/blob/722d5b477219f0a2435a9f4ad4d54c61b83219f1/nova/availability_zones.py#L99) which is the last resort; meaning CONF.default_availability_zone is set to None, which by default is "nova".

Probably its the situation where the instance was deleted before being scheduled to a compute node in which case it could hit https://github.com/openstack/nova/blob/722d5b477219f0a2435a9f4ad4d54c61b83219f1/nova/availability_zones.py#L168. Could you confirm if it is indeed this i.e instance.host was NULL?