Public bug reported: Problematic Situation:
1 check the hosts visible to nova compute nova hypervisor-list id hypervisor hostname state status xx compute2 up enbled 2 check the hosts visible to cellv2 nova-manage cell_v2 list_hosts cell name cell uuid hostname cell1 xxxx compute1 cell1 xxxx compute2 Here compute1 that actually does not exist (like renamed) still remains in cell_mappings 3 now try to delete host compute1 nova-manage cell_v2 delete_host --cell_uuid xxxx --host compute1 then the following error is shown: Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/nova/cmd/manage.py", line 1620, in main ret = fn(*fn_args, **fn_kwargs) File "/usr/lib/python2.7/site-packages/nova/cmd/manage.py", line 1558, in delete_host nodes = objects.ComputeNodeList.get_all_by_host(cctxt, host) File "/usr/lib/python2.7/site-packages/oslo_versionedobjects/base.py", line 184, in wrapper result = fn(cls, context, *args, **kwargs) File "/usr/lib/python2.7/site-packages/nova/objects/compute_node.py", line 437, in get_all_by_host use_slave=use_slave) File "/usr/lib/python2.7/site-packages/nova/db/sqlalchemy/api.py", line 225, in wrapper return f(*args, **kwargs) File "/usr/lib/python2.7/site-packages/nova/objects/compute_node.py", line 432, in _db_compute_node_get_all_by_host return db.compute_node_get_all_by_host(context, host) File "/usr/lib/python2.7/site-packages/nova/db/api.py", line 297, in compute_node_get_all_by_host return IMPL.compute_node_get_all_by_host(context, host) File "/usr/lib/python2.7/site-packages/nova/db/sqlalchemy/api.py", line 270, in wrapped return f(context, *args, **kwargs) File "/usr/lib/python2.7/site-packages/nova/db/sqlalchemy/api.py", line 672, in compute_node_get_all_by_host raise exception.ComputeHostNotFound(host=host) ComputeHostNotFound: Compute host compute1 could not be found. Not quite sure the exact way to reproduce it, but I think it would be nicer to allow the delete_host operation for situations like this. ** Affects: nova Importance: Undecided Assignee: Chen (chenn2) Status: New ** Changed in: nova Assignee: (unassigned) => Chen (chenn2) -- You received this bug notification because you are a member of Yahoo! Engineering Team, which is subscribed to OpenStack Compute (nova). https://bugs.launchpad.net/bugs/1781391 Title: cellv2_delete_host when host not found by ComputeNodeList Status in OpenStack Compute (nova): New Bug description: Problematic Situation: 1 check the hosts visible to nova compute nova hypervisor-list id hypervisor hostname state status xx compute2 up enbled 2 check the hosts visible to cellv2 nova-manage cell_v2 list_hosts cell name cell uuid hostname cell1 xxxx compute1 cell1 xxxx compute2 Here compute1 that actually does not exist (like renamed) still remains in cell_mappings 3 now try to delete host compute1 nova-manage cell_v2 delete_host --cell_uuid xxxx --host compute1 then the following error is shown: Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/nova/cmd/manage.py", line 1620, in main ret = fn(*fn_args, **fn_kwargs) File "/usr/lib/python2.7/site-packages/nova/cmd/manage.py", line 1558, in delete_host nodes = objects.ComputeNodeList.get_all_by_host(cctxt, host) File "/usr/lib/python2.7/site-packages/oslo_versionedobjects/base.py", line 184, in wrapper result = fn(cls, context, *args, **kwargs) File "/usr/lib/python2.7/site-packages/nova/objects/compute_node.py", line 437, in get_all_by_host use_slave=use_slave) File "/usr/lib/python2.7/site-packages/nova/db/sqlalchemy/api.py", line 225, in wrapper return f(*args, **kwargs) File "/usr/lib/python2.7/site-packages/nova/objects/compute_node.py", line 432, in _db_compute_node_get_all_by_host return db.compute_node_get_all_by_host(context, host) File "/usr/lib/python2.7/site-packages/nova/db/api.py", line 297, in compute_node_get_all_by_host return IMPL.compute_node_get_all_by_host(context, host) File "/usr/lib/python2.7/site-packages/nova/db/sqlalchemy/api.py", line 270, in wrapped return f(context, *args, **kwargs) File "/usr/lib/python2.7/site-packages/nova/db/sqlalchemy/api.py", line 672, in compute_node_get_all_by_host raise exception.ComputeHostNotFound(host=host) ComputeHostNotFound: Compute host compute1 could not be found. Not quite sure the exact way to reproduce it, but I think it would be nicer to allow the delete_host operation for situations like this. To manage notifications about this bug go to: https://bugs.launchpad.net/nova/+bug/1781391/+subscriptions -- Mailing list: https://launchpad.net/~yahoo-eng-team Post to : yahoo-eng-team@lists.launchpad.net Unsubscribe : https://launchpad.net/~yahoo-eng-team More help : https://help.launchpad.net/ListHelp