d8eefd0a75
This is a queens only modified version of https://review.opendev.org/682644 due to the different deployment methods we have there. When the compute bootstrap node gets blacklisted or deployment is run with skip-deploy-identifier the discovery job we have in step_5 won't run. This runs the the discovery via an ansible playbook to make sure it runs in this conditions. In case of default deploy method the discovery is run by the discovery workflow. In case of config-download the discovery is run via the deploy_steps_tasks. Change-Id: Icda4c1eb3e8c39a01547586dbc6f0407ce846c64 Closes-Bug: #1831711 Depends-On: I54d42df162a6744806301d97bca5d94e5f380a2b
76 lines
2.7 KiB
YAML
76 lines
2.7 KiB
YAML
heat_template_version: queens
|
|
|
|
description: >
|
|
Contains a static list of common things necessary for nova-compute containers
|
|
|
|
parameters:
|
|
|
|
# Required parameters
|
|
EndpointMap:
|
|
default: {}
|
|
description: Mapping of service endpoint -> protocol. Typically set
|
|
via parameter_defaults in the resource registry.
|
|
type: json
|
|
ServiceData:
|
|
default: {}
|
|
description: Dictionary packing service data
|
|
type: json
|
|
ServiceNetMap:
|
|
default: {}
|
|
description: Mapping of service_name -> network name. Typically set
|
|
via parameter_defaults in the resource registry. This
|
|
mapping overrides those in ServiceNetMapDefaults.
|
|
type: json
|
|
DefaultPasswords:
|
|
default: {}
|
|
type: json
|
|
RoleName:
|
|
default: ''
|
|
description: Role name on which the service is applied
|
|
type: string
|
|
RoleParameters:
|
|
default: {}
|
|
description: Parameters specific to the role
|
|
type: json
|
|
|
|
outputs:
|
|
docker_config_scripts:
|
|
description: Shared docker config scripts
|
|
value:
|
|
nova_statedir_ownership.py:
|
|
mode: "0700"
|
|
content: { get_file: ../../docker_config_scripts/nova_statedir_ownership.py }
|
|
nova_wait_for_placement_service.py:
|
|
mode: "0755"
|
|
content: { get_file: ../../docker_config_scripts/nova_wait_for_placement_service.py }
|
|
nova_wait_for_compute_service.py:
|
|
mode: "0755"
|
|
content: { get_file: ../../docker_config_scripts/nova_wait_for_compute_service.py }
|
|
|
|
# deploy_steps_tasks only run in queens when config-download is used
|
|
nova_compute_common_deploy_steps_tasks:
|
|
description: Common host prep tasks for nova-compute services (compute + ironic)
|
|
value: &nova_compute_common_deploy_steps_tasks
|
|
- when: step|int == 5
|
|
block:
|
|
# discovery for non config-download method is triggered by workflow_tasks
|
|
# in docker/services/nova-api.yaml
|
|
- name: discover via nova_compute?
|
|
set_fact:
|
|
delegate_host: "{{ groups['nova_compute'][0] }}"
|
|
when:
|
|
- groups['nova_compute'] is defined and (groups['nova_compute']|length>0)
|
|
- name: discover via nova_ironic?
|
|
set_fact:
|
|
delegate_host: "{{ groups['nova_ironic'][0] }}"
|
|
when:
|
|
- delegate_host is not defined
|
|
- groups['nova_ironic'] is defined and (groups['nova_ironic']|length>0)
|
|
- name: Discovering nova hosts
|
|
command: "docker exec nova_compute nova-manage cell_v2 discover_hosts --by-service"
|
|
become: true
|
|
changed_when: False
|
|
when:
|
|
- delegate_host is defined
|
|
- inventory_hostname == delegate_host
|