Unity: hosts still exist on Unity even after all LUNs are detached

Bug #1768711 reported by Ryan Liang
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
Undecided
Ryan Liang

Bug Description

The host still exists on Unity even after all LUNs are detached from it.

Unity driver creates the host and attaches the luns to the host. In current implementation, the terminate_connection only detaches the luns from the host, and leaves the host as it is.

The requirement is from the user who is using IBM PowerVC. In their use case, there would be one host per VM Instance on Unity system. After deleting those VM instances from OpenStack, there still were lots of hosts left on Unity.

The solution is adding an option to cinder.conf, which could let Unity driver remove the hosts from Unity system after the last LUN is detached.

Changed in cinder:
assignee: nobody → Ryan Liang (ryan-liang)
status: New → In Progress
Ryan Liang (ryan-liang)
tags: added: dellemc
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (master)

Reviewed: https://review.openstack.org/565945
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=f9a9aa5a25688cac86e5dc060a20374e4a29bbef
Submitter: Zuul
Branch: master

commit f9a9aa5a25688cac86e5dc060a20374e4a29bbef
Author: Ryan Liang <email address hidden>
Date: Wed May 2 10:30:20 2018 +0800

    [Unity] Add support of removing empty host

    Add an option in Unity Cinder driver to customize the removing
    of empty host. The option is named `remove_empty_host`. Its
    default value is False. When it is set to True, the host will
    be removed from Unity after the last LUN is detached from it.

    Change-Id: I2d9fad2c977a61f5b26a6449a8e509911eff28e0
    Closes-bug: #1768711

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

Fix proposed to branch: stable/queens
Review: https://review.openstack.org/570520

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

Reviewed: https://review.openstack.org/570520
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=24bd0c4b645dbcb99977e6a3e16c51979455b1eb
Submitter: Zuul
Branch: stable/queens

commit 24bd0c4b645dbcb99977e6a3e16c51979455b1eb
Author: Ryan Liang <email address hidden>
Date: Wed May 2 10:30:20 2018 +0800

    [Unity] Add support of removing empty host

    Add an option in Unity Cinder driver to customize the removing
    of empty host. The option is named `remove_empty_host`. Its
    default value is False. When it is set to True, the host will
    be removed from Unity after the last LUN is detached from it.

    Change-Id: I2d9fad2c977a61f5b26a6449a8e509911eff28e0
    Closes-bug: #1768711
    (cherry picked from commit f9a9aa5a25688cac86e5dc060a20374e4a29bbef)

tags: added: in-stable-queens
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/cinder 13.0.0.0b2

This issue was fixed in the openstack/cinder 13.0.0.0b2 development milestone.

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

Fix proposed to branch: stable/pike
Review: https://review.openstack.org/574120

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

Reviewed: https://review.openstack.org/574120
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=66c50600def5f8f25106afaa316e7fc300d72c87
Submitter: Zuul
Branch: stable/pike

commit 66c50600def5f8f25106afaa316e7fc300d72c87
Author: Ryan Liang <email address hidden>
Date: Wed May 2 10:30:20 2018 +0800

    [Unity] Add support of removing empty host

    Add an option in Unity Cinder driver to customize the removing
    of empty host. The option is named `remove_empty_host`. Its
    default value is False. When it is set to True, the host will
    be removed from Unity after the last LUN is detached from it.

    Change-Id: I2d9fad2c977a61f5b26a6449a8e509911eff28e0
    Closes-bug: #1768711
    (cherry picked from commit f9a9aa5a25688cac86e5dc060a20374e4a29bbef)
    (cherry picked from commit 24bd0c4b645dbcb99977e6a3e16c51979455b1eb)

tags: added: in-stable-pike
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/cinder 12.0.3

This issue was fixed in the openstack/cinder 12.0.3 release.

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

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

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

This issue was fixed in the openstack/cinder 11.2.0 release.

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

Reviewed: https://review.openstack.org/626069
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=9773f963fea7e8a7033a047fda8967259ef4f99f
Submitter: Zuul
Branch: stable/ocata

commit 9773f963fea7e8a7033a047fda8967259ef4f99f
Author: Ryan Liang <email address hidden>
Date: Wed May 2 10:30:20 2018 +0800

    [Unity] Add support of removing empty host

    Add an option in Unity Cinder driver to customize the removing
    of empty host. The option is named `remove_empty_host`. Its
    default value is False. When it is set to True, the host will
    be removed from Unity after the last LUN is detached from it.

    Change-Id: I2d9fad2c977a61f5b26a6449a8e509911eff28e0
    Closes-bug: #1768711
    (cherry picked from commit f9a9aa5a25688cac86e5dc060a20374e4a29bbef)
    (cherry picked from commit 24bd0c4b645dbcb99977e6a3e16c51979455b1eb)
    (cherry picked from commit 66c50600def5f8f25106afaa316e7fc300d72c87)

tags: added: in-stable-ocata
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.