tripleo-heat-templates/docker/services/nova-compute-common.yaml
Martin Schuppert cc61ff93ec Change step to start nova placement and make compute wait for it
There is a deployment race where nova-placement fails to start if
the nova api db migration have not finished before starting it.
We start nova placement early to make sure it is up before the
nova-compute services get started. Since in HA scenario there is
no sync in between the nodes on the current worked deployment step
we might have the situation that the placement service gets started
on C1/2 when the nova api db sync is not yet finished on C0.

We have two possibilities:
1) start placement later and verify that nova-computes recover correct
2) verify that db migration on nova_api db finished before start nova-
placement on the controllers

2) which was addressed via https://review.openstack.org/610966 showed
problems:
a) the docker/podman container failed to start with some file not found
error, therefore this was reverted in https://review.openstack.org/619607

b) when the scrip were running on different controllers at the same
time, the way how nova's db_version() is implemented has issues, which
is being worked on in https://review.openstack.org/619622

This patch addresses 1) and moves placement service start to step_4
and adds an additional task on the computes to wait until the placement
service is up.

Closes-Bug: #1784155

Change-Id: Ifb5ffc4b25f5ca266560bc0ac96c73071ebd1c9f
2018-11-26 17:44:47 +01:00

46 lines
1.3 KiB
YAML

heat_template_version: rocky
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: "0700"
content: { get_file: ../../docker_config_scripts/nova_wait_for_placement_service.py }