From 9a8a476d9fb985f774baaf3f734edd021ca66e69 Mon Sep 17 00:00:00 2001 From: "DeJaeger, Darren (dd118r)" Date: Mon, 2 Aug 2021 08:56:56 -0400 Subject: [PATCH] Nova bootstrap job efficiency This PS attempts to make the Nova bootstrap job a little speedier. It's been noticed that flavor check/creation on initial deployment are rather slow, so this backgrounds the creation of each flavor, so that the defined flavors can be checked/create in parallel, rather than one at a time. Waits for the jobs to finish at the end. Change-Id: Ib9ab345e5aee697a41414e927910335dd286072f --- nova/Chart.yaml | 2 +- nova/templates/bin/_bootstrap.sh.tpl | 15 +++++++++------ releasenotes/notes/nova.yaml | 1 + 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/nova/Chart.yaml b/nova/Chart.yaml index 16d7a12e72..c3514337e4 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.11 +version: 0.2.12 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/_bootstrap.sh.tpl b/nova/templates/bin/_bootstrap.sh.tpl index 4d69c097e2..9cb48b1270 100644 --- a/nova/templates/bin/_bootstrap.sh.tpl +++ b/nova/templates/bin/_bootstrap.sh.tpl @@ -23,15 +23,18 @@ export HOME=/tmp # longer treated specially. Though the same behavior can be achieved w/o specifying #--id flag. # https://review.opendev.org/c/openstack/python-openstackclient/+/750151 -openstack flavor show {{ .name }} || \ - openstack flavor create {{ .name }} \ +{ + openstack flavor show {{ .name }} || \ + openstack flavor create {{ .name }} \ {{ if .id }} \ - --id {{ .id }} \ + --id {{ .id }} \ {{ end }} \ - --ram {{ .ram }} \ - --disk {{ .disk }} \ - --vcpus {{ .vcpus }} + --ram {{ .ram }} \ + --disk {{ .disk }} \ + --vcpus {{ .vcpus }} +} & {{ end }} +wait {{ end }} {{ if .Values.bootstrap.wait_for_computes.enabled }} diff --git a/releasenotes/notes/nova.yaml b/releasenotes/notes/nova.yaml index 3ce9044521..6ca8441c79 100644 --- a/releasenotes/notes/nova.yaml +++ b/releasenotes/notes/nova.yaml @@ -32,4 +32,5 @@ nova: - 0.2.9 Add image clean up to rally test - 0.2.10 Add tls cert mounting to nova-novnc - 0.2.11 Add Victoria and Wallaby releases support + - 0.2.12 Bootstrap flavor creation efficiencies ...