← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1693979] [NEW] HostMappingNotFound: Host 'xxx' is not mapped to any cell

 

Public bug reported:

Description
===========
When the nova-compute starts to running, the nova-scheduler log displays many exceptions.
exceptions:
[req-4f1d7888-2324-4c9d-b88b-f468159b1364 None None] Exception during message handling (/usr/local/lib/python2.7/dist-packages/oslo_messaging/rpc/server.py:166)
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/oslo_messaging/rpc/server.py", line 157, in _process_incoming
    res = self.dispatcher.dispatch(message)
  File "/usr/local/lib/python2.7/dist-packages/oslo_messaging/rpc/dispatcher.py", line 213, in dispatch
    return self._do_dispatch(endpoint, method, ctxt, args)
  File "/usr/local/lib/python2.7/dist-packages/oslo_messaging/rpc/dispatcher.py", line 183, in _do_dispatch
    result = func(ctxt, **new_args)
  File "/opt/stack/nova/nova/scheduler/manager.py", line 125, in update_instance_info
    instance_info)
  File "/usr/local/lib/python2.7/dist-packages/oslo_concurrency/lockutils.py", line 271, in inner
    return f(*args, **kwargs)
  File "/opt/stack/nova/nova/scheduler/host_manager.py", line 768, in update_instance_info
    self._recreate_instance_info(context, host_name)
  File "/opt/stack/nova/nova/scheduler/host_manager.py", line 739, in _recreate_instance_info
    inst_dict = self._get_instances_by_host(context, host_name)
  File "/opt/stack/nova/nova/scheduler/host_manager.py", line 711, in _get_instances_by_host
    hm = objects.HostMapping.get_by_host(context, host_name)
  File "/usr/local/lib/python2.7/dist-packages/oslo_versionedobjects/base.py", line 184, in wrapper
    result = fn(cls, context, *args, **kwargs)
  File "/opt/stack/nova/nova/objects/host_mapping.py", line 100, in get_by_host
    db_mapping = cls._get_by_host_from_db(context, host)
  File "/usr/local/lib/python2.7/dist-packages/oslo_db/sqlalchemy/enginefacade.py", line 963, in wrapper
    return fn(*args, **kwargs)
  File "/opt/stack/nova/nova/objects/host_mapping.py", line 95, in _get_by_host_from_db
    raise exception.HostMappingNotFound(name=host)
HostMappingNotFound: Host 'xxx' is not mapped to any cell

Environment
===========

$ git log -1
commit 7280f4fc4c5a2203ac2f59a9df0525488ac2c1ff
Author: Artom Lifshitz <alifshit@xxxxxxxxxx>
Date:   Mon Jan 9 18:57:17 2017 +0000

    Libvirt support for tagged volume attachment

    This patch adds support for tagged volume attachment to the libvirt
    driver.

    Change-Id: I8b475992b881db08cf1354299cc86042413074cc
    Implements: blueprint bp/virt-device-tagged-attach-detach

Explanation
===========
I carefully looked at the code nova-compute and nova-scheduler.
When the nova-compute start to running, the Service.start (nova/service.py) is invoked.
Then, executes self.manager.init_host(), causing the exception (HostMappingNotFound) to accur.
When I track the operation of function ComputeManager.init_host (nova/compute/manager.py), self._update_scheduler_instance_info is invoked, that is sending the RPC request to nova-scheduler to execute update_instance_info.

I looked at the code nova-scheduler. the
SchedulerManager.update_instance_info (nova/scheduler/manager.py) is
invoked. Then, the self.driver.host_manager.update_instance_info is
invoked. In the file nova/scheduler/host_manager.py, because of the
host_name (xxx) is not in self._instance_info,
self._recreate_instance_info will been invoked. Then, the
self._get_instances_by_host can not get the instance from table
host_mappings, the exceptions HostMappingNotFound is raised.

What needs to be configured?

** Affects: nova
     Importance: Undecided
         Status: New

** Description changed:

  Description
  ===========
  When the nova-compute starts to running, the nova-scheduler log displays many exceptions.
  exceptions:
  [req-4f1d7888-2324-4c9d-b88b-f468159b1364 None None] Exception during message handling (/usr/local/lib/python2.7/dist-packages/oslo_messaging/rpc/server.py:166)
  Traceback (most recent call last):
-   File "/usr/local/lib/python2.7/dist-packages/oslo_messaging/rpc/server.py", line 157, in _process_incoming
-     res = self.dispatcher.dispatch(message)
-   File "/usr/local/lib/python2.7/dist-packages/oslo_messaging/rpc/dispatcher.py", line 213, in dispatch
-     return self._do_dispatch(endpoint, method, ctxt, args)
-   File "/usr/local/lib/python2.7/dist-packages/oslo_messaging/rpc/dispatcher.py", line 183, in _do_dispatch
-     result = func(ctxt, **new_args)
-   File "/opt/stack/nova/nova/scheduler/manager.py", line 125, in update_instance_info
-     instance_info)
-   File "/usr/local/lib/python2.7/dist-packages/oslo_concurrency/lockutils.py", line 271, in inner
-     return f(*args, **kwargs)
-   File "/opt/stack/nova/nova/scheduler/host_manager.py", line 768, in update_instance_info
-     self._recreate_instance_info(context, host_name)
-   File "/opt/stack/nova/nova/scheduler/host_manager.py", line 739, in _recreate_instance_info
-     inst_dict = self._get_instances_by_host(context, host_name)
-   File "/opt/stack/nova/nova/scheduler/host_manager.py", line 711, in _get_instances_by_host
-     hm = objects.HostMapping.get_by_host(context, host_name)
-   File "/usr/local/lib/python2.7/dist-packages/oslo_versionedobjects/base.py", line 184, in wrapper
-     result = fn(cls, context, *args, **kwargs)
-   File "/opt/stack/nova/nova/objects/host_mapping.py", line 100, in get_by_host
-     db_mapping = cls._get_by_host_from_db(context, host)
-   File "/usr/local/lib/python2.7/dist-packages/oslo_db/sqlalchemy/enginefacade.py", line 963, in wrapper
-     return fn(*args, **kwargs)
-   File "/opt/stack/nova/nova/objects/host_mapping.py", line 95, in _get_by_host_from_db
-     raise exception.HostMappingNotFound(name=host)
+   File "/usr/local/lib/python2.7/dist-packages/oslo_messaging/rpc/server.py", line 157, in _process_incoming
+     res = self.dispatcher.dispatch(message)
+   File "/usr/local/lib/python2.7/dist-packages/oslo_messaging/rpc/dispatcher.py", line 213, in dispatch
+     return self._do_dispatch(endpoint, method, ctxt, args)
+   File "/usr/local/lib/python2.7/dist-packages/oslo_messaging/rpc/dispatcher.py", line 183, in _do_dispatch
+     result = func(ctxt, **new_args)
+   File "/opt/stack/nova/nova/scheduler/manager.py", line 125, in update_instance_info
+     instance_info)
+   File "/usr/local/lib/python2.7/dist-packages/oslo_concurrency/lockutils.py", line 271, in inner
+     return f(*args, **kwargs)
+   File "/opt/stack/nova/nova/scheduler/host_manager.py", line 768, in update_instance_info
+     self._recreate_instance_info(context, host_name)
+   File "/opt/stack/nova/nova/scheduler/host_manager.py", line 739, in _recreate_instance_info
+     inst_dict = self._get_instances_by_host(context, host_name)
+   File "/opt/stack/nova/nova/scheduler/host_manager.py", line 711, in _get_instances_by_host
+     hm = objects.HostMapping.get_by_host(context, host_name)
+   File "/usr/local/lib/python2.7/dist-packages/oslo_versionedobjects/base.py", line 184, in wrapper
+     result = fn(cls, context, *args, **kwargs)
+   File "/opt/stack/nova/nova/objects/host_mapping.py", line 100, in get_by_host
+     db_mapping = cls._get_by_host_from_db(context, host)
+   File "/usr/local/lib/python2.7/dist-packages/oslo_db/sqlalchemy/enginefacade.py", line 963, in wrapper
+     return fn(*args, **kwargs)
+   File "/opt/stack/nova/nova/objects/host_mapping.py", line 95, in _get_by_host_from_db
+     raise exception.HostMappingNotFound(name=host)
  HostMappingNotFound: Host 'xxx' is not mapped to any cell
- 
  
  Environment
  ===========
  
  $ git log -1
  commit 7280f4fc4c5a2203ac2f59a9df0525488ac2c1ff
  Author: Artom Lifshitz <alifshit@xxxxxxxxxx>
  Date:   Mon Jan 9 18:57:17 2017 +0000
  
-     Libvirt support for tagged volume attachment
-     
-     This patch adds support for tagged volume attachment to the libvirt
-     driver.
-     
-     Change-Id: I8b475992b881db08cf1354299cc86042413074cc
-     Implements: blueprint bp/virt-device-tagged-attach-detach
+     Libvirt support for tagged volume attachment
  
- Explainment
+     This patch adds support for tagged volume attachment to the libvirt
+     driver.
+ 
+     Change-Id: I8b475992b881db08cf1354299cc86042413074cc
+     Implements: blueprint bp/virt-device-tagged-attach-detach
+ 
+ Explanation
  ===========
  I carefully looked at the code nova-compute and nova-scheduler.
  When the nova-compute start to running, the Service.start (nova/service.py) is invoked.
  Then, executes self.manager.init_host(), causing the exception (HostMappingNotFound) to accur.
  When I track the operation of function ComputeManager.init_host (nova/compute/manager.py), self._update_scheduler_instance_info is invoked, that is sending the RPC request to nova-scheduler to execute update_instance_info.
  
  I looked at the code nova-scheduler. the
  SchedulerManager.update_instance_info (nova/scheduler/manager.py) is
  invoked. Then, the self.driver.host_manager.update_instance_info is
  invoked. In the file nova/scheduler/host_manager.py, because of the
  host_name (xxx) is not in self._instance_info,
  self._recreate_instance_info will been invoked. Then, the
  self._get_instances_by_host can not get the instance from table
  host_mappings, the exceptions HostMappingNotFound is raised.
  
  What needs to be configured?

-- 
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/1693979

Title:
  HostMappingNotFound: Host 'xxx' is not mapped to any cell

Status in OpenStack Compute (nova):
  New

Bug description:
  Description
  ===========
  When the nova-compute starts to running, the nova-scheduler log displays many exceptions.
  exceptions:
  [req-4f1d7888-2324-4c9d-b88b-f468159b1364 None None] Exception during message handling (/usr/local/lib/python2.7/dist-packages/oslo_messaging/rpc/server.py:166)
  Traceback (most recent call last):
    File "/usr/local/lib/python2.7/dist-packages/oslo_messaging/rpc/server.py", line 157, in _process_incoming
      res = self.dispatcher.dispatch(message)
    File "/usr/local/lib/python2.7/dist-packages/oslo_messaging/rpc/dispatcher.py", line 213, in dispatch
      return self._do_dispatch(endpoint, method, ctxt, args)
    File "/usr/local/lib/python2.7/dist-packages/oslo_messaging/rpc/dispatcher.py", line 183, in _do_dispatch
      result = func(ctxt, **new_args)
    File "/opt/stack/nova/nova/scheduler/manager.py", line 125, in update_instance_info
      instance_info)
    File "/usr/local/lib/python2.7/dist-packages/oslo_concurrency/lockutils.py", line 271, in inner
      return f(*args, **kwargs)
    File "/opt/stack/nova/nova/scheduler/host_manager.py", line 768, in update_instance_info
      self._recreate_instance_info(context, host_name)
    File "/opt/stack/nova/nova/scheduler/host_manager.py", line 739, in _recreate_instance_info
      inst_dict = self._get_instances_by_host(context, host_name)
    File "/opt/stack/nova/nova/scheduler/host_manager.py", line 711, in _get_instances_by_host
      hm = objects.HostMapping.get_by_host(context, host_name)
    File "/usr/local/lib/python2.7/dist-packages/oslo_versionedobjects/base.py", line 184, in wrapper
      result = fn(cls, context, *args, **kwargs)
    File "/opt/stack/nova/nova/objects/host_mapping.py", line 100, in get_by_host
      db_mapping = cls._get_by_host_from_db(context, host)
    File "/usr/local/lib/python2.7/dist-packages/oslo_db/sqlalchemy/enginefacade.py", line 963, in wrapper
      return fn(*args, **kwargs)
    File "/opt/stack/nova/nova/objects/host_mapping.py", line 95, in _get_by_host_from_db
      raise exception.HostMappingNotFound(name=host)
  HostMappingNotFound: Host 'xxx' is not mapped to any cell

  Environment
  ===========

  $ git log -1
  commit 7280f4fc4c5a2203ac2f59a9df0525488ac2c1ff
  Author: Artom Lifshitz <alifshit@xxxxxxxxxx>
  Date:   Mon Jan 9 18:57:17 2017 +0000

      Libvirt support for tagged volume attachment

      This patch adds support for tagged volume attachment to the libvirt
      driver.

      Change-Id: I8b475992b881db08cf1354299cc86042413074cc
      Implements: blueprint bp/virt-device-tagged-attach-detach

  Explanation
  ===========
  I carefully looked at the code nova-compute and nova-scheduler.
  When the nova-compute start to running, the Service.start (nova/service.py) is invoked.
  Then, executes self.manager.init_host(), causing the exception (HostMappingNotFound) to accur.
  When I track the operation of function ComputeManager.init_host (nova/compute/manager.py), self._update_scheduler_instance_info is invoked, that is sending the RPC request to nova-scheduler to execute update_instance_info.

  I looked at the code nova-scheduler. the
  SchedulerManager.update_instance_info (nova/scheduler/manager.py) is
  invoked. Then, the self.driver.host_manager.update_instance_info is
  invoked. In the file nova/scheduler/host_manager.py, because of the
  host_name (xxx) is not in self._instance_info,
  self._recreate_instance_info will been invoked. Then, the
  self._get_instances_by_host can not get the instance from table
  host_mappings, the exceptions HostMappingNotFound is raised.

  What needs to be configured?

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1693979/+subscriptions