Nova: Update Cell management to allow db updates and improve rabbit
This PS allows the db connection string for the singular cell that OSH currently supports to be updated, and also uses the full connection string for the transport url. Change-Id: I700133263273e04dad5b3e69d5e1f8255323e560 Signed-off-by: Pete Birley <pete@port.direct>
This commit is contained in:
parent
2c166a726c
commit
09616b4f3f
@ -27,18 +27,19 @@ function manage_cells () {
|
||||
nova-manage cell_v2 list_cells | grep -q " cell1 " || \
|
||||
nova-manage cell_v2 create_cell --name=cell1 --verbose
|
||||
|
||||
# NOTE: We do this to allow the transport url to be updated.
|
||||
CELL1_ID=$(nova-manage cell_v2 list_cells | awk -F '|' '/ cell1 / { print $3 }' | tr -d ' ')
|
||||
set +x
|
||||
if [ -z "${TRANSPORT_URL}" ]; then
|
||||
echo "Error: Transport URL is not set, exiting."
|
||||
exit 1
|
||||
else
|
||||
nova-manage cell_v2 update_cell \
|
||||
--cell_uuid="${CELL1_ID}" \
|
||||
--name="cell1" \
|
||||
--transport-url="${TRANSPORT_URL}"
|
||||
fi
|
||||
for VAR in TRANSPORT_URL DB_CONNECTION; do
|
||||
if [ -z "${!VAR}" ]; then
|
||||
echo "ERROR: missing $VAR variable"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
nova-manage cell_v2 update_cell \
|
||||
--cell_uuid="${CELL1_ID}" \
|
||||
--name="cell1" \
|
||||
--transport-url="${TRANSPORT_URL}" \
|
||||
--database_connection="${DB_CONNECTION}"
|
||||
set -x
|
||||
fi
|
||||
}
|
||||
|
@ -22,6 +22,11 @@ env:
|
||||
secretKeyRef:
|
||||
name: {{ $envAll.Values.secrets.oslo_messaging.nova }}
|
||||
key: TRANSPORT_URL
|
||||
- name: DB_CONNECTION
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ $envAll.Values.secrets.oslo_db.nova }}
|
||||
key: DB_CONNECTION
|
||||
{{- end }}
|
||||
|
||||
{{- if .Values.manifests.job_db_sync }}
|
||||
|
@ -26,6 +26,6 @@ metadata:
|
||||
type: Opaque
|
||||
data:
|
||||
RABBITMQ_CONNECTION: {{ tuple "oslo_messaging" "internal" $userClass "http" $envAll | include "helm-toolkit.endpoints.authenticated_endpoint_uri_lookup" | b64enc }}
|
||||
TRANSPORT_URL: {{ tuple "oslo_messaging" "internal" $userClass "amqp" $envAll | include "helm-toolkit.endpoints.authenticated_endpoint_uri_lookup" | b64enc }}
|
||||
TRANSPORT_URL: {{ tuple "oslo_messaging" "internal" $userClass "amqp" $envAll | include "helm-toolkit.endpoints.authenticated_transport_endpoint_uri_lookup" | b64enc }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
Loading…
Reference in New Issue
Block a user