redhat-openstack / puppet-pacemaker

Puppet modules to manage pacemaker with corosync
9 stars 25 forks source link

Allow one to specify some corosync parameters #60

Closed Spredzy closed 9 years ago

Spredzy commented 9 years ago

Currently only the default value for corosync are available. A user can not set specific values related to corosync due to the fact that the command run to create the cluster is pcs cluster setup --start with no possible parameters.

This commit aims to allow one to specify all the corosync parameters available via the pcs cluster setup --start command.

An example would be the following

 class { '::pacemaker::corosync':
    cluster_members => 'node01.example.com node02.example.com
node03.example.com',
    setup_cluster   => true,
    cluster_setup_extras => {'--token' => '10000', '--join' => '100'},
  }

This would result in pcs cluster corosync outputing the following: Note: totem and join values.

[root@localhost ~]# pcs cluster corosync
totem {
version: 2
secauth: off
cluster_name: clustername
transport: udpu
token: 10000
join: 100
}
nodelist {
  node {
        ring0_addr: node01.example.com
        nodeid: 1
       }
  node {
        ring0_addr: node02.example.com
        nodeid: 2
       }
  node {
        ring0_addr: node03.example.com
        nodeid: 3
       }
}
quorum {
provider: corosync_votequorum
}
logging {
to_syslog: yes
}
jguiditta commented 9 years ago

Visual +1, I'll try to test this later today or early next week

cwolferh commented 9 years ago

@Spredzy , please rebase.

Spredzy commented 9 years ago

@cwolferh @jguiditta rebased

cwolferh commented 9 years ago

Confirmed backwards-compatible. +1 to merge.