use ssd image types on Amazon EC2

Bug #1381009 reported by John A Meinel
26
This bug affects 4 people
Affects Status Importance Assigned to Milestone
juju-core
Fix Released
High
Ian Booth

Bug Description

Amazon uses a differently named image type for the new SSD machines. Instead of deploying an "ebs" root volume, or an "instance" based volume, you use an "ssd" volume.

You can see them in the streams data here:
  http://cloud-images.ubuntu.com/releases/streams/v1/com.ubuntu.cloud:released:aws.json

Such as:
      "apne1hs": {
       "root_store": "ssd",
       "virt": "hvm",
       "crsn": "ap-northeast-1",
       "id": "ami-35e2b434"
      },
as contrasted with:
      "apne1he": {
       "root_store": "ebs",
       "virt": "hvm",
       "crsn": "ap-northeast-1",
       "id": "ami-3d79003c"
      },
or
      "apne1hi": {
       "root_store": "instance",
       "virt": "hvm",
       "crsn": "ap-northeast-1",
       "id": "ami-b9067fb8"
      },

We currently have 2 places in our code that seem to filter for exact matches to "ebs", which we need to figure out what we can do. AIUI Amazon would *like* us to just switch over to "ssd" completely (that was my understanding from Ben Howard). However, I'd rather we move to a "use ssd if we can, else fall back to ebs".

You can grep the code for "ebsStorage" where we save that constant, but it is in StartInstance (passing it as the Storage parameter to findInstanceSpec), and in filterImages, where we again do a:
                // For now, we only want images with "ebs" storage.
                if image.Storage == ebsStorage {
                        result = append(result, image)
                }

I'm assuming the loop is easy enough to change to:
if image.Storage == ebsStorage || image.Storage == ssdStorage

but I don't quite know how to fix the findInstanceSpec since it only lets us put one entry in the InstanceConstraint document.

I also don't quite understand why InstanceConstraint is getting the Storage parameter, and passing it on to imagemetadata.Fetch, but then we still run it through a pass of filterImages (with a hard-coded storage type).
I'm guessing the value passed in is just ignored everywhere, but there are a lot of layers to dig through to get there.

Revision history for this message
Curtis Hovey (sinzui) wrote :

Is this a duplicate of bug 1333117

Ian Booth (wallyworld)
Changed in juju-core:
milestone: none → 1.21-alpha2
Ian Booth (wallyworld)
Changed in juju-core:
assignee: nobody → Ian Booth (wallyworld)
status: Triaged → In Progress
Ian Booth (wallyworld)
Changed in juju-core:
status: In Progress → Fix Committed
Curtis Hovey (sinzui)
Changed in juju-core:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.