[ClusterLabs] clutering rabbitmq
Damiano Giuliani
damianogiuliani87 at gmail.com
Tue Jun 25 14:14:12 UTC 2024
Oyvind many thanks for your precious support.
unfortunately im not a good developer, i will try my best to add some
cluster checks with my basic skills.
if you guys have some hint, please share with me!
thanks for your time
have a good day
Damian
Il giorno mar 25 giu 2024 alle ore 12:35 Oyvind Albrigtsen <
oalbrigt at redhat.com> ha scritto:
> On 25/06/24 12:21 GMT, Damiano Giuliani wrote:
> >Hi Oyvind, thanks for the explanation and joining. my only doubt about
> >using systemd is pacemaker will not check in any way the status of the
> >rabbitmq cluster but only the status those resources. So basically it
> could
> >check all resources up but not a consistent rabbit cluster.
> >What do u think about it?
> Correct. It will be able to start rabbitmq and try to restart (or move
> to other node on repeated fails), but wont be able to do any more
> advanced checks.
>
> So if you need more advanced checks, or more advanced code being run
> during start/stop or anything else more advanced you'll have to either
> modify the existing agents or read the developer guide for how to make
> one from scratch:
>
> https://github.com/ClusterLabs/resource-agents/blob/main/doc/dev-guides/ra-dev-guide.asc
>
> >I also noticed rabbitmq-server-ha resource agent (2444 code lines) but it
> >doesn't work to me yet (some pid problems)
> >
> >Really thanks for helping and share ur knowledge
> >
> >Damian
> >
> >On Tue, Jun 25, 2024, 12:03 PM Oyvind Albrigtsen <oalbrigt at redhat.com>
> >wrote:
> >
> >> There's also the rabbitmq-cluster agent, but that is also made for
> >> OSP, and seems to wipe data during the start-action.
> >>
> >> So the best way is probably to run it via the systemd unit file. Run
> >> "pcs resource list systemd" to find it, and create it the same way
> >> (it doesnt take any parameters, so settings has to be set in e.g.
> >> the config files in /etc/ or similar).
> >>
> >>
> >> Oyvind Albrigtsen
> >>
> >> On 25/06/24 11:48 GMT, Damiano Giuliani wrote:
> >> >I Ken, thanks for answering.
> >> >Yes unfortunately the rabbitmq-cluster agent wipe everything and losing
> >> our
> >> >quorum queue is not an option 😄 we just learnt after a power
> interrupion
> >> >this! I was super confident about the agent really didn't expected a
> >> >complete wipe and rebuild!lession learned!
> >> >
> >> >If somebody con join the conversation and share how achieve high
> >> >availability rabbimq with pacemaker helping me I would really
> appreciate!
> >> >
> >> >On Mon, Jun 24, 2024, 5:19 PM Ken Gaillot <kgaillot at redhat.com> wrote:
> >> >
> >> >> Hi,
> >> >>
> >> >> The rabbitmq-cluster agent was written specifically for the OpenStack
> >> >> use case, which is fine with recreating the cluster from scratch
> after
> >> >> problems. I'm not sure about the other two, and I'm not really
> familiar
> >> >> with any of the agents. Hopefully someone with more experience with
> >> >> RabbitMQ can jump in.
> >> >>
> >> >> On Thu, 2024-06-20 at 10:33 +0200, Damiano Giuliani wrote:
> >> >> > Hi,
> >> >> >
> >> >> > hope you guys can help me,
> >> >> >
> >> >> > we have builded up a rabbitmq cluster using pacemaker resource
> called
> >> >> > rabbitmq-cluster.
> >> >> > everything works as exptected till for maintenance reason, we
> shutted
> >> >> > down the entire cluster gracefully.
> >> >> > at the startup we noticed all the user and permissions were dropped
> >> >> > and probably also the quorum queues.
> >> >> > So investigating the resource agent (rabbitmq-cluster), i find out
> it
> >> >> > callss this wipe function
> >> >> >
> >> >> > rmq_wipe_data()
> >> >> > {
> >> >> > rm -rf $RMQ_DATA_DIR > /dev/null 2>&1
> >> >> > }
> >> >> >
> >> >> > when the first start function is called
> >> >> >
> >> >> > rmq_start_first()
> >> >> > {
> >> >> > local rc
> >> >> >
> >> >> > ocf_log info "Bootstrapping rabbitmq cluster"
> >> >> > rmq_wipe_data
> >> >> > rmq_init_and_wait
> >> >> > rc=$?
> >> >> >
> >> >> > So probably when all the cluster is fired up by pacemaker all the
> >> >> > rabbitmq istances are wiped out.
> >> >> >
> >> >> > the rabbitmq-cluster is quite old (3-4yo) and probably didnt take
> >> >> > into account quorum queues which are presistent, so a full wipe is
> >> >> > not acceptable.
> >> >> >
> >> >> > So i moved to the RA called rabbitmq-server-ha which is quite huge
> >> >> > and big script but im a bit lost because i notice also this one
> seems
> >> >> > cleans mnesia folder.
> >> >> >
> >> >> > So the third and last one is the RA rabbitmq-server which seems
> >> >> > simple resoruce but not manage cluster status but only simple
> actions
> >> >> > like start stop etc.
> >> >> > i could probably build the cluster using this one + rabbitmq.conf
> >> >> > file where i defined cluster istances, something like this.
> >> >> >
> >> >>
> >>
> https://www.rabbitmq.com/docs/cluster-formation#peer-discovery-classic-config
> >> >> >
> >> >> > so im a bit lost because seems there is no easy way to build up a
> >> >> > rabbitmq cluster using pacemaker.
> >> >> >
> >> >> > can you guys help me heading on the correct way?
> >> >> >
> >> >> > thanks
> >> >> >
> >> >> > Damiano
> >> >> >
> >> >> >
> >> >> >
> >> >> >
> >> >> > _______________________________________________
> >> >> > Manage your subscription:
> >> >> > https://lists.clusterlabs.org/mailman/listinfo/users
> >> >> >
> >> >> > ClusterLabs home: https://www.clusterlabs.org/
> >> >> --
> >> >> Ken Gaillot <kgaillot at redhat.com>
> >> >>
> >> >> _______________________________________________
> >> >> Manage your subscription:
> >> >> https://lists.clusterlabs.org/mailman/listinfo/users
> >> >>
> >> >> ClusterLabs home: https://www.clusterlabs.org/
> >> >>
> >>
> >> >_______________________________________________
> >> >Manage your subscription:
> >> >https://lists.clusterlabs.org/mailman/listinfo/users
> >> >
> >> >ClusterLabs home: https://www.clusterlabs.org/
> >>
> >> _______________________________________________
> >> Manage your subscription:
> >> https://lists.clusterlabs.org/mailman/listinfo/users
> >>
> >> ClusterLabs home: https://www.clusterlabs.org/
> >>
>
> >_______________________________________________
> >Manage your subscription:
> >https://lists.clusterlabs.org/mailman/listinfo/users
> >
> >ClusterLabs home: https://www.clusterlabs.org/
>
> _______________________________________________
> Manage your subscription:
> https://lists.clusterlabs.org/mailman/listinfo/users
>
> ClusterLabs home: https://www.clusterlabs.org/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.clusterlabs.org/pipermail/users/attachments/20240625/09bbf88e/attachment-0001.htm>
More information about the Users
mailing list