Unmap compute nodes when deleting host mappings in delete cell operation
Presently when a host_mapping is deleted during the nova-manage cell_v2
delete_cell operation, the compute node record still remains with its
mapped field set to 1. Due to this, if we delete a cell, and later
create a new cell, the discover_hosts command will not work and the
compute node will not get mapped to the new cell. This patch fixes this
issue by setting it back to 0.
Conflicts: nova/tests/unit/test_nova_manage.py
NOTE(tssurya): The conflict is due to not having the change
Ibefa0465224bec9a22431c7d3b5c8f5d91fc7732 in Queens.
Change-Id: Iaf13f11bcd0bb25f673fc28f252cb9391409b9b5
Closes-Bug: #1747936
(cherry picked from commit dc2d15129d1a86a841e3dc1ccab250c30d34c540)
Reviewed: https:/ /review. openstack. org/553496 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=6401d1e3c89 66f5c9b9106d2e3 918c766ce8b48a
Committed: https:/
Submitter: Zuul
Branch: stable/queens
commit 6401d1e3c8966f5 c9b9106d2e3918c 766ce8b48a
Author: Surya Seetharaman <email address hidden>
Date: Fri Feb 9 18:54:05 2018 +0100
Unmap compute nodes when deleting host mappings in delete cell operation
Presently when a host_mapping is deleted during the nova-manage cell_v2
delete_cell operation, the compute node record still remains with its
mapped field set to 1. Due to this, if we delete a cell, and later
create a new cell, the discover_hosts command will not work and the
compute node will not get mapped to the new cell. This patch fixes this
issue by setting it back to 0.
Conflicts:
nova/tests/ unit/test_ nova_manage. py
NOTE(tssurya): The conflict is due to not having the change 4bec9a22431c7d3 b5c8f5d91fc7732 in Queens.
Ibefa046522
Change-Id: Iaf13f11bcd0bb2 5f673fc28f252cb 9391409b9b5 841e3dc1ccab250 c30d34c540)
Closes-Bug: #1747936
(cherry picked from commit dc2d15129d1a86a