From 2d347e8fd382bbb99c9747328e41734b331f745c Mon Sep 17 00:00:00 2001 From: Michael Polenchuk Date: Fri, 12 Jan 2018 14:37:10 +0400 Subject: [PATCH] Retry cinder volume state The service of cinder-volume restarts too quickly after package installation with default/incorrect configuration and goes over restart threshold, so systemd stops attempt to restart any further causing state faulure. To fix it properly the RestartSec (i.e. restart delay) param should be added into cinder-volume.service unit. Change-Id: Ic8591e8ef52a3d439122f276d275e56bd2442ce6 Signed-off-by: Michael Polenchuk (cherry picked from commit 1ea49591080442d8db86fff60031d3dc41142274) --- mcp/config/states/openstack_ha | 2 +- mcp/config/states/openstack_noha | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/mcp/config/states/openstack_ha b/mcp/config/states/openstack_ha index fbddc6e83..02b700975 100755 --- a/mcp/config/states/openstack_ha +++ b/mcp/config/states/openstack_ha @@ -46,7 +46,7 @@ salt -I 'nova:controller' state.sls nova -b 1 salt -I 'heat:server' state.sls heat -b 1 wait_for 5 "salt -I 'cinder:controller' state.sls cinder -b 1" -salt -I 'cinder:volume' state.sls cinder +wait_for 3 "salt -I 'cinder:volume' state.sls cinder" salt -I 'neutron:server' state.sls neutron -b 1 salt -I 'neutron:gateway' state.sls neutron.gateway diff --git a/mcp/config/states/openstack_noha b/mcp/config/states/openstack_noha index 369e16504..cc46ac10e 100755 --- a/mcp/config/states/openstack_noha +++ b/mcp/config/states/openstack_noha @@ -9,6 +9,9 @@ CI_DEBUG=${CI_DEBUG:-0}; [[ "${CI_DEBUG}" =~ (false|0) ]] || set -x +# shellcheck disable=SC1090 +source "$(dirname "${BASH_SOURCE[0]}")/../../scripts/lib.sh" + salt -I 'nfs:server' file.mkdir /srv/nova/instances salt -I 'nfs:server' state.sls nfs salt -I 'nfs:client' state.sls nfs @@ -34,7 +37,7 @@ salt -I 'nova:controller' state.sls nova salt -I 'heat:server' state.sls heat salt -I 'cinder:controller' state.sls cinder -salt -I 'cinder:volume' state.sls cinder +wait_for 3 "salt -I 'cinder:volume' state.sls cinder" salt -I 'neutron:server' state.sls neutron salt -I 'neutron:gateway' state.sls neutron -- 2.16.6