← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1758260] Re: Create instance throws TypeError: argument of type 'NoneType' is not iterable in nova-conductor

 

This is the error from the nova-conductor logs:

2018-03-23 16:01:30.287 2213 ERROR oslo_messaging.rpc.server [req-0c91a675-d8e1-4e94-86e8-953a30a082bb c327309640084a138cc26e41ec014bb8 4ab0b5b8aecf4096b32a93a5e954b8a5 - default default] Exception during message handling: TypeError: argument of type 'NoneType' is not iterable
2018-03-23 16:01:30.287 2213 ERROR oslo_messaging.rpc.server Traceback (most recent call last):
2018-03-23 16:01:30.287 2213 ERROR oslo_messaging.rpc.server   File "/usr/lib/python2.7/dist-packages/oslo_messaging/rpc/server.py", line 163, in _process_incoming
2018-03-23 16:01:30.287 2213 ERROR oslo_messaging.rpc.server     res = self.dispatcher.dispatch(message)
2018-03-23 16:01:30.287 2213 ERROR oslo_messaging.rpc.server   File "/usr/lib/python2.7/dist-packages/oslo_messaging/rpc/dispatcher.py", line 220, in dispatch
2018-03-23 16:01:30.287 2213 ERROR oslo_messaging.rpc.server     return self._do_dispatch(endpoint, method, ctxt, args)
2018-03-23 16:01:30.287 2213 ERROR oslo_messaging.rpc.server   File "/usr/lib/python2.7/dist-packages/oslo_messaging/rpc/dispatcher.py", line 190, in _do_dispatch
2018-03-23 16:01:30.287 2213 ERROR oslo_messaging.rpc.server     result = func(ctxt, **new_args)
2018-03-23 16:01:30.287 2213 ERROR oslo_messaging.rpc.server   File "/usr/lib/python2.7/dist-packages/nova/conductor/manager.py", line 1268, in schedule_and_build_instances
2018-03-23 16:01:30.287 2213 ERROR oslo_messaging.rpc.server     limits=host.limits, host_list=host_list)
2018-03-23 16:01:30.287 2213 ERROR oslo_messaging.rpc.server   File "/usr/lib/python2.7/dist-packages/nova/compute/rpcapi.py", line 1234, in build_and_run_instance
2018-03-23 16:01:30.287 2213 ERROR oslo_messaging.rpc.server     cctxt.cast(ctxt, 'build_and_run_instance', **kwargs)
2018-03-23 16:01:30.287 2213 ERROR oslo_messaging.rpc.server   File "/usr/lib/python2.7/dist-packages/oslo_messaging/rpc/client.py", line 152, in cast
2018-03-23 16:01:30.287 2213 ERROR oslo_messaging.rpc.server     self.transport._send(self.target, msg_ctxt, msg, retry=self.retry)
2018-03-23 16:01:30.287 2213 ERROR oslo_messaging.rpc.server   File "/usr/lib/python2.7/dist-packages/oslo_messaging/transport.py", line 131, in _send
2018-03-23 16:01:30.287 2213 ERROR oslo_messaging.rpc.server     timeout=timeout, retry=retry)
2018-03-23 16:01:30.287 2213 ERROR oslo_messaging.rpc.server   File "/usr/lib/python2.7/dist-packages/oslo_messaging/_drivers/amqpdriver.py", line 559, in send
2018-03-23 16:01:30.287 2213 ERROR oslo_messaging.rpc.server     retry=retry)
2018-03-23 16:01:30.287 2213 ERROR oslo_messaging.rpc.server   File "/usr/lib/python2.7/dist-packages/oslo_messaging/_drivers/amqpdriver.py", line 520, in _send
2018-03-23 16:01:30.287 2213 ERROR oslo_messaging.rpc.server     with self._get_connection(rpc_common.PURPOSE_SEND) as conn:
2018-03-23 16:01:30.287 2213 ERROR oslo_messaging.rpc.server   File "/usr/lib/python2.7/dist-packages/oslo_messaging/_drivers/amqpdriver.py", line 475, in _get_connection
2018-03-23 16:01:30.287 2213 ERROR oslo_messaging.rpc.server     purpose=purpose)
2018-03-23 16:01:30.287 2213 ERROR oslo_messaging.rpc.server   File "/usr/lib/python2.7/dist-packages/oslo_messaging/_drivers/common.py", line 399, in __init__
2018-03-23 16:01:30.287 2213 ERROR oslo_messaging.rpc.server     self.connection = connection_pool.get()
2018-03-23 16:01:30.287 2213 ERROR oslo_messaging.rpc.server   File "/usr/lib/python2.7/dist-packages/oslo_messaging/_drivers/pool.py", line 107, in get
2018-03-23 16:01:30.287 2213 ERROR oslo_messaging.rpc.server     return self.create()
2018-03-23 16:01:30.287 2213 ERROR oslo_messaging.rpc.server   File "/usr/lib/python2.7/dist-packages/oslo_messaging/_drivers/pool.py", line 144, in create
2018-03-23 16:01:30.287 2213 ERROR oslo_messaging.rpc.server     return self.connection_cls(self.conf, self.url, purpose)
2018-03-23 16:01:30.287 2213 ERROR oslo_messaging.rpc.server   File "/usr/lib/python2.7/dist-packages/oslo_messaging/_drivers/impl_rabbit.py", line 525, in __init__
2018-03-23 16:01:30.287 2213 ERROR oslo_messaging.rpc.server     self._parse_url_hostname(host.hostname) or '',
2018-03-23 16:01:30.287 2213 ERROR oslo_messaging.rpc.server   File "/usr/lib/python2.7/dist-packages/oslo_messaging/_drivers/impl_rabbit.py", line 676, in _parse_url_hostname
2018-03-23 16:01:30.287 2213 ERROR oslo_messaging.rpc.server     return '[%s]' % hostname if ':' in hostname else hostname
2018-03-23 16:01:30.287 2213 ERROR oslo_messaging.rpc.server TypeError: argument of type 'NoneType' is not iterable
2018-03-23 16:01:30.287 2213 ERROR oslo_messaging.rpc.server 

Looking at your list_cells output, the transport URL for cell1 is
incomplete (there is no host specified):

rabbit://openstack:****@

So that's likely the problem. The nova-conductor service is trying to
RPC cast to cell1 but the transport URL is incomplete.

** Changed in: nova
       Status: New => Invalid

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

Title:
  Create instance throws TypeError: argument of type 'NoneType' is not
  iterable in nova-conductor

Status in OpenStack Compute (nova):
  Invalid

Bug description:
  Installed a brand new Openstack Queenson Ubuntu 16.04 following the
  OpenStack documentation.

  I have 1 controller and 1 compute (kvm) nodes so far, no storage yet.
  All are registered properly:

  ```
  $ sudo -u nova nova-manage --use-json cell_v2 list_cells
  +-------+--------------------------------------+--------------------------+------------------------------------------------+
  |  Name |                 UUID                 |      Transport URL       |              Database Connection               |
  +-------+--------------------------------------+--------------------------+------------------------------------------------+
  | cell0 | 00000000-0000-0000-0000-000000000000 |          none:/          | mysql+pymysql://nova:****@localhost/nova_cell0 |
  | cell1 | d30a8c57-dad1-406f-9ff1-50d93dc70b2b | rabbit://openstack:****@ |    mysql+pymysql://nova:****@localhost/nova    |
  +-------+--------------------------------------+--------------------------+------------------------------------------------+
  ```
  And:
  ```
  sudo -u nova nova-manage cell_v2 list_hosts
  +-----------+--------------------------------------+----------+
  | Cell Name |              Cell UUID               | Hostname |
  +-----------+--------------------------------------+----------+
  |   cell1   | d30a8c57-dad1-406f-9ff1-50d93dc70b2b | grunt01  |
  +-----------+--------------------------------------+----------+
  ```

  When I create an instance:

  ```
  $ openstack server create --flavor m1.nano --image cirros \
    --nic net-id=$(openstack network show demo -c id -f value) \
    --security-group default
    --key-name xxxx
    first -test
  ```

  The image gets created but stays stuck in the BUILD state.

  The logs on the compute noad (/var/log/nova-compute.log) never get any
  entry written.

  The version for nova is:

  ```
  $ dpkg -l | grep nova
  ii  nova-api                            2:17.0.0-0ubuntu1~cloud0                   all          OpenStack Compute - API frontend
  ii  nova-common                         2:17.0.0-0ubuntu1~cloud0                   all          OpenStack Compute - common files
  ii  nova-conductor                      2:17.0.0-0ubuntu1~cloud0                   all          OpenStack Compute - conductor service
  ii  nova-consoleauth                    2:17.0.0-0ubuntu1~cloud0                   all          OpenStack Compute - Console Authenticator
  ii  nova-novncproxy                     2:17.0.0-0ubuntu1~cloud0                   all          OpenStack Compute - NoVNC proxy
  ii  nova-placement-api                  2:17.0.0-0ubuntu1~cloud0                   all          OpenStack Compute - placement API frontend
  ii  nova-scheduler                      2:17.0.0-0ubuntu1~cloud0                   all          OpenStack Compute - virtual machine scheduler
  ii  python-nova                         2:17.0.0-0ubuntu1~cloud0                   all          OpenStack Compute Python libraries
  ii  python-novaclient                   2:9.1.1-0ubuntu1~cloud0                    all          client library for OpenStack Compute API - Python 2.7
  ```

  logs and config attached (sosreport)

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


References