Error on LUN creation on HNAS iSCSI driver

Bug #1430782 reported by Erlon R. Cruz
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
Undecided
Erlon R. Cruz

Bug Description

If chap_enabled is 'False', in the first initialization of the driver (before the target is created on HNAS) the driver fails to create volumes.

Steps to reproduce:
1 Set chap_enabled -> False
2 Delete the target of HNAS
3 Create a volume
4 Create an instance
5 Attach the volume to the instance.

Tags: hds iscsi nas
Revision history for this message
Erlon R. Cruz (sombrafam) wrote :
description: updated
Revision history for this message
Jin Liu (jin-t) wrote :

The exception log looks like in manager.py driver.initialize_connection throw exception.
There's some difference for chap_enabled=False when create volume in cinder/volume/drivers/hds/iscsi.py. If you would like add debug=true in cinder.conf and then restart cinder services, you may find more clue for the debug info generated by driver code.
And you may find something in nova-api.log, since nova run cinder-client to create volume.

Revision history for this message
Erlon R. Cruz (sombrafam) wrote :

Hi Jin, thanks! I have found the problem. The target name stored in the driver is not always stored correctly. It is stored as None when the target does not exist in the array. The driver then creates the target but stores None as its name. Then when it tries to attach a volume is refers to 'None' instead of the target name.

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

Changed in cinder:
assignee: nobody → Erlon R. Cruz (sombrafam)
status: New → In Progress
Revision history for this message
Jin Liu (jin-t) wrote :

Good to see, another ticket https://bugs.launchpad.net/cinder/+bug/1430778 may cause by similiar reason, because I find the exception is in _attach_volume in cinder/volume/driver.py, due to initialize_connection failure.

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

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

commit ef27c6beb7410d7007b867b8895178245fe4b7a4
Author: Erlon R. Cruz <email address hidden>
Date: Wed Mar 11 11:30:28 2015 -0300

    Fix HNAS iSCSI driver error on LUN creation

    If chap_enabled is 'False', in the first initialization of the driver (before
    the target is created on HNAS) the driver fails to create volumes. This patch
    fix that by returning the right value when 'get_targetiqn' is called in this
    situation.

    Change-Id: I899717c0e7e4ff800cecc8ffa6e3a81a47e96e9f
    Closes-Bug: #1430782

Changed in cinder:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in cinder:
milestone: none → kilo-rc1
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in cinder:
milestone: kilo-rc1 → 2015.1.0
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

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