Make nova nova_instance_datadir_volume configurable.

User can use custom directory for nova instance.
For example using a shared file system as backend.

Change-Id: I11fe4891719a2e2a34888d8b798df5602e294e4f
This commit is contained in:
MinSun 2018-07-05 10:16:59 +08:00
parent fd3f54faed
commit f692b4c9ac
4 changed files with 10 additions and 3 deletions

View File

@ -701,6 +701,7 @@ nova_backend_ceph: "{{ enable_ceph }}"
nova_backend: "{{ 'rbd' if nova_backend_ceph | bool else 'default' }}" nova_backend: "{{ 'rbd' if nova_backend_ceph | bool else 'default' }}"
# Valid options are [ kvm, qemu, vmware, xenapi ] # Valid options are [ kvm, qemu, vmware, xenapi ]
nova_compute_virt_type: "kvm" nova_compute_virt_type: "kvm"
nova_instance_datadir_volume: "nova_compute"
####################### #######################
# Murano options # Murano options

View File

@ -6,6 +6,7 @@
enable_haproxy: "{{ enable_haproxy }}" enable_haproxy: "{{ enable_haproxy }}"
enable_swift: "{{ enable_swift }}" enable_swift: "{{ enable_swift }}"
glance_file_datadir_volume: "{{ glance_file_datadir_volume }}" glance_file_datadir_volume: "{{ glance_file_datadir_volume }}"
nova_instance_datadir_volume: "{{ nova_instance_datadir_volume }}"
kolla_internal_vip_address: "{{ kolla_internal_vip_address }}" kolla_internal_vip_address: "{{ kolla_internal_vip_address }}"
kolla_external_vip_address: "{{ kolla_external_vip_address }}" kolla_external_vip_address: "{{ kolla_external_vip_address }}"
kolla_dev_repos_directory: "{{ kolla_dev_repos_directory }}" kolla_dev_repos_directory: "{{ kolla_dev_repos_directory }}"

View File

@ -18,7 +18,7 @@ nova_services:
- "/sys/fs/cgroup:/sys/fs/cgroup" - "/sys/fs/cgroup:/sys/fs/cgroup"
- "kolla_logs:/var/log/kolla/" - "kolla_logs:/var/log/kolla/"
- "libvirtd:/var/lib/libvirt" - "libvirtd:/var/lib/libvirt"
- "nova_compute:/var/lib/nova/" - "{{ nova_instance_datadir_volume }}:/var/lib/nova/"
- "{% if enable_cinder_backend_nfs | bool %}/var/lib/nova/mnt:/var/lib/nova/mnt:shared{% endif %}" - "{% if enable_cinder_backend_nfs | bool %}/var/lib/nova/mnt:/var/lib/nova/mnt:shared{% endif %}"
- "nova_libvirt_qemu:/etc/libvirt/qemu" - "nova_libvirt_qemu:/etc/libvirt/qemu"
nova-ssh: nova-ssh:
@ -30,7 +30,7 @@ nova_services:
- "{{ node_config_directory }}/nova-ssh/:{{ container_config_directory }}/:ro" - "{{ node_config_directory }}/nova-ssh/:{{ container_config_directory }}/:ro"
- "/etc/localtime:/etc/localtime:ro" - "/etc/localtime:/etc/localtime:ro"
- "kolla_logs:/var/log/kolla" - "kolla_logs:/var/log/kolla"
- "nova_compute:/var/lib/nova" - "{{ nova_instance_datadir_volume }}:/var/lib/nova"
- "{% if enable_cinder_backend_nfs | bool %}/var/lib/nova/mnt:/var/lib/nova/mnt:shared{% endif %}" - "{% if enable_cinder_backend_nfs | bool %}/var/lib/nova/mnt:/var/lib/nova/mnt:shared{% endif %}"
placement-api: placement-api:
container_name: "placement_api" container_name: "placement_api"
@ -124,7 +124,7 @@ nova_services:
- "kolla_logs:/var/log/kolla/" - "kolla_logs:/var/log/kolla/"
- "{% if enable_iscsid | bool %}iscsi_info:/etc/iscsi{% endif %}" - "{% if enable_iscsid | bool %}iscsi_info:/etc/iscsi{% endif %}"
- "libvirtd:/var/lib/libvirt" - "libvirtd:/var/lib/libvirt"
- "nova_compute:/var/lib/nova/" - "{{ nova_instance_datadir_volume }}:/var/lib/nova/"
- "{% if enable_cinder_backend_nfs | bool %}/var/lib/nova/mnt:/var/lib/nova/mnt:shared{% endif %}" - "{% if enable_cinder_backend_nfs | bool %}/var/lib/nova/mnt:/var/lib/nova/mnt:shared{% endif %}"
nova-compute-ironic: nova-compute-ironic:
container_name: "nova_compute_ironic" container_name: "nova_compute_ironic"

View File

@ -56,6 +56,11 @@ if [[ "$glance_file_datadir_volume" != "glance" && -d "$glance_file_datadir_volu
rm -rfv $glance_file_datadir_volume rm -rfv $glance_file_datadir_volume
fi fi
if [[ "$nova_instance_datadir_volume" != "nova_compute" && -d "$nova_instance_datadir_volume" ]]; then
echo "Removing nova_compute volume if it is customzied"
rm -rfv $nova_instance_datadir_volume
fi
FOLDER_PATH="/etc/kolla/" FOLDER_PATH="/etc/kolla/"
if [[ -e "$FOLDER_PATH/ovsdpdk-db/ovs-dpdkctl.sh" ]]; then if [[ -e "$FOLDER_PATH/ovsdpdk-db/ovs-dpdkctl.sh" ]]; then