VM spawn failed. Error as below.
Logs saved at http://mayamruga/Docs/bugs/<bug-id>
2014-11-03 21:47:47.503 2339 AUDIT nova.compute.manager [req-19144961-bdde-42a1-af1b-7896791594f3 0f0adedc1a284424bc86b4f89c140536 7f422a31d0e14a719697f8881c7ce7e8] [instance: cf8c7cfa-06ad-426b-ab04-4ce39ce8c689] Terminating instance
2014-11-03 21:47:47.858 2339 ERROR nova.compute.manager [req-04b601f4-a2ad-40c1-80c0-a3f027a3f39b 9b0f7f00cbe84789bceee9ede888d7cc 7f422a31d0e14a719697f8881c7ce7e8] [instance: a067ca59-eb29-48af-97c8-f976b706c965] Instance failed to spawn
2014-11-03 21:47:47.858 2339 TRACE nova.compute.manager [instance: a067ca59-eb29-48af-97c8-f976b706c965] Traceback (most recent call last):
2014-11-03 21:47:47.858 2339 TRACE nova.compute.manager [instance: a067ca59-eb29-48af-97c8-f976b706c965] File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 1717, in _spawn
2014-11-03 21:47:47.858 2339 TRACE nova.compute.manager [instance: a067ca59-eb29-48af-97c8-f976b706c965] block_device_info)
2014-11-03 21:47:47.858 2339 TRACE nova.compute.manager [instance: a067ca59-eb29-48af-97c8-f976b706c965] File "/usr/lib/python2.7/dist-packages/nova/virt/libvirt/driver.py", line 2265, in spawn
2014-11-03 21:47:47.858 2339 TRACE nova.compute.manager [instance: a067ca59-eb29-48af-97c8-f976b706c965] block_device_info)
2014-11-03 21:47:47.858 2339 TRACE nova.compute.manager [instance: a067ca59-eb29-48af-97c8-f976b706c965] File "/usr/lib/python2.7/dist-packages/nova/virt/libvirt/driver.py", line 3667, in _create_domain_and_network
2014-11-03 21:47:47.858 2339 TRACE nova.compute.manager [instance: a067ca59-eb29-48af-97c8-f976b706c965] self.plug_vifs(instance, network_info)
2014-11-03 21:47:47.858 2339 TRACE nova.compute.manager [instance: a067ca59-eb29-48af-97c8-f976b706c965] File "/usr/lib/python2.7/dist-packages/nova/virt/libvirt/driver.py", line 858, in plug_vifs
2014-11-03 21:47:47.858 2339 TRACE nova.compute.manager [instance: a067ca59-eb29-48af-97c8-f976b706c965] self.vif_driver.plug(instance, vif)
2014-11-03 21:47:47.858 2339 TRACE nova.compute.manager [instance: a067ca59-eb29-48af-97c8-f976b706c965] File "/usr/lib/python2.7/dist-packages/nova_contrail_vif/contrailvif.py", line 207, in plug
2014-11-03 21:47:47.858 2339 TRACE nova.compute.manager [instance: a067ca59-eb29-48af-97c8-f976b706c965] **kwargs)
2014-11-03 21:47:47.858 2339 TRACE nova.compute.manager [instance: a067ca59-eb29-48af-97c8-f976b706c965] File "/usr/lib/python2.7/dist-packages/contrail_vrouter_api/vrouter_api.py", line 128, in add_port
2014-11-03 21:47:47.858 2339 TRACE nova.compute.manager [instance: a067ca59-eb29-48af-97c8-f976b706c965] result = self._client.AddPort([data])
2014-11-03 21:47:47.858 2339 TRACE nova.compute.manager [instance: a067ca59-eb29-48af-97c8-f976b706c965] File "/usr/lib/python2.7/dist-packages/contrail_vrouter_api/gen_py/instance_service/InstanceService.py", line 150, in AddPort
2014-11-03 21:47:47.858 2339 TRACE nova.compute.manager [instance: a067ca59-eb29-48af-97c8-f976b706c965] return self.recv_AddPort()
2014-11-03 21:47:47.858 2339 TRACE nova.compute.manager [instance: a067ca59-eb29-48af-97c8-f976b706c965] File "/usr/lib/python2.7/dist-packages/contrail_vrouter_api/gen_py/instance_service/InstanceService.py", line 161, in recv_AddPort
2014-11-03 21:47:47.858 2339 TRACE nova.compute.manager [instance: a067ca59-eb29-48af-97c8-f976b706c965] (fname, mtype, rseqid) = self._iprot.readMessageBegin()
2014-11-03 21:47:47.858 2339 TRACE nova.compute.manager [instance: a067ca59-eb29-48af-97c8-f976b706c965] File "/usr/lib/python2.7/dist-packages/thrift/protocol/TBinaryProtocol.py", line 126, in readMessageBegin
2014-11-03 21:47:47.858 2339 TRACE nova.compute.manager [instance: a067ca59-eb29-48af-97c8-f976b706c965] sz = self.readI32()
2014-11-03 21:47:47.858 2339 TRACE nova.compute.manager [instance: a067ca59-eb29-48af-97c8-f976b706c965] File "/usr/lib/python2.7/dist-packages/thrift/protocol/TBinaryProtocol.py", line 206, in readI32
2014-11-03 21:47:47.858 2339 TRACE nova.compute.manager [instance: a067ca59-eb29-48af-97c8-f976b706c965] buff = self.trans.readAll(4)
2014-11-03 21:47:47.858 2339 TRACE nova.compute.manager [instance: a067ca59-eb29-48af-97c8-f976b706c965] File "/usr/lib/python2.7/dist-packages/thrift/transport/TTransport.py", line 58, in readAll
2014-11-03 21:47:47.858 2339 TRACE nova.compute.manager [instance: a067ca59-eb29-48af-97c8-f976b706c965] chunk = self.read(sz - have)
2014-11-03 21:47:47.858 2339 TRACE nova.compute.manager [instance: a067ca59-eb29-48af-97c8-f976b706c965] File "/usr/lib/python2.7/dist-packages/thrift/transport/TTransport.py", line 271, in read
2014-11-03 21:47:47.858 2339 TRACE nova.compute.manager [instance: a067ca59-eb29-48af-97c8-f976b706c965] self.readFrame()
2014-11-03 21:47:47.858 2339 TRACE nova.compute.manager [instance: a067ca59-eb29-48af-97c8-f976b706c965] File "/usr/lib/python2.7/dist-packages/thrift/transport/TTransport.py", line 275, in readFrame
2014-11-03 21:47:47.858 2339 TRACE nova.compute.manager [instance: a067ca59-eb29-48af-97c8-f976b706c965] buff = self.__trans.readAll(4)
2014-11-03 21:47:47.858 2339 TRACE nova.compute.manager [instance: a067ca59-eb29-48af-97c8-f976b706c965] File "/usr/lib/python2.7/dist-packages/thrift/transport/TTransport.py", line 58, in readAll
2014-11-03 21:47:47.858 2339 TRACE nova.compute.manager [instance: a067ca59-eb29-48af-97c8-f976b706c965] chunk = self.read(sz - have)
2014-11-03 21:47:47.858 2339 TRACE nova.compute.manager [instance: a067ca59-eb29-48af-97c8-f976b706c965] File "/usr/lib/python2.7/dist-packages/thrift/transport/TSocket.py", line 103, in read
2014-11-03 21:47:47.858 2339 TRACE nova.compute.manager [instance: a067ca59-eb29-48af-97c8-f976b706c965] buff = self.handle.recv(sz)
2014-11-03 21:47:47.858 2339 TRACE nova.compute.manager [instance: a067ca59-eb29-48af-97c8-f976b706c965] File "/usr/lib/python2.7/dist-packages/eventlet/greenio.py", line 262, in recv
2014-11-03 21:47:47.858 2339 TRACE nova.compute.manager [instance: a067ca59-eb29-48af-97c8-f976b706c965] timeout_exc=socket.timeout("timed out"))
2014-11-03 21:47:47.858 2339 TRACE nova.compute.manager [instance: a067ca59-eb29-48af-97c8-f976b706c965] File "/usr/lib/python2.7/dist-packages/eventlet/hubs/__init__.py", line 151, in trampoline
2014-11-03 21:47:47.858 2339 TRACE nova.compute.manager [instance: a067ca59-eb29-48af-97c8-f976b706c965] listener = hub.add(hub.READ, fileno, current.switch)
2014-11-03 21:47:47.858 2339 TRACE nova.compute.manager [instance: a067ca59-eb29-48af-97c8-f976b706c965] File "/usr/lib/python2.7/dist-packages/eventlet/hubs/epolls.py", line 48, in add
2014-11-03 21:47:47.858 2339 TRACE nova.compute.manager [instance: a067ca59-eb29-48af-97c8-f976b706c965] listener = BaseHub.add(self, evtype, fileno, cb)
2014-11-03 21:47:47.858 2339 TRACE nova.compute.manager [instance: a067ca59-eb29-48af-97c8-f976b706c965] File "/usr/lib/python2.7/dist-packages/eventlet/hubs/hub.py", line 126, in add
2014-11-03 21:47:47.858 2339 TRACE nova.compute.manager [instance: a067ca59-eb29-48af-97c8-f976b706c965] evtype, fileno, evtype))
2014-11-03 21:47:47.858 2339 TRACE nova.compute.manager [instance: a067ca59-eb29-48af-97c8-f976b706c965] RuntimeError: Second simultaneous read on fileno 9 detected. Unless you really know what you're doing, make sure that only one greenthread can read any particular socket. Consider using a pools.Pool. If you do know what you're doing and want to disable this error, call eventlet.debug.hub_prevent_multiple_readers(False)
2014-11-03 21:47:47.858 2339 TRACE nova.compute.manager [instance: a067ca59-eb29-48af-97c8-f976b706c965]
2014-11-03 21:47:48.349 2339 ERROR nova.compute.manager [req-093c796a-27dd-41cd-8372-99ed971fa4d5 0f0adedc1a284424bc86b4f89c140536 7f422a31d0e14a719697f8881c7ce7e8] [instance: c3a7fc44-106b-4c49-ab69-2f97bd71a9cf] Instance failed to spawn
2014-11-03 21:47:48.349 2339 TRACE nova.compute.manager [instance: c3a7fc44-106b-4c49-ab69-2f97bd71a9cf] Traceback (most recent call last):
2014-11-03 21:47:48.349 2339 TRACE nova.compute.manager [instance: c3a7fc44-106b-4c49-ab69-2f97bd71a9cf] File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 1717, in _spawn
2014-11-03 21:47:48.349 2339 TRACE nova.compute.manager [instance: c3a7fc44-106b-4c49-ab69-2f97bd71a9cf] block_device_info)
2014-11-03 21:47:48.349 2339 TRACE nova.compute.manager [instance: c3a7fc44-106b-4c49-ab69-2f97bd71a9cf] File "/usr/lib/python2.7/dist-packages/nova/virt/libvirt/driver.py", line 2265, in spawn
2014-11-03 21:47:48.349 2339 TRACE nova.compute.manager [instance: c3a7fc44-106b-4c49-ab69-2f97bd71a9cf] block_device_info)
2014-11-03 21:47:48.349 2339 TRACE nova.compute.manager [instance: c3a7fc44-106b-4c49-ab69-2f97bd71a9cf] File "/usr/lib/python2.7/dist-packages/nova/virt/libvirt/driver.py", line 3667, in _create_domain_and_network
2014-11-03 21:47:48.349 2339 TRACE nova.compute.manager [instance: c3a7fc44-106b-4c49-ab69-2f97bd71a9cf] self.plug_vifs(instance, network_info)
2014-11-03 21:47:48.349 2339 TRACE nova.compute.manager [instance: c3a7fc44-106b-4c49-ab69-2f97bd71a9cf] File "/usr/lib/python2.7/dist-packages/nova/virt/libvirt/driver.py", line 858, in plug_vifs
2014-11-03 21:47:48.349 2339 TRACE nova.compute.manager [instance: c3a7fc44-106b-4c49-ab69-2f97bd71a9cf] self.vif_driver.plug(instance, vif)
2014-11-03 21:47:48.349 2339 TRACE nova.compute.manager [instance: c3a7fc44-106b-4c49-ab69-2f97bd71a9cf] File "/usr/lib/python2.7/dist-packages/nova_contrail_vif/contrailvif.py", line 207, in plug
2014-11-03 21:47:48.349 2339 TRACE nova.compute.manager [instance: c3a7fc44-106b-4c49-ab69-2f97bd71a9cf] **kwargs)
2014-11-03 21:47:48.349 2339 TRACE nova.compute.manager [instance: c3a7fc44-106b-4c49-ab69-2f97bd71a9cf] File "/usr/lib/python2.7/dist-packages/contrail_vrouter_api/vrouter_api.py", line 128, in add_port
2014-11-03 21:47:48.349 2339 TRACE nova.compute.manager [instance: c3a7fc44-106b-4c49-ab69-2f97bd71a9cf] result = self._client.AddPort([data])
2014-11-03 21:47:48.349 2339 TRACE nova.compute.manager [instance: c3a7fc44-106b-4c49-ab69-2f97bd71a9cf] AttributeError: 'NoneType' object has no attribute 'AddPort'
Pedro, Ajay
Could you analyze this bug. From my limited understanding of python, the code for add_port in vrouter_api.py looks buggy.
https:/ /github. com/Juniper/ contrail- controller/ blob/master/ src/vnsw/ contrail- vrouter- api/contrail_ vrouter_ api/vrouter_ api.py
If we set _client to ‘None’, depending on where we are in the function we can have exception. Isn’t it? Is intention is to run add_port exclusively. If yes, then we should have a lock. I think from the bt it feels like there is some kind of concurrency issue. Any insight will be helpful.
Bug link: /bugs.launchpad .net/juniperope nstack/ +bug/1389157
https:/
thanks
Ashish