Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for enabled plugins config using enabled_plugins file #777

Merged

Conversation

hjensas
Copy link
Contributor

@hjensas hjensas commented Feb 12, 2019

Pull Request (PR) description

Support configuring plugins using enabled_plugins file

Adds optional support to configure rabbitmq plugins by
writing configuration file (/etc/rabbitmq/enabled_plugins).

New parameter $use_config_file_for_plugins (boolean, default:
false) Can be used to enable this feature. When enabled it
replaces the use of the rabbitmqplugins provider to enable
plugins.

This Pull Request (PR) fixes the following issues

Fixes #775

@hjensas hjensas changed the title Add support for enabled plugins config Add support for enabled plugins config using enabled_plugins file Feb 12, 2019
Enabling the rabbitmq_managemnt interface and installing the
rabbitmqadmin client was both controlled by the admin_enable
parameter.

Adds option enable_management (default: false). When this is
set to true, and admin_enable is false the rabbitmq_management
plugin is enabled, but the rabbitmqadmin client is not
installed.

For backward compatiblity the rabbitmq_management plugin is
also enabled when admin_enable is set to true.

Related voxpupuli#775
@hjensas hjensas force-pushed the add-support-for-enabled-plugins-config branch 3 times, most recently from 583bac3 to d6c8263 Compare February 13, 2019 01:54
Adds optional support to configure rabbitmq plugins by
writing configuration file (/etc/rabbitmq/enabled_plugins).

New parameter $use_config_file_for_plugins (boolean, default:
false) Can be used to enable this feature. When enabled it
replaces the use of the rabbitmqplugins provider to enable
plugins.

Fixes voxpupuli#775
@hjensas hjensas force-pushed the add-support-for-enabled-plugins-config branch from d6c8263 to 2e761f0 Compare February 13, 2019 01:58
@wyardley wyardley added the enhancement New feature or request label Feb 13, 2019
@mbaldessari
Copy link
Contributor

I tested these two patches on a rabbitmq cluster managed by pacemaker and they worked for me:

pcs status |grep rabbitmq-cluster
   rabbitmq-bundle-0    (ocf::heartbeat:rabbitmq-cluster):      Started controller-0
   rabbitmq-bundle-1    (ocf::heartbeat:rabbitmq-cluster):      Started controller-1
   rabbitmq-bundle-2    (ocf::heartbeat:rabbitmq-cluster):      Started controller-2

curl -u guest:***http://localhost:15672/api/queues
[{"messages_details":{"rate":0.4},"messages":14,"messages_unacknowledged_details":{"rate":0.0},"messages_unacknowledged":0,"messages_ready_details":{"rate":0.4},"messages_ready":14,"reductions_details":{"rate":197.4},"reductions":8307,"message_stats":{"publish_details":{"rate":0.2},"publish":14},"node":"rabbit@controller-0","arguments":{},"exclusive":false,"auto_delete":false,"durable":false,"vhost":"/","name":"notifications.info","message_bytes_paged_out":0,"messages_paged_out":0,"backing_queue_status":{"mode":"default","q1":0,"q2":0,"delta":["delta","undefined",0,0,"undefined"],"q3":0,"q4":14,"len":14,"target_ram_count":"infinity","next_seq_id":14,"avg_ingress_rate":0.3077116436405823,"avg_egress_rate":0.0,"avg_ack_ingress_rate":0.0,"avg_ack_egress_rate":0.0,"mirror_seen":0,"mirror_senders":2},"head_message_timestamp":null,"message_bytes_persistent":0,"message_bytes_ram":6938,"message_bytes_unacknowledged":0,"message_bytes_ready":6938,"message_bytes":6938,"messages_persistent":0,"messages_unacknowledged_ram":0,"messages_ready_ram":14,"messages_ram":14,"garbage_collection":{"minor_gcs":12,"fullsweep_after":65535,"min_heap_size":233,"min_bin_vheap_size":46422},"state":"running","recoverable_slaves":null,"synchronised_slave_nodes":["rabbit@controller-2"],"slave_nodes":["rabbit@controller-2"],"memory":55688,"consumer_utilisation":null,"consumers":0,"exclusive_consumer_tag":null,"policy":"ha-all"}]

Set the following hiera keys for the mgmt plugin:

rabbitmq::management_enable: true
rabbitmq::use_config_file_for_plugins: true
rabbitmq::management_ip_address: 127.0.0.1 

Thanks!

@EmilienM EmilienM merged commit 48e8723 into voxpupuli:master Feb 14, 2019
@hjensas hjensas deleted the add-support-for-enabled-plugins-config branch February 14, 2019 15:35
rdoproject pushed a commit to rdo-packages/puppet-rabbitmq-distgit that referenced this pull request Feb 14, 2019
Pull in changes from:
  voxpupuli/puppet-rabbitmq#777

This allow us to configure plugins using the config file
(/etc/rabbitmq/enabled_plugins) and makes it possible to
enable the rabbitmq_management plugin without also
downloading and installing rabbitmqadmin.

Change-Id: I6c35eec19407d77f96cacd7094580198215adc24
Related-Bug: #1815675
apevec pushed a commit to redhat-openstack/rdoinfo that referenced this pull request Feb 18, 2019
Pull in changes from:
  voxpupuli/puppet-rabbitmq#777

This allow us to configure plugins using the config file
(/etc/rabbitmq/enabled_plugins) and makes it possible to
enable the rabbitmq_management plugin without also
downloading and installing rabbitmqadmin.

Change-Id: I3c714c5f1a800b9047533ca1a3f9feab42b575e4
Related-Bug: #1815675
apevec pushed a commit to redhat-openstack/rdoinfo that referenced this pull request Feb 18, 2019
Pull in changes from:
  voxpupuli/puppet-rabbitmq#777

This allow us to configure plugins using the config file
(/etc/rabbitmq/enabled_plugins) and makes it possible to
enable the rabbitmq_management plugin without also
downloading and installing rabbitmqadmin.

Change-Id: I579b80b9300cef6249629b905b33404d94c980db
Related-Bug: #1815675
openstack-gerrit pushed a commit to openstack-archive/tripleo-heat-templates that referenced this pull request Feb 19, 2019
Enable the RabbitMQ managment plugin. RabbitMQ managment
will listen on localhost (127.0.0.1) only.

NOTE: This depend on this upstream change:
  voxpupuli/puppet-rabbitmq#777

Also to optimize for performance:
 - Disables message rates in the management plugin.
 - Raises the collect_statistics_interval from 5000ms to
   30000ms.

Related-Bug: #1815675
Change-Id: I5e73660e23fef15d1cae4c89d8b45b2456b0a110
openstack-gerrit pushed a commit to openstack/openstack that referenced this pull request Feb 19, 2019
* Update tripleo-heat-templates from branch 'master'
  - Merge "Enable rabbitmq_management plugin"
  - Enable rabbitmq_management plugin
    
    Enable the RabbitMQ managment plugin. RabbitMQ managment
    will listen on localhost (127.0.0.1) only.
    
    NOTE: This depend on this upstream change:
      voxpupuli/puppet-rabbitmq#777
    
    Also to optimize for performance:
     - Disables message rates in the management plugin.
     - Raises the collect_statistics_interval from 5000ms to
       30000ms.
    
    Related-Bug: #1815675
    Change-Id: I5e73660e23fef15d1cae4c89d8b45b2456b0a110
openstack-gerrit pushed a commit to openstack-archive/tripleo-heat-templates that referenced this pull request Aug 8, 2019
Enable the RabbitMQ managment plugin. RabbitMQ managment
will listen on localhost (127.0.0.1) only.

NOTE: This depend on this upstream change:
  voxpupuli/puppet-rabbitmq#777

Also to optimize for performance:
 - Disables message rates in the management plugin.
 - Raises the collect_statistics_interval from 5000ms to
   30000ms.

NB: Cherry-pick was not clean so I tested this manually on queens
and got the expected result:
~]# pcs status |grep -e 'rabbitmq.*Started'
  rabbitmq-bundle-0    (ocf::heartbeat:rabbitmq-cluster):      Started controller-0
  rabbitmq-bundle-1    (ocf::heartbeat:rabbitmq-cluster):      Started controller-1
  rabbitmq-bundle-2    (ocf::heartbeat:rabbitmq-cluster):      Started controller-2

~]# curl -sS  -u guest:$(hiera -c /etc/puppet/hiera.yaml rabbitmq::default_pass) http://127.0.0.1:15672/api/queues/ 2> /dev/null  |jq . |head -n5
[
  {
    "memory": 10936,
    "idle_since": "2019-08-08 8:49:23",
    "consumer_utilisation": null,

Related-Bug: #1815675
Change-Id: I5e73660e23fef15d1cae4c89d8b45b2456b0a110
(cherry-picked from commit d6727af
openstack-gerrit pushed a commit to openstack-archive/tripleo-heat-templates that referenced this pull request Aug 9, 2019
Enable the RabbitMQ managment plugin. RabbitMQ managment
will listen on localhost (127.0.0.1) only.

NOTE: This depend on this upstream change:
  voxpupuli/puppet-rabbitmq#777

Also to optimize for performance:
 - Disables message rates in the management plugin.
 - Raises the collect_statistics_interval from 5000ms to
   30000ms.

NB: Cherry-pick was not clean so I tested this manually on queens
and got the expected result:
~]# pcs status |grep -e 'rabbitmq.*Started'
  rabbitmq-bundle-0    (ocf::heartbeat:rabbitmq-cluster):      Started controller-0
  rabbitmq-bundle-1    (ocf::heartbeat:rabbitmq-cluster):      Started controller-1
  rabbitmq-bundle-2    (ocf::heartbeat:rabbitmq-cluster):      Started controller-2

~]# curl -sS  -u guest:$(hiera -c /etc/puppet/hiera.yaml rabbitmq::default_pass) http://127.0.0.1:15672/api/queues/ 2> /dev/null  |jq . |head -n5
[
  {
    "memory": 10936,
    "idle_since": "2019-08-08 8:49:23",
    "consumer_utilisation": null,

Related-Bug: #1815675
Change-Id: I5e73660e23fef15d1cae4c89d8b45b2456b0a110
(cherry-picked from commit d6727af
cegeka-jenkins pushed a commit to cegeka/puppet-rabbitmq that referenced this pull request Mar 26, 2021
…xpupuli#777)

* Support enabling rabbitmq_management without rabbitmqadmin

Enabling the rabbitmq_managemnt interface and installing the
rabbitmqadmin client was both controlled by the admin_enable
parameter.

Adds option enable_management (default: false). When this is
set to true, and admin_enable is false the rabbitmq_management
plugin is enabled, but the rabbitmqadmin client is not
installed.

For backward compatiblity the rabbitmq_management plugin is
also enabled when admin_enable is set to true.

Related voxpupuli#775

* Support configuring plugins using enabled_plugins file

Adds optional support to configure rabbitmq plugins by
writing configuration file (/etc/rabbitmq/enabled_plugins).

New parameter $use_config_file_for_plugins (boolean, default:
false) Can be used to enable this feature. When enabled it
replaces the use of the rabbitmqplugins provider to enable
plugins.

Fixes voxpupuli#775
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

admin_enable - controles both rabbitmq_management plugin and install of rabbitmqadmin
4 participants