Allows for flexible NFS volume naming

It doesn't make sense to force all NFS exports to have the same
volume name, as you could be mounting from various different sources.
This change allows the user to specify the values for shares.conf
instead of having it rendered from "netapp_server_hostname:@export"

This is explicity for grizzly today, as I need it, but Blueprint is
submitted for allowing more generic NFS cinder in master.

Also adds rubocop as tests fail without it

Change-Id: Icd5c6d92a9ae8f5f68f8bb1ad62d180f388fde90
This commit is contained in:
alop 2014-02-18 10:29:56 -08:00
parent f7739f2404
commit bca3241c3b
5 changed files with 5 additions and 8 deletions

View File

@ -98,6 +98,7 @@ TODO: move rabbit parameters under openstack["block-storage"]["mq"]
* `openstack["block-storage"]["netapp"]["netapp_server_hostname"]` - hostname of your filer, needs to be resolvable
* `openstack["block-storage"]["netapp"]["netapp_server_login"]` - Username for netapp filer
* `openstack["block-storage"]["netapp"]["netapp_server_password"]` - password for user above
* `openstack["block-storage"]["nfs"]["exports"]` - Array of server:export pairs
* `openstack["block-storage"]["nfs"]["shares_config"]` - file containing line by line entries of server:export
* `openstack["block-storage"]["nfs"]["mount_point_base"]` - directory to mount NFS exported shares
* `openstack["block-storage"]["rpc_thread_pool_size"]` - size of RPC thread pool

View File

@ -120,7 +120,7 @@ default["openstack"]["block-storage"]["netapp"]["netapp_server_port"] = "80"
default["openstack"]["block-storage"]["netapp"]["netapp_server_hostname"] = nil
default["openstack"]["block-storage"]["netapp"]["netapp_server_password"] = nil
default["openstack"]["block-storage"]["netapp"]["netapp_server_login"] = nil
default["openstack"]["block-storage"]["netapp"]["export"] = nil
default["openstack"]["block-storage"]["nfs"]["exports"] = nil
default["openstack"]["block-storage"]["nfs"]["shares_config"] = "/etc/cinder/shares.conf"
default["openstack"]["block-storage"]["nfs"]["mount_point_base"] = "/mnt/cinder-volumes"
default["openstack"]["block-storage"]["nfs"]["nfs_disk_util"] = "df"

View File

@ -4,7 +4,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 "7.2.2"
version "7.2.3"
recipe "openstack-block-storage::common", "Defines the common pieces of repeated code from the other recipes"
recipe "openstack-block-storage::api", "Installs the cinder-api, sets up the cinder database, and cinder service/user/endpoints in keystone"

View File

@ -72,10 +72,6 @@ case node["openstack"]["block-storage"]["volume"]["driver"]
mode "0600"
owner node["openstack"]["block-storage"]["user"]
group node["openstack"]["block-storage"]["group"]
variables(
"host" => node["openstack"]["block-storage"]["netapp"]["netapp_server_hostname"],
"export" => node["openstack"]["block-storage"]["netapp"]["export"]
)
notifies :restart, "service[cinder-volume]"
end

View File

@ -1,4 +1,4 @@
# Automatically generated by chef, changes will be overwritten
<% node["openstack"]["block-storage"]["netapp"]["netapp_server_hostname"].each do |h| %>
<%= h %>:<%= @export %>
<% node["openstack"]["block-storage"]["nfs"]["exports"].each do |e| %>
<%= e %>
<% end %>