summaryrefslogtreecommitdiff
path: root/scripts
Commit message (Collapse)AuthorAgeFilesLines
* Remove pacemaker OCF RA agent for RabbitMQBogdan Dobrelya2021-11-041-2435/+0
| | | | | | | | | | It has been moved to https://github.com/ClusterLabs/resource-agents/tree/master/heartbeat since it can be no longer CI tested here Signed-off-by: Bogdan Dobrelya <bogdando@mail.ru> (cherry picked from commit 3083d5fc210c04bf68a09015ceb75a792332a333) (cherry picked from commit 159939f13c3410bc017913939277a2f5337519de)
* Fix the plugin separator for RABBITMQ_ENABLED_PLUGINS in bazelPhilip Kuryloski2021-09-101-3/+4
| | | | | Originally I thought these were space separated, but rabbit_env:enabled_plugins indicates they are comma separated
* Fix mixed version testing for 3.7/3.8 (#3387)Philip Kuryloski2021-09-091-1/+23
| | | | | | | | | * Correct the codepath for the 3.7 mixed tests * Minor setup tweak in rabbitmq_queues_cli_integration_SUITE * Use rabbitmq-ct-helpers master * Skip certain tests in 3.7/3.8 mixed clusters
* Fix a typo in rabbitmq-run.shPhilip Kuryloski2021-09-081-1/+1
| | | | | (cherry picked from commit eec4a042893abee0d5d156207069011f28e692bd) (cherry picked from commit badd37273df3c8c5721b2921f6d29f53ad06ec61)
* Mixed version testing in bazel (#3200)Philip Kuryloski2021-07-201-6/+9
| | | | | | | | | | | | | Unlike with gnu make, mixed version testing with bazel uses a package-generic-unix for the secondary umbrella rather than the source. This brings the benefit of being able to mixed version test releases built with older erlang versions (even though all nodes will run under the single version given to bazel) This introduces new test labels, adding a `-mixed` suffix for every existing test. They can be skipped if necessary with `--test_tag_filters` (see the github actions workflow for an example) As part of the change, it is now possible to run an old release of rabbit with rabbitmq_run rule, such as: `bazel run @rabbitmq-server-generic-unix-3.8.17//:rabbitmq-run run-broker` (cherry picked from commit d6399bbb5b6c90c2a9e3d20011452ea59808c341) (cherry picked from commit 6f24943f038b40a0bc368c344cc0b1dd8f4b9f93)
* Merge pull request #3166 from bogdando/fix_ocf_raMichael Klishin2021-07-011-31/+9
| | | | | | OCF RA: fix start/stop handling (cherry picked from commit b6f5c2daad427a9a84376709b41e6cfdd62b7b5e)
* Only export RABBITMQ_NODE_PORT when it is not the defaultMichele Baldessari2021-06-301-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | RABBITMQ_NODE_PORT is exported by default and set to 5672. Re-exporting it in that case will actually break the case where we set up rabbit with tls on the default port: 2021-02-28 07:44:10.732 [error] <0.453.0> Failed to start Ranch listener {acceptor,{172,17,1,93},5672} in ranch_ssl:listen([{cacerts,'...'},{key,'...'},{cert,'...'},{ip,{172,17,1,93}},{port,5672}, inet,{keepalive,true}, {versions,['tlsv1.1','tlsv1.2']},{certfile,"/etc/pki/tls/certs/rabbitmq.crt"},{keyfile,"/etc/pki/tls/private/rabbitmq.key"}, {depth,1},{secure_renegotiate,true},{reuse_sessions,true},{honor_cipher_order,true},{verify,verify_none},{fail_if_no_peer_cert,false}]) for reason eaddrinuse (address already in use) This is because by explicitely always exporting it, we force rabbit to listen to that port via tcp and that is a problem when we want to do SSL on that port. Since 5672 is the default port already we can just avoid exporting this port when the user does not customize the port. Tested both in a non-TLS env (A) and in a TLS-env (B) successfully: (A) Non-TLS [root@messaging-0 /]# grep -ir -e tls -e ssl /etc/rabbitmq [root@messaging-0 /]# [root@messaging-0 /]# pcs status |grep rabbitmq * rabbitmq-bundle-0 (ocf::rabbitmq:rabbitmq-server-ha): Master messaging-0 * rabbitmq-bundle-1 (ocf::rabbitmq:rabbitmq-server-ha): Master messaging-1 * rabbitmq-bundle-2 (ocf::rabbitmq:rabbitmq-server-ha): Master messaging-2 (B) TLS [root@messaging-0 /]# grep -ir -e tls -e ssl /etc/rabbitmq/ |head -n3 /etc/rabbitmq/rabbitmq.config: {ssl, [{versions, ['tlsv1.1', 'tlsv1.2']}]}, /etc/rabbitmq/rabbitmq.config: {ssl_listeners, [{"172.17.1.48", 5672}]}, /etc/rabbitmq/rabbitmq.config: {ssl_options, [ [root@messaging-0 ~]# pcs status |grep rabbitmq * rabbitmq-bundle-0 (ocf::rabbitmq:rabbitmq-server-ha): Master messaging-0 * rabbitmq-bundle-1 (ocf::rabbitmq:rabbitmq-server-ha): Master messaging-1 * rabbitmq-bundle-2 (ocf::rabbitmq:rabbitmq-server-ha): Master messaging-2 Note: I don't believe we should export RABBITMQ_NODE_PORT at all, since you can specify all ports in the rabbit configuration anyways, but prefer to play it safe here as folks might rely on being able to customize this. Signed-off-by: Michele Baldessari <michele@acksyn.org>
* Stop logging unblock client access unconditionallyMichele Baldessari2021-06-301-9/+10
| | | | | | | | | | | | | | | | Currently every call to unblock_client_access() is followed by a log line showing which function requested the unblocking. When we pass the parameter OCF_RESKEY_avoid_using_iptables=true it makes no sense to log unblocking of iptables since it is effectively a no-op. Let's move that logging inside the unblock_client_access() function allowing a parameter to log which function called it. Tested on a cluster with rabbitmq bundles with avoid_using_iptables=true and observed no spurious logging any longer: [root@messaging-0 ~]# journalctl |grep 'unblocked access to RMQ port' |wc -l 0
* Allow rabbitmq to run in a larger cluster composed of also non-rabbitmq nodesMichele Baldessari2021-06-301-2/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We introduce the OCF_RESKEY_allowed_cluster_node parameter which can be used to specify which nodes of the cluster rabbitmq is expected to run on. When this variable is not set the resource agent assumes that all nodes of the cluster (output of crm_node -l) are eligible to run rabbitmq. The use case here is clusters that have a large numbers of node, where only a specific subset is used for rabbitmq (usually this is done with some constraints). Tested in a 9-node cluster as follows: [root@messaging-0 ~]# pcs resource config rabbitmq Resource: rabbitmq (class=ocf provider=rabbitmq type=rabbitmq-server-ha) Attributes: allowed_cluster_nodes="messaging-0 messaging-1 messaging-2" avoid_using_iptables=true Meta Attrs: container-attribute-target=host master-max=3 notify=true ordered=true Operations: demote interval=0s timeout=30 (rabbitmq-demote-interval-0s) monitor interval=5 timeout=30 (rabbitmq-monitor-interval-5) monitor interval=3 role=Master timeout=30 (rabbitmq-monitor-interval-3) notify interval=0s timeout=20 (rabbitmq-notify-interval-0s) promote interval=0s timeout=60s (rabbitmq-promote-interval-0s) start interval=0s timeout=200s (rabbitmq-start-interval-0s) stop interval=0s timeout=200s (rabbitmq-stop-interval-0s) [root@messaging-0 ~]# pcs status |grep -e rabbitmq -e messaging * Online: [ controller-0 controller-1 controller-2 database-0 database-1 database-2 messaging-0 messaging-1 messaging-2 ] ... * Container bundle set: rabbitmq-bundle [cluster.common.tag/rhosp16-openstack-rabbitmq:pcmklatest]: * rabbitmq-bundle-0 (ocf::rabbitmq:rabbitmq-server-ha): Master messaging-0 * rabbitmq-bundle-1 (ocf::rabbitmq:rabbitmq-server-ha): Master messaging-1 * rabbitmq-bundle-2 (ocf::rabbitmq:rabbitmq-server-ha): Master messaging-2
* Remove osiris references in bazelPhilip Kuryloski2021-06-241-3/+0
| | | | osiris is not a dependency in 3.8
* Merge pull request #3117 from tropikhajma/masterMichael Klishin2021-06-171-2/+11
| | | | | | fix hostname(1) calls on Solaris (cherry picked from commit 9666ffa67eb41f5d063103a9d435b6832e5847e7)
* Allow plugin selection when running //:broker from bazelPhilip Kuryloski2021-05-251-2/+2
| | | | (cherry picked from commit 95cad1b2aafa682bf6fa85591c96937a59eb4adc)
* Initial Bazel build (#2955)Philip Kuryloski2021-04-072-0/+199
| | | | | | Add a partial Bazel build (#2938) Adds WORKSPACE.bazel, BUILD.bazel & *.bzl files for partial build & test with Bazel. Introduces a build-time dependency on https://github.com/rabbitmq/bazel-erlang
* Bump (c) yearMichael Klishin2021-01-222-2/+2
|
* Small changes to follow name and quote style.Luke Bakken2020-10-131-2/+2
| | | | (cherry picked from commit 7dabdd152e3de33da568ae9ae9beec75bd47452f)
* Capture and return rabbitmq-plugins exit code in rabbitmq-script-wrapperChunyi Lyu2020-10-131-0/+2
| | | | (cherry picked from commit 3811258de8907e143e57f106e47c011226aab6a6)
* Merge pull request #133 from rabbitmq/switch-to-MPL2Michael Klishin2020-07-172-26/+10
| | | | | | Switch to MPL2 (cherry picked from commit 71149000accf7bd34ffb48dfb034b03de19bbccc)
* Update copyright (year 2020)Jean-Sébastien Pédron2020-06-172-2/+2
|
* Merge pull request #132 from rabbitmq/fix-console-redirectionLuke Bakken2020-06-081-2/+1
| | | | | | Fix console redirection (cherry picked from commit 8d38a9a9dd4f43d90cf78dde94bc0f155f1d1af7)
* packaging: Don't load rabbitmq-env from init scriptsJean-Sébastien Pédron2020-03-241-9/+1
| | | | | | | | | | | | | | | This was used to define `$RABBITMQ_LOG_BASE`, but this variable is no longer define there. rabbitmq-env would also load `rabbitmq-env.conf` which could redefine `$RABBITMQ_LOG_BASE`, but this is a corner case and doesn't fit packaging well: packages already prepare a location for log files and will clean this location up on removal. Now, we set `$RABBITMQ_LOG_BASE` value in those scripts and get rid of rabbitmq-env load. (cherry picked from commit 4b7048205d1afa80bb0d644acb90e13106b2b8c1)
* Allow operator to disable iptables client blockingMichele Baldessari2020-03-241-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently the resource agent hard-codes iptables calls to block off client access before the resource becomes master. This was done historically because many libraries were fairly buggy detecting a not-yet functional rabbitmq, so they were being helped by getting a tcp RST packet and they would go on trying their next configured server. It makes sense to be able to disable this behaviour because most libraries by now have gotten better at detecting timeouts when talking to rabbit and because when you run rabbitmq inside a bundle (pacemaker term for a container with an OCF resource inside) you normally do not have access to iptables. Tested by creating a three-node bundle cluster inside a container: Container bundle set: rabbitmq-bundle [cluster.common.tag/rhosp16-openstack-rabbitmq:pcmklatest] Replica[0] rabbitmq-bundle-podman-0 (ocf::heartbeat:podman): Started controller-0 rabbitmq-bundle-0 (ocf::pacemaker:remote): Started controller-0 rabbitmq (ocf::rabbitmq:rabbitmq-server-ha): Master rabbitmq-bundle-0 Replica[1] rabbitmq-bundle-podman-1 (ocf::heartbeat:podman): Started controller-1 rabbitmq-bundle-1 (ocf::pacemaker:remote): Started controller-1 rabbitmq (ocf::rabbitmq:rabbitmq-server-ha): Master rabbitmq-bundle-1 Replica[2] rabbitmq-bundle-podman-2 (ocf::heartbeat:podman): Started controller-2 rabbitmq-bundle-2 (ocf::pacemaker:remote): Started controller-2 rabbitmq (ocf::rabbitmq:rabbitmq-server-ha): Master rabbitmq-bundle-2 The ocf resource was created inside a bundle with: pcs resource create rabbitmq ocf:rabbitmq:rabbitmq-server-ha avoid_using_iptables="true" \ meta notify=true container-attribute-target=host master-max=3 ordered=true \ op start timeout=200s stop timeout=200s promote timeout=60s bundle rabbitmq-bundle Signed-off-by: Michele Baldessari <michele@acksyn.org> (cherry picked from commit 6c33da543b954eabbc26cb73258e25af684e8565)
* (c) bumpMichael Klishin2019-12-292-2/+2
|
* Merge pull request #99 from spring-operator/polish-urls-apache-license-masterMichael Klishin2019-03-291-1/+1
|\ | | | | URL Cleanup
| * URL CleanupSpring Operator2019-03-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | This commit updates URLs to prefer the https protocol. Redirects are not followed to avoid accidentally expanding intentionally shortened URLs (i.e. if using a URL shortener). # Fixed URLs ## Fixed Success These URLs were switched to an https URL with a 2xx status. While the status was successful, your review is still recommended. * [ ] http://www.apache.org/licenses/LICENSE-2.0 with 1 occurrences migrated to: https://www.apache.org/licenses/LICENSE-2.0 ([https](https://www.apache.org/licenses/LICENSE-2.0) result 200).
* | URL CleanupSpring Operator2019-03-202-2/+2
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit updates URLs to prefer the https protocol. Redirects are not followed to avoid accidentally expanding intentionally shortened URLs (i.e. if using a URL shortener). # HTTP URLs that Could Not Be Fixed These URLs were unable to be fixed. Please review them to see if they can be manually resolved. * http://blog.listincomprehension.com/search/label/procket (200) with 1 occurrences could not be migrated: ([https](https://blog.listincomprehension.com/search/label/procket) result ClosedChannelException). * http://dozzie.jarowit.net/trac/wiki/TOML (200) with 1 occurrences could not be migrated: ([https](https://dozzie.jarowit.net/trac/wiki/TOML) result SSLHandshakeException). * http://dozzie.jarowit.net/trac/wiki/subproc (200) with 1 occurrences could not be migrated: ([https](https://dozzie.jarowit.net/trac/wiki/subproc) result SSLHandshakeException). * http://e2project.org (200) with 1 occurrences could not be migrated: ([https](https://e2project.org) result AnnotatedConnectException). * http://nitrogenproject.com/ (200) with 2 occurrences could not be migrated: ([https](https://nitrogenproject.com/) result ConnectTimeoutException). * http://proper.softlab.ntua.gr (200) with 1 occurrences could not be migrated: ([https](https://proper.softlab.ntua.gr) result SSLHandshakeException). * http://yaws.hyber.org (200) with 1 occurrences could not be migrated: ([https](https://yaws.hyber.org) result AnnotatedConnectException). * http://httpredir.debian.org/debian (302) with 1 occurrences could not be migrated: ([https](https://httpredir.debian.org/debian) result AnnotatedConnectException). * http://choven.ca (503) with 1 occurrences could not be migrated: ([https](https://choven.ca) result ConnectTimeoutException). # Fixed URLs ## Fixed But Review Recommended These URLs were fixed, but the https status was not OK. However, the https status was the same as the http request or http redirected to an https URL, so they were migrated. Your review is recommended. * http://fixprotocol.org/ (301) with 1 occurrences migrated to: https://fixtrading.org ([https](https://fixprotocol.org/) result SSLHandshakeException). * http://nsis.sourceforge.net/Setting_Environment_Variables (301) with 1 occurrences migrated to: https://nsis.sourceforge.io/Setting_Environment_Variables ([https](https://nsis.sourceforge.net/Setting_Environment_Variables) result AnnotatedConnectException). * http://erldb.org (UnknownHostException) with 1 occurrences migrated to: https://erldb.org ([https](https://erldb.org) result UnknownHostException). * http://www.rabbitmq.com/releases/rabbitmq-server/v (404) with 1 occurrences migrated to: https://www.rabbitmq.com/releases/rabbitmq-server/v ([https](https://www.rabbitmq.com/releases/rabbitmq-server/v) result 404). * http://www.rabbitmq.com/releases/rabbitmq-server/v% (404) with 1 occurrences migrated to: https://www.rabbitmq.com/releases/rabbitmq-server/v% ([https](https://www.rabbitmq.com/releases/rabbitmq-server/v%) result 404). ## Fixed Success These URLs were switched to an https URL with a 2xx status. While the status was successful, your review is still recommended. * http://cloudi.org/ with 27 occurrences migrated to: https://cloudi.org/ ([https](https://cloudi.org/) result 200). * http://erlware.org/ with 1 occurrences migrated to: https://erlware.org/ ([https](https://erlware.org/) result 200). * http://inaka.github.io/cowboy-trails/ with 1 occurrences migrated to: https://inaka.github.io/cowboy-trails/ ([https](https://inaka.github.io/cowboy-trails/) result 200). * http://ninenines.eu with 6 occurrences migrated to: https://ninenines.eu ([https](https://ninenines.eu) result 200). * http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html with 1 occurrences migrated to: https://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html ([https](https://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html) result 200). * http://www.actordb.com/ with 2 occurrences migrated to: https://www.actordb.com/ ([https](https://www.actordb.com/) result 200). * http://www.cs.kent.ac.uk/projects/wrangler/Home.html with 1 occurrences migrated to: https://www.cs.kent.ac.uk/projects/wrangler/Home.html ([https](https://www.cs.kent.ac.uk/projects/wrangler/Home.html) result 200). * http://www.debian.org/doc/debian-policy/ with 2 occurrences migrated to: https://www.debian.org/doc/debian-policy/ ([https](https://www.debian.org/doc/debian-policy/) result 200). * http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ with 1 occurrences migrated to: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ ([https](https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/) result 200). * http://www.rabbitmq.com/ with 2 occurrences migrated to: https://www.rabbitmq.com/ ([https](https://www.rabbitmq.com/) result 200). * http://www.rabbitmq.com/debian/ with 3 occurrences migrated to: https://www.rabbitmq.com/debian/ ([https](https://www.rabbitmq.com/debian/) result 200). * http://www.rabbitmq.com/monitoring.html with 2 occurrences migrated to: https://www.rabbitmq.com/monitoring.html ([https](https://www.rabbitmq.com/monitoring.html) result 200). * http://www.rebar3.org with 1 occurrences migrated to: https://www.rebar3.org ([https](https://www.rebar3.org) result 200). * http://contributor-covenant.org with 1 occurrences migrated to: https://contributor-covenant.org ([https](https://contributor-covenant.org) result 301). * http://contributor-covenant.org/version/1/3/0/ with 1 occurrences migrated to: https://contributor-covenant.org/version/1/3/0/ ([https](https://contributor-covenant.org/version/1/3/0/) result 301). * http://inaka.github.com/apns4erl with 1 occurrences migrated to: https://inaka.github.com/apns4erl ([https](https://inaka.github.com/apns4erl) result 301). * http://inaka.github.com/edis/ with 1 occurrences migrated to: https://inaka.github.com/edis/ ([https](https://inaka.github.com/edis/) result 301). * http://lasp-lang.org/ with 1 occurrences migrated to: https://lasp-lang.org/ ([https](https://lasp-lang.org/) result 301). * http://saleyn.github.com/erlexec with 1 occurrences migrated to: https://saleyn.github.com/erlexec ([https](https://saleyn.github.com/erlexec) result 301). * http://www.debian-administration.org/articles/286 with 1 occurrences migrated to: https://www.debian-administration.org/articles/286 ([https](https://www.debian-administration.org/articles/286) result 301). * http://www.erlang.org/download.html with 1 occurrences migrated to: https://www.erlang.org/download.html ([https](https://www.erlang.org/download.html) result 301). * http://www.mozilla.org/MPL/ with 5 occurrences migrated to: https://www.mozilla.org/MPL/ ([https](https://www.mozilla.org/MPL/) result 301). * http://zhongwencool.github.io/observer_cli with 1 occurrences migrated to: https://zhongwencool.github.io/observer_cli ([https](https://zhongwencool.github.io/observer_cli) result 301).
* Use ocf_attribute_target instead of crm_nodeMichele Baldessari2018-11-191-3/+3
| | | | | | | | | | | | | | | | | | | | | Instead of calling crm_node directly it is preferrable to use the ocf_attribute_target function. This function will return crm_node -n as usual, except when run inside a bundle (aka container in pcmk language). Inside a bundle it will return the bundle name or, if the meta attribute meta_container_attribute_target is set to 'host', it will return the physical node name where the bundle is running. Typically when running a rabbitmq cluster inside containers it is desired to set 'meta_container_attribute_target=host' on the rabbit cluster resource so that the RA is aware on which host it is running. Tested both on baremetal (without containers): Master/Slave Set: rabbitmq-master [rabbitmq] Masters: [ controller-0 controller-1 controller-2 ] And with bundles as well. Co-Authored-By: Damien Ciabrini <dciabrin@redhat.com>
* Use template in rabbitmq-script-wrapper for RabbitMQ user and groupLuke Bakken2018-09-131-1/+1
|
* Ensure ~rabbitmq/.erlang.cookie is readable after running a command as rootLuke Bakken2018-09-121-1/+17
| | | | Fixes #85
* Use sysexists exit codes in OCF agent scriptJacek Tomasiak2018-06-111-1/+1
| | | | | | | Exit codes from sysexits.h were introduced in rabbitmq CLI with https://github.com/rabbitmq/rabbitmq-server/pull/412. The OCF agent for non-clustered setup was not updated and some exit codes were incorrectly reported as unexpected.
* OCF RA: Do not consider local failures as remote node problemsVincent Untz2017-12-201-4/+4
| | | | | | | | | | | | | | | | | In is_clustered_with(), commands that we run to check if the node is clustered with us, or partitioned with us may fail. When they fail, it actually doesn't tell us anything about the remote node. Until now, we were considering such failures as hints that the remote node is not in a sane state with us. But doing so has pretty negative impact, as it can cause rabbitmq to get restarted on the remote node, causing quite some disruption. So instead of doing this, ignore the error (it's still logged). There was a comment in the code wondering what is the best behavior; based on experience, I think preferring stability is the slightly more acceptable poison between the two options.
* OCF RA: Fix syntax errorVincent Untz2017-12-141-1/+1
| | | | (cherry picked from commit a9b4a4ff97a96e798de51933fc44f61aa6bc88a3)
* Merge pull request #64 from vuntz/ocf-fix-notify-startMichael Klishin2017-12-121-4/+3
|\ | | | | OCF RA: Fix various issues with start notification handler
| * OCF RA: Fix logging in start notification handlerVincent Untz2017-12-081-1/+1
| | | | | | | | | | | | The "post-start end" log message was written too early (some things were still done afterwards), and not in all cases (it was inside a if statement).
| * OCF RA: Do not start rabbitmq if notification of start is not about usVincent Untz2017-12-081-2/+1
| | | | | | | | | | | | | | | | | | | | Right now, every time we get a start notification, all nodes will ensure the rabbitmq app is started. This makes little sense, as nodes that are already active don't need to do that. On top of that, this had the sideeffect of updating the start time for each of these nodes, which could result in the master moving to another node.
| * OCF RA: Fix test for no node in start notification handlerVincent Untz2017-12-081-1/+1
| | | | | | | | | | | | If there's nothing starting and nothing active, then we do a -z " ", which doesn't have the same result as -z "". Instead, just test for emptiness for each set of nodes.
* | OCF RA: Avoid promoting nodes with same start time as masterVincent Untz2017-12-081-0/+5
|/ | | | | | | It may happen that two nodes have the same start time, and one of these is the master. When this happens, the node actually gets the same score as the master and can get promoted. There's no reason to avoid being stable here, so let's keep the same master in that scenario.
* Detect util-linux version of runuserLuke Bakken2017-09-201-1/+12
| | | | | | | Alternative is to always use runuser invocation in else clause. Fixes #44. [#150221349]
* Use runuser in non-su-compatible modeLuke Bakken2017-09-201-9/+3
| | | | | | | | | Remove argument quoting which is not necessary as long as command is passed to `/sbin/runuser` and `/bin/su` as arguments instead of a string. Fixes #44. [#150221349]
* Define shell explicitly for runuser commandJean-Sébastien Pedron2017-08-311-1/+1
| | | | | | | | | | | | Because the rabbitmq user shell defaults to /bin/false, we must explicitly define a shell when using the runuser command Issue: rabbitmq/rabbitmq-server-release#32 PR: rabbitmq/rabbitmq-server-release#40 [#150221349] Signed-off-by: Gerhard Lazu <gerhard@rabbitmq.com>
* Change runuser arguments to support more platformsDaniil Fedotov2017-08-221-1/+1
|
* Error message change from review.Luke Bakken2017-08-171-1/+1
|
* Fixes for SELinux supportLuke Bakken2017-08-161-1/+10
| | | | | Use /sbin/runuser to execute script as the `rabbitmq` user as this command does not cause issues with SELinux. See #32 for details.
* Merge branch 'stable'Jean-Sébastien Pédron2017-08-011-7/+12
|\
| * scripts/rabbitmq-script-wrapper: Run rabbitmq-plugin as root onlyJean-Sébastien Pédron2017-08-011-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The previous patch was meant to make it clear that an unprivileged user (other than `rabbitmq`) shouldn't run rabbitmq-plugins. Unfortunately, it broke the script when called by root, because the real script was executed as `rabbitmq`. This user doesn't have write permissions to `/etc/rabbitmq` by default. Now, rabbitmq-plugins' wrapper must be executed as root and so is the real script. This should fix the problem described above. [#149840153]
* | Ensure we are in a readable dir when running RabbitMQ scriptsJean-Sébastien Pedron2017-07-281-0/+6
| | | | | | | | | | | | | | | | | | If the current working directory is not readable, Erlang will crash. This ensures that we run RabbitMQ scripts from a readable directory. [#149425921] Signed-off-by: Gerhard Lazu <gerhard@rabbitmq.com>
* | Refactor rabbitmq-script-wrapperJean-Sébastien Pedron2017-07-281-21/+59
| | | | | | | | | | | | | | | | | | | | The logic is a bit crazy, and the whole purpose of this script is questionable, but until we get rid of it, we've refactor it to make it more obvious just how crazy it actually is. [#149425921] Signed-off-by: Gerhard Lazu <gerhard@rabbitmq.com>
* | Merge branch 'stable'Gerhard Lazu2017-07-281-1/+1
|\ \ | |/
| * Require root or rabbitmq user for rabbitmq-plugins.Daniil Fedotov2017-07-241-1/+1
| | | | | | | | | | | | | | | | | | | | For some reason, the rabbitmq-plugins command could be run from arbitrary user, which would result in errors unable to access a cookie file or plugins configuration files. Changed to work the same way as rabbitmqctl - require root or rabbitmq user. [Fixes #149425921]
| * Fix HA OCF scriptMate Lakat2017-05-092-1/+28
| | | | | | | | | | | | Some parts of #21 have not been added to the stable branch. This change fixes the issue by adding missing changes to rabbitmq-server-ha.ocf and also fixing rabbitmq-server.ocf
| * Enlist OCF_RESKEY_limit_nofile_default on commentMate Lakat2017-05-091-0/+1
| | | | | | | | Minor change to be consistent with the rest of the file.