Ensure octavia flavor gets configured if composable octavia

The octavia service templates configure the octavia flavor through the
controller-worker is deployed on a node other than the controller. Since
this uses docker_puppet_tasks, it is only run on the bootstrap node
which at the moment means the first controller. This patch moves the
flavor creation to the docker API template to make sure the flavor gets
created when deploying worker components in an non-standard role.

Closes-Bug: #1797443

Change-Id: Id823672b82ea60f355d1f01068f802567d687da5
This commit is contained in:
Brent Eagles 2018-10-11 10:34:48 -02:30
parent ad06ebce20
commit 7d533b7737
2 changed files with 23 additions and 10 deletions

View File

@ -68,12 +68,25 @@ resources:
RoleName: {get_param: RoleName}
RoleParameters: {get_param: RoleParameters}
OctaviaFlavor:
type: ../../puppet/services/octavia-worker.yaml
properties:
EndpointMap: {get_param: EndpointMap}
ServiceData: {get_param: ServiceData}
ServiceNetMap: {get_param: ServiceNetMap}
DefaultPasswords: {get_param: DefaultPasswords}
RoleName: {get_param: RoleName}
RoleParameters: {get_param: RoleParameters}
outputs:
role_data:
description: Role data for the Octavia API role.
value:
service_name: {get_attr: [OctaviaApiPuppetBase, role_data, service_name]}
config_settings: {get_attr: [OctaviaApiPuppetBase, role_data, config_settings]}
config_settings:
map_merge:
- {get_attr: [OctaviaApiPuppetBase, role_data, config_settings]}
- {get_attr: [OctaviaFlavor, role_data, config_settings]}
service_config_settings:
map_merge:
- get_attr: [OctaviaApiPuppetBase, role_data, service_config_settings]
@ -107,6 +120,15 @@ outputs:
dest: "/"
merge: true
preserve_properties: true
docker_puppet_tasks:
step_5:
config_volume: octavia
puppet_tags: nova_flavor
step_config:
get_attr: [OctaviaFlavor, role_data, step_config]
config_image: {get_param: DockerOctaviaConfigImage}
volumes:
- /var/lib/config-data/puppet-generated/nova/etc/nova:/etc/nova:ro
docker_config:
# Kolla_bootstrap/db_sync runs before permissions set by kolla_config
step_2:

View File

@ -132,15 +132,6 @@ outputs:
- /var/log/containers/octavia:/var/log/octavia
environment:
- KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
docker_puppet_tasks:
step_5:
config_volume: octavia
puppet_tags: nova_flavor
step_config:
get_attr: [OctaviaWorkerPuppetBase, role_data, step_config]
config_image: {get_param: DockerOctaviaConfigImage}
volumes:
- /var/lib/config-data/puppet-generated/nova/etc/nova:/etc/nova:ro
host_prep_tasks:
- name: create persistent logs directory
file: