Cell_v2 discover_hosts Not Working, after deleted a host from a cell
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
Medium
|
Dan Smith | ||
Pike |
Fix Committed
|
Undecided
|
Matt Riedemann |
Bug Description
!!!!!!!
Description
===========
Mulit-cell Cell_v2 'discover_hosts' is not working after executing 'delete_host' operation to remove a specific host from the cell.
Steps to reproduce
==================
*Consider I am having nova-compute service running on host 'compute3'
*nova-manage cell_v2 delete_host --cell_uuid d9a559a8-
*Host entry was removed from host_mappings table
*Still service is up and Running on the local cell DB.
*I am trying to execute 'nova-manage cell_v2 discover_hosts --verbose'
*No host entry was created and got `Found 0 unmapped computes in cell: d9a559a8-
Expected result
===============
It should add the host that is not mapped to the cell.
Actual result
=============
nova-manage cell_v2 discover_hosts --verbose
Getting compute nodes from cell 'cell2': d9a559a8-
Found 0 unmapped computes in cell: d9a559a8-
Host is not added to the cell.
Environment
===========
Devstack(
tags: | added: cells nova-manage |
Changed in nova: | |
assignee: | nobody → Surya Seetharaman (tssurya) |
This is because the compute node for that host in that cell is not deleted and since it was mapped once, it is marked as 'mapped' again, so the discover_hosts routine ignores it, for performance / efficiency reasons.
This likely means that the delete_host CLI is not checking to see that the actual compute node is gone from the cell before deleting the host mapping, or if it will delete the host mapping, it should mark the compute node as mapped=0 so it can be discovered again.