tripleo-heat-templates/puppet/services/nova-libvirt-guests.yaml
Martin Schuppert 9654393f24 Add NovaResumeGuestsStateOnHostBoot and NovaResumeGuestsShutdownTimeout
NovaResumeGuestsStateOnHostBoot (true/false) parameter which
configures whether or not to start again instances which were running at
the time of a compute reboot.
This will set the resume_guests_state_on_host_boot parameter in nova.conf
and configures and enables libvirt-guests with a dependency to the
docker service to shutdown instances before the libvirt container gets
stopped.
NovaResumeGuestsShutdownTimeout specifies the number in seconds for an
instance to allow to shutdown.

Change-Id: I946600ebbc3afd88385ca89015e8f6a6c46f46ef
Closes-Bug: 1778216
Depends-On: I2766cdd66ff17756daaf1a75ad516a7af6eebddc
Depends-On: Id1cc2e75af316b864cebf601395f1111b7fb049a
2018-07-31 12:24:08 +02:00

74 lines
2.3 KiB
YAML

heat_template_version: rocky
description: >
Configure libvirt-guests
parameters:
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
EndpointMap:
default: {}
description: Mapping of service endpoint -> protocol. Typically set
via parameter_defaults in the resource registry.
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
NovaResumeGuestsStateOnHostBoot:
default: false
description: Whether to start running instance on compute host reboot
type: boolean
tags:
- role_specific
NovaResumeGuestsShutdownTimeout:
default: 300
description: Number of seconds we're willing to wait for a guest to
shut down. If this is 0, then there is no time out (use
with caution, as guests might not respond to a shutdown
request). The default value is 300 seconds (5 minutes).
type: string
tags:
- role_specific
resources:
RoleParametersValue:
type: OS::Heat::Value
properties:
type: json
value:
map_replace:
- map_replace:
- tripleo::profile::base::nova::compute::libvirt_guests::enabled: NovaResumeGuestsStateOnHostBoot
nova::compute::libvirt_guests::shutdown_timeout: NovaResumeGuestsShutdownTimeout
- values: {get_param: [RoleParameters]}
- values:
NovaResumeGuestsStateOnHostBoot: {get_param: NovaResumeGuestsStateOnHostBoot}
NovaResumeGuestsShutdownTimeout: {get_param: NovaResumeGuestsShutdownTimeout}
outputs:
role_data:
description: Role data for libvirt-guests
value:
service_name: nova_libvirt_guests
config_settings:
map_merge:
- get_attr: [RoleParametersValue, value]
step_config: |
include ::tripleo::profile::base::nova::compute::libvirt_guests