]> review.fuel-infra Code Review - openstack-build/heat-build.git/commitdiff
More EBS fixes.
authorIan Main <imain@redhat.com>
Thu, 6 Sep 2012 15:27:45 +0000 (08:27 -0700)
committerIan Main <imain@redhat.com>
Thu, 6 Sep 2012 15:51:06 +0000 (08:51 -0700)
Single instance with EBS apparently needs an httpd restart in order to
keep talking to mysql after we change the partition.  Also change other
EBS templates to use vdc.

Change-Id: I180cca2166a0210d5d8dd3e0aea111ea625b865a
Signed-off-by: Ian Main <imain@redhat.com>
templates/WordPress_2_Instances_With_EBS.template
templates/WordPress_2_Instances_With_EBS_EIP.template
templates/WordPress_Single_Instance_With_EBS.template
templates/WordPress_Single_Instance_With_EBS_EIP.template

index 73c4247d0b474997bb4acc75e0930f63c8b2f1ab..ada10c0fc4b506ef6faf9b7da894951c00b1cae1 100644 (file)
           "/opt/aws/bin/cfn-init\n",
 
           "# Wait for the volume to appear\n",
-          "while [ ! -e /dev/vdb ]; do echo Waiting for volume to attach; sleep 1; done\n",
-          "parted /dev/vdb mklabel msdos\n",
-          "parted /dev/vdb mkpart primary ext3 1 1000\n",
+          "while [ ! -e /dev/vdc ]; do echo Waiting for volume to attach; sleep 1; done\n",
+          "parted /dev/vdc mklabel msdos\n",
+          "parted /dev/vdc mkpart primary ext3 1 1000\n",
           "# Format the EBS volume and mount it\n",
           "systemctl stop mysqld.service\n",
           "sleep 1\n",
           "mv /var/lib/mysql /var/lib/mysql.data\n",
-          "/sbin/mkfs -t ext3 /dev/vdb1\n",
+          "/sbin/mkfs -t ext3 /dev/vdc1\n",
           "mkdir /var/lib/mysql\n",
-          "mount /dev/vdb1 /var/lib/mysql\n",
+          "mount /dev/vdc1 /var/lib/mysql\n",
           "chown mysql.mysql /var/lib/mysql\n",
           "mv -n /var/lib/mysql.data/* /var/lib/mysql\n",
           "systemctl start mysqld.service\n",
       "Properties" : {
         "InstanceId" : { "Ref" : "WikiDatabase" },
         "VolumeId"  : { "Ref" : "DataVolume" },
-        "Device" : "/dev/vdb"
+        "Device" : "/dev/vdc"
       }
     }
   },
index cb997ceec4c1695ec175c2bd79196e3c8c31d757..78fdcfccbdb9b73fcf378471967b2f46a56fefc4 100644 (file)
           "/opt/aws/bin/cfn-init\n",
 
           "# Wait for the volume to appear\n",
-          "while [ ! -e /dev/vdb ]; do echo Waiting for volume to attach; sleep 1; done\n",
-          "parted /dev/vdb mklabel msdos\n",
-          "parted /dev/vdb mkpart primary ext3 1 1000\n",
+          "while [ ! -e /dev/vdc ]; do echo Waiting for volume to attach; sleep 1; done\n",
+          "parted /dev/vdc mklabel msdos\n",
+          "parted /dev/vdc mkpart primary ext3 1 1000\n",
           "# Format the EBS volume and mount it\n",
           "systemctl stop mysqld.service\n",
           "sleep 1\n",
           "mv /var/lib/mysql /var/lib/mysql.data\n",
-          "/sbin/mkfs -t ext3 /dev/vdb1\n",
+          "/sbin/mkfs -t ext3 /dev/vdc1\n",
           "mkdir /var/lib/mysql\n",
-          "mount /dev/vdb1 /var/lib/mysql\n",
+          "mount /dev/vdc1 /var/lib/mysql\n",
           "chown mysql.mysql /var/lib/mysql\n",
           "mv -n /var/lib/mysql.data/* /var/lib/mysql\n",
           "systemctl start mysqld.service\n",
       "Properties" : {
         "InstanceId" : { "Ref" : "WikiDatabase" },
         "VolumeId"  : { "Ref" : "DataVolume" },
-        "Device" : "/dev/vdb"
+        "Device" : "/dev/vdc"
       }
     }
   },
index aa25af1a3fc20caa55ad6694c08cf0fa13edda59..1d5ba694629f897c4322112ec9df111370817d5e 100644 (file)
           "EXIT\n",
           "EOF\n",
           "sed --in-place --e s/database_name_here/", { "Ref" : "DBName" }, "/ --e s/username_here/", { "Ref" : "DBUsername" }, "/ --e s/password_here/", { "Ref" : "DBPassword" }, "/ /usr/share/wordpress/wp-config.php\n"
+          "systemctl restart httpd.service\n",
         ]]}}
       }
     },
index 89b90ee1cade920085a5c375f1084aaa42e73895..ab7ea11bfb39d729858c1e8c0bcd71d99746c03f 100644 (file)
           "EXIT\n",
           "EOF\n",
           "sed --in-place --e s/database_name_here/", { "Ref" : "DBName" }, "/ --e s/username_here/", { "Ref" : "DBUsername" }, "/ --e s/password_here/", { "Ref" : "DBPassword" }, "/ /usr/share/wordpress/wp-config.php\n"
+          "systemctl restart httpd.service\n",
         ]]}}
       }
     },