2017-04-25 10:55:25 +03:00
|
|
|
heat_template_version: pike
|
2016-06-15 06:46:44 +00:00
|
|
|
|
|
|
|
description: >
|
|
|
|
OpenStack Libvirt Service
|
|
|
|
|
|
|
|
parameters:
|
|
|
|
DockerNamespace:
|
|
|
|
description: namespace
|
|
|
|
default: 'tripleoupstream'
|
|
|
|
type: string
|
|
|
|
DockerLibvirtImage:
|
|
|
|
description: image
|
2017-01-03 22:21:44 -05:00
|
|
|
default: 'centos-binary-nova-libvirt:latest'
|
|
|
|
type: string
|
|
|
|
# we configure libvirt via the nova-compute container due to coupling
|
|
|
|
# in the puppet modules
|
2017-03-09 16:48:06 +01:00
|
|
|
DockerNovaConfigImage:
|
2017-01-03 22:21:44 -05:00
|
|
|
description: image
|
|
|
|
default: 'centos-binary-nova-compute:latest'
|
2016-06-15 06:46:44 +00:00
|
|
|
type: string
|
|
|
|
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
|
2017-02-24 06:27:58 -05:00
|
|
|
RoleName:
|
|
|
|
default: ''
|
|
|
|
description: Role name on which the service is applied
|
|
|
|
type: string
|
|
|
|
RoleParameters:
|
|
|
|
default: {}
|
|
|
|
description: Parameters specific to the role
|
2016-06-15 06:46:44 +00:00
|
|
|
EndpointMap:
|
|
|
|
default: {}
|
|
|
|
description: Mapping of service endpoint -> protocol. Typically set
|
|
|
|
via parameter_defaults in the resource registry.
|
|
|
|
type: json
|
|
|
|
|
|
|
|
resources:
|
|
|
|
|
2017-04-13 13:46:31 +00:00
|
|
|
ContainersCommon:
|
|
|
|
type: ./containers-common.yaml
|
|
|
|
|
2016-06-15 06:46:44 +00:00
|
|
|
NovaLibvirtBase:
|
|
|
|
type: ../../puppet/services/nova-libvirt.yaml
|
|
|
|
properties:
|
|
|
|
EndpointMap: {get_param: EndpointMap}
|
2017-01-03 22:21:44 -05:00
|
|
|
ServiceNetMap: {get_param: ServiceNetMap}
|
|
|
|
DefaultPasswords: {get_param: DefaultPasswords}
|
2017-02-24 06:27:58 -05:00
|
|
|
RoleName: {get_param: RoleName}
|
|
|
|
RoleParameters: {get_param: RoleParameters}
|
2016-06-15 06:46:44 +00:00
|
|
|
|
|
|
|
outputs:
|
|
|
|
role_data:
|
|
|
|
description: Role data for the Libvirt service.
|
|
|
|
value:
|
2017-01-03 22:21:44 -05:00
|
|
|
service_name: {get_attr: [NovaLibvirtBase, role_data, service_name]}
|
Don't attempt to configure live migration
When configuring nova containers via puppet, the puppet class chain
includes a class for live migration, which configures live migration
aspects in nova and libvirt.
Some of the libvirt config parts try to notify Service[libvirt], but
that service definition is only included in nova-libvirt service, it's
not included in the control plan nova services. However, our hieradata
is currently global on the node, it's not per-service, which means even
though only nova-compute and nova-libvirt service set
tripleo::profile::base::nova::manage_migration: true
this hiera setting is applied to all containers running puppet, most
notably the ones which configure nova control plane services. As a
result, configuration of nova control plane services failed, and in turn
the whole deployment failed.
This commit disables the libvirt part of live migration config until we
implement some better solution (e.g. hieradata separation between
different puppet containers, or move the libvirt config parts only to
nova-compute manifests in puppet-tripleo).
Change-Id: I0328406607d451e6bdce4d92c441c03648925fa7
Closes-Bug: #1684107
2017-04-20 11:25:23 +02:00
|
|
|
config_settings:
|
|
|
|
map_merge:
|
|
|
|
- get_attr: [NovaLibvirtBase, role_data, config_settings]
|
|
|
|
# FIXME: we need to disable migration for now as the
|
|
|
|
# hieradata is common for all services, and this means nova
|
|
|
|
# and nova_placement puppet runs also try to configure
|
|
|
|
# libvirt, and they fail. We can remove this override when
|
|
|
|
# we have hieradata separation between containers.
|
|
|
|
- tripleo::profile::base::nova::manage_migration: false
|
2017-03-01 03:09:31 +00:00
|
|
|
step_config: &step_config
|
|
|
|
get_attr: [NovaLibvirtBase, role_data, step_config]
|
|
|
|
puppet_config:
|
|
|
|
config_volume: nova_libvirt
|
|
|
|
puppet_tags: nova_config
|
|
|
|
step_config: *step_config
|
|
|
|
config_image:
|
|
|
|
list_join:
|
|
|
|
- '/'
|
2017-03-09 16:48:06 +01:00
|
|
|
- [ {get_param: DockerNamespace}, {get_param: DockerNovaConfigImage} ]
|
2017-01-03 21:57:14 -05:00
|
|
|
kolla_config:
|
2017-01-03 22:21:44 -05:00
|
|
|
/var/lib/kolla/config_files/nova-libvirt.json:
|
2017-03-29 14:11:21 +02:00
|
|
|
command: /usr/sbin/libvirtd --config /etc/libvirt/libvirtd.conf
|
2017-03-07 17:12:36 +01:00
|
|
|
permissions:
|
|
|
|
- path: /var/log/nova
|
|
|
|
owner: nova:nova
|
|
|
|
recurse: true
|
2016-06-15 06:46:44 +00:00
|
|
|
docker_config:
|
2017-01-03 22:21:44 -05:00
|
|
|
step_3:
|
2016-06-15 06:46:44 +00:00
|
|
|
nova_libvirt:
|
2017-03-06 13:58:10 -05:00
|
|
|
image:
|
|
|
|
list_join:
|
|
|
|
- '/'
|
|
|
|
- [ {get_param: DockerNamespace}, {get_param: DockerLibvirtImage} ]
|
2016-06-15 06:46:44 +00:00
|
|
|
net: host
|
|
|
|
pid: host
|
|
|
|
privileged: true
|
|
|
|
restart: always
|
|
|
|
volumes:
|
2017-04-25 10:55:25 +03:00
|
|
|
list_concat:
|
|
|
|
- {get_attr: [ContainersCommon, volumes]}
|
|
|
|
-
|
|
|
|
- /var/lib/kolla/config_files/nova-libvirt.json:/var/lib/kolla/config_files/config.json:ro
|
|
|
|
- /var/lib/config-data/nova_libvirt/etc/libvirt/:/etc/libvirt/:ro
|
|
|
|
- /lib/modules:/lib/modules:ro
|
|
|
|
- /dev:/dev
|
|
|
|
- /run:/run
|
|
|
|
- /sys/fs/cgroup:/sys/fs/cgroup
|
|
|
|
- /var/lib/nova:/var/lib/nova
|
|
|
|
# Needed to use host's virtlogd
|
|
|
|
- /var/run/libvirt:/var/run/libvirt
|
|
|
|
- /var/lib/libvirt:/var/lib/libvirt
|
|
|
|
- /etc/libvirt/qemu:/etc/libvirt/qemu
|
2017-03-07 17:12:36 +01:00
|
|
|
- /var/log/containers/nova:/var/log/nova
|
2016-06-15 06:46:44 +00:00
|
|
|
environment:
|
|
|
|
- KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
|
2017-03-08 16:20:04 +01:00
|
|
|
host_prep_tasks:
|
|
|
|
- name: create libvirt persistent data directories
|
|
|
|
file:
|
|
|
|
path: "{{ item }}"
|
|
|
|
state: directory
|
|
|
|
with_items:
|
|
|
|
- /etc/libvirt/qemu
|
|
|
|
- /var/lib/libvirt
|
2017-03-07 17:12:36 +01:00
|
|
|
- /var/log/containers/nova
|
2017-03-22 12:10:24 +01:00
|
|
|
upgrade_tasks:
|
|
|
|
- name: Stop and disable libvirtd service
|
|
|
|
tags: step2
|
|
|
|
service: name=libvirtd state=stopped enabled=no
|