Sometimes BnR doesn't complete because the drbd-cephmon
manifest isn't applied when trying to make it primary.
After testing, it was identified that this is caused
by a race condition.
Therefore, to ensure that drbd-cephmon becomes primary,
as this is an intermittent issue, a script was added
that contains a 'for loop', where up to 10 attempts are
made to execute the drbdadm command with an interval of
100ms between each one.
Additionally, in some tests the target was not executed due
to onlyif, when the state was other than 'inconsistent'.
In this case, since the drbd_make_primary_drbd-cephmon
target is running only when it is an initial setup, the
onlyif attribute ends up being redundant and there is no
need to have it.
Although the 'overwrite-data-of-peer' argument has been
replaced by 'force', they are both the same thing, they
are aliases, as can be seen at:
https://linbit.com/man/v84/?linbitman=drbdsetup.8.html
Test Plan:
PASS: Build puppet-drbd package
PASS: Backup and restore on AIO-DX system
Closes-Bug: 2031542
Depends-On: https://review.opendev.org/c/starlingx/ansible-playbooks/+/900555
Change-Id: I497bb02123fb9e4a48424d8bc36325cfd6268199
Signed-off-by: Erickson Silva de Oliveira <Erickson.SilvadeOliveira@windriver.com>