Uploaded image for project: 'Brooklyn'
  1. Brooklyn
  2. BROOKLYN-422

Using AWS availability zone as location region causes IllegalStateException during deployment

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 0.10.0
    • 0.11.0
    • None

    Description

      A regression in 0.10.0 causes deployments that use specific AWS availability zones (e.g. us-east-1b) to fail. jclouds throws an IllegalStateException complaining that: "location id us-east-1b not found in: [

      {scope=PROVIDER, id=aws-ec2, description=https://ec2.us-east-1.amazonaws.com, iso3166Codes=[US-VA, US-CA, US-OR, BR-SP, IE, DE-HE, SG, AU-NSW, JP-13]}

      ]".

      The exception is thrown by org.jclouds.compute.domain.internal.TemplateBuilderImpl#locationId(String). The fix is to remove the availability zone suffix when configuring org.jclouds.location.reference.LocationConstants#PROPERTY_REGIONS.

      A simple blueprint that fails is:

      location:
        jclouds:aws-ec2:
          region: us-east-1a
      services:
      - type: server
      

      And a more complex one using DynamicCluster's availability zones features:

      services:
      - type: org.apache.brooklyn.entity.group.DynamicCluster
        brooklyn.config:
          initialSize: 2
          memberSpec:
            $brooklyn:entitySpec:
              type: org.apache.brooklyn.entity.software.base.EmptySoftwareProcess
          enableAvailabilityZones: true
          availabilityZoneNames:
          - us-east-1a
          - us-east-1b
      
      location: jclouds:aws-ec2:us-east-1
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            sjcorbett Samuel James Corbett
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: