Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Merge pull request #176 from rightscale/sprint12_10_a66598_do_force_r…

…eset_stop_start_fix

sprint12_10_a66598_do_force_reset_stop_start_fix
  • Loading branch information...
commit fe3c7bc39741bc898ecd545611ac27f3be057b48 2 parents b58dc30 + aaeb6db
Nitin authored November 28, 2012
6  cookbooks/block_device/README.rdoc
Source Rendered
@@ -80,8 +80,10 @@ device names or '*' to indicate all devices. By default, there are two available
80 80
 block devices. Currently, in order to add more block devices you need to 
81 81
 override the cookbook. Instructions can be found at: {Increase the Number of Block Devices}[http://support.rightscale.com/12-Guides/Chef_Cookbooks_Developer_Guide/08-Chef_Development/Increase_the_Number_of_Block_Devices]
82 82
 
83  
-The volume nicknames are made unique by appending the RightScale's instance uuid
84  
-to the provided nickname input.
  83
+The volume nicknames are made unique by appending the RightScale instance's uuid
  84
+to the provided nickname input. In case of "stop/start" operation (supported by
  85
+instances launched with EBS images), the uuid of the first instance before the
  86
+"stop" operation is used.
85 87
 
86 88
 == LICENSE:
87 89
 
3  cookbooks/block_device/attributes/default.rb
@@ -31,3 +31,6 @@
31 31
   set_unless[:block_device][:devices][device][:vg_data_percentage] = "90"
32 32
   set_unless[:block_device][:devices][device][:nickname] = "data_storage#{number}"
33 33
 end
  34
+
  35
+# block_device/first_server_uuid will be used to generate unique block device nicknames
  36
+set_unless[:block_device][:first_server_uuid] = node[:rightscale][:instance_uuid]
2  cookbooks/block_device/libraries/block_device.rb
@@ -27,7 +27,7 @@ def init(new_resource, backup_type = :primary)
27 27
       }
28 28
       options[:rackspace_use_snet] = new_resource.rackspace_snet if new_resource.rackspace_snet
29 29
       # Appends RightScale instance uuid to make the nickname unique.
30  
-      modified_nickname = new_resource.nickname + '_' + node[:rightscale][:instance_uuid] if new_resource.nickname
  30
+      modified_nickname = new_resource.nickname + '_' + node[:block_device][:first_server_uuid] if new_resource.nickname
31 31
 
32 32
       # Primary ROS options - some options needed regardless of backup type
33 33
       options[:primary_storage_cloud] = new_resource.primary_cloud if new_resource.primary_cloud
2  cookbooks/block_device/metadata.json
@@ -749,7 +749,7 @@
749 749
   "platforms": {
750 750
   },
751 751
   "maintainer": "RightScale, Inc.",
752  
-  "long_description": "= Storage Toolbox Cookbook\n\n== DESCRIPTION:\n\nThis cookbook provides the building blocks for multi-cloud backup/restore\nsupport. It leverages RightScale's 1.0 and 1.5 API for performing\nvolume management across multiple clouds.\n\n== REQUIREMENTS:\n\n* The block device tools depend on the <tt>rightscale::install_tools</tt>\n  recipe.\n* Requires a virtual machine launched from a RightScale-managed RightImage.\n\n== COOKBOOKS DEPENDENCIES:\n\nPlease see <tt>metadata.rb</tt> file for the latest dependencies.\n\n== KNOWN LIMITATIONS:\n\n* Rackspace requires an instance size of 512MB or larger. An instance size of\n  256MB is not supported. (w-3947)\n* Multiple block devices are not supported on Rackspace.\n\n== SETUP/USAGE:\n\n=== Getting started and taking the first backup:\n\n1. Import the latest version of 'Storage Toolbox (Chef)' ServerTemplate into\n   your RightScale account.\n2. Set up a new deployment. Add a server into the deployment using the \n   toolbox ServerTemplate and launch the server.\n3. Once the server is operational consider it in a 'pristine state'. Nothing\n   will happen other than installing the tools until you run an operational\n   recipe. You can modify this behavior by cloning the ServerTemplate and\n   changing the list of recipes to run on boot.\n4. Run the \"block_device::setup_block_device\" recipe, which attaches\n   storage based on the volume size and number of volumes you have specified.\n   The storage is located in '/mnt/storage1' by default.\n5. Add your data into /mnt/storage1.\n6. Run the recipe \"block_device::do_primary_backup\". This recipe detects\n   what cloud you are on and performs a backup to the local cloud persistence\n   service.\n\n=== Continuous Backups with CRON:\n\n1. Enable continuous backups by running the recipe\n   \"block_device::setup_continuous_backups\".  This sets up a cron job.\n2. You can disable backups at any time by running the\n   \"block_device::do_disable_continuous_backups\" recipe, which removes \n   the cron job that was performing backups.\n\n=== Force Reset:\n\n1. WARNING: The \"block_device::do_force_reset\" recipe detaches all storage \n   related to your lineage and DESTROYS the volumes! You should only run\n   this recipe if you want to restore your database to a pristine state \n   and do not want to save any of its data. After running the \n   \"block_device::do_force_reset\" recipe you can then run the\n   \"block_device::setup_block_device\" or \"block_device::do_restore\" recipes.\n\n=== Restore:\n\n1. Start from a pristine state (fresh launch of a new server or using a server\n   that's been reset).\n2. Run the \"block_device::do_restore\" recipe.\n\nMix and match recipes to get the right combination for your deployments.\n\n=== Delete Volumes and Terminate\n\n1. Delete the attached volumes and terminate the server.  Note: if this script\n   is not used to terminate the server the volumes will persist.\n\n== DETAILS:\n\nMultiple block device support is controlled by the\n<tt>block_device/devices_to_use</tt> input. It can be a comma-separated list of\ndevice names or '*' to indicate all devices. By default, there are two available\nblock devices. Currently, in order to add more block devices you need to \noverride the cookbook. Instructions can be found at: {Increase the Number of Block Devices}[http://support.rightscale.com/12-Guides/Chef_Cookbooks_Developer_Guide/08-Chef_Development/Increase_the_Number_of_Block_Devices]\n\nThe volume nicknames are made unique by appending the RightScale's instance uuid\nto the provided nickname input.\n\n== LICENSE:\n\nCopyright RightScale, Inc. All rights reserved.  All access and use subject to\nthe RightScale Terms of Service available at http://www.rightscale.com/terms.php\nand, if applicable, other agreements such as a RightScale Master Subscription\nAgreement.\n",
  752
+  "long_description": "= Storage Toolbox Cookbook\n\n== DESCRIPTION:\n\nThis cookbook provides the building blocks for multi-cloud backup/restore\nsupport. It leverages RightScale's 1.0 and 1.5 API for performing\nvolume management across multiple clouds.\n\n== REQUIREMENTS:\n\n* The block device tools depend on the <tt>rightscale::install_tools</tt>\n  recipe.\n* Requires a virtual machine launched from a RightScale-managed RightImage.\n\n== COOKBOOKS DEPENDENCIES:\n\nPlease see <tt>metadata.rb</tt> file for the latest dependencies.\n\n== KNOWN LIMITATIONS:\n\n* Rackspace requires an instance size of 512MB or larger. An instance size of\n  256MB is not supported. (w-3947)\n* Multiple block devices are not supported on Rackspace.\n\n== SETUP/USAGE:\n\n=== Getting started and taking the first backup:\n\n1. Import the latest version of 'Storage Toolbox (Chef)' ServerTemplate into\n   your RightScale account.\n2. Set up a new deployment. Add a server into the deployment using the \n   toolbox ServerTemplate and launch the server.\n3. Once the server is operational consider it in a 'pristine state'. Nothing\n   will happen other than installing the tools until you run an operational\n   recipe. You can modify this behavior by cloning the ServerTemplate and\n   changing the list of recipes to run on boot.\n4. Run the \"block_device::setup_block_device\" recipe, which attaches\n   storage based on the volume size and number of volumes you have specified.\n   The storage is located in '/mnt/storage1' by default.\n5. Add your data into /mnt/storage1.\n6. Run the recipe \"block_device::do_primary_backup\". This recipe detects\n   what cloud you are on and performs a backup to the local cloud persistence\n   service.\n\n=== Continuous Backups with CRON:\n\n1. Enable continuous backups by running the recipe\n   \"block_device::setup_continuous_backups\".  This sets up a cron job.\n2. You can disable backups at any time by running the\n   \"block_device::do_disable_continuous_backups\" recipe, which removes \n   the cron job that was performing backups.\n\n=== Force Reset:\n\n1. WARNING: The \"block_device::do_force_reset\" recipe detaches all storage \n   related to your lineage and DESTROYS the volumes! You should only run\n   this recipe if you want to restore your database to a pristine state \n   and do not want to save any of its data. After running the \n   \"block_device::do_force_reset\" recipe you can then run the\n   \"block_device::setup_block_device\" or \"block_device::do_restore\" recipes.\n\n=== Restore:\n\n1. Start from a pristine state (fresh launch of a new server or using a server\n   that's been reset).\n2. Run the \"block_device::do_restore\" recipe.\n\nMix and match recipes to get the right combination for your deployments.\n\n=== Delete Volumes and Terminate\n\n1. Delete the attached volumes and terminate the server.  Note: if this script\n   is not used to terminate the server the volumes will persist.\n\n== DETAILS:\n\nMultiple block device support is controlled by the\n<tt>block_device/devices_to_use</tt> input. It can be a comma-separated list of\ndevice names or '*' to indicate all devices. By default, there are two available\nblock devices. Currently, in order to add more block devices you need to \noverride the cookbook. Instructions can be found at: {Increase the Number of Block Devices}[http://support.rightscale.com/12-Guides/Chef_Cookbooks_Developer_Guide/08-Chef_Development/Increase_the_Number_of_Block_Devices]\n\nThe volume nicknames are made unique by appending the RightScale instance's uuid\nto the provided nickname input. In case of \"stop/start\" operation (supported by\ninstances launched with EBS images), the uuid of the first instance before the\n\"stop\" operation is used.\n\n== LICENSE:\n\nCopyright RightScale, Inc. All rights reserved.  All access and use subject to\nthe RightScale Terms of Service available at http://www.rightscale.com/terms.php\nand, if applicable, other agreements such as a RightScale Master Subscription\nAgreement.\n",
753 753
   "version": "13.2.0",
754 754
   "recommendations": {
755 755
   },

0 notes on commit fe3c7bc

Please sign in to comment.
Something went wrong with that request. Please try again.