bundle: Refactor handling of masters/promoted_max
... to avoid the following warning message. Warning: Unknown variable: 'used_promoted_max'. Change-Id: I9a1f5e2c6d5ef655f3dc681bb10c7ff9e4281c49
This commit is contained in:
parent
cf2cfcb1e9
commit
c332d43db6
|
@ -156,23 +156,19 @@ define pacemaker::resource::bundle(
|
|||
# target-dir=/var/log options=ro storage-map id=bar-storage-test
|
||||
# source-dir=/foo target-dir=/bar options=wr
|
||||
|
||||
if $promoted_max {
|
||||
if !$::pacemaker::pcs_010 {
|
||||
fail('Cannot use \'promoted_max\' without pacemaker 2 and pcs >= 0.10')
|
||||
} else {
|
||||
$used_promoted_max = $promoted_max
|
||||
}
|
||||
}
|
||||
|
||||
# promoted_max supersedes masters in pacemaker 2 (pcs >= 0.10)
|
||||
if $masters and $::pacemaker::pcs_010 {
|
||||
if $promoted_max {
|
||||
if $::pacemaker::pcs_010 {
|
||||
if $promoted_max and $masters {
|
||||
warning('Both \'masters\' and \'promoted_max\' specified, using option \'promoted_max\'')
|
||||
} else {
|
||||
$used_promoted_max = $masters
|
||||
}
|
||||
|
||||
# promoted_max supersedes masters in pacemaker 2 (pcs >= 0.10)
|
||||
$used_promoted_max = pick_default($promoted_max, $masters)
|
||||
$used_masters = undef
|
||||
} else {
|
||||
if $promoted_max {
|
||||
fail('Cannot use \'promoted_max\' without pacemaker 2 and pcs >= 0.10')
|
||||
}
|
||||
$used_promoted_max = undef
|
||||
$used_masters = $masters
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue