swap and ephemeral devices defined in the flavor are not created as a block device mapping

Bug #1297325 reported by Xavier Queralt
8
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Medium
Nikola Đipanov
Kilo
Fix Released
Undecided
Unassigned

Bug Description

When booting an instance specifying the swap and/or ephemeral devices, those will be created as a block device mapping in the database together with the image and volumes if present.

If, instead, we rely on libvirt to define the swap and ephemeral devices later from the specified instance type, those devices won't be added to the block device mapping list.

To be consistent and to prevent any errors when trying to guess the device name from the existing block device mappings, we should create a mappings for those devices if present in the instance type. We should create them from the API layer, before validating the block device mappings and only if no swap or ephemeral device are defined by the user.

Changed in nova:
status: New → Confirmed
tags: added: icehouse-rc-potential
Changed in nova:
milestone: icehouse-rc1 → none
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/83516

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

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

Thierry Carrez (ttx)
tags: added: icehouse-backport-potential
removed: icehouse-rc-potential
Revision history for this message
Openstack Gerrit (openstack-gerrit) wrote : Fix merged to nova (master)

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

commit 38b348ee665af23a6dc324e70664948dd944763f
Author: Xavier Queralt <email address hidden>
Date: Thu Mar 27 19:19:33 2014 +0100

    Create the image mappings BDMs earlier in the boot

    Refactor the processing of BDMs defined in the image (either as a block
    device mapping in the properties or mappings of blank devices) and move
    it to the same method where the rest of BDMs are processed.

    Partial-bug: #1297325
    Change-Id: Ida0ddb6efcb0014890762df000eaea679f9b1d7b

Revision history for this message
Sean Dague (sdague) wrote :

The upstream patches have been stalled and the creator seems not to be working on them. They are available for others to take over.

Changed in nova:
status: In Progress → Confirmed
assignee: Xavier Queralt (xqueralt) → nobody
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on nova (master)

Change abandoned by Joe Gordon (<email address hidden>) on branch: master
Review: https://review.openstack.org/83516
Reason: Patch is stalled waiting for the author, looks like this has been abandoned. Feel free to restore.

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

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

commit 7f8128f87f5a2fa93c857295fb7e4163986eda25
Author: Xavier Queralt <email address hidden>
Date: Thu Apr 10 13:59:47 2014 +0200

    Add the swap and ephemeral BDMs if needed

    After preparing the block device mapping for creating new instance(s),
    check if any ephemeral and/or a swap disks have been already defined. If
    that is not the case and the instance type requires them, create the
    needed ephemeral and/or swap BDMs.

    Closes-Bug: #1297325
    Related-Bug: #1457527
    Change-Id: I44b30625cf1023d20ebec5e38f46b7b8dab325f6

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → liberty-1
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: liberty-1 → 12.0.0
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (stable/kilo)

Fix proposed to branch: stable/kilo
Review: https://review.openstack.org/269421

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

Reviewed: https://review.openstack.org/269421
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=dd1c3c7561676e7479d4ed60609286ed40f32964
Submitter: Jenkins
Branch: stable/kilo

commit dd1c3c7561676e7479d4ed60609286ed40f32964
Author: Xavier Queralt <email address hidden>
Date: Thu Apr 10 13:59:47 2014 +0200

    Add the swap and ephemeral BDMs if needed

    After preparing the block device mapping for creating new instance(s),
    check if any ephemeral and/or a swap disks have been already defined. If
    that is not the case and the instance type requires them, create the
    needed ephemeral and/or swap BDMs.

    Closes-Bug: #1297325
    Related-Bug: #1457527
    Change-Id: I44b30625cf1023d20ebec5e38f46b7b8dab325f6
    (cherry picked from commit 7f8128f87f5a2fa93c857295fb7e4163986eda25)

tags: added: in-stable-kilo
Revision history for this message
Doug Hellmann (doug-hellmann) wrote : Fix included in openstack/nova 2015.1.4

This issue was fixed in the openstack/nova 2015.1.4 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

This issue was fixed in the openstack/nova 2015.1.4 release.

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.