Pivotal Knowledge Base

Follow

Default Pivotal Cloud Foundry 1.8, 1.9, 1.10 installation fails on AWS

Environment

Pivotal Cloud Foundry: 1.8, 1.9, 1.10

Symptom

While using the Cloudformation Script to install Pivotal Cloud Foundry, the installation fails while requesting the recreation of the default AWS VPC with the following errors: 

11:41:52 UTC-0400 CREATE_FAILED AWS::CloudFormation::Stack red-
OpsManStack-7ARWI7IRP4L8 The following resource(s) failed to create: [PcfNatInstance,
PcfIamUser, PcfIamInstanceProfile, PcfPublicSubnetRouteTableAssociation, PcfRds,
PcfPrivateSubnet2RouteTableAssociation, PcfPublicDefaultRoute,
PcfPublicSubnetRouteTableAssociation2, PcfPrivateSubnetRouteTableAssociation].
11:41:44 UTC-0400 CREATE_FAILED AWS::RDS::DBInstance PcfRds Cannot create 
a db.m3.large Multi-AZ instance because at least 2 subnets must exist in availability
zones with sufficient capacity for VPC and storage type : io1 for db.m3.large, so 1 more
must be created in other availability zones; choose from these availability zones: us-east-
1e, us-east-1d, us-east-1c.
VPC ID:

Cause

This is a recent issue that appeared due to the launch of a new Availability Zone in the N. Virginia region. This change was made to ensure that the resources are distributed across the Availability Zones for a region. AWS independently map Availability Zones to identifiers for each account. For example, your Availability Zone us-east-1a might not be the same location as us-east-1a for another account. There's no way for you to coordinate Availability Zones between accounts. Please check out this doc where it is explained in more detail.

Resolution

The problem can be resolved with a simple change to the Cloud Formation script available for download from network.pivotal.io Elastic Runtime Section. To fix this issue, you will need to modify the "PcfRdsSubnet2" in the "OpsManStack" template to use either of the other three availability zones (1e, 1d, 1c) instead of "us-east-1b."

1. Select the AZ to be used on the "PcfRdsSubnet2" resource

"PcfRdsSubnet2": {
      "Type": "AWS::EC2::Subnet",
      "Condition": "CreateRDS",
      "Properties": {
        "AvailabilityZone": {
          "Fn::Select": [
            "1",
            {"Fn::GetAZs": {"Ref": "AWS::Region"}}
          ]
        },
        "CidrBlock": "10.0.3.0/24",
        "VpcId": {
          "Ref": "PcfVpc"
        },
        "Tags": [
          {
            "Key": "Name",
            "Value": "pcf-rds-subnet-2"
          }
        ]
      }

2. Change the AZ to either "2," "3," or "4". Note that you have may try different availability zones in template to avoid the issue described above in the "Cause" section

"PcfRdsSubnet2": {
      "Type": "AWS::EC2::Subnet",
      "Condition": "CreateRDS",
      "Properties": {
        "AvailabilityZone": {
          "Fn::Select": [
            "2",
            {"Fn::GetAZs": {"Ref": "AWS::Region"}}
          ]
        },
        "CidrBlock": "10.0.3.0/24",
        "VpcId": {
          "Ref": "PcfVpc"
        },
        "Tags": [
          {
            "Key": "Name",
            "Value": "pcf-rds-subnet-2"
          }
        ]
      }

3. Upload the template to S3 where it can be publically accessible

4. Relaunch the stack; change the "OpsManager Template" section with the URL for the uploaded cloud formation script and proceed with the rest of the stack deployment

Screen_Shot_2017-06-09_at_3.27.02_PM.png 


 

Comments

Powered by Zendesk