From: Ian Main Date: Thu, 6 Sep 2012 15:27:45 +0000 (-0700) Subject: More EBS fixes. X-Git-Tag: 2014.1~1463 X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=c805d065a1f99b280093c1a37cb91c1c6815e280;p=openstack-build%2Fheat-build.git More EBS fixes. 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 --- diff --git a/templates/WordPress_2_Instances_With_EBS.template b/templates/WordPress_2_Instances_With_EBS.template index 73c4247d..ada10c0f 100644 --- a/templates/WordPress_2_Instances_With_EBS.template +++ b/templates/WordPress_2_Instances_With_EBS.template @@ -130,16 +130,16 @@ "/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", @@ -204,7 +204,7 @@ "Properties" : { "InstanceId" : { "Ref" : "WikiDatabase" }, "VolumeId" : { "Ref" : "DataVolume" }, - "Device" : "/dev/vdb" + "Device" : "/dev/vdc" } } }, diff --git a/templates/WordPress_2_Instances_With_EBS_EIP.template b/templates/WordPress_2_Instances_With_EBS_EIP.template index cb997cee..78fdcfcc 100644 --- a/templates/WordPress_2_Instances_With_EBS_EIP.template +++ b/templates/WordPress_2_Instances_With_EBS_EIP.template @@ -166,16 +166,16 @@ "/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", @@ -240,7 +240,7 @@ "Properties" : { "InstanceId" : { "Ref" : "WikiDatabase" }, "VolumeId" : { "Ref" : "DataVolume" }, - "Device" : "/dev/vdb" + "Device" : "/dev/vdc" } } }, diff --git a/templates/WordPress_Single_Instance_With_EBS.template b/templates/WordPress_Single_Instance_With_EBS.template index aa25af1a..1d5ba694 100644 --- a/templates/WordPress_Single_Instance_With_EBS.template +++ b/templates/WordPress_Single_Instance_With_EBS.template @@ -157,6 +157,7 @@ "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", ]]}} } }, diff --git a/templates/WordPress_Single_Instance_With_EBS_EIP.template b/templates/WordPress_Single_Instance_With_EBS_EIP.template index 89b90ee1..ab7ea11b 100644 --- a/templates/WordPress_Single_Instance_With_EBS_EIP.template +++ b/templates/WordPress_Single_Instance_With_EBS_EIP.template @@ -181,6 +181,7 @@ "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", ]]}} } },