Comment 2 for bug 1421272

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

Reviewed: https://review.openstack.org/156154
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=bbd4b5f372d1241f8f817e5aafbbd1aee2b385cd
Submitter: Jenkins
Branch: master

commit bbd4b5f372d1241f8f817e5aafbbd1aee2b385cd
Author: Adelina Tuvenie <email address hidden>
Date: Thu Feb 12 09:07:57 2015 -0800

    Fixes Attribute Error when trying to spawn instance from vhd on HyperV

    When trying to boot an instance from a vhd image we get a AttributeError.
    This happens when we try to get the root disk size from the old flavor.
    Since on creation there is no old flavor, instance.get_flavor() will return
    None and thus the AttributeError when trying to return te root_gb.

    This patch fixes this problem by checking if the return value from
    instance.get_flavor() is None, in which case it returns
    instance.root_gb.

    Change-Id: Ief16679a6b80f6f8b9246ea6a50773e40824bb7f
    Closes-Bug: 1421272