diff --git a/nova/Chart.yaml b/nova/Chart.yaml index 7d06d6f540..1cb74bccb4 100644 --- a/nova/Chart.yaml +++ b/nova/Chart.yaml @@ -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: diff --git a/nova/templates/bin/_cell-setup-init.sh.tpl b/nova/templates/bin/_cell-setup-init.sh.tpl index 192a3349e1..daa9048490 100644 --- a/nova/templates/bin/_cell-setup-init.sh.tpl +++ b/nova/templates/bin/_cell-setup-init.sh.tpl @@ -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 diff --git a/nova/values.yaml b/nova/values.yaml index d730e1c8d0..823fb0a9fb 100644 --- a/nova/values.yaml +++ b/nova/values.yaml @@ -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 diff --git a/releasenotes/notes/nova.yaml b/releasenotes/notes/nova.yaml index cfb5ab308d..a14e015728 100644 --- a/releasenotes/notes/nova.yaml +++ b/releasenotes/notes/nova.yaml @@ -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 ...