libvirt's _create_ephemeral must accept max_size

Bug #1250032 reported by jan grant
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Committed
Undecided
jan grant
Havana
Fix Committed
Undecided
Unassigned

Bug Description

Running libvirt / KVM with QCow2, local ephemeral storage.

With revision f6810be4, Change-Id: I3d47adaa2ad07434853f447feb27d7aae0e2e717, a max_size parameter was introduced to calls to prepare_template. For ephemeral images, this introduced a regression.

prepare_template triggers a call to _create_ephemeral in the case where an ephemeral backing file (of some size) is required, which doesn't yet exist on the host.

This causes an error since nova/virt/libvirt/driver.py's LibvirtDriver._create_ephemeral doesn't recognise that kwarg.

The fix ought to be trivial - teaching _create_ephemeral to understand the max_size kwarg (even if it ignores it).

Matt Riedemann (mriedem)
tags: added: libvirt volumes
Revision history for this message
jan grant (jan-grant) wrote :
Changed in nova:
assignee: nobody → jan grant (jan-grant)
status: New → In Progress
Revision history for this message
Gonéri Le Bouder (goneri) wrote :
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/56347
Committed: http://github.com/openstack/nova/commit/384f55bcb32251698cc2ce839a0286ef99e74984
Submitter: Jenkins
Branch: master

commit 384f55bcb32251698cc2ce839a0286ef99e74984
Author: Gonéri Le Bouder <email address hidden>
Date: Tue Nov 19 11:30:08 2013 +0100

    Add missing argument max_size in libvirt driver

    max_size argument was added in commit 3cdfe894ab58f7b91bf7fb690fc5bc724e44066f,
    but missing in _create_ephemeral and _create_swap method, which cause
    exception raised when caching ephemeral and swap disk files of the instance.

    Add test for _create_ephemeral used with max_size parameter
    and test _create_swap method

    Change-Id: I46032ad32f317c923692b8b3d40cedd0dce06cad
    Closes-Bug: 1251152
    Closes-Bug: 1250032

Changed in nova:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (stable/havana)

Fix proposed to branch: stable/havana
Review: https://review.openstack.org/57817

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

Fix proposed to branch: stable/grizzly
Review: https://review.openstack.org/57821

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

Reviewed: https://review.openstack.org/57817
Committed: http://github.com/openstack/nova/commit/b3af6e877aaab4ace3d7c43d15d492f6498a0837
Submitter: Jenkins
Branch: stable/havana

commit b3af6e877aaab4ace3d7c43d15d492f6498a0837
Author: Gonéri Le Bouder <email address hidden>
Date: Tue Nov 19 11:30:08 2013 +0100

    Add missing argument max_size in libvirt driver

    max_size argument was added in commit 3cdfe894ab58f7b91bf7fb690fc5bc724e44066f,
    but missing in _create_ephemeral and _create_swap method, which cause
    exception raised when caching ephemeral and swap disk files of the instance.

    Add test for _create_ephemeral used with max_size parameter
    and test _create_swap method

    Closes-Bug: 1251152
    Closes-Bug: 1250032
    (cherry picked from commit 384f55bcb32251698cc2ce839a0286ef99e74984)

    Conflicts:
     nova/tests/virt/libvirt/test_libvirt.py
     nova/virt/libvirt/driver.py

    Change-Id: I46032ad32f317c923692b8b3d40cedd0dce06cad

tags: added: in-stable-havana
Alan Pevec (apevec)
tags: removed: in-stable-havana
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (stable/grizzly)

Reviewed: https://review.openstack.org/57821
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=3ed9635ba9f0d166c132e70bbbacd79213b9cba6
Submitter: Jenkins
Branch: stable/grizzly

commit 3ed9635ba9f0d166c132e70bbbacd79213b9cba6
Author: Gonéri Le Bouder <email address hidden>
Date: Tue Nov 19 11:30:08 2013 +0100

    Add missing argument max_size in libvirt driver

    max_size argument was added in commit 3cdfe894ab58f7b91bf7fb690fc5bc724e44066f,
    but missing in _create_ephemeral and _create_swap method, which cause
    exception raised when caching ephemeral and swap disk files of the instance.

    Add test for _create_ephemeral used with max_size parameter
    and test _create_swap method

    Closes-Bug: 1251152
    Closes-Bug: 1250032
    (cherry picked from commit 384f55bcb32251698cc2ce839a0286ef99e74984)

    Conflicts:
     nova/tests/test_libvirt.py
     nova/virt/libvirt/driver.py

    Change-Id: I46032ad32f317c923692b8b3d40cedd0dce06cad

tags: added: in-stable-grizzly
Alan Pevec (apevec)
tags: removed: in-stable-grizzly
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.