Make nova use a data container

Make nova-libvirt and nova-compute use a data container called
nova_data.  This data container contains /var/lib/nova/instances
data so upgrades to nova-compute work properly.

Change-Id: I89362eb0857f7b07503c35178475bc91d0d19ca8
Closes-Bug: #1486333
This commit is contained in:
Steven Dake 2015-09-09 17:55:44 -07:00
parent e7c30a2fd4
commit 1025890e99
3 changed files with 23 additions and 2 deletions

View File

@ -40,6 +40,10 @@ nova_api_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker
nova_api_tag: "{{ openstack_release }}"
nova_api_image_full: "{{ nova_api_image }}:{{ nova_api_tag }}"
nova_data_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ kolla_install_type }}-data"
nova_data_tag: "{{ openstack_release }}"
nova_data_image_full: "{{ nova_data_image }}:{{ nova_data_tag }}"
####################
# Openstack

View File

@ -27,6 +27,22 @@
failed_when: database_user_create.stdout.split()[2] != 'SUCCESS'
run_once: True
- name: Starting Nova data container
docker:
docker_api_version: "{{ docker_api_version }}"
net: host
pull: "{{ docker_pull_policy }}"
restart_policy: "{{ docker_restart_policy }}"
restart_policy_retry: "{{ docker_restart_policy_retry }}"
state: reloaded
registry: "{{ docker_registry }}"
username: "{{ docker_registry_username }}"
password: "{{ docker_registry_password }}"
insecure_registry: "{{ docker_insecure_registry }}"
name: nova_data
image: "{{ nova_data_image_full }}"
volumes: "/var/lib/nova/instances"
- name: Starting Nova bootstrap container
docker:
detach: False

View File

@ -19,7 +19,8 @@
- "{{ node_config_directory }}/nova-libvirt/:/opt/kolla/nova-libvirt/:ro"
- "/run:/run"
- "/sys/fs/cgroup:/sys/fs/cgroup"
- "/var/lib/nova/instances"
volumes_from:
- nova_data
env:
KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}"
when: inventory_hostname in groups['compute']
@ -142,7 +143,7 @@
- "/lib/modules:/lib/modules:ro"
- "/run:/run"
volumes_from:
- nova_libvirt
- nova_data
env:
KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}"
when: inventory_hostname in groups['compute']