Colocation constraint always has master role.
All colocation contraint are created with master role. This is because currently the code test the if @resource[:master_role] is true. As the parameter return the symbol :false, this is considered as a true value. This fix the problem by making sure the parameter is cast into a TrueClass, FalseClass. Closes-Bug: 1583792 Change-Id: Ic00e49a71130b7f00f33a5f698b2de6e5608dcce
This commit is contained in:
parent
3f1c3e849a
commit
3cfaf36e2f
|
@ -1,3 +1,5 @@
|
|||
require 'puppet/parameter/boolean'
|
||||
|
||||
Puppet::Type.newtype(:pcmk_constraint) do
|
||||
@doc = "Base constraint definition for a pacemaker constraint"
|
||||
|
||||
|
@ -22,10 +24,7 @@ Puppet::Type.newtype(:pcmk_constraint) do
|
|||
newparam(:score) do
|
||||
desc "Score"
|
||||
end
|
||||
newparam(:master_slave) do
|
||||
newparam(:master_slave, :boolean => true, :parent => Puppet::Parameter::Boolean) do
|
||||
desc "Enable master/slave support with multistage"
|
||||
newvalues(:true)
|
||||
newvalues(:false)
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -53,8 +53,8 @@ describe 'One node install' do
|
|||
/stonith-fence_ipmilan-ipmi_fence/,
|
||||
/start ip-192.168.201.59 then start haproxy-clone.*kind:Optional/,
|
||||
/start ip-2001.dead..28 then start haproxy-clone.*kind:Optional/,
|
||||
/ip-192.168.201.59 with haproxy-clone \(score:INFINITY\) \(rsc-role:Started\) \(with-rsc-role:Master\)/,
|
||||
/ip-2001.dead..28 with haproxy-clone \(score:INFINITY\) \(rsc-role:Started\) \(with-rsc-role:Master\)/
|
||||
/ip-192.168.201.59 with haproxy-clone \(score:INFINITY\)/,
|
||||
/ip-2001.dead..28 with haproxy-clone \(score:INFINITY\)/
|
||||
]
|
||||
)
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue