Allow a retry when creating a VIP primitive in pacemaker_vip_primitive

As nodes will race to initially create the VIP primitive, they will
likely hit some failure because only one can obviously create it. Once
it's created, there's no issue as there's a check for existence.
Add prepare_role_for_ha helper to PacemakerServiceObject

Some barclamps might enable HA without using haproxy (for a service that
must run in active/passive, for instance).
hb_gui requires xorg-x11-fonts
Add a haproxy cookbook

It is not based on the upstream one, which would require too many changes.
Add a crowbar-pacemaker wrapper cookbook and switch to it

This cookbooks wraps all the use of upstream cookbooks, in order to
allow proper crowbar integration, as well as integration between two
independent cookbooks.

Concretely, we provide an easy way to install haproxy on pacemaker
clusters.

Note that we always install haproxy on cluster nodes.If we were not doing this,
then some nodes would not have it installed when the resource is first declared
and these nodes will have this error:
    warning: services_os_action_execute: Cannot execute '/etc/init.d/haproxy': No such file or directory (2)
The error is fixable with "crm resource refresh", but we might as well just
install the package.
Add haproxy_servers_for_service helper

This provides a convenient method for cookbooks that will use
haproxy_loadbalancer.
Merge pull request #12 from vuntz/haproxy

HA with HAProxy
Merge pull request #26 from vuntz/prepare_role_for_ha

Add prepare_role_for_ha helper to PacemakerServiceObject
Merge pull request #27 from aspiers/hb_gui-fonts

hb_gui requires xorg-x11-fonts
install pacemaker-mgmt package for hb_gui to work

It turns out pacemaker-mgmt must be installed *before* the openais
service starts.
add a hint about changing the hb_gui field to true
add rubydeps support for graphing class hierarchy

https://github.com/dcadenas/rubydeps
prune class dependency tree

Chef::Mixin::Pacemaker::StandardCIBObject only requires
Pacemaker::CIBObject, not the whole hierarchy.
eliminate "superclass mismatch for class Resource" error

Previously libraries/pacemaker/mixins/resource_meta.rb had:

  module Pacemaker
    class Resource
      module Meta
        ...

but libraries/pacemaker/resource.rb had:

  module Pacemaker
    class Resource < Pacemaker::CIBObject
      ...

This would work fine if libraries/pacemaker/resource.rb was loaded
before libraries/pacemaker/mixins/resource_meta.rb, because then
Pacemaker::Resource would have Pacemaker::CIBObject as its parent class,
and the mixin would simply add the Meta module within the existing
Pacemaker::Resource class.  However, due to Chef's somewhat erratic
method of loading libraries, sometimes it could happen the other way
around, in which case Pacemaker::Resource would be initially defined by
the mixin with no parent class, and then when resource.rb was loaded, it
would attempt to redefine Resource to have a parent class, triggering
the error.
Merge pull request #32 from aspiers/superclass-mismatch

fix superclass mismatch
Translate _ from pacemaker proposal name to - in hostnames

The proposal names can only have letters or an underscore in their name.

A hostname cannot have an underscore in its name, but can have a dash.

As we build a virtual hostname based on the proposal name, we simply
translate the underscore to a dash so we're valid.
Merge pull request #35 from vuntz/no-underscore-hostname

Translate _ from pacemaker proposal name to - in hostnames
rename #expect_definitions to #stub_shellout and document

This method was previously misnamed - we are not setting any
expectations, but instead stubbing Mixlib::ShellOut so that
its #stdout command returns given values which can then be
tested against.

Also rename the parameters for clarity, and add some explanatory
comments.
add support for testing scenarios where commands fail
handle creation errors more robustly

We have seen strange cases where creation of a new CIB object apparently
failed:

  http://pastebin.suse.de/9346

Even though this is strange, we should certainly expect
Pacemaker::CIBObject.from_name to return nil in a few cases, so we need
to handle that properly.