From 0706efc6028d06307945f1853c5ff45c57acc384 Mon Sep 17 00:00:00 2001 From: Steven Hardy Date: Thu, 6 Sep 2012 14:32:14 +0100 Subject: [PATCH] heat templates : EBS templates, attach volume to vdc Fix Single_Instance_With_EBS templates, need the EBS disk to attach to vdc not vdb which is used for the ephemeral disk (fix from imain) Fixes #185 Change-Id: I47d1b640d25c0f53dd4535e4bd73846d01f4fc86 Signed-off-by: Steven Hardy --- .../WordPress_Single_Instance_With_EBS.template | 12 ++++++------ .../WordPress_Single_Instance_With_EBS_EIP.template | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/templates/WordPress_Single_Instance_With_EBS.template b/templates/WordPress_Single_Instance_With_EBS.template index 033f490fbd..aa25af1a3f 100644 --- a/templates/WordPress_Single_Instance_With_EBS.template +++ b/templates/WordPress_Single_Instance_With_EBS.template @@ -133,16 +133,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", @@ -175,7 +175,7 @@ "Properties" : { "InstanceId" : { "Ref" : "WikiDatabase" }, "VolumeId" : { "Ref" : "DataVolume" }, - "Device" : "/dev/vdb" + "Device" : "/dev/vdc" } } }, diff --git a/templates/WordPress_Single_Instance_With_EBS_EIP.template b/templates/WordPress_Single_Instance_With_EBS_EIP.template index 50070095f1..89b90ee1ca 100644 --- a/templates/WordPress_Single_Instance_With_EBS_EIP.template +++ b/templates/WordPress_Single_Instance_With_EBS_EIP.template @@ -157,16 +157,16 @@ "#!/bin/bash -v\n", "/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", @@ -197,7 +197,7 @@ "Properties" : { "InstanceId" : { "Ref" : "WikiServer" }, "VolumeId" : { "Ref" : "DataVolume" }, - "Device" : "/dev/vdb" + "Device" : "/dev/vdc" } } },