4

I can't find a way to start cluster (corosync+pacemaker) at boot time in Debian

I have updated a 2 node cluster with the following configuration on both nodes:

  • Debian Wheezy 7.7
  • Corosync v2.3.4
  • Pacemaker v1.1.12
  • Libqb v0.17.1
  • Cluster-glue v1.0.12
  • Resource-agents v3.9.6
  • crmsh v2.1.0

I've installed the cluster software from source following the Compiling_on_Debian guide on Clusterlabs for Jessie.

Before installing I made sure there were no older corosync or pacemaker dependencies.

After all the configuratins I've started both corosync and pacemaker with

/etc/init.d/corosync start
/etc/init.d/pacemaker/start

The cluster is up and running, but I can't find a way to start the cluster at boot time

I've tried adding the init.d scripts to runlevels, but I get this response and no effect (no symlinks created) on corosync

root@PC:~# update-rc.d corosync defaults 
update-rc.d: using dependency based boot sequencing

and this error on pacemaker

root@PC:~# update-rc.d pacemaker defaults 
update-rc.d: using dependency based boot sequencing
insserv: Service corosync has to be enabled to start service pacemaker
insserv: exiting now!
update-rc.d: error: insserv rejected the script header

Here are the corosync init script and pacemaker init script

What is the correct way to make the cluster run at boot time? What daemon must be started and enabled?

P.s. In my older configuration (corosync 1.4.2 and pacemaker 1.1.7) all I had to do was setting START=yes in /etc/default/corosync, a file that is missing in this new version

Danilo7
  • 101
  • 5

1 Answers1

1

In my configuration (corosync 1.4.2-3) I use the service.d out of corosync.

/etc/corosync/service.d/pcmk 

 service {
        # Load the Pacemaker Cluster Resource Manager
        name: pacemaker
        ver:  0 
 }

This tells corosync to start the pacemaker resource manager. You won't have initscripts for pacemaker in this configuration (and even service pacemaker status will show that it is stopped), but crm and pacemaker itself will run.

The definition of the ver: #

  1. corosync + pacemaker plugin (v0)
  2. corosync + pacemaker plugin (v1) + mcp
  3. corosync + cpg + cman + mcp
  4. corosync + cpg + quorumd + mcp

I hope this is still accurate enough (link)

EDIT: Just found the appropriate documentation

Well, seems like you have to start pacemaker service then, I clearly just wasn't up to date. You could try to link the initscripts yourself, without using update-rc.d

Lenniey
  • 5,090
  • 2
  • 17
  • 28
  • Hi Lenniey, I've been struggling with this update for a while so I've already found that link while googling. Tried to add service name and ver both in /etc/corosync/corosync.conf and in a new file /etc/corosync/service.d/pcmk without any result. I've read online that plugins are outdated in newest pacemaker versions – Danilo7 Jun 10 '15 at 09:49
  • What do you mean with "link the initscripts yourself"? I was finally able to use update-rc.d (what was missing were the default runlevels in the init.d scripts). So now I have the symlinks, corosync starts at boot, but pacemaker does not :( – Danilo7 Jun 11 '15 at 15:54