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

Bug #1250673 reported by John Griffith
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
Medium
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.

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/58886

Changed in cinder:
assignee: nobody → John Griffith (john-griffith)
status: New → In Progress
Changed in cinder:
milestone: none → icehouse-1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (master)

Reviewed: https://review.openstack.org/58886
Committed: http://github.com/openstack/cinder/commit/d869dee85aa9d32d1a397b954f6583d6bfa60c18
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
    hyphens.

    Change-Id: Ic45a38bf4c56a4aec6847ab0d29e3b41d35bd3d2
    Closes-Bug: #1250673

Changed in cinder:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in cinder:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in cinder:
milestone: icehouse-1 → 2014.1
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.