[Bug 1515278] Re: [SRU] rabbit queues should expire when unused

Edward Hope-Morley edward.hope-morley at canonical.com
Thu Mar 23 11:44:40 UTC 2017


** Tags removed: sts-sru
** Tags added: sts-sru-done

-- 
You received this bug notification because you are a member of Ubuntu
OpenStack, which is subscribed to python-oslo.messaging in Ubuntu.
https://bugs.launchpad.net/bugs/1515278

Title:
  [SRU] rabbit queues should expire when unused

Status in Ubuntu Cloud Archive:
  Invalid
Status in Ubuntu Cloud Archive liberty series:
  Fix Released
Status in oslo.messaging:
  Fix Released
Status in python-oslo.messaging package in Ubuntu:
  Fix Released
Status in oslo.messaging source package in Trusty:
  Confirmed
Status in python-oslo.messaging source package in Wily:
  Fix Released

Bug description:
  [Description]

  RabbitMQ supports queue-level TTLs as described here:

  https://www.rabbitmq.com/ttl.html#queue-ttl

  This should be used when declaring queues in order to clean up queues
  that are orphaned for various reasons.

  This is an important complement to auto_delete queues.  Queues marked
  auto_delete are only deleted if a consumer existed at some point, and
  then disconnected, resulting in zero consumers.

  [Impact]

  Consider the following scenario: a client declares a queue
  (auto_delete) and binds it to a fan out exchange, but before the
  client can consume from the queue, it dies.

  Because there was never (and will never be) a consumer of this queue,
  the auto_delete logic does not fire.  The queue will live forever, and
  will collect a copy of every message that is sent to the bound fanout
  exchange.  Given enough published messages to the exchange, the queue
  will eventually consume all available memory on the broker.

  This is bad and we should avoid it by setting a reasonable TTL.

  [Test Case]

  * Deploy a new cinder service unit
  * Create a volume 
  * Destroy the new cinder service unit.
  * List the current active queues:

  rabbitmqctl -p openstack list_queues messages consumers name

  811 0 q-agent-notifier-security_group update_fanout_c3c4f4d4fc774322938357952ab6d252 
  3352 0 cinder-volume_fanout_49a14d5511dc4c8c935904eb299a06a8 
  3352 0 cinder-volume_fanout_634a3e584c064a788676fb29fbf7db23 
  3352 0 cinder-volume_fanout_ada4f2368cb74d7389998d0adbd15f88 
  3352 0 cinder-volume_fanout_e896e25b029c4cbd97037909c34803db

  Those queues with 0 consumers will grow and remain there forever.

  After applying the patch, those queues are removed from the exchange after
  10 minutes.

  
  [Regression Potential]

  * Not identified.

To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-archive/+bug/1515278/+subscriptions



More information about the Ubuntu-openstack-bugs mailing list