Merge "Use templating for nova cell transport-url"

This commit is contained in:
Zuul 2019-01-08 09:30:50 +00:00 committed by Gerrit Code Review
commit 9174ae0f13
2 changed files with 41 additions and 3 deletions

View File

@ -211,10 +211,10 @@ outputs:
DEFID=$(nova-manage cell_v2 list_cells | sed -e '1,3d' -e '$d' | awk -F ' *| *' '$2 == "default" {print $4}')
if [ "$DEFID" ]; then
echo "(cellv2) Updating default cell_v2 cell $DEFID"
su nova -s /bin/bash -c "/usr/bin/nova-manage cell_v2 update_cell --cell_uuid $DEFID --name=default --database_connection='CELLDB'"
su nova -s /bin/bash -c "/usr/bin/nova-manage cell_v2 update_cell --cell_uuid $DEFID --name=default --database_connection='CELLDB' --transport-url='TRANSPORTURL'"
else
echo "(cellv2) Creating default cell_v2 cell"
su nova -s /bin/bash -c "/usr/bin/nova-manage cell_v2 create_cell --name=default --database_connection='CELLDB'"
su nova -s /bin/bash -c "/usr/bin/nova-manage cell_v2 create_cell --name=default --database_connection='CELLDB' --transport-url='TRANSPORTURL'"
fi
params:
CELLDB:
@ -235,6 +235,20 @@ outputs:
- 'nova'
- '?'
- '{query}'
TRANSPORTURL:
list_join:
- ''
- - 'rabbit'
- '://'
- '{username}'
- ':'
- '{password}'
- '@'
- '{hostname}'
- ':5672'
- '/'
- '?'
- '{query}'
docker_config:
step_2:
get_attr: [NovaApiLogging, docker_config, step_2]
@ -479,7 +493,7 @@ outputs:
- name: Setup cell_v2 (map cell0)
shell:
str_replace:
template: nova-manage cell_v2 map_cell0 --database_connection='CELL0DB'
template: nova-manage cell_v2 map_cell0 --database_connection='CELL0DB' --transport-url='TRANSPORTURL'
params:
CELL0DB:
list_join:
@ -499,6 +513,20 @@ outputs:
- 'nova_cell0'
- '?'
- '{query}'
TRANSPORTURL:
list_join:
- ''
- - 'rabbit'
- '://'
- '{username}'
- ':'
- '{password}'
- '@'
- '{hostname}'
- ':5672'
- '/'
- '?'
- '{query}'
- name: Setup cell_v2 (create default cell)
# (owalsh) puppet-nova expects the cell name 'default'
shell:

View File

@ -0,0 +1,10 @@
---
features:
- |
Nova now allows use of templated urls in the database and mq
connections which will allow static configuration elements to be
applied to the urls read from the database per-node. This should
be a simpler and less obscure method of configuring things like
the per-node bind_address necessary for director's HA arrangement.
This patch addresses the templated transport urls as part 2.
Nova support added here - https://review.openstack.org/578163