VMware: factor out the management of unit numbers

Bug #1259981 reported by Radoslav Gerganov
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Medium
Radoslav Gerganov

Bug Description

Virtual devices need a unit number when they are attached to a controller. We cannot have two devices on the same controller with the same unit number.

Currently, the selection of unit numbers is spread all over the driver code, leaking to high-level functions like spawn() and rescue(). We need to factor this out into helper functions which take care of choosing a proper unit number and creating additional controllers if needed.

High-level functions need to communicate only the intent like 'attach CDROM' or 'attach disk' and shouldn't bother with details like unit numbers.

Tags: vmware
Changed in nova:
assignee: nobody → Radoslav Gerganov (rgerganov)
Gary Kotton (garyk)
Changed in nova:
importance: Undecided → Medium
status: New → Confirmed
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/66523

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

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

commit ecdc5728ca849fd19d01c2a69cf07bf0989e8567
Author: Radoslav Gerganov <email address hidden>
Date: Tue Jan 14 11:02:07 2014 +0200

    VMware: factor out management of controller keys and unit numbers

    This patch encapsulates the allocation of controller key and unit
    number for a new virtual disk/CDROM into utility function.
    This way high-level methods like spawn, rescue, etc. don't have
    to deal with implementation details like the above and the
    algorithm for allocating controller_key and unit_number is
    clearly defined and can be easily reused.

    Change-Id: Ia6d5db5d5c5fa25f680eae82892dcb9b2be864fa
    Closes-Bug: #1259981

Changed in nova:
status: In Progress → Fix Committed
Changed in nova:
milestone: none → icehouse-3
Thierry Carrez (ttx)
Changed in nova:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: icehouse-3 → 2014.1
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.