Set RabbitMQ policies

Bug #1429124 reported by Alexey Khivin
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Fix Released
High
Alexander Nevenchannyy
5.1.x
Won't Fix
High
Alexander Nevenchannyy
6.0.x
Fix Released
High
Alexander Nevenchannyy
6.1.x
Fix Released
High
Alexander Nevenchannyy

Bug Description

As noted in https://bugs.launchpad.net/fuel/6.0.x/+bug/1396688 we need to set policies for collecting garbage in RabbitMQ

So we need to set policies for RabbitMQ server

rabbitmqctl set_policy heat_rpc_expire "^heat-engine-listener\\." '{"expires":3600000,"ha-mode":"all"}' --apply-to all --priority 1
rabbitmqctl set_policy results_expire "^results\\." '{"expires":3600000,"ha-mode":"all"}' --apply-to all --priority 1
rabbitmqctl set_policy tasks_expire "^tasks\\." '{"expires":3600000,"ha-mode":"all"}' --apply-to all --priority 1

this one is for 6.0.x and for older versions only
rabbitmqctl set_policy heat_rpc_expire_old "^........-....-....-....-............" '{"expires":3600000,"ha-mode":"all"}' --apply-to all --priority 1

priority 1 is set to overwrite default 0 level policy in the fuel deployment

Alexey Khivin (akhivin)
Changed in fuel:
assignee: nobody → Fuel Library Team (fuel-library)
Alexey Khivin (akhivin)
summary: - Add policies to RabbitMQ
+ Set RabbitMQ policies
Changed in fuel:
status: New → Triaged
milestone: none → 6.1
tags: added: low-hanging-fruit
Revision history for this message
Alexey Khivin (akhivin) wrote :

rabbitmqctl set_policy command sets runtime parameters for a whole cluster and policies are not stored in the config as i know

Revision history for this message
Bogdan Dobrelya (bogdando) wrote :

That means that OCF script should apply this "hack" for heat each time it starts the rabbit

Revision history for this message
Bogdan Dobrelya (bogdando) wrote :

Though, the issue is that then we start rabbit for the first time, there is no heat queues yet

Revision history for this message
Alexey Khivin (akhivin) wrote :

This policies will affect all queues, already existed and newly created

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to fuel-library (master)

Fix proposed to branch: master
Review: https://review.openstack.org/162197

Changed in fuel:
assignee: Fuel Library Team (fuel-library) → Alexander Nevenchannyy (anevenchannyy)
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to fuel-library (master)

Reviewed: https://review.openstack.org/162197
Committed: https://git.openstack.org/cgit/stackforge/fuel-library/commit/?id=b280d2051c581c883fb7ffb895d4dc16581d2a29
Submitter: Jenkins
Branch: master

commit b280d2051c581c883fb7ffb895d4dc16581d2a29
Author: Alexander Nevenchannyy <email address hidden>
Date: Fri Mar 6 18:30:40 2015 +0300

    Add RabbitMQ expiration policies.

    This is fix must solve problem with growing number of RabbitMQ queues.

    Change-Id: Idb575cbd446730c10b8de4adad0df843276cf390
    Closes-bug: #1429124

Changed in fuel:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to fuel-library (stable/6.0)

Fix proposed to branch: stable/6.0
Review: https://review.openstack.org/164790

Revision history for this message
Anastasia Palkina (apalkina) wrote :

Verified on ISO #304 for Ubuntu with Neutron, Vlan

"build_id": "2015-04-10_22-54-31", "ostf_sha": "c2a76a60ec4ebbd78e508216c2e12787bf25e423", "build_number": "304", "release_versions": {"2014.2-6.1": {"VERSION": {"build_id": "2015-04-10_22-54-31", "ostf_sha": "c2a76a60ec4ebbd78e508216c2e12787bf25e423", "build_number": "304", "api": "1.0", "nailgun_sha": "69547a71abb4696df7e6f44b1f7864b0535f2df7", "openstack_version": "2014.2-6.1", "production": "docker", "python-fuelclient_sha": "9208ff4a08dcb674ce2df132399a5aa3ddfac21c", "astute_sha": "d96a80b63198a578b2c159edbd76048819039eb0", "feature_groups": ["mirantis"], "release": "6.1", "fuelmain_sha": "8daac234aea6ac0a98f27871deec039f74f6fdab", "fuellib_sha": "867028fe78837dc2e4635a2cbb976782856964d0"}}}, "auth_required": true, "api": "1.0", "nailgun_sha": "69547a71abb4696df7e6f44b1f7864b0535f2df7", "openstack_version": "2014.2-6.1", "production": "docker", "python-fuelclient_sha": "9208ff4a08dcb674ce2df132399a5aa3ddfac21c", "astute_sha": "d96a80b63198a578b2c159edbd76048819039eb0", "feature_groups": ["mirantis"], "release": "6.1", "fuelmain_sha": "8daac234aea6ac0a98f27871deec039f74f6fdab", "fuellib_sha": "867028fe78837dc2e4635a2cbb976782856964d0"

root@node-14:~# rabbitmqctl list_policies
Listing policies ...
/ ha-all all . {"ha-mode":"all","ha-sync-mode":"automatic"} 0
/ heat_rpc_expire all ^heat-engine-listener\\. {"expires":3600000,"ha-mode":"all","ha-sync-mode":"automatic"} 1
/ results_expire all ^results\\. {"expires":3600000,"ha-mode":"all","ha-sync-mode":"automatic"} 1
/ tasks_expire all ^tasks\\. {"expires":3600000,"ha-mode":"all","ha-sync-mode":"automatic"} 1
...done.
root@node-14:~# exit
root@node-15:~# rabbitmqctl list_policies
Listing policies ...
/ ha-all all . {"ha-mode":"all","ha-sync-mode":"automatic"} 0
/ heat_rpc_expire all ^heat-engine-listener\\. {"expires":3600000,"ha-mode":"all","ha-sync-mode":"automatic"} 1
/ results_expire all ^results\\. {"expires":3600000,"ha-mode":"all","ha-sync-mode":"automatic"} 1
/ tasks_expire all ^tasks\\. {"expires":3600000,"ha-mode":"all","ha-sync-mode":"automatic"} 1
...done.
root@node-15:~# exit
root@node-16:~# rabbitmqctl list_policies
Listing policies ...
/ ha-all all . {"ha-mode":"all","ha-sync-mode":"automatic"} 0
/ heat_rpc_expire all ^heat-engine-listener\\. {"expires":3600000,"ha-mode":"all","ha-sync-mode":"automatic"} 1
/ results_expire all ^results\\. {"expires":3600000,"ha-mode":"all","ha-sync-mode":"automatic"} 1
/ tasks_expire all ^tasks\\. {"expires":3600000,"ha-mode":"all","ha-sync-mode":"automatic"} 1
...done.
root@node-16:~#

Revision history for this message
OSCI Robot (oscirobot) wrote :

NOTE: Changeset is not merged, created temporary package repository.
RPM package fuel-library6.0 has been built for project stackforge/fuel-library.
Files placed in repository:
fuel-ha-utils6.0-6.0.0-6201.2.gerrit164790.3.git46ccc9d.noarch.rpm
fuel-library6.0-6.0.0-6201.2.gerrit164790.3.git46ccc9d.noarch.rpm
Repository URL: http://osci-obs.vm.mirantis.net:82/centos-fuel-6.0-updates-stable-LP1429124/centos .

Revision history for this message
OSCI Robot (oscirobot) wrote :

NOTE: Changeset is not merged, created temporary package repository.
DEB package fuel-library has been built for project stackforge/fuel-library.
Files placed in repository:
fuel-ha-utils6.0_6.0.0-6201.2.gerrit164790.3.git46ccc9d_all.deb
fuel-library6.0_6.0.0-6201.2.gerrit164790.3.git46ccc9d_all.deb
Repository URL: http://osci-obs.vm.mirantis.net:82/ubuntu-fuel-6.0-updates-stable-LP1429124/ubuntu .

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to fuel-library (stable/6.0)

Reviewed: https://review.openstack.org/164790
Committed: https://git.openstack.org/cgit/stackforge/fuel-library/commit/?id=46ccc9dea60cc28b31bb3282aa82fe3059e0700a
Submitter: Jenkins
Branch: stable/6.0

commit 46ccc9dea60cc28b31bb3282aa82fe3059e0700a
Author: Alexandr Nevenchannyy <email address hidden>
Date: Mon Mar 16 20:13:49 2015 +0300

    Add RabbitMQ expiration policies.

    This is fix must solve problem with growing number of RabbitMQ queues.
    Change-Id: Idb575cbd446730c10b8de4adad0df843276cf390
    Closes-bug: #1429124

Revision history for this message
OSCI Robot (oscirobot) wrote :

Changeset merged. Package placed on primary repository.
RPM package fuel-library6.0 has been built for project stackforge/fuel-library.
Files placed in repository:
fuel-ha-utils6.0-6.0.0-6203.1.noarch.rpm
fuel-library6.0-6.0.0-6203.1.noarch.rpm
Repository URL: http://osci-obs.vm.mirantis.net:82/centos-fuel-6.0-updates-stable/centos .

Revision history for this message
OSCI Robot (oscirobot) wrote :

Changeset merged. Package placed on primary repository.
DEB package fuel-library has been built for project stackforge/fuel-library.
Files placed in repository:
fuel-ha-utils6.0_6.0.0-6203.1_all.deb
fuel-library6.0_6.0.0-6203.1_all.deb
Repository URL: http://osci-obs.vm.mirantis.net:82/ubuntu-fuel-6.0-updates-stable/ubuntu .

Revision history for this message
Vadim Rovachev (vrovachev) wrote :

Version 6.0. Reopen.
Patch for 6.0 version https://review.openstack.org/#/c/164790/3 have policy:
rabbitmqctl set_policy heat_rpc_expire_old "^........-....-....-....-............" '{"expires":3600000,"ha-mode":"all","ha-mode":"all","ha-sync-mode":"automatic"}' --apply-to all --priority 1
But we have duplicate "ha-mode":"all" in body of this body, and this policy not apply.

tags: added: done release-notes
tags: added: 6.0-mu-5
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to fuel-library (stable/6.0)

Fix proposed to branch: stable/6.0
Review: https://review.openstack.org/217304

Revision history for this message
OSCI Robot (oscirobot) wrote :

NOTE: Changeset is not merged, created temporary package repository.
RPM package fuel-library6.0 has been built for project stackforge/fuel-library.
Files placed in repository:
fuel-ha-utils6.0-6.0.0-6207.2.gerrit217304.1.git7edcfef.noarch.rpm
fuel-library6.0-6.0.0-6207.2.gerrit217304.1.git7edcfef.noarch.rpm
Repository URL: http://osci-obs.vm.mirantis.net:82/centos-fuel-6.0-updates-stable-LP1429124/centos .

Revision history for this message
OSCI Robot (oscirobot) wrote :

NOTE: Changeset is not merged, created temporary package repository.
DEB package fuel-library has been built for project stackforge/fuel-library.
Files placed in repository:
fuel-ha-utils6.0_6.0.0-6207.2.gerrit217304.1.git7edcfef_all.deb
fuel-library6.0_6.0.0-6207.2.gerrit217304.1.git7edcfef_all.deb
Repository URL: http://osci-obs.vm.mirantis.net:82/ubuntu-fuel-6.0-updates-stable-LP1429124/ubuntu .

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to fuel-library (stable/6.0)

Reviewed: https://review.openstack.org/217304
Committed: https://git.openstack.org/cgit/stackforge/fuel-library/commit/?id=7edcfef00463b9822e7e9eb3a2e6a650e35ba588
Submitter: Jenkins
Branch: stable/6.0

commit 7edcfef00463b9822e7e9eb3a2e6a650e35ba588
Author: Alexandr Nevenchannyy <email address hidden>
Date: Wed Aug 26 18:47:53 2015 +0300

    Fix RabbitMQ heat queue expiration policies.

    Fix duplicated "ha-mode":"all" parameter in rabbitmq OCF script
    from commit https://review.openstack.org/#/c/164790/3

    Change-Id: I50903a61ed406f6ee3b43f9b4641dfab4245dd3f
    Closes-bug: #1429124

Revision history for this message
OSCI Robot (oscirobot) wrote :

Changeset merged. Package placed on primary repository.
RPM package fuel-library6.0 has been built for project stackforge/fuel-library.
Files placed in repository:
fuel-ha-utils6.0-6.0.0-6207.1.noarch.rpm
fuel-library6.0-6.0.0-6207.1.noarch.rpm
Repository URL: http://osci-obs.vm.mirantis.net:82/centos-fuel-6.0-updates-stable/centos .

Revision history for this message
OSCI Robot (oscirobot) wrote :

Changeset merged. Package placed on primary repository.
DEB package fuel-library has been built for project stackforge/fuel-library.
Files placed in repository:
fuel-ha-utils6.0_6.0.0-6207.1_all.deb
fuel-library6.0_6.0.0-6207.1_all.deb
Repository URL: http://osci-obs.vm.mirantis.net:82/ubuntu-fuel-6.0-updates-stable/ubuntu .

tags: added: 6.0
removed: 6.0-mu-5
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.