Support to configure VMware vCenter VMDK driver cinder volume driver
If set the volume driver as cinder.volume.drivers.vmware.vmdk.VMwareVcVmdkDriver, we need provide the vmware configuration in cinder.conf Implements: blueprint vmwareapi-support Change-Id: I4ef75636d4a561e371cdab58539d3e32e63ef9b9
This commit is contained in:
		@@ -2,6 +2,9 @@ openstack-block-storage Cookbook CHANGELOG
 | 
			
		||||
==============================
 | 
			
		||||
This file is used to list changes made in each version of the openstack-block-storage cookbook.
 | 
			
		||||
 | 
			
		||||
## 8.2.0
 | 
			
		||||
* VMware VMDK driver support
 | 
			
		||||
 | 
			
		||||
## 8.1.0
 | 
			
		||||
* Add client recipe
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										11
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										11
									
								
								README.md
									
									
									
									
									
								
							@@ -140,6 +140,17 @@ Cinder attributes
 | 
			
		||||
* `openstack['block-storage']['storwize']['storwize_svc_multipath_enabled'] - Connect with multipath (FC only; iSCSI multipath is controlled by Nova)
 | 
			
		||||
* `openstack['block-storage']['storwize']['storwize_svc_multihostmap_enabled'] - Allows vdisk to multi host mapping
 | 
			
		||||
 | 
			
		||||
### VMware attributes ###
 | 
			
		||||
* `openstack['block-storage']['vmware']['vmware_host_ip']` - IP address for connecting to VMware ESX/VC server. (string value)
 | 
			
		||||
* `openstack['block-storage']['vmware']['vmware_host_username']` - Username for authenticating with VMware ESX/VC server. (string value)
 | 
			
		||||
* `openstack']['block-storage']['vmware']['vmware_host_password']` - Password for authenticating with VMware ESX/VC server. (string value)
 | 
			
		||||
* `openstack']['block-storage']['vmware']['vmware_wsdl_location']` - Optional VIM service WSDL Location e.g http://<server>/vimService.wsdl. Optional over-ride to default location for bug work-arounds. (string value)
 | 
			
		||||
* `openstack']['block-storage']['vmware']['vmware_api_retry_count']` - Number of times VMware ESX/VC server API must be retried upon connection related issues. (integer value, default 10)
 | 
			
		||||
* `openstack']['block-storage']['vmware']['vmware_task_poll_interval']` - The interval (in seconds) for polling remote tasks invoked on VMware ESX/VC server. (integer value, default 5)
 | 
			
		||||
* `openstack']['block-storage']['vmware']['vmware_volume_folder']` - Name for the folder in the VC datacenter that will contain cinder volumes. (string value, default cinder-volumes)
 | 
			
		||||
* `openstack']['block-storage']['vmware']['vmware_image_transfer_timeout_secs']` - Timeout in seconds for VMDK volume transfer between Cinder and Glance. (integer value, default 7200)
 | 
			
		||||
* `openstack']['block-storage']['vmware']['vmware_max_objects_retrieval']` - Max number of objects to be retrieved per batch. (integer value, default 100)
 | 
			
		||||
 | 
			
		||||
Testing
 | 
			
		||||
=====
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -151,6 +151,17 @@ default['openstack']['block-storage']['emc']['EcomServerPort'] = '5988'
 | 
			
		||||
default['openstack']['block-storage']['emc']['EcomUserName'] = 'admin'
 | 
			
		||||
default['openstack']['block-storage']['emc']['MaskingView'] = nil
 | 
			
		||||
 | 
			
		||||
# VMware Support
 | 
			
		||||
default['openstack']['block-storage']['vmware']['vmware_host_ip'] = ''
 | 
			
		||||
default['openstack']['block-storage']['vmware']['vmware_host_username'] = ''
 | 
			
		||||
default['openstack']['block-storage']['vmware']['vmware_host_password'] = ''
 | 
			
		||||
default['openstack']['block-storage']['vmware']['vmware_wsdl_location'] = nil
 | 
			
		||||
default['openstack']['block-storage']['vmware']['vmware_api_retry_count'] = 10
 | 
			
		||||
default['openstack']['block-storage']['vmware']['vmware_task_poll_interval'] = 5
 | 
			
		||||
default['openstack']['block-storage']['vmware']['vmware_volume_folder'] = 'cinder-volumes'
 | 
			
		||||
default['openstack']['block-storage']['vmware']['vmware_image_transfer_timeout_secs'] = 7200
 | 
			
		||||
default['openstack']['block-storage']['vmware']['vmware_max_objects_retrieval'] = 100
 | 
			
		||||
 | 
			
		||||
# logging attribute
 | 
			
		||||
default['openstack']['block-storage']['syslog']['use'] = false
 | 
			
		||||
default['openstack']['block-storage']['syslog']['facility'] = 'LOG_LOCAL2'
 | 
			
		||||
 
 | 
			
		||||
@@ -5,7 +5,7 @@ maintainer_email 'cookbooks@lists.tfoundry.com'
 | 
			
		||||
license          'Apache 2.0'
 | 
			
		||||
description      'The OpenStack Advanced Volume Management service Cinder.'
 | 
			
		||||
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
 | 
			
		||||
version          '8.1.0'
 | 
			
		||||
version          '8.2.0'
 | 
			
		||||
 | 
			
		||||
recipe           'openstack-block-storage::api', 'Installs the cinder-api, sets up the cinder database, and cinder service/user/endpoints in keystone'
 | 
			
		||||
recipe           'openstack-block-storage::client', 'Install packages required for cinder client'
 | 
			
		||||
 
 | 
			
		||||
@@ -304,6 +304,42 @@ describe 'openstack-block-storage::cinder-common' do
 | 
			
		||||
        expect(@chef_run).to render_file(@file.name).with_content('cinder_emc_config_file=/etc/test/config.file')
 | 
			
		||||
      end
 | 
			
		||||
    end
 | 
			
		||||
 | 
			
		||||
    describe 'vmware vmdk settings' do
 | 
			
		||||
      before do
 | 
			
		||||
        @chef_run.node.set['openstack']['block-storage']['volume']['driver'] = 'cinder.volume.drivers.vmware.vmdk.VMwareVcVmdkDriver'
 | 
			
		||||
        @chef_run.converge 'openstack-block-storage::cinder-common'
 | 
			
		||||
      end
 | 
			
		||||
 | 
			
		||||
      [
 | 
			
		||||
        /^vmware_host_ip = $/,
 | 
			
		||||
        /^vmware_host_username = $/,
 | 
			
		||||
        /^vmware_host_password = $/,
 | 
			
		||||
        /^vmware_api_retry_count = 10$/,
 | 
			
		||||
        /^vmware_task_poll_interval = 5$/,
 | 
			
		||||
        /^vmware_volume_folder = cinder-volumes/,
 | 
			
		||||
        /^vmware_image_transfer_timeout_secs = 7200$/,
 | 
			
		||||
        /^vmware_max_objects_retrieval = 100$/
 | 
			
		||||
      ].each do |content|
 | 
			
		||||
        it "has a #{content.source[1...-1]} line" do
 | 
			
		||||
          expect(@chef_run).to render_file(@file.name).with_content(content)
 | 
			
		||||
        end
 | 
			
		||||
      end
 | 
			
		||||
 | 
			
		||||
      it 'has no wsdl_location line' do
 | 
			
		||||
        expect(@chef_run).not_to render_file(@file.name).with_content('vmware_wsdl_location = ')
 | 
			
		||||
      end
 | 
			
		||||
 | 
			
		||||
      it 'has wsdl_location line' do
 | 
			
		||||
        chef_run = ::ChefSpec::Runner.new(::UBUNTU_OPTS) do |n|
 | 
			
		||||
          n.set['openstack']['block-storage']['volume']['driver'] = 'cinder.volume.drivers.vmware.vmdk.VMwareVcVmdkDriver'
 | 
			
		||||
          n.set['openstack']['block-storage']['vmware']['vmware_wsdl_location'] = 'http://127.0.0.1/wsdl'
 | 
			
		||||
        end
 | 
			
		||||
        filename = '/etc/cinder/cinder.conf'
 | 
			
		||||
        chef_run.converge 'openstack-block-storage::cinder-common'
 | 
			
		||||
        expect(chef_run).to render_file(filename).with_content('vmware_wsdl_location = http://127.0.0.1/wsdl')
 | 
			
		||||
      end
 | 
			
		||||
    end
 | 
			
		||||
  end
 | 
			
		||||
 | 
			
		||||
  describe '/var/lock/cinder' do
 | 
			
		||||
 
 | 
			
		||||
@@ -861,3 +861,50 @@ cinder_emc_config_file=<%= node["openstack"]["block-storage"]["emc"]["cinder_emc
 | 
			
		||||
 | 
			
		||||
# zadara_vpsa_allow_nonexistent_delete=true
 | 
			
		||||
#### (BoolOpt) Don't halt on deletion of non-existing volumes
 | 
			
		||||
 | 
			
		||||
<% if node['openstack']['block-storage']['volume']['driver'] == 'cinder.volume.drivers.vmware.vmdk.VMwareVcVmdkDriver' %>
 | 
			
		||||
#
 | 
			
		||||
# Options defined in cinder.volume.drivers.vmware.vmdk
 | 
			
		||||
#
 | 
			
		||||
 | 
			
		||||
# IP address for connecting to VMware ESX/VC server. (string
 | 
			
		||||
# value)
 | 
			
		||||
vmware_host_ip = <%= node['openstack']['block-storage']['vmware']['vmware_host_ip'] %>
 | 
			
		||||
 | 
			
		||||
# Username for authenticating with VMware ESX/VC server.
 | 
			
		||||
# (string value)
 | 
			
		||||
vmware_host_username = <%= node['openstack']['block-storage']['vmware']['vmware_host_username'] %>
 | 
			
		||||
 | 
			
		||||
# Password for authenticating with VMware ESX/VC server.
 | 
			
		||||
# (string value)
 | 
			
		||||
vmware_host_password = <%= node['openstack']['block-storage']['vmware']['vmware_host_password'] %>
 | 
			
		||||
 | 
			
		||||
<% if node['openstack']['block-storage']['vmware']['vmware_wsdl_location'] -%>
 | 
			
		||||
# Optional VIM service WSDL Location e.g
 | 
			
		||||
# http://<server>/vimService.wsdl. Optional over-ride to
 | 
			
		||||
# default location for bug work-arounds. (string value)
 | 
			
		||||
vmware_wsdl_location = <%= node['openstack']['block-storage']['vmware']['vmware_wsdl_location'] %>
 | 
			
		||||
<% end %>
 | 
			
		||||
 | 
			
		||||
# Number of times VMware ESX/VC server API must be retried
 | 
			
		||||
# upon connection related issues. (integer value)
 | 
			
		||||
vmware_api_retry_count = <%= node['openstack']['block-storage']['vmware']['vmware_api_retry_count'] %>
 | 
			
		||||
 | 
			
		||||
# The interval (in seconds) for polling remote tasks invoked
 | 
			
		||||
# on VMware ESX/VC server. (integer value)
 | 
			
		||||
vmware_task_poll_interval = <%= node['openstack']['block-storage']['vmware']['vmware_task_poll_interval'] %>
 | 
			
		||||
 | 
			
		||||
# Name for the folder in the VC datacenter that will contain
 | 
			
		||||
# cinder volumes. (string value)
 | 
			
		||||
vmware_volume_folder = <%= node['openstack']['block-storage']['vmware']['vmware_volume_folder'] %>
 | 
			
		||||
 | 
			
		||||
# Timeout in seconds for VMDK volume transfer between Cinder
 | 
			
		||||
# and Glance. (integer value)
 | 
			
		||||
vmware_image_transfer_timeout_secs = <%= node['openstack']['block-storage']['vmware']['vmware_image_transfer_timeout_secs'] %>
 | 
			
		||||
 | 
			
		||||
# Max number of objects to be retrieved per batch. Query
 | 
			
		||||
# results will be obtained in batches from the server and not
 | 
			
		||||
# in one shot. Server may still limit the count to something
 | 
			
		||||
# less than the configured value. (integer value)
 | 
			
		||||
vmware_max_objects_retrieval = <%= node['openstack']['block-storage']['vmware']['vmware_max_objects_retrieval'] %>
 | 
			
		||||
<% end %>
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user