From 96fb31d7459bd4e05e052053177dce4d38cdaf90 Mon Sep 17 00:00:00 2001 From: Sabari Kumar Murugesan Date: Thu, 5 Mar 2015 16:52:18 -0800 Subject: [PATCH] Update config and docs for multiple datastores support The patch adds the necessary configuration options defined in the multiple datastore spec for VMware Store backend. Approved Spec: I16229da839ab7f147c36d5857e2269999e8215d7 Implementation: I176f1143cd2d9b0a01a0f4f4256e7ac7d9b09afd blueprint vmware-store-multiple-datastores Depends-On: I4a52347cdbc238a3cb36a67d453591d0f8576a39 UpgradeImpact DocImpact Change-Id: Ic459b3b579d2b02e9abd9655ea2eb3e99fddcfcd --- doc/source/configuring.rst | 32 ++++++++++++++++++++++++++++++++ etc/glance-api.conf | 16 ++++++++++++++++ 2 files changed, 48 insertions(+) diff --git a/doc/source/configuring.rst b/doc/source/configuring.rst index e3567cd7b5..ce81e367d3 100644 --- a/doc/source/configuring.rst +++ b/doc/source/configuring.rst @@ -1079,6 +1079,38 @@ Can only be specified in configuration files. Datastore name associated with the ``vmware_datacenter_path`` +* ``vmware_datastores`` + +Optional. Default: Not set. + +This option can only be specified in configuration file and is specific +to the VMware storage backend. + +vmware_datastores allows administrators to configure multiple datastores to +save glance image in the VMware store backend. The required format for the +option is: ::. + +where datacenter_path is the inventory path to the datacenter where the +datastore is located. An optional weight can be given to specify the priority. + +Example:: + + vmware_datastores = datacenter1:datastore1 + vmware_datastores = dc_folder/datacenter2:datastore2:100 + vmware_datastores = datacenter1:datastore3:200 + +**NOTE**: + + - This option can be specified multiple times to specify multiple datastores. + - Either vmware_datastore_name or vmware_datastores option must be specified + in glance-api.conf + - Datastore with weight 200 has precedence over datastore with weight 100. + - If no weight is specified, default weight '0' is associated with it. + - If two datastores have same weight, the datastore with maximum free space + will be chosen to store the image. + - If the datacenter path or datastore name contains a colon (:) symbol, it + must be escaped with a backslash. + * ``vmware_api_retry_count=TIMES`` Optional. Default: ``10`` diff --git a/etc/glance-api.conf b/etc/glance-api.conf index 326dbd6c4f..aaaf2096d4 100644 --- a/etc/glance-api.conf +++ b/etc/glance-api.conf @@ -738,11 +738,27 @@ sheepdog_store_chunk_size = 64 # Inventory path to a datacenter (string value) # Value optional when vmware_server_ip is an ESX/ESXi host: if specified # should be `ha-datacenter`. +# Deprecated in favor of vmware_datastores. #vmware_datacenter_path = # Datastore associated with the datacenter (string value) +# Deprecated in favor of vmware_datastores. #vmware_datastore_name = +# A list of datastores where the image can be stored. +# This option may be specified multiple times for specifying multiple +# datastores. Either one of vmware_datastore_name or vmware_datastores is +# required. The datastore name should be specified after its datacenter +# path, seperated by ":". An optional weight may be given after the datastore +# name, seperated again by ":". Thus, the required format becomes +# ::. +# When adding an image, the datastore with highest weight will be selected, +# unless there is not enough free space available in cases where the image size +# is already known. If no weight is given, it is assumed to be zero and the +# directory will be considered for selection last. If multiple datastores have +# the same weight, then the one with the most free space available is selected. +#vmware_datastores = + # The number of times we retry on failures # e.g., socket error, etc (integer value) #vmware_api_retry_count = 10