Public bug reported: The code here is misleading:
https://github.com/openstack/nova/blob/d49a78e9f895be36eeeb3da88e2472cf773cb105/nova/compute/manager.py#L4638 volume_id=volume_id or 'reserved', That originated in grizzly with: https://github.com/openstack/nova/commit/66f1a34cabc26930db2a1afed5a0f5ced4d1c015 To fix a problem in the 2.x compute api where volume_id was optional. As of https://github.com/openstack/nova/commit/91b35b22e753a4eb0c22c004bb12586970a95e11 we now required compute rpcapi >= 4.0 so we don't support the 2.x volume_id being optional case. Furthermore, the v2 API and v2.1 REST APIs require the volume_id to be passed in when attaching a volume: v2: https://github.com/openstack/nova/blob/master/nova/api/openstack/compute/legacy_v2/contrib/volumes.py#L293 v2.1: https://github.com/openstack/nova/blob/master/nova/api/openstack/compute/schemas/volumes.py#L79 So we should remove that "or 'reserved'" condition in the compute manager code since it's very confusing, especially when we don't have unique constraints on the BDM table in the database, we really need to have a unique volume_id (or None in the case of booting from blank/image/snapshot). ** Affects: nova Importance: Low Assignee: Matt Riedemann (mriedem) Status: Triaged ** Tags: compute volumes ** Changed in: nova Importance: Undecided => Low ** Changed in: nova Status: New => Triaged ** Changed in: nova Assignee: (unassigned) => Matt Riedemann (mriedem) -- You received this bug notification because you are a member of Yahoo! Engineering Team, which is subscribed to OpenStack Compute (nova). https://bugs.launchpad.net/bugs/1533871 Title: compute manager reserve_block_device_name should not set 'reserved' as BDM volume_id Status in OpenStack Compute (nova): Triaged Bug description: The code here is misleading: https://github.com/openstack/nova/blob/d49a78e9f895be36eeeb3da88e2472cf773cb105/nova/compute/manager.py#L4638 volume_id=volume_id or 'reserved', That originated in grizzly with: https://github.com/openstack/nova/commit/66f1a34cabc26930db2a1afed5a0f5ced4d1c015 To fix a problem in the 2.x compute api where volume_id was optional. As of https://github.com/openstack/nova/commit/91b35b22e753a4eb0c22c004bb12586970a95e11 we now required compute rpcapi >= 4.0 so we don't support the 2.x volume_id being optional case. Furthermore, the v2 API and v2.1 REST APIs require the volume_id to be passed in when attaching a volume: v2: https://github.com/openstack/nova/blob/master/nova/api/openstack/compute/legacy_v2/contrib/volumes.py#L293 v2.1: https://github.com/openstack/nova/blob/master/nova/api/openstack/compute/schemas/volumes.py#L79 So we should remove that "or 'reserved'" condition in the compute manager code since it's very confusing, especially when we don't have unique constraints on the BDM table in the database, we really need to have a unique volume_id (or None in the case of booting from blank/image/snapshot). To manage notifications about this bug go to: https://bugs.launchpad.net/nova/+bug/1533871/+subscriptions -- Mailing list: https://launchpad.net/~yahoo-eng-team Post to : yahoo-eng-team@lists.launchpad.net Unsubscribe : https://launchpad.net/~yahoo-eng-team More help : https://help.launchpad.net/ListHelp