base driver _do_iscsi_discovery relies on volume['host'] which breaks if called in multi-backend env

Bug #1250673 reported by John Griffith on 2013-11-12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
John Griffith

Bug Description

The base driver file has a mechanism to attempt an iscsi target discovery in cases where the provider info is not present, this mechanism won't work in multi-backend mode because the sendtargets command is formed using volume['host'] to determine what ip to querie. In the case of multi-backend this host entry will look something like: "cinder-host@backend-name", the "@backend-name" is of course invalid for the iscsiadm call and will result in a failure.

Fix proposed to branch: master

Changed in cinder:
assignee: nobody → John Griffith (john-griffith)
status: New → In Progress
Changed in cinder:
milestone: none → icehouse-1

Submitter: Jenkins
Branch: master

commit d869dee85aa9d32d1a397b954f6583d6bfa60c18
Author: john-griffith <email address hidden>
Date: Wed Nov 27 16:38:22 2013 -0700

    Parse out '@' in volume['host'] to do discovery

    The backup method of getting iscsi info is to use
    iscsiadm discovery, however currently that method
    just uses volume['host'] which in the case of
    multi-backend will use "host@backend-name".

    This will cause the discovery to fail of course, so
    this change just parses out the '@' symbol if it's present
    and avoids the problem in the first place.

    This also beefs up the error logging and exception catching
    a bit.

    Parsing out the '@' symbol all the time should be safe as
    the accepted valid chars for hostnames are digits, a-z and

    Change-Id: Ic45a38bf4c56a4aec6847ab0d29e3b41d35bd3d2
    Closes-Bug: #1250673

Changed in cinder:
status: In Progress → Fix Committed
Thierry Carrez (ttx) on 2013-12-04
Changed in cinder:
status: Fix Committed → Fix Released
Thierry Carrez (ttx) on 2014-04-17
Changed in cinder:
milestone: icehouse-1 → 2014.1
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers