Pacemaker misc fixes
Add missing package, add mising parameters, fix functions. Change-Id: Ib885af7df8fc2b678272fe85e5d8bbdd9aa1988b
This commit is contained in:
parent
102f55f039
commit
475b7ebcd0
@ -146,6 +146,7 @@ Output forms:
|
||||
fail "Data is not a hash: #{hash.inspect}" unless hash.is_a? Hash
|
||||
node_list = []
|
||||
hash.each do |node_name, node|
|
||||
node = node.dup
|
||||
node['name'] = node_name if node_name and not node['name']
|
||||
node_hash = node_hash_process.call node
|
||||
next unless node_hash['ring0'] or node_hash['ring1']
|
||||
|
@ -4,7 +4,7 @@ module Puppet::Parser::Functions
|
||||
type: :rvalue,
|
||||
arity: -1,
|
||||
doc: <<-eof
|
||||
Gather resource parameters and their values
|
||||
Gather resource parameters and their values
|
||||
eof
|
||||
) do |args|
|
||||
parameters = {}
|
||||
@ -15,6 +15,7 @@ module Puppet::Parser::Functions
|
||||
next if key.nil?
|
||||
next if value.nil?
|
||||
next if value == ''
|
||||
next if value == :undef
|
||||
key = key.to_s
|
||||
parameters.store key, value
|
||||
end
|
||||
|
@ -16,17 +16,17 @@ class pacemaker::new (
|
||||
$package_provider = $::pacemaker::new::params::package_provider,
|
||||
|
||||
$pcsd_mode = $::pacemaker::new::params::pcsd_mode,
|
||||
|
||||
$cluster_nodes = $::pacemaker::new::params::cluster_nodes,
|
||||
$cluster_rrp_nodes = $::pacemaker::new::params::cluster_rrp_nodes,
|
||||
$cluster_name = $::pacemaker::new::params::cluster_name,
|
||||
$cluster_auth_key = $::pacemaker::new::params::cluster_auth_key,
|
||||
$cluster_auth_enabled = $::pacemaker::new::params::cluster_auth_enabled,
|
||||
$cluster_setup = $::pacemaker::new::params::cluster_setup,
|
||||
$cluster_options = $::pacemaker::new::params::cluster_options,
|
||||
$cluster_user = $::pacemaker::new::params::cluster_user,
|
||||
$cluster_group = $::pacemaker::new::params::cluster_group,
|
||||
$cluster_password = $::pacemaker::new::params::cluster_password,
|
||||
$pcs_bin_path = $::pacemaker::new::params::pcs_bin_path,
|
||||
|
||||
$cluster_config_path = $::pacemaker::new::params::cluster_config_path,
|
||||
$cluster_interfaces = $::pacemaker::new::params::cluster_interfaces,
|
||||
$cluster_log_subsys = $::pacemaker::new::params::cluster_log_subsys,
|
||||
|
@ -24,7 +24,7 @@ class pacemaker::new::params {
|
||||
$log_file_path = '/var/log/cluster/corosync.log'
|
||||
} elsif $::osfamily == 'Debian' {
|
||||
$pcsd_mode = false
|
||||
$package_list = ['pacemaker-mgmt', 'pacemaker', 'corosync', 'pacemaker-cli-utils', 'resource-agents']
|
||||
$package_list = ['pacemaker-mgmt', 'pacemaker', 'corosync', 'pacemaker-cli-utils', 'resource-agents', 'crmsh']
|
||||
$cluster_user = 'root'
|
||||
$cluster_group = 'root'
|
||||
$log_file_path = '/var/log/corosync/corosync.log'
|
||||
|
@ -15,7 +15,7 @@ describe 'pacemaker_resource_parameters' do
|
||||
|
||||
it { is_expected.to run.with_params('a', 'b').and_return({'a' => 'b'}) }
|
||||
|
||||
it { is_expected.to run.with_params('a', 'b', 'c', nil, ['d', 1]).and_return({'a' => 'b', 'd' => 1}) }
|
||||
it { is_expected.to run.with_params('a', 'b', 'c', nil, ['d', 1], 'e', :undef).and_return({'a' => 'b', 'd' => 1}) }
|
||||
|
||||
it { is_expected.to run.with_params('a', 'b', 'c', 'd', {'e' => 'f', 'a' => '10'}).and_return({'a' => '10', 'c' => 'd', 'e' => 'f'}) }
|
||||
end
|
Loading…
Reference in New Issue
Block a user