wrong instance bdm response in ec2 api

Bug #1165973 reported by MotoKen
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Medium
MotoKen
Grizzly
Fix Released
Medium
Russell Bryant

Bug Description

when describing an instance with an attached volume, it will get the following response:

<DescribeInstancesResponse xmlns="http://ec2.amazonaws.com/doc/2010-08-31/">
  <requestId>req-4ddb9332-7068-4b7d-8d82-8f64d49e8e11</requestId>
  <reservationSet>
    <item>
      <ownerId>7dd8607e7d294efc845ccf68f8d282b7</ownerId>
      <groupSet>
        <item>
          <groupId>default</groupId>
        </item>
      </groupSet>
      <reservationId>r-z0xn0h0g</reservationId>
      <instancesSet>
        <item>
          <blockDeviceMapping>
            <item>
              <deviceName>/dev/vdd</deviceName>
              <ebs>
                <status>in-use</status>
                <deleteOnTermination>false</deleteOnTermination>
                <volumeId>1a9ca4f2-0151-45c3-b0e7-196615bc6773</volumeId>
                <attachTime></attachTime>
              </ebs>
            </item>
          </blockDeviceMapping>
          <placement>
            <availabilityZone>nova</availabilityZone>
          </placement>
          <keyName/>
          <instanceId>i-00001882</instanceId>
          <instanceState>
            <code>16</code>
            <name>running</name>
          </instanceState>
          <publicDnsName/>
          <imageId>ami-00000133</imageId>
          <productCodesSet/>
          <privateDnsName>server-0aa61ca2-ab25-4318-a406-8b96bc588557</privateDnsName>
          <dnsName>server-0aa61ca2-ab25-4318-a406-8b96bc588557</dnsName>
          <launchTime>2013-03-29T07:15:19.000Z</launchTime>
          <amiLaunchIndex>0</amiLaunchIndex>
          <rootDeviceName>/dev/vda</rootDeviceName>
          <rootDeviceType>instance-store</rootDeviceType>
          <ipAddress>10.0.0.3</ipAddress>
          <instanceType>m1.small</instanceType>
          <privateIpAddress>10.0.0.3</privateIpAddress>
        </item>
      </instancesSet>
    </item>
  </reservationSet>
</DescribeInstancesResponse>

in the blockDeviceMapping, the volumeId should use ec2 id instead of uuid and the status should be 'attached' rather than 'in-use'.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.openstack.org/27896

Changed in nova:
assignee: nobody → MotoKen (motokentsai)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/27896
Committed: http://github.com/openstack/nova/commit/f48a2e1a68cca1ef147279b2ddf713635f494bc0
Submitter: Jenkins
Branch: master

commit f48a2e1a68cca1ef147279b2ddf713635f494bc0
Author: MotoKen <email address hidden>
Date: Wed May 1 14:05:58 2013 +0800

    Fix EC2 instance bdm response

    Make the bdm response respect Amazon EC2 spec:
     * use ec2 volume id instead of uuid
     * use volume attach_status instead of status

    References:
    http://docs.aws.amazon.com/AWSEC2/latest/APIReference/ApiReference-ItemType-EbsInstanceBlockDeviceMappingResponseType.html

    Resolves bug 1165973.

    Change-Id: Ib68397b79f63e01e92ed4bebbc245ba5e0a3ad11

Changed in nova:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (stable/grizzly)

Fix proposed to branch: stable/grizzly
Review: https://review.openstack.org/28310

Changed in nova:
importance: Undecided → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (stable/grizzly)

Reviewed: https://review.openstack.org/28310
Committed: http://github.com/openstack/nova/commit/325ab8f66b83bce71d5874aaa7d15ca924ae829d
Submitter: Jenkins
Branch: stable/grizzly

commit 325ab8f66b83bce71d5874aaa7d15ca924ae829d
Author: MotoKen <email address hidden>
Date: Wed May 1 14:05:58 2013 +0800

    Fix EC2 instance bdm response

    Make the bdm response respect Amazon EC2 spec:
     * use ec2 volume id instead of uuid
     * use volume attach_status instead of status

    References:
    http://docs.aws.amazon.com/AWSEC2/latest/APIReference/ApiReference-ItemType-EbsInstanceBlockDeviceMappingResponseType.html

    Resolves bug 1165973.

    Change-Id: Ib68397b79f63e01e92ed4bebbc245ba5e0a3ad11
    (cherry picked from commit f48a2e1a68cca1ef147279b2ddf713635f494bc0)

Thierry Carrez (ttx)
Changed in nova:
milestone: none → havana-1
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: havana-1 → 2013.2
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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