Add customizable gnocchi volume

Change-Id: I8d21546847a2f5fa418e07cfe79016a349af4783
Signed-off-by: ZijianGuo <guozijn@gmail.com>
This commit is contained in:
ZijianGuo 2019-01-02 11:42:00 +08:00
parent 69666b6665
commit 6d876934ea
4 changed files with 10 additions and 3 deletions

View File

@ -717,6 +717,7 @@ gnocchi_backend_storage: "{% if enable_ceph | bool and not enable_swift | bool %
# Valid options are [redis, ''] # Valid options are [redis, '']
gnocchi_incoming_storage: "{{ 'redis' if enable_redis | bool else '' }}" gnocchi_incoming_storage: "{{ 'redis' if enable_redis | bool else '' }}"
gnocchi_metric_datadir_volume: "gnocchi"
################################# #################################

View File

@ -7,6 +7,7 @@
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 }}" nova_instance_datadir_volume: "{{ nova_instance_datadir_volume }}"
gnocchi_metric_datadir_volume: "{{ gnocchi_metric_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

@ -10,7 +10,7 @@ gnocchi_services:
volumes: volumes:
- "{{ node_config_directory }}/gnocchi-api/:{{ container_config_directory }}/:ro" - "{{ node_config_directory }}/gnocchi-api/:{{ container_config_directory }}/:ro"
- "/etc/localtime:/etc/localtime:ro" - "/etc/localtime:/etc/localtime:ro"
- "gnocchi:/var/lib/gnocchi/" - "{{ gnocchi_metric_datadir_volume }}:/var/lib/gnocchi/"
- "kolla_logs:/var/log/kolla/" - "kolla_logs:/var/log/kolla/"
dimensions: "{{ gnocchi_api_dimensions }}" dimensions: "{{ gnocchi_api_dimensions }}"
haproxy: haproxy:
@ -32,7 +32,7 @@ gnocchi_services:
volumes: volumes:
- "{{ node_config_directory }}/gnocchi-metricd/:{{ container_config_directory }}/:ro" - "{{ node_config_directory }}/gnocchi-metricd/:{{ container_config_directory }}/:ro"
- "/etc/localtime:/etc/localtime:ro" - "/etc/localtime:/etc/localtime:ro"
- "gnocchi:/var/lib/gnocchi/" - "{{ gnocchi_metric_datadir_volume }}:/var/lib/gnocchi/"
- "kolla_logs:/var/log/kolla/" - "kolla_logs:/var/log/kolla/"
dimensions: "{{ gnocchi_metricd_dimensions }}" dimensions: "{{ gnocchi_metricd_dimensions }}"
gnocchi-statsd: gnocchi-statsd:
@ -43,7 +43,7 @@ gnocchi_services:
volumes: volumes:
- "{{ node_config_directory }}/gnocchi-statsd/:{{ container_config_directory }}/:ro" - "{{ node_config_directory }}/gnocchi-statsd/:{{ container_config_directory }}/:ro"
- "/etc/localtime:/etc/localtime:ro" - "/etc/localtime:/etc/localtime:ro"
- "gnocchi:/var/lib/gnocchi/" - "{{ gnocchi_metric_datadir_volume }}:/var/lib/gnocchi/"
- "kolla_logs:/var/log/kolla/" - "kolla_logs:/var/log/kolla/"
dimensions: "{{ gnocchi_statsd_dimensions }}" dimensions: "{{ gnocchi_statsd_dimensions }}"

View File

@ -61,6 +61,11 @@ if [[ "$nova_instance_datadir_volume" != "nova_compute" && -d "$nova_instance_da
rm -rfv $nova_instance_datadir_volume rm -rfv $nova_instance_datadir_volume
fi fi
if [[ "$gnocchi_metric_datadir_volume" != "gnocchi" && -d "$gnocchi_metric_datadir_volume" ]]; then
echo "Removing gnocchi volume if it is customzied"
rm -rfv $gnocchi_metric_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