redhat-openstack / puppet-pacemaker

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

Support setting pacemaker resource defaults #61

Closed jistr closed 9 years ago

jistr commented 9 years ago

This patch adds initial support for pacemaker resource defaults. Similarly as other pacemaker resource types in this module, it doesn't yet prefetch already created resources.

The resource default can either be created directly via pcmk_resource_default type, or in bulk via pacemaker::resource_defaults class.

jistr commented 9 years ago

Tested together with https://review.openstack.org/218931.

cwolferh commented 9 years ago

For sanity, tested:

pcmk_resource_default {"resource-stickiness":
  value => '200',
  ensure => present,
}

and works as expected. +1 to merge.

jistr commented 9 years ago

Thanks Crag :) I added the debug statement and tested in a similar way, here's the output:

Info: Applying configuration version '1441100685'
Debug: Running pcs resource defaults | grep '^mydefault: myvalue$'
Debug: Running pcs resource defaults mydefault='myvalue'
Notice: /Stage[main]/Main/Pcmk_resource_default[mydefault]/ensure: created
jguiditta commented 9 years ago

LGTM :+1:

jistr commented 9 years ago

Thanks!