Comment 3 for bug 1410566

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (master)

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

commit fb8bfea97b54f3d0971fdc1b0473e8a60b1badb3
Author: Mitsuhiro Tanino <email address hidden>
Date: Fri Jan 16 22:04:17 2015 -0500

    Refactoring for export functions in Target object

    Currently, export functions such as create_export() are implemented
    in individual Target code, but most of them are same and these are
    common features in each target.
    This patch moves these methods to parent ISCSITarget class to
    commonalize and each Target simply inherit these methods from parent
    class. As a result of this change, LioAdm can inherit ISCSITarget
    class directly instead of inheriting TgtAdm class.
    This simplifies dependency of targets and improves maintainability.

    By refactoring these methods, this patch also fixes following issues.

    (a) Fix bug #1410566
    After transitioning to the new driver and target model, iscsi_targets
    is not added to the table during create_export() phase.
    However, remove_export() in LIO Target is still reffering empty
    iscsi_targets table. This causes NotFound exception and remove_export()
    skips to do remove_iscsi_target().
    As a result, iscsi target is not removed and the target continues to
    grab the volume(logical volume) as an in-use status.
    This patch fix the problem.

    (b) Re-export a volume with CHAP
    Current Tgt Target recreate iscsi target without CHAP during
    ensure_export() even if the volume is exported with CHAP previously.
    This patch changes this bahaviour to recreate iscsi target using
    previous CHAP which is stored in volume file on state_path dir.

    Closes-Bug: 1410566
    Change-Id: Iea3d94e35a4ced4dafc1b61e2df6b075cf200577