Remove GerritVolumeId from dual-master

Dual-master recipe cannot mount the same EBS volume on multiple master
instances, thus specifying the GERRIT_VOLUME_ID, which makes sense for
other, single master recipes, makes no sense when more than one master
exists.

For the dual-master recipe, the GERRIT_VOLUME_SNAPSHOT_ID parameter must
be used, so that two *new* EBS volumes are created and mounted for each
master.

Change-Id: I729ae548ac6d37220b0bd219496b24e067265789
diff --git a/common-templates/cf-master-asg.yml b/common-templates/cf-master-asg.yml
index c099798..8224823 100644
--- a/common-templates/cf-master-asg.yml
+++ b/common-templates/cf-master-asg.yml
@@ -47,9 +47,6 @@
   MasterMaxCount:
     Description: The maximum number of EC2 instances in the master autoscaling group
     Type: Number
-  GerritVolumeId:
-    Description: Existing Gerrit volume id
-    Type: String
   GerritVolumeSnapshotId:
     Description: Id of the EBS snapshot for Gerrit volume
     Type: String
@@ -116,7 +113,7 @@
             sleep ${GerritVolumeAttachRetryDelay}
           done
 
-          if [[ "${GerritVolumeId}" = "" && "${GerritVolumeSnapshotId}" = "" ]]; then
+          if [[ "${GerritVolumeSnapshotId}" = "" ]]; then
             echo "Create file system for Gerrit volume"
             mkfs -t xfs /dev/xvdg
           fi
@@ -124,7 +121,7 @@
           mkdir /gerrit-mount-point
           mount /dev/xvdg /gerrit-mount-point
 
-          if [[ "${GerritVolumeId}" = "" && "${GerritVolumeSnapshotId}" = "" ]]; then
+          if [[ "${GerritVolumeSnapshotId}" = "" ]]; then
             echo "Create Gerrit directories"
             mkdir -p /gerrit-mount-point/gerrit-logs \
              /gerrit-mount-point/gerrit-cache \
@@ -230,7 +227,7 @@
       TemplateURL: !Join [ '', ['https://', !Ref TemplateBucketName, '.s3.amazonaws.com/cf-gerrit-volume.yml'] ]
       TimeoutInMinutes: '25'
       Parameters:
-        GerritVolumeId: !Ref GerritVolumeId
+        GerritVolumeId: ""
         GerritVolumeSnapshotId: !Ref GerritVolumeSnapshotId
         GerritVolumeSizeInGiB: !Ref GerritVolumeSizeInGiB
 
diff --git a/dual-master/README.md b/dual-master/README.md
index 5d59b1b..7b2ad60 100644
--- a/dual-master/README.md
+++ b/dual-master/README.md
@@ -200,10 +200,14 @@
 * `MASTER_MAX_COUNT`: Optional. Maximum number of EC2 instances in the master autoscaling group.
 "2" by default. Minimum: "2".
 
-* `GERRIT_VOLUME_ID` : Optional. Id of an extisting EBS volume. If empty, a new volume
-for Gerrit data will be created
-* `GERRIT_VOLUME_SNAPSHOT_ID` : Optional. Ignored if GERRIT_VOLUME_ID is not empty. Id of
-the EBS volume snapshot used to create new EBS volume for Gerrit data.
+* `GERRIT_VOLUME_SNAPSHOT_ID` : Optional. Id of the EBS volume snapshot used to
+create new EBS volume for Gerrit data. A new volume will be created for each
+master, based on this snapshot.
+
+Note that, differently from other recipes, dual-master does not support the
+`GERRIT_VOLUME_ID` parameter, since it wouldn't be possible to mount the same
+EBS on multiple EC2 instances.
+
 * `GERRIT_VOLUME_SIZE_IN_GIB`: Optional. The size of the Gerrit data volume, in GiBs. `10` by default.
 * `FILESYSTEM_ID`: Optional. An existing EFS filesystem id.
 
diff --git a/dual-master/cf-cluster.yml b/dual-master/cf-cluster.yml
index b2a5be7..7c506b6 100644
--- a/dual-master/cf-cluster.yml
+++ b/dual-master/cf-cluster.yml
@@ -77,10 +77,6 @@
     Type: Number
     Default: 2
     MinValue: 2
-  GerritVolumeId:
-    Description: Existing Gerrit volume id
-    Type: String
-    Default: ""
   GerritVolumeSnapshotId:
     Description: Id of the EBS snapshot for Gerrit volume
     Type: String
@@ -230,7 +226,6 @@
         MasterMaxCount: !Ref MasterMaxCount
         GerritVolumeAttachMaxRetries: !Ref GerritVolumeAttachMaxRetries
         GerritVolumeAttachRetryDelay: !Ref GerritVolumeAttachRetryDelay
-        GerritVolumeId: !Ref GerritVolumeId
         GerritVolumeSnapshotId: !Ref GerritVolumeSnapshotId
         GerritVolumeSizeInGiB: !Ref GerritVolumeSizeInGiB
         TemplateBucketName: !Ref TemplateBucketName
@@ -255,7 +250,6 @@
         MasterMaxCount: !Ref MasterMaxCount
         GerritVolumeAttachMaxRetries: !Ref GerritVolumeAttachMaxRetries
         GerritVolumeAttachRetryDelay: !Ref GerritVolumeAttachRetryDelay
-        GerritVolumeId: !Ref GerritVolumeId
         GerritVolumeSnapshotId: !Ref GerritVolumeSnapshotId
         GerritVolumeSizeInGiB: !Ref GerritVolumeSizeInGiB
         TemplateBucketName: !Ref TemplateBucketName