Only lookup volume service passwords when necessary
The volume service passwords should be looked up depending on the type of driver used. As I understand it the grizzly netapp driver no longer requires dfm. However, without testing this, would like to keep the existing configuraton. We will be testing this in our lab over the next few days, and will send a new patch based on our findings. Change-Id: I1cf0b6e292eec71788d0b79dbf270a1d17bbfa1e
This commit is contained in:
parent
eb06267d14
commit
dbd139f8e3
|
@ -43,7 +43,11 @@ platform_options["cinder_iscsitarget_packages"].each do |pkg|
|
|||
end
|
||||
end
|
||||
|
||||
node.override["openstack"]["block-storage"]["netapp"]["dfm_password"] = service_password "netapp"
|
||||
if node["openstack"]["block-storage"]["volume"]["volume_driver"] == "cinder.volume.netapp.NetAppISCSIDriver"
|
||||
node.override["openstack"]["block-storage"]["netapp"]["dfm_password"] = service_password "netapp"
|
||||
elsif node["openstack"]["block-storage"]["volume"]["volume_driver"] == 'cinder.volume.driver.RBDDriver'
|
||||
node.override["openstack"]["block-storage"]["rbd_secret_uuid"] = service_password "rbd"
|
||||
end
|
||||
|
||||
service "cinder-volume" do
|
||||
service_name platform_options["cinder_volume_service"]
|
||||
|
|
|
@ -28,6 +28,30 @@ describe "openstack-block-storage::volume" do
|
|||
expect(@chef_run).to upgrade_package "tgt"
|
||||
end
|
||||
|
||||
it "configures netapp dfm password" do
|
||||
::Chef::Recipe.any_instance.stub(:service_password).with("netapp").
|
||||
and_return "netapp-pass"
|
||||
chef_run = ::ChefSpec::ChefRunner.new ::UBUNTU_OPTS do |n|
|
||||
n.set["openstack"]["block-storage"]["volume"]["volume_driver"] = "cinder.volume.netapp.NetAppISCSIDriver"
|
||||
end
|
||||
chef_run.converge "openstack-block-storage::volume"
|
||||
|
||||
n = chef_run.node["openstack"]["block-storage"]["netapp"]["dfm_password"]
|
||||
expect(n).to eq "netapp-pass"
|
||||
end
|
||||
|
||||
it "configures rbd password" do
|
||||
::Chef::Recipe.any_instance.stub(:service_password).with("rbd").
|
||||
and_return "rbd-pass"
|
||||
chef_run = ::ChefSpec::ChefRunner.new ::UBUNTU_OPTS do |n|
|
||||
n.set["openstack"]["block-storage"]["volume"]["volume_driver"] = "cinder.volume.driver.RBDDriver"
|
||||
end
|
||||
chef_run.converge "openstack-block-storage::volume"
|
||||
|
||||
n = chef_run.node["openstack"]["block-storage"]["rbd_secret_uuid"]
|
||||
expect(n).to eq "rbd-pass"
|
||||
end
|
||||
|
||||
it "starts cinder volume" do
|
||||
expect(@chef_run).to start_service "cinder-volume"
|
||||
end
|
||||
|
|
|
@ -536,7 +536,7 @@ volume_group=<%= node["openstack"]["block-storage"]["volume"]["volume_group"] %>
|
|||
|
||||
# iscsi_port=3260
|
||||
#### (IntOpt) The port that the iSCSI daemon is listening on
|
||||
<% if node["openstack"]["block-storage"]["volume"]["volume_driver"] == 'cinder.volume.driver.RBDDriver' %>
|
||||
<% if node["openstack"]["block-storage"]["volume"]["volume_driver"] == "cinder.volume.driver.RBDDriver" %>
|
||||
rbd_pool=<%= node["openstack"]["block-storage"]["rbd_pool"] %>
|
||||
#### (StrOpt) the RADOS pool in which rbd volumes are stored
|
||||
|
||||
|
|
Loading…
Reference in New Issue