|
13 | 13 | # |
14 | 14 | # See usage() function below for more details ... |
15 | 15 | # |
| 16 | +# Note that the script uses set_rabbitmq_policy.sh script located in the |
| 17 | +# same directory to setup RabbitMQ policies. |
| 18 | +# |
16 | 19 | ####################################################################### |
17 | 20 | # Initialization: |
18 | 21 |
|
|
92 | 95 | } |
93 | 96 |
|
94 | 97 | meta_data() { |
| 98 | + # The EXTENDED_OCF_PARAMS parameter below does not exist by default |
| 99 | + # and hence converted to an empty string unless overridden. It |
| 100 | + # could be used by an extention script to add new parameters. For |
| 101 | + # example see https://review.openstack.org/#/c/249180/10 |
| 102 | + |
95 | 103 | cat <<END |
96 | 104 | <?xml version="1.0"?> |
97 | 105 | <!DOCTYPE resource-agent SYSTEM "ra-api-1.dtd"> |
@@ -268,6 +276,8 @@ If too many timeouts happen in a raw, the monitor call will return with error. |
268 | 276 | <content type="string" default="${OCF_RESKEY_max_rabbitmqctl_timeouts_default}" /> |
269 | 277 | </parameter> |
270 | 278 |
|
| 279 | +$EXTENDED_OCF_PARAMS |
| 280 | +
|
271 | 281 | </parameters> |
272 | 282 |
|
273 | 283 | <actions> |
@@ -1721,11 +1731,10 @@ action_promote() { |
1721 | 1731 | ocf_log info "${LH} action end." |
1722 | 1732 | exit $OCF_FAILED_MASTER |
1723 | 1733 | fi |
1724 | | - ocf_log info "${LH} Setting HA policy for all queues" |
1725 | | - ${OCF_RESKEY_ctl} set_policy ha-all "." '{"ha-mode":"all", "ha-sync-mode":"automatic"}' --apply-to all --priority 0 |
1726 | | - ${OCF_RESKEY_ctl} set_policy heat_rpc_expire "^heat-engine-listener\\." '{"expires":3600000,"ha-mode":"all","ha-sync-mode":"automatic"}' --apply-to all --priority 1 |
1727 | | - ${OCF_RESKEY_ctl} set_policy results_expire "^results\\." '{"expires":3600000,"ha-mode":"all","ha-sync-mode":"automatic"}' --apply-to all --priority 1 |
1728 | | - ${OCF_RESKEY_ctl} set_policy tasks_expire "^tasks\\." '{"expires":3600000,"ha-mode":"all","ha-sync-mode":"automatic"}' --apply-to all --priority 1 |
| 1734 | + |
| 1735 | + local set_policy_path="$(dirname $0)/set_rabbitmq_policy.sh" |
| 1736 | + . $set_policy_path |
| 1737 | + |
1729 | 1738 | # create timestamp file |
1730 | 1739 | ocf_log info "${LH} Updating start timestamp" |
1731 | 1740 | ocf_run crm_attribute -N $THIS_PCMK_NODE -l reboot --name 'rabbit-start-time' --update $(now) |
|
0 commit comments