Commit Graph

91 Commits

Author SHA1 Message Date
Billy Olsen 09ce13aaf2 Remove unused config options
The config options `module-nodes` and `known-wait` are no longer used
after commit 12de0d964c introduced
coordinated restarts across the rabbit cluster. This change removes
those charm config options.

Change-Id: I3aee35633e0716f8ce933ee3079494dbc761c04d
2022-04-12 14:53:36 -07:00
Liam Young df711c6717 Switch to enabling the managment plugin by default
Over time the managment plugin has become a core part of managing
a rabbit deployment. This includes allowing tools such as nrpe to
be able to query the api and alert for situations such as orphaned
queues.

Change-Id: Icbf760610ce83b9d95f48e99f6607ddf23963c97
Partial-Bug: 1930547
2021-11-29 11:06:18 +00:00
Julien Thieffry 242167b6ba Display busiest queues in check_queues NRPE plugin
When invoking the check_rabbitmq_queues script with wildcards for vhost
and/or queue parameters, script output does not reflect precisely which
queues are having a high number of oustanding messages as information is
consolidated under the wildcard.

This change fixes this behaviour by adding a new charm configuration
parameter which allows the user to specify the number of busiest queues,
n, to display should the check_rabbitmq_queues script reports any
warnings or errors.  The default, n=0, keeps the current script output.
This option is applicable regardless of the vhost:queue combination but
is specifically relevant when wildcards are passed as arguments.

Implementation displays the first n items in the stats list re-organized
in decreasing message count order.

Closes-Bug: #1939084
Change-Id: I5a32cb6bf37bd2a0f30861eace3c0e6cb5c2559d
2021-08-23 06:21:58 +00:00
Nicolas Bock 8015d9a365 Add config parameters to tune mnesia settings
When a RabbitMQ cluster is restarted, the mnesia settings determine
how long and how often each broker will try to connect to the cluster
before giving up. It might be useful for an operator to be able to
tune these parameters. This change adds two settings,
`mnesia-table-loading-retry-timeout` and
`mnesia-table-loading-retry-limit`, which set these parameters in the
rabbitmq.config file [1].

[1] https://www.rabbitmq.com/configure.html#config-items

Change-Id: I96aa8c4061aed47eb2e844d1bec44fafd379ac25
Partial-Bug: #1828988
Related-Bug: #1874075
Co-authored-by: Nicolas Bock <nicolas.bock@canonical.com>
Co-authored-by: Aurelien Lourot <aurelien.lourot@canonical.com>
2021-08-16 15:43:19 +02:00
Liam Young 81c33953f9 Implementation of deferred restarts
Add deferred event actions and config.

Change-Id: Ifbb15c0c04117a5a98672b2af4fd7203dae9a18e
2021-04-09 21:11:30 +00:00
Peter Matulis a00ecabe67 Clarify TLS
* Make TLS simpler and more accurate.

* Apply README template.

* Adjust config.yaml re use of Vault.

Related-Bug: #1871442

Change-Id: Ia819cb03d30f6b4e0a04cc388e7243849800455a
2021-02-26 14:53:31 -05:00
Liam Young aebde77008 Remove ceph relation
As per the 21.01 release note *1 the ceph relation will be removed
this syscle as it is no longer needed or used.

*1 https://docs.openstack.org/charm-guide/latest/2101.html#rabbitmq-ceph-relation

Change-Id: Ib98abdbd67c2112624fac298cc9dc7683ea29891
2021-02-12 11:14:28 +00:00
Martin Kalcok 7acad5fdaa NRPE: Allow excluding queues from queue-size checks
Option '-e <vhost>  <queue>' was added to the 'check_rabbitmq_queues.py'
nrpe script to allow excluding selected queues when checking queue
sizes. Corresponding option 'exclude_queues' was added to the
charm config.
By default, following queues are excluded:
 * event.sample
 * notifications_designate.info
 * notifications_designate.error
 * versioned_notifications.info
 * versioned_notifications.error

Closes-Bug: #1811433
Change-Id: I57e297bb4323a3ab98da020bfcb1630889aac6d7
2021-01-14 11:35:31 +01:00
Felipe Reyes 07ec03b5d7 Add queue-master-locator config option
queue-master-locator is a configuration option supported by
rabbitmq-server since 3.6, it allows to have control of where the
master queue will be created.

Change-Id: I38cc019b73d062572e19bd532b6bccdaf88638ba
Func-Test-PR: https://github.com/openstack-charmers/zaza-openstack-tests/pull/382
Closes-Bug: #1890759
Signed-off-by: Nicolas Bock <nicolas.bock@canonical.com>
2020-12-13 15:43:31 -03:00
Peter Sabaini 943f4f63ab Fix: nrpe queue check should check for freshness
Make the rabbitmq queue check also check if its input data file was
recently updated. This input data is created via cronjob; if that gets
stuck we might not actually be getting meaningful data.

The charm supports configuring the check interval via a full cron time
specification, so technically one could have that updated only once a
year even if this doesn't make much sense in a monitoring scenario.

Also fix a buglet in the nrpe update hook function: only deploy a
queue check if the cron job hasn't been deconfigured by setting it to
the empty string

Change-Id: I60141397f39e3b1b0274230db8d984934c98a08d
Closes-Bug: #1898523
2020-11-06 09:36:49 +01:00
Xav Paice 5558e21ea8 Add option to check extra vhosts with nrpe
Adds monitoring options to allow us to check for vhosts in addition to
the host specific one made by default, when using the nrpe subordinate.

Change-Id: I10715e8ab8c83fdd7d5c08736ee89472acfe3933
Related-Bug: 1730507
2020-09-14 16:47:37 +12:00
Peter Matulis 14f0a6f102 Review README
As per team discussion, Vault is the preferred method for SSL
management and Network spaces should not be mentioned in any
README pending a supporting documentation effort.

Change-Id: If8bc2f271be71caccd4f3f0b50f8ae412bef35b7
2020-04-09 14:17:34 -04:00
Ryan Beisner 863c6cd97c Revert "Default to autoheal for cluster-partition-handling"
This reverts commit b74a50d30f.

Change-Id: I206cdb35b0be355d2b29739c9dd42fb663bac15e
2019-12-18 22:21:32 +00:00
Andrea Ieri fb83b0dbbf Clarify how to use queue_thresholds
This commit clarifies syntax and semantics of the queue thresholds.
* both yaml multi-line arrays and lists of lists are supported
* explain that the order of the values does matter, especially if using
  wildcards

Change-Id: I31ff1bfa94a708a4f7469bb3a9a5dbca33bb3607
Closes-Bug: 1822547
2019-04-02 16:54:37 +02:00
Zuul 3cf1b0f1b3 Merge "Workaround notification topic filling with OpenStack" 2019-01-09 12:13:59 +00:00
Shane Peters b74a50d30f Default to autoheal for cluster-partition-handling
By setting the default to 'autoheal', we can better ensure
service continuity in most use-cases. With autoheal, the
'winning' partition will be the one with the most clients
connected to it and nodes in the losing partition(s) will be
restarted.

Change-Id: I0988e1d22e7c97819552b3bf325801632b099a32
Closes-Bug: 1802315
2018-11-29 10:59:09 -05:00
James Page 77b6175c1c Workaround notification topic filling with OpenStack
OpenStack charms currently unconditionally enable notifications
for consumption by aodh/ceilometer etc...  If these services are
not deployed, then notification queues will fill over time and
cause alerts/service issues.

Workaround this issue for now by setting a TTL on notification
topics under the openstack vhost (if configured).

By default, the TTL for messages in any notification topics will
be set to 1 hour, after which they are dropped from the queue.

Change-Id: I46a11e98a2e3bbb6016e7ddfe27bdffe55c37aab
Partial-Bug: 1737170
2018-07-18 10:27:33 -04:00
Zhang Hua ff4da882a2 Support timeout for stats capture cron job
In this charm we run a cron job to check rabbitmq status and it is
possible that the commands run could fail or hang if e.g. rabbit
is not healthy. Currently the cron will never timeout and could
hang forever so we add a new timeout config option 'cron-timeout'
which, when set, will result in the a SIGINT being sent to the
application and if that fails to exit within 10s a SIGKILL is sent.
We also fix logging so that all output goes to syslog local0.notice.

Change-Id: I0bb8780c5cc64a24384648f00c8068d5d666d28c
Closes-Bug: 1716854
2017-10-04 07:54:06 +08:00
David Ames a68b912cf5 Remove random wait use distributed_wait
Random waits were used to avoid restart collisions. This change uses
distributed_wait based on modulo_distribution to calculate wait time
based on the modulo-nodes setting (or peer relations) and known-wait.

charm-helpers sync for module distribution helpers

Depends-On: I02c648cccc72d816beeec5546b6c7914d57c607a
Change-Id: Ic796c23e1bc560d461c674cbfadf8589380eb649
2017-09-27 11:43:19 -07:00
Mario Splivalo 9d9c6c778d Prevent running apt-get update/upgrade on restart
As config-changed hook runs each time jujud is restarted, the hook
could upgrade rabbitmq without operator warrant.

This change runs apt-get update/upgrade in config-changed only
if "source" charm options is changed.

Change-Id: I56781659b02b883c9b15867dac6f9c8d27b5d975
Closes-Bug: 1694377
2017-08-11 13:57:08 +01:00
Shane Peters 01386e0cb2 Clarify description of stats_cron_schedule option
The description for this option is confusing. Leaving it unset
implies using the default value which enables the cron task.

This change clarifies to the user they must actually set the value to
an empty string in order to disable the cron task.

Change-Id: I39efdfe574412ec5a188794b32b5cf221c40e884
Closes-Bug: #1697523
2017-06-30 12:19:44 +01:00
Shane Peters f019ee3164 Cleanup config.yaml
Change-Id: I6958c49d273f145c2783cd56b24538817a868b43
2017-06-09 15:31:00 +00:00
Edward Hope-Morley 96fa17720b Expose performance tuning options via charm
Adds connection-backlog and erl-vm-io-thread-multiplier config
options which are required for tuning when deploying in
environments with large numbers of clients and server hosts
with high numbers of cores respectively. Also refactors
rabbitmq-env.conf rendering code so that it is properly
applied by the charm.

Change-Id: I8596eb9a0419d4e64782bfaf9d8c0f67e5de96b1
Closes-Bug: 1693561
2017-06-02 15:43:22 +01:00
Edward Hope-Morley 75a5d0f2f1 Cleanup config.yaml
Re-order settings based on section and move
HA options to bottom and mark as deprecated
since they and their related code is due
for imminent removal (has been deprecated
for several cycles now) and should not be
used.

Change-Id: Ic13897a2c8fd97cfb98454375d7325a018c5b37d
2017-05-31 13:20:03 +01:00
David Ames d45d9b82bf Fix support for network-spaces
Make sure network-get is consulted when selecting an IP address. Generalize
the get_unit_ip to work with any relationship. Allow for cluster-network
override.

Change-Id: I75e9199ae586f663313f0c751247e1465c753a64
Partial-Bug: #1657305
2017-01-26 08:05:21 -08:00
Edward Hope-Morley 294634b2c0 Add hardening support
Add charmhelpers.contrib.hardening and calls to install,
config-changed, upgrade-charm and update-status hooks.
Also add new config option to allow one or more hardening
modules to be applied at runtime.

Change-Id: I035d8d959f5217801b296a4975fce605b25b4b24
2016-03-24 11:38:33 +00:00
Jorge Niedbalski 329a5ee8f8 Rebase 2015-09-23 10:16:23 -03:00
Liam Young b35957b3cd [thedac, r=gnuoy] This change adds support for queue monitoring by nagios. 2015-04-20 12:13:39 +01:00
Edward Hope-Morley a652247e6e added unit test 2015-04-20 09:19:08 +01:00
Edward Hope-Morley cf621bb732 [hopem,r=]
Provide min-cluster-size config option to get
round clustering races until we have leadership
election support in Juju.
2015-04-17 16:26:42 +01:00
David Ames dc0bfbc00d Fix Billy Olsen's suggestions 2015-04-13 13:00:59 -07:00
Jorge Niedbalski 2043055e4b Addressed @billy-olsen comments 2015-04-13 14:15:49 -03:00
Jorge Niedbalski 997f866a0b - Added the cluster_partition_handling option fixes LP: #1442443
- Refactored the ssl handling code.
- Added a generic config loader
2015-04-09 23:34:40 -03:00
David Ames 1b746a4631 Be opinionated about defaults for stats_cron_schedule and queue_thresholds 2015-04-01 16:11:07 -07:00
David Ames 818a0d3ad9 Added stats cronjob and queue monitoring nagios plugin
Rebase for https://code.launchpad.net/~jacekn/charms/precise/rabbitmq-server/queue-monitoring/+merge/218580
2015-04-01 10:55:33 -07:00
Brad Marshall c5530a34e0 [bradm] Add nrpe service check, add configurable nagios servicegroup, sync charmhelpers 2015-03-03 16:05:14 +10:00
James Page 154918e61f Aligment on config 2015-01-23 08:28:27 +00:00
James Page acaa5456d9 Re-instate configuration 2015-01-23 08:27:43 +00:00
Felipe Reyes d618cc3558 Changed mirroring-queues default to True
In the past (rabbitmq-server < 3.0), queue mirroring was enabled by default
this change honours the original default
2015-01-19 12:27:24 -03:00
Felipe Reyes 10fa53d976 Configure mirrored queues 2015-01-09 10:36:27 -03:00
Jorge Niedbalski 5a9431cf12 [hopem, r=niedbalski,jamespage] ceph-osd-replication-count set to factor 3 by default 2014-11-27 09:21:56 -03:00
Edward Hope-Morley 4fdbd60cef [hopem,r=jamespage]
Set default ceph-replication-count to 3
2014-10-08 11:59:07 +01:00
Edward Hope-Morley 2c79c943cc Fixed minor typo in config.yaml 2014-09-25 17:43:37 +01:00
Edward Hope-Morley 8b3a9053ce [hopem]
Adds ipv6 privacy extensions deploy note to config.yaml
2014-09-25 17:32:25 +01:00
Hui Xiang 3f9e05c67e Mere from trunk. 2014-09-17 22:34:37 +08:00
James Page 5c725670d9 Fixup indents 2014-09-11 08:24:57 +01:00
James Page 28d2a6c323 Fixup default keys and formatting in config.yaml 2014-09-11 08:22:31 +01:00
Matt Bruzek bdeb88b735 Adding default key to the source and key configuration values. No default value lowers the charm proof warning to information. 2014-09-08 13:38:55 -05:00
Hui Xiang 4e488a4605 [Hui Xiang] Replace 'use-ipv6' with 'prefer-ipv6'. 2014-07-23 16:49:03 +08:00
Hui Xiang f38c781e8e [Hui Xiang] support ipv6 for rabbitmq-server 2014-07-01 18:27:53 +08:00