Add option to extend the wait for cell-setup-init
In some deployement environments, nova compute processes took a bit longer to register on all hosts, and vm/server is instantiated almost immediately before the process is registered on remaining hosts. This PS enhances the cell-setup-init script to enable option to extend the wait before performing discover hosts. Change-Id: Ie9867e64c554d4f39fdc7432823a1869f0b4a520
This commit is contained in:
parent
96c7ec86c8
commit
6b785b16dc
@ -14,7 +14,7 @@ apiVersion: v1
|
||||
appVersion: v1.0.0
|
||||
description: OpenStack-Helm Nova
|
||||
name: nova
|
||||
version: 0.2.22
|
||||
version: 0.2.23
|
||||
home: https://docs.openstack.org/nova/latest/
|
||||
icon: https://www.openstack.org/themes/openstack/images/project-mascots/Nova/OpenStack_Project_Nova_vertical.png
|
||||
sources:
|
||||
|
@ -16,6 +16,34 @@ limitations under the License.
|
||||
|
||||
set -ex
|
||||
|
||||
{{- if .Values.jobs.cell_setup.extended_wait.enabled }}
|
||||
iteration={{ .Values.jobs.cell_setup.extended_wait.iteration }}
|
||||
duration={{ .Values.jobs.cell_setup.extended_wait.duration }}
|
||||
|
||||
extra_wait=true
|
||||
|
||||
while [[ "$extra_wait" == true ]]
|
||||
do
|
||||
if [[ -z "$(openstack compute service list --service nova-compute -f value -c State | grep '^down$')" ]]
|
||||
then
|
||||
# No more down
|
||||
extra_wait=false
|
||||
else
|
||||
sleep "$duration"
|
||||
|
||||
if [[ "$iteration" -gt 1 ]]
|
||||
then
|
||||
((iteration=iteration-1))
|
||||
else
|
||||
extra_wait=false
|
||||
|
||||
# List out the info to see whether any nodes is still down
|
||||
openstack compute service list --service nova-compute
|
||||
fi
|
||||
fi
|
||||
done
|
||||
{{- end }}
|
||||
|
||||
until openstack compute service list --service nova-compute -f value -c State | grep -q "^up$" ;do
|
||||
echo "Waiting for Nova Compute processes to register"
|
||||
sleep 10
|
||||
|
@ -105,6 +105,10 @@ jobs:
|
||||
history:
|
||||
success: 3
|
||||
failed: 1
|
||||
extended_wait:
|
||||
enabled: false
|
||||
iteration: 3
|
||||
duration: 5
|
||||
service_cleaner:
|
||||
cron: "0 */1 * * *"
|
||||
starting_deadline: 600
|
||||
|
@ -43,4 +43,5 @@ nova:
|
||||
- 0.2.20 Update script to true of grep does get anything.
|
||||
- 0.2.21 Helm 3 - Fix Job Labels
|
||||
- 0.2.22 Update htk requirements repo
|
||||
- 0.2.23 Add option to enable extra wait for cell-setup-init
|
||||
...
|
||||
|
Loading…
x
Reference in New Issue
Block a user