text: Quantum service does not restart after reboot
  Bug Description
  Hi,
  If the Quantum service starts before QPID then it does not listen on port 9696. The reason for is that the connection setup with the RPC hangs with the call: self.connection
  Even when the qpidd service starts this does not work and Quantum is still waiting to get out of this function.
  Thanks
  Gary
  Related branches
  - Openstack Ubuntu Testers: Pending requested 2012-11-30
  - Diff: 79 lines (+68/-0)1 file modifieddebian/changelog (+68/-0)
  I just tried to reproduce this using nova. Specifically, I did ...
  1) Get everything up and running with devstack using qpid
  2) Stop qpidd
  3) Stop nova-network
  4) Start nova-network (and observe it hang at trying to connect to qpidd)
  5) Start qpidd
  6) Observe nova-network connect to qpidd within 20 seconds or so.
  This behavior was repeatedly repduceble for me
  Hi Russel,
  Thanks for taking a look. I did the following:
  1. Installed devstack on fedora
  2. Stopped QPID. nov-network had an exception (below [1] - this is a separate issue and I would guess that one woud want to catch the exception and retry to connect)
  3. When QPID restarts nova-network manages to reconnect again (with an exception and then terminates).
  The example that I had with the nova-network was with packages and not devstack. Any idea why this may be different behaviour?
  I will take a look at devstack with Quantum service and post my findings.
  Thanks
  Gary
  [1] Trace of crach for nova-network when qpid terminates
  2012-11-03 18:54:41 INFO nova.openstack.
  2012-11-03 18:54:41 DEBUG nova.service [-] Creating Consumer connection for Service network from (pid=7002) start /opt/stack/
  Traceback (most recent call last):
  File "/usr/lib/
  readers.
  File "/usr/lib/
  current.
  File "/usr/lib/
  result = function(*args, **kwargs)
  File "/opt/stack/
  server.start()
  File "/opt/stack/
  self.
  File "/opt/stack/
  self.
  File "/opt/stack/
  consumer = TopicConsumer(
  File "/opt/stack/
  {}, name or topic, {})
  File "/opt/stack/
  self.
  File "/opt/stack/
  self.receiver = session.
  File "<string>", line 6, in receiver
  File "/usr/lib/
  raise e
  MalformedAddress: unrecognized characters line:1,18: openstack/
  Removing descriptor: 9
  2012-11-03 18:54:41 CRITICAL nova [-] unrecognized characters line:1,18: openstack/
  2012-11-03 18:54:41 TRACE nova Traceback (most recent call last):
  2012-11-03 18:54:41 TRACE nova File "/opt/stack/
  2012-11-03 18:54:41 TRACE nova ...
  Hi,
  When doing the same test with devstack the quantum service also recovers. I will go back to the packaging version and continue debugging. Any ideas?
  Thanks
  Gary
  Hi,
  I have done a little extra investigation. In the devstack scanerio described above not all of the service recover when QPID is started.
  Thanks
  Gary
  Hi,
  When I remove the call eventlet.
  Thanks
  Gary
  Hi,
  The problem is very easily reproducible. Please use the following script (if the eventlet.
  Thanks
  Gary
  #!/usr/bin/env python
  #import eventlet
  #eventlet.
  import os
  import time
  from qpid.messaging import endpoints
  print "QPID Test!"
  session = None
  consumers = {}
  consumer_thread = None
  default_params = dict(hostname=
  params = {}
  for key in default_
  params.
  broker = params['hostname'] + ":" + str(params['port'])
  # Create the connection - this does not open the connection
  print "======> broker %s" % broker
  connection = endpoints.
  # Check if flags are set and if so set them for the connection
  # before we call open
  connection.username = params['username']
  connection.password = params['password']
  connection.
  connection.
  connection.
  connection.protocol = 'tcp'
  connection.
  while True:
  try:
  except endpoints.
  print 'Unable to connect to AMQP server: %s' % e
  else:
  break
  print 'Connected to AMQP server on %s' % broker
  We certainly cannot remove eventlet.
  An update of what I've seen looking at this ... http://
  Reviewed: https:/
  Committed: http://
  Submitter: Jenkins
  Branch: master
  commit 8eb832715117b9f
  Author: Gary Kotton <email address hidden>
  Date: Thu Nov 8 21:16:01 2012 +0000
  Update latest openstack-common code
  This fixes bug 1073999 (quantum/
  In addition to this the common code is updated.
  Change-Id: I41223963baf347
  Reviewed: https:/
  Committed: http://
  Submitter: Jenkins
  Branch: stable/folsom
  commit 82b1a55cc985192
  Author: Gary Kotton <email address hidden>
  Date: Sat Nov 10 06:59:33 2012 +0000
  Update stable with stable oslo (aka common)
  This fixes bug 1073999
  Change-Id: I191af50a7b0ab6
  Hello Gary, or anyone else affected,
  Accepted quantum quantum - 2012.2.1-0ubuntu1
  ---------------
  allocatio
  ...
  Reviewed: https:/
  Committed: http://
  Submitter: Jenkins
  Branch: stable/folsom
  commit ce516f6a2367b50
  Author: Eric Harney <email address hidden>
  Date: Mon Feb 18 16:15:45 2013 -0500
  Sync rpc changes from oslo stable/folsom
  Contains code from the following oslo commits:
  9f938720 Update common code to support pep 1.3.
  7e36792c kombu's fanout_
  - Fixes bug 1074113
  c3ec615c LOG.exception() should only be used in exception handler
  17c5188c Use pep8 v1.3.3
  d147d9f2 Fix QPID reconnect issues
  - Fixes bug 1073999
  Change-Id: Ia4504cb4d8f210
  The problem is also reproducible with nova-network.
  Simple reproduction:
  - shut down qpidd
  - restart nova-network