Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[block_device] Use block_device/first_server_uuid attribute to genera…

…te unique volume nicknames
  • Loading branch information...
commit c823fd400906c166d095a297ae4e61cb36471c81 1 parent 49c24a5
@nitinmohan87 nitinmohan87 authored
View
3  cookbooks/block_device/attributes/default.rb
@@ -31,3 +31,6 @@
set_unless[:block_device][:devices][device][:vg_data_percentage] = "90"
set_unless[:block_device][:devices][device][:nickname] = "data_storage#{number}"
end
+
+# block_device/first_server_uuid will be used to generate unique block device nicknames
+set_unless[:block_device][:first_server_uuid] = node[:rightscale][:instance_uuid]
View
2  cookbooks/block_device/libraries/block_device.rb
@@ -27,7 +27,7 @@ def init(new_resource, backup_type = :primary)
}
options[:rackspace_use_snet] = new_resource.rackspace_snet if new_resource.rackspace_snet
# Appends RightScale instance uuid to make the nickname unique.
- modified_nickname = new_resource.nickname + '_' + node[:rightscale][:instance_uuid] if new_resource.nickname
+ modified_nickname = new_resource.nickname + '_' + node[:block_device][:first_server_uuid] if new_resource.nickname
# Primary ROS options - some options needed regardless of backup type
options[:primary_storage_cloud] = new_resource.primary_cloud if new_resource.primary_cloud
Please sign in to comment.
Something went wrong with that request. Please try again.