Browse Source

Make sure we create stonith resources before stonith levels

Currently stonith levels kind of work out of pure luck. If puppet
decides to reorder resources stonith levels can fail with:

            "Error: /Stage[main]/Tripleo::Fencing/Pacemaker::Stonith::Level[stonith-1-525400e05b23]/Pcmk_stonith_level[stonith-level-1-$(/usr/sbin/crm_node -n)-stonith-fence_ipmilan-525400e05b23]/ensure: change from absent to present failed: pcs -f /var/lib/pacemaker/cib/puppet-cib-backup20200305-60559-tn9ici create failed: Error: Stonith resource(s) 'stonith-fence_ipmilan-525400e05b23' do not exist, use --force to override"

Nowhere in the code do we mandate that the single stonith resources need
to be created *before* the stonith levels which make use of them.
Let's add a constraint via collectors so we enforce this ordering.

Tested on the environment that was not working and got a correctly
deployed IHA overcloud.

Change-Id: I78cb6ae21366a429b65a8357b3b267a485484a42
Closes-Bug: #1866214
(cherry picked from commit b706f5365a)
(cherry picked from commit dd44d1552b)
(cherry picked from commit cbf11f05d4)
changes/41/712841/1
Michele Baldessari 4 months ago
parent
commit
5de64973b0
1 changed files with 1 additions and 0 deletions
  1. +1
    -0
      manifests/fencing.pp

+ 1
- 0
manifests/fencing.pp View File

@@ -142,6 +142,7 @@ class tripleo::fencing(
tries => $tries,
try_sleep => $try_sleep,
}
Pcmk_stonith<||> -> Pcmk_stonith_level<||>
}
}
}


Loading…
Cancel
Save