ocata: potential AttributeError on libvirt.VIR_DOMAIN_BLOCK_REBASE_COPY_DEV

Bug #1724039 reported by Matt Riedemann
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Invalid
Undecided
Unassigned
Ocata
Fix Committed
Medium
Matt Riedemann

Bug Description

We merged this backport in stable/ocata which went into the 15.0.6 and 15.0.7 releases:

https://review.openstack.org/#/c/471353/

But later realized (when reviewing the stable/newton proposed backport) that the VIR_DOMAIN_BLOCK_REBASE_COPY_DEV flag is only available to libvirt starting in 1.2.9.

We only started requiring libvirt >= 1.2.9 starting in the pike release, and in ocata we require libvirt >= 1.2.1.

So anyone with libvirt < 1.2.9 that picks up this change in ocata and is doing a swap volume operation with a block volume could hit an AttributeError.

https://libvirt.org/git/?p=libvirt.git;a=blob;f=docs/news-2014.html.in

https://libvirt.org/git/?p=libvirt.git;a=commit;h=b7e73585a8d96677695a52bafb156f26cbd48fb5

Matt Riedemann (mriedem)
Changed in nova:
status: Triaged → Invalid
importance: Medium → Undecided
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (stable/ocata)

Fix proposed to branch: stable/ocata
Review: https://review.openstack.org/512406

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

Reviewed: https://review.openstack.org/512406
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=5d5c5a5d92458d530115b3d3b8b381524b1a3a90
Submitter: Zuul
Branch: stable/ocata

commit 5d5c5a5d92458d530115b3d3b8b381524b1a3a90
Author: Matt Riedemann <email address hidden>
Date: Mon Oct 16 16:23:28 2017 -0400

    libvirt: add check for VIR_DOMAIN_BLOCK_REBASE_COPY_DEV

    Change I868a0dae0baf8cded9c7c5807ea63ffc5eec0c5e adds some
    code that relies on the VIR_DOMAIN_BLOCK_REBASE_COPY_DEV flag
    which was introduced to libvirt in commit
    b7e73585a8d96677695a52bafb156f26cbd48fb5 which went into the
    1.2.9 release:

    https://libvirt.org/git/?p=libvirt.git;a=blob;f=docs/news-2014.html.in

    The nova change went into the Pike release and was backported
    to stable/ocata, and went into the 15.0.6 release. However,
    in ocata the minimum required version of libvirt is 1.2.1, so
    it's possible people could be running libvirt in ocata with
    libvirt < 1.2.9 which would then result in an AttributeError
    if doing a swap volume operation on a block type device.

    This adds a check to see if the attribute exists before attempting
    to use it.

    Note that this change is not made on the master branch since starting
    in Pike the minimum required version of libvirt is 1.2.9.

    Change-Id: Ie3789bda6c6417249e279739b80a61c5b525421f
    Closes-Bug: #1724039

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/nova 15.0.8

This issue was fixed in the openstack/nova 15.0.8 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.