Create lock directory for cinder

This patch creates the /var/lock/cinder directory (or other location
specified in the corresponding attribute) to use for lock files.

Change-Id: I23d2d8a201f892cc1bf56f8db825f70fc1fdf5d6
This commit is contained in:
Luis A. Garcia 2013-12-14 01:30:54 +00:00
parent 38c8aa5c7a
commit 53efbf5225
2 changed files with 23 additions and 0 deletions

View File

@ -63,3 +63,10 @@ template "/etc/cinder/cinder.conf" do
:glance_port => glance_api_endpoint.port
)
end
directory node["openstack"]["block-storage"]["lock_path"] do
group node["openstack"]["block-storage"]["group"]
owner node["openstack"]["block-storage"]["user"]
mode 00700
end

View File

@ -214,4 +214,20 @@ describe "openstack-block-storage::cinder-common" do
end
end
end
describe "/var/lock/cinder" do
before do
@dir = @chef_run.directory "/var/lock/cinder"
end
it "has proper owner" do
expect(@dir.owner).to eq("cinder")
expect(@dir.group).to eq("cinder")
end
it "has proper modes" do
expect(sprintf("%o", @dir.mode)).to eq "700"
end
end
end