fuel-library/deployment/puppet/pacemaker
Sergey Vasilenko ddc5d07b88 Remove PROXY-ARP artifacts from ns_IPaddr2 OCF script
This patchset implements:
* remove proxy-arp artefects
* replace internal (broken in ubuntu) Send Gratuitous ARP manner to arping
* optimize monitor() method
* remove ifconfig usage. Only iproute2 used.
* remove NIC parameter. Only bridges may be connected with network namespace without proxy-arp.
* remove unused parameters
* remove setup forwarding (not need more for bridging + veth-pairs usage)
* use arping instead icmp ping, because no IP address from VIP subnet on host system allowed.

Change-Id: I0d545567de84e13bf88fd95e2fc13a03378693b0
Closes-bug: 1485951
2015-08-24 22:47:07 +03:00
..
lib/puppet Remove PROXY-ARP artifacts from ns_IPaddr2 OCF script 2015-08-24 22:47:07 +03:00
spec Remove OCF-based resource rescheduling and legacy params 2015-07-30 19:55:53 +03:00
.fixtures.yml Sync corosync upstream 2015-01-23 11:05:09 +01:00
.gitignore Sync corosync upstream 2015-01-23 11:05:09 +01:00
.rspec Sync corosync upstream 2015-01-23 11:05:09 +01:00
.travis.yml Sync corosync upstream 2015-01-23 11:05:09 +01:00
Gemfile Pacemaker fixes for controller add/remove 2015-04-30 12:07:23 +03:00
LICENSE Sync corosync upstream 2015-01-23 11:05:09 +01:00
README.md Sync corosync upstream 2015-01-23 11:05:09 +01:00
Rakefile Sync corosync upstream 2015-01-23 11:05:09 +01:00

README.md

Fuel module for Pacemaker

These manfisests are derived from puppetlabs-corosync modules v0.1.0.

Basic usage

Configuring primitives

The resources that Pacemaker will manage can be referred to as a primitive. These are things like virtual IPs or services like drbd, nginx, and apache.

To assign a VIP to a network interface to be used by Nginx

cs_resource { 'nginx_vip':
  primitive_class => 'ocf',
  primitive_type  => 'IPaddr2',
  provided_by     => 'heartbeat',
  parameters      => { 'ip' => '172.16.210.100', 'cidr_netmask' => '24' },
  operations      => { 'monitor' => { 'interval' => '10s' } },
}

Make Pacemaker manage and monitor the state of Nginx using a custom OCF agent

cs_resource { 'nginx_service':
  primitive_class => 'ocf',
  primitive_type  => 'nginx_fixed',
  provided_by     => 'pacemaker',
  operations      => {
    'monitor' => { 'interval' => '10s', 'timeout' => '30s' },
    'start'   => { 'interval' => '0', 'timeout' => '30s', 'on-fail' => 'restart' }
  },
  require         => Cs_primitive['nginx_vip'],
}

Make Pacemaker manage and monitor the state of Apache using a LSB agent

cs_resource { 'nginx_service':
  primitive_class => 'lsb',
  primitive_type  => 'apache2',
  provided_by     => 'heartbeat',
  operations      => {
    'monitor' => { 'interval' => '10s', 'timeout' => '30s' },
    'start'   => { 'interval' => '0', 'timeout' => '30s', 'on-fail' => 'restart' }
  },
  require         => Cs_primitive['apache2_vip'],
}

*You can also specify multi-state resource such as clone or master

cs_resource {'nginx_service':
primitive_class => 'lsb',
  provided_by     => 'heartbeat',
  operations      => {
    'monitor' => { 'interval' => '10s', 'timeout' => '30s' },
    'start'   => { 'interval' => '0', 'timeout' => '30s', 'on-fail' => 'restart' }
  },
  require         => Cs_primitive['apache2_vip'],
  multistate_hash => {'type'=>'clone','name'=>'nginx_clone'
  ms_metadata => {'interleave'=>'true'}
  }
}

Dependencies

Tested and built on Ubuntu 12.04 with 1.4.2 of Corosync is validated to function.

Notes

Contributors

Copyright (C) 2012 Puppet Labs Inc

Puppet Labs can be contacted at: info@puppetlabs.com

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.