[openstack-dev] [nova] Removing BDM devices from POST requests
Matt Riedemann
mriedemos at gmail.com
Sun Apr 2 23:46:35 UTC 2017
On 4/2/2017 12:35 PM, Feodor Tersin wrote:
> Device merging is used by EC2 API at least. This allows us (EC2 API
> team) to implement a use case of changing attached volume parameters
> when launching an instance from a volume backed image. If the image's
> bdms contain several volume descriptions, but a user wants to change
> some of them for a new instance, he can [1] E.g. the user may want to
> increase root volume size, skip another volume.
>
>
> Nova API doesn't support this ability fine (we must specify full bdm
> rather than changes only), but it works at least. If you remove device
> names from API, what alternative way are you going to provide instead
> for this purpose?
>
>
> [1] http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/block-device-mapping-concepts.html#Using_OverridingAMIBDM
>
>
> Thanks,
>
> Feodor Tersin.
>
Can you give some more details? How does this actually "merge" or
replace BDMs defined in the image metadata? Is this because we use
device name as part of a hack for a primary key in the database [1]? I
assume it is. The lack of unique constraint in the BDM data model has
also always been a source of bugs, especially with cells v1 and why we
talk about adding a uuid column to that table every few months.
I've never actually heard of this use case but it looks like it's been
baked in since the legacy BDM behavior in the code, which is itself a
bunch of technical debt that I'd love to remove at some point.
I guess what I'm trying to get at is, is this just important for EC2
compatibility? Or do non-AWS OpenStack users care about this use case,
because we definitely don't advertise this anywhere in our
documentation, or test it in any of our integrated testing (Tempest). So
just because it happens to work by chance of a poor data model doesn't
make me want to bend over backward to keep this working.
If we wanted to support updating/overriding a specific image BDM during
server create, I'd think we could do something more straight-forward in
the compute API, like add an "image_bdm_override=True" field to
block_device_mapping_v2, something like that. What do you think about
that alternative?
[1]
https://github.com/openstack/nova/blob/468916ee57fede4d0c89fbf9c776269943e2cb44/nova/db/sqlalchemy/api.py#L4170-L4175
--
Thanks,
Matt
More information about the OpenStack-dev
mailing list