Standby controller in reboot loop after modifying the partition size
The root cause of this issue is that when the newly standby controller is coming up, the partition manifest calls "sm-unmanage / sm-manage" for drbd-cinder service. However at this time /var/run/sm.db is not available yet which causes "sm-unmanage / sm-manage" to fail. This commit adds a check in the partition puppet file that only if the system is up "sm-unmanage" and "sm-manage" will be called. Change-Id: I1869f024579350265684f2ee3bb5e3e74e6427cb Closes-bug: 1809009 Signed-off-by: Wei Zhou <wei.zhou@windriver.com>
This commit is contained in:
parent
9aab67d3b7
commit
0d958de077
|
@ -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 -%>
|
||||
|
|
Loading…
Reference in New Issue