Remove unused bits in pacemaker cookbook

This commit is contained in:
Vincent Untz
2014-02-27 10:52:53 +01:00
parent 3576656c33
commit 8215e403df
3 changed files with 0 additions and 142 deletions

View File

@@ -11,10 +11,6 @@ default
-------
Installs and start `pacemaker`.
config
-------
Configures pacemaker resources such as primitive, location, colocation and order.
Resources/Providers
===================
There are 7 LWRPs for interacting with pacemaker.

View File

@@ -28,48 +28,3 @@ else
end
default[:pacemaker][:crm][:initial_config_file] = "/etc/corosync/crm-initial.conf"
default['pacemaker']['primitive']['cinder-volume']['agent'] = "ocf:openstack:cinder-volume"
default['pacemaker']['primitive']['cinder-volume']['meta']['is-managed'] = "true"
default['pacemaker']['primitive']['cinder-volume']['meta']['target-role'] = "Started"
default['pacemaker']['primitive']['cinder-volume']['op']['monitor']['interval'] = "10s"
default['pacemaker']['primitive']['clvm']['agent'] = "ocf:lvm2:clvmd"
default['pacemaker']['primitive']['clvm']['params']['daemon_timeout'] = "30"
default['pacemaker']['primitive']['clvm']['op']['monitor']['interval'] = "5s"
default['pacemaker']['primitive']['clvm']['op']['monitor']['on-fail'] = "restart"
# Vip address might be replaced by cinder-volume's myip specified in the environment.
default['pacemaker']['primitive']['vip']['agent'] = "ocf:heartbeat:IPaddr2"
default['pacemaker']['primitive']['vip']['params']['ip'] = "10.5.2.200"
default['pacemaker']['primitive']['vip']['params']['cidr_netmask'] = "24"
default['pacemaker']['primitive']['vip']['op']['monitor']['interval'] = "3s"
default['pacemaker']['primitive']['vip']['op']['monitor']['nic'] = "eth0"
default['pacemaker']['primitive']['vip']['meta']['target-role'] = "Started"
default['pacemaker']['location']['l-st-node1']['rsc_name'] = "st-node1"
default['pacemaker']['location']['l-st-node1']['priority'] = "-inf"
default['pacemaker']['location']['l-st-node2']['rsc_name'] = "st-node2"
default['pacemaker']['location']['l-st-node2']['priority'] = "-inf"
default['pacemaker']['clone']['clvm-clone']['rsc_name'] = "clvm"
default['pacemaker']['clone']['clvm-clone']['meta']['globally-unique'] = "false"
default['pacemaker']['clone']['clvm-clone']['meta']['interleave'] = "true"
default['pacemaker']['clone']['clvm-clone']['meta']['ordered'] = "true"
default['pacemaker']['colocation']['c-cinder-volume']['priority'] = "inf"
default['pacemaker']['colocation']['c-cinder-volume']['is_multiple'] = "yes"
# Single colocation (if multiple is 'no')
default['pacemaker']['colocation']['c-cinder-volume']['rsc'] = nil
default['pacemaker']['colocation']['c-cinder-volume']['with_rsc'] = nil
# Multiple colocation (if multiple is 'yes')
default['pacemaker']['colocation']['c-cinder-volume']['multiple_rscs'] = ['drbd-cluster', 'vip', 'cinder-volume']
default['pacemaker']['order']['o-lvm']['priority'] = "inf"
default['pacemaker']['order']['o-lvm']['resources'] = ['drbd-cluster', 'clvm-clone', 'vip', 'cinder-volume']
default['pacemaker']['property']['no-quorum-policy'] = "ignore"

View File

@@ -1,93 +0,0 @@
#
# Author:: Robert Choi
# Cookbook Name:: pacemaker
# Recipe:: config
#
# Copyright 2013, Robert Choi
#
# 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.
#
include_recipe "pacemaker::setup"
# Get cinder-volume's myip which might have been set by 'ktc-cinder' cookbook.
if node['pacemaker']['primitive'].include?('vip') and node['cinder'] and node['cinder']['services']['volume']['myip']
node.default['pacemaker']['primitive']['vip']['params']['ip'] = node['cinder']['services']['volume']['myip']
end
node['pacemaker']['primitive'].each do |name, attr|
pacemaker_primitive name do
agent attr['agent']
params attr['params']
meta attr['meta']
op attr['op']
action :create
only_if { attr['active'].include?(node.name.partition(".")[0]) }
end
end
node['pacemaker']['location'].each do |name, attr|
pacemaker_location name do
rsc attr['rsc_name']
priority attr['priority']
loc attr['loc']
action :create
only_if { attr['active'].include?(node.name.partition(".")[0]) }
end
end
node['pacemaker']['ms'].each do |name, attr|
pacemaker_ms name do
rsc attr['rsc_name']
meta attr['meta']
action :create
only_if { attr['active'].include?(node.name.partition(".")[0]) }
end
end
node['pacemaker']['clone'].each do |name, attr|
pacemaker_clone name do
rsc attr['rsc_name']
meta attr['meta']
action :create
only_if { attr['active'].include?(node.name.partition(".")[0]) }
end
end
node['pacemaker']['colocation'].each do |name, attr|
pacemaker_colocation name do
priority attr['priority']
multiple attr['is_multiple']
rsc attr['rsc']
with_rsc attr['with_rsc']
multiple_rscs attr['multiple_rscs']
action :create
only_if { attr['active'].include?(node.name.partition(".")[0]) }
end
end
node['pacemaker']['order'].each do |name, attr|
pacemaker_order name do
priority attr['priority']
resources attr['resources']
action :create
only_if { attr['active'].include?(node.name.partition(".")[0]) }
end
end
node['pacemaker']['property'].each do |name, val|
pacemaker_property name do
value val
action :create
end
end