From 8215e403df536eadc34091f714d1f90f4c3221fc Mon Sep 17 00:00:00 2001 From: Vincent Untz Date: Thu, 27 Feb 2014 10:52:53 +0100 Subject: [PATCH] Remove unused bits in pacemaker cookbook --- README.md | 4 -- attributes/default.rb | 45 --------------------- recipes/config.rb | 93 ------------------------------------------- 3 files changed, 142 deletions(-) delete mode 100644 recipes/config.rb diff --git a/README.md b/README.md index c4e84b9..5b89bbb 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/attributes/default.rb b/attributes/default.rb index d87acd1..49bcd1e 100644 --- a/attributes/default.rb +++ b/attributes/default.rb @@ -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" diff --git a/recipes/config.rb b/recipes/config.rb deleted file mode 100644 index 8b7e616..0000000 --- a/recipes/config.rb +++ /dev/null @@ -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