[ClusterLabs] Q: Is there any plan for pcs to support corosync-notifyd?
井上和徳
kazunori_inoue at newson.co.jp
Wed Mar 24 04:29:50 EDT 2021
On Thu, Mar 18, 2021 at 6:31 PM Jehan-Guillaume de Rorthais
<jgdr at dalibo.com> wrote:
>
> On Thu, 18 Mar 2021 17:29:59 +0900
> 井上和徳 <kazunori_inoue at newson.co.jp> wrote:
>
> > On Tue, Mar 16, 2021 at 10:23 PM Jehan-Guillaume de Rorthais
> > <jgdr at dalibo.com> wrote:
> > >
> > > > On Tue, 16 Mar 2021, 09:58 井上和徳, <kazunori_inoue at newson.co.jp> wrote:
> > > >
> > > > > Hi!
> > > > >
> > > > > Cluster (corosync and pacemaker) can be started with pcs,
> > > > > but corosync-notifyd needs to be started separately with systemctl,
> > > > > which is not easy to use.
> > >
> > > Maybe you can add to the [Install] section of corosync-notifyd a dependency
> > > with corosync? Eg.:
> > >
> > > WantedBy=corosync.service
> > >
> > > (use systemctl edit corosync-notifyd)
> > >
> > > Then re-enable the service (without starting it by hands).
> >
> > I appreciate your proposal. How to use WantedBy was helpful!
> > However, since I want to start the cluster (corosync, pacemaker) only
> > manually, it is unacceptable to start corosync along with corosync-notifyd at
> > OS boot time.
>
> This is perfectly fine.
>
> I suppose corosync-notifyd is starting because the default service config has:
>
> [Install]
> WantedBy=multi-user.target
>
> If you want corosync-notifyd to be enabled ONLY on corosync startup, but noton
> system startup, you have to remove this startup dependency on "multi-user"
> target. So, your drop-in setup of corosync-notifyd shoudl be (remove leading
> spaces):
>
> cat <<EOF|EDITOR=tee systemctl edit corosync-notifyd.service
> [Install]
> WantedBy=
> WantedBy=corosync.service
> EOF
>
Oh, that makes sense!
With this setting, it seems that the purpose can be achieved.
Thank you.
> The first empty WantedBy= removes any pre-existing dependency.
>
> Then disable/enable corosync-notifyd again to install the new dependency and
> remove old ones. It should only creates ONE link in
> "/etc/systemd/system/corosync.service.wants/corosync-notifyd.service",
> but NOT in "/etc/systemd/system/multi-user.target.wants/".
>
> Regards,
More information about the Users
mailing list