Merge "Standby controller in reboot loop after modifying the partition size"

This commit is contained in:
Zuul 2018-12-18 17:04:52 +00:00 committed by Gerrit Code Review
commit 018352bd2e
1 changed files with 15 additions and 6 deletions

View File

@ -1,10 +1,14 @@
/bin/true # puppet requires this for correct template parsing
<% if @shutdown_drbd_resource and (@is_controller_active.to_s == 'false' or @system_mode == 'simplex') -%>
sm-unmanage service <%= @shutdown_drbd_resource %>
if [ -f /var/run/goenabled ]; then
sm-unmanage service <%= @shutdown_drbd_resource %>
fi
<% if @shutdown_drbd_resource == 'drbd-cinder' and @system_mode == 'simplex' -%>
sm-unmanage service cinder-lvm
if [ -f /var/run/goenabled ]; then
sm-unmanage service cinder-lvm
fi
targetctl clear || exit 5
lvchange -an cinder-volumes || exit 10
vgchange -an cinder-volumes || exit 20
@ -28,7 +32,6 @@ done
if [[ DRBD_UNCONFIGURED_DELAY -eq DRBD_UNCONFIGURED_TIMEOUT ]]; then
exit 40
fi
<% end -%>
manage-partitions <%= @action %> '<%= @config %>'
@ -41,9 +44,15 @@ drbdadm primary drbd-cinder || exit 50
vgchange -ay cinder-volumes || exit 60
lvchange -ay cinder-volumes || exit 70
targetctl restore || exit 75
sm-manage service <%= @shutdown_drbd_resource %>
sm-manage service cinder-lvm
if [ -f /var/run/goenabled ]; then
sm-manage service <%= @shutdown_drbd_resource %>
sm-manage service cinder-lvm
fi
<% end -%>
sm-manage service <%= @shutdown_drbd_resource %>
if [ -f /var/run/goenabled ]; then
sm-manage service <%= @shutdown_drbd_resource %>
fi
<% end -%>