Netapp: Image cloning unsuccessful, "need more than 2 values to unpack"

Bug #1490845 reported by Christoph Dwertmann
18
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
Undecided
Tom Barron
Kilo
Fix Released
Undecided
Tom Barron

Bug Description

I just upgraded to the kilo 2015.1.1 packages, and Netapp Flex cloning from glance stopped working.

# dpkg -l | grep cinder
ii cinder-api 1:2015.1.1-0ubuntu2~cloud2 all Cinder storage service - API server
ii cinder-backup 1:2015.1.1-0ubuntu2~cloud2 all Cinder storage service - Scheduler server
ii cinder-common 1:2015.1.1-0ubuntu2~cloud2 all Cinder storage service - common files
ii cinder-scheduler 1:2015.1.1-0ubuntu2~cloud2 all Cinder storage service - Scheduler server
ii cinder-volume 1:2015.1.1-0ubuntu2~cloud2 all Cinder storage service - Volume server
ii python-cinder 1:2015.1.1-0ubuntu2~cloud2 all Cinder Python libraries
ii python-cinderclient 1:1.1.1-0ubuntu1~cloud0 all python bindings to the OpenStack Volume API

cinder-volume log:

2015-09-01 16:20:12.852 27743 INFO cinder.volume.drivers.netapp.dataontap.nfs_base [req-ef38d425-a61f-477d-8abd-b2727dbd45e2 50d450c6c59a4201aa6baf2af7943455 a27858aecba74f5e8aeac7977207c273 - - -] Checking image clone a5aa3603-c014-420e-8799-31c7ff853838 from glance share.
2015-09-01 16:20:12.853 27743 DEBUG cinder.volume.drivers.netapp.dataontap.nfs_base [req-ef38d425-a61f-477d-8abd-b2727dbd45e2 50d450c6c59a4201aa6baf2af7943455 a27858aecba74f5e8aeac7977207c273 - - -] Found possible share matches [u'10.1.0.9:/vol/vault_tier1'] _check_share_in_use /usr/lib/python2.7/dist-packages/cinder/volume/drivers/netapp/dataontap/nfs_base.py:579
2015-09-01 16:20:12.861 27743 DEBUG cinder.volume.drivers.netapp.dataontap.nfs_7mode [req-ef38d425-a61f-477d-8abd-b2727dbd45e2 50d450c6c59a4201aa6baf2af7943455 a27858aecba74f5e8aeac7977207c273 - - -] Share match found for ip 10.1.0.9 _share_match_for_ip /usr/lib/python2.7/dist-packages/cinder/volume/drivers/netapp/dataontap/nfs_7mode.py:199
2015-09-01 16:20:12.866 27743 INFO cinder.volume.drivers.netapp.dataontap.nfs_base [req-ef38d425-a61f-477d-8abd-b2727dbd45e2 50d450c6c59a4201aa6baf2af7943455 a27858aecba74f5e8aeac7977207c273 - - -] Image cloning unsuccessful for image a5aa3603-c014-420e-8799-31c7ff853838. Message: need more than 2 values to unpack

The problem seems to be that _get_capacity_info() in drivers/netapp/dataontap/nfs_base.py returns a tuple, whereas in drivers/nfs.py three values are expected:

        total_size, total_available, total_allocated = \
            self._get_capacity_info(nfs_share)

Revision history for this message
Christoph Dwertmann (cdwertmann) wrote :
Tom Barron (tpb)
Changed in cinder:
assignee: nobody → Tom Barron (tpb)
tags: added: netapp
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (master)

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

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

Reviewed: https://review.openstack.org/223385
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=cc651ff8c658c4f8d4415d46a348136b653ab30a
Submitter: Jenkins
Branch: master

commit cc651ff8c658c4f8d4415d46a348136b653ab30a
Author: Tom Barron <email address hidden>
Date: Thu Sep 10 19:53:29 2015 -0400

    Fix NetApp clone from glance failure

    When glance and cinder are backed by the same NetApp DOT flexvol
    container, exposed as an NFS share, a direct clone is attempted
    of the backing files rather than a copy. With the advent of
    kilo 2015.1.1, this clone operation fails with the message:
    "Image cloning unsuccessful ... need more than 2 values to unpack."

    The issue here is that the clone path code is calling the parent
    nfs class _is_share_eligible() method to see if there is enough
    space on the destination flexvol and this method calls _get_capacity_info()
    expecting a three-tuple to be returned. However, commit
    e52f304313efc695f7dd89c222041bffd53c131a deliberately changed the return
    values of _get_capacity_info() within the NetApp drivers to return
    a 2-tuple, based on API calls to obtain capacity information from
    the NetApp storage arrays. That commit missed that this method
    would also be invoked by the parent nfs class _is_share_eligible()
    method, which expects a different signature.

    The fix in this commit is to replace the call to the parent
    _is_share_eligible() method with a more appropriate NetApp class
    specific _share_has_space_for_clone() method. This new method
    uses the NetApp version of _get_capacity_info to get space information
    from the arrays via NetApp apis and expects a 2-tuple to be returned
    from this method.

    Change-Id: Ib0c69e5ea7b32d17930fe0bdcdb9357fd4e4a244
    Closes-bug: 1490845

Changed in cinder:
status: In Progress → Fix Committed
Tom Barron (tpb)
tags: added: drivers kilo-backport-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (stable/kilo)

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

Thierry Carrez (ttx)
Changed in cinder:
milestone: none → liberty-rc1
status: Fix Committed → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (stable/kilo)

Reviewed: https://review.openstack.org/225185
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=e9dfe5a45971000f458ddcdfee426e3c1ada3a1d
Submitter: Jenkins
Branch: stable/kilo

commit e9dfe5a45971000f458ddcdfee426e3c1ada3a1d
Author: Tom Barron <email address hidden>
Date: Thu Sep 10 19:53:29 2015 -0400

    Fix NetApp clone from glance failure

    When glance and cinder are backed by the same NetApp DOT flexvol
    container, exposed as an NFS share, a direct clone is attempted
    of the backing files rather than a copy. With the advent of
    kilo 2015.1.1, this clone operation fails with the message:
    "Image cloning unsuccessful ... need more than 2 values to unpack."

    The issue here is that the clone path code is calling the parent
    nfs class _is_share_eligible() method to see if there is enough
    space on the destination flexvol and this method calls _get_capacity_info()
    expecting a three-tuple to be returned. However, commit
    e52f304313efc695f7dd89c222041bffd53c131a deliberately changed the return
    values of _get_capacity_info() within the NetApp drivers to return
    a 2-tuple, based on API calls to obtain capacity information from
    the NetApp storage arrays. That commit missed that this method
    would also be invoked by the parent nfs class _is_share_eligible()
    method, which expects a different signature.

    The fix in this commit is to replace the call to the parent
    _is_share_eligible() method with a more appropriate NetApp class
    specific _share_has_space_for_clone() method. This new method
    uses the NetApp version of _get_capacity_info to get space information
    from the arrays via NetApp apis and expects a 2-tuple to be returned
    from this method.

    Note that although this is a cherry-pick, changes were made
    because NetApp Kilo drivers do not support scheduler-based
    over-subscription, only the legacy driver-based NFS over-subscription
    options.

        Conflicts:
            cinder/tests/test_netapp_nfs.py
            cinder/tests/unit/volume/drivers/netapp/dataontap/test_nfs_base.py
            cinder/tests/unit/volume/drivers/netapp/dataontap/test_nfs_cmode.py

    Change-Id: Ib0c69e5ea7b32d17930fe0bdcdb9357fd4e4a244
    Closes-bug: 1490845
    (cherry picked from commit cc651ff8c658c4f8d4415d46a348136b653ab30a)

tags: added: in-stable-kilo
Thierry Carrez (ttx)
Changed in cinder:
milestone: liberty-rc1 → 7.0.0
Eric Harney (eharney)
tags: removed: kilo-backport-potential
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.