Can't specify custom backend-name for HP/Lefthand driver

Bug #1173037 reported by Shanthakumar K on 2013-04-26
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
High
John Griffith

Bug Description

Hi,

Please find my setup details below,

OS: Ubuntu12.04 LTS 64B
Mode: Openstack Grizzly Single node

I have openstack grizzly single node setup with all the servcies up and running.

I'm running in a config issue with cinder-volume service while I'm trying to attach the volume to the instance.

I'm using storage multibackend feature using thatI can create/delete volumes but not attaching to the instance im getting the following error.

#########################
Cinder volume log
########################

2013-04-27 01:25:40 ERROR [cinder.openstack.common.rpc.amqp] Exception during message handling
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/cinder/openstack/common/rpc/amqp.py", line 430, in _process_data
    rval = self.proxy.dispatch(ctxt, version, method, **args)
  File "/usr/lib/python2.7/dist-packages/cinder/openstack/common/rpc/dispatcher.py", line 133, in dispatch
    return getattr(proxyobj, method)(ctxt, **kwargs)
  File "/usr/lib/python2.7/dist-packages/cinder/volume/manager.py", line 665, in initialize_connection
    return self.driver.initialize_connection(volume_ref, connector)
  File "/usr/lib/python2.7/dist-packages/cinder/volume/driver.py", line 336, in initialize_connection
    if self.configuration.iscsi_helper == 'lioadm':
  File "/usr/lib/python2.7/dist-packages/cinder/volume/configuration.py", line 83, in __getattr__
    return getattr(self.local_conf, value)
  File "/usr/lib/python2.7/dist-packages/oslo/config/cfg.py", line 1708, in __getattr__
    return self._conf._get(name, self._group)
  File "/usr/lib/python2.7/dist-packages/oslo/config/cfg.py", line 1513, in _get
    value = self._substitute(self._do_get(name, group))
  File "/usr/lib/python2.7/dist-packages/oslo/config/cfg.py", line 1529, in _do_get
    info = self._get_opt_info(name, group)
  File "/usr/lib/python2.7/dist-packages/oslo/config/cfg.py", line 1629, in _get_opt_info
    raise NoSuchOptError(opt_name, group)
NoSuchOptError: no such option in group driver-1: iscsi_helper
2013-04-27 01:25:40 ERROR [cinder.openstack.common.rpc.common] Returning exception no such option in group driver-1: iscsi_helper to caller
2013-04-27 01:25:40 ERROR [cinder.openstack.common.rpc.common] ['Traceback (most recent call last):\n', ' File "/usr/lib/python2.7/dist-packages/cinder/openstack/common/rpc/amqp.py", line 430, in _process_data\n rval = self.proxy.dispatch(ctxt, version, method, **args)\n', ' File "/usr/lib/python2.7/dist-packages/cinder/openstack/common/rpc/dispatcher.py", line 133, in dispatch\n return getattr(proxyobj, method)(ctxt, **kwargs)\n', ' File "/usr/lib/python2.7/dist-packages/cinder/volume/manager.py", line 665, in initialize_connection\n return self.driver.initialize_connection(volume_ref, connector)\n', ' File "/usr/lib/python2.7/dist-packages/cinder/volume/driver.py", line 336, in initialize_connection\n if self.configuration.iscsi_helper == \'lioadm\':\n', ' File "/usr/lib/python2.7/dist-packages/cinder/volume/configuration.py", line 83, in __getattr__\n return getattr(self.local_conf, value)\n', ' File "/usr/lib/python2.7/dist-packages/oslo/config/cfg.py", line 1708, in __getattr__\n return self._conf._get(name, self._group)\n', ' File "/usr/lib/python2.7/dist-packages/oslo/config/cfg.py", line 1513, in _get\n value = self._substitute(self._do_get(name, group))\n', ' File "/usr/lib/python2.7/dist-packages/oslo/config/cfg.py", line 1529, in _do_get\n info = self._get_opt_info(name, group)\n', ' File "/usr/lib/python2.7/dist-packages/oslo/config/cfg.py", line 1629, in _get_opt_info\n raise NoSuchOptError(opt_name, group)\n', 'NoSuchOptError: no such option in group driver-1: iscsi_helper\n']

###################
Cinder.conf file
###################

[DEFAULT]
rootwrap_config=/etc/cinder/rootwrap.conf
sql_connection = mysql://cinderUser:cinderPass@10.1.0.29/cinder
api_paste_confg = /etc/cinder/api-paste.ini
iscsi_helper=tgtadm
volume_name_template = volume-%s
volume_group = cinder-volumes
volumes_dir = /etc/cinder/volumes
state_path = /var/lib/cinder
lock_path = /var/lock/cinder
verbose = True
auth_strategy = keystone
debug=true
#osapi_volume_listen_port=5900

# a list of backends that will be served by this compute node
enabled_backends=driver-1,driver-2

[driver-1]
iscsi_helper=tgtadm
volume_group = cinder-volumes
volume_driver=cinder.volume.drivers.lvm.LVMISCSIDriver
volume_backend_name=LVM_iSCSI

[driver-2]
volume_driver=cinder.volume.drivers.san.hp_lefthand.HpSanISCSIDriver
volume_backend_name=LHN_iSCSI
volume_group = cinder-volumes
iscsi_helper=tgtadm
san_ip=********
san_login=*****
san_password=*****
san_ssh_port=16022
san_clustername=******
san_thin_provision=True
san_is_local=False

Kindly let me know, if you need any more details

Hi Shausy,

You shouldn't specify the iscsi_helper in the driver sub-config. You have it specified in the defaults already which is all you need/should have.

Also, I don't think the HP LHN driver has the configurable back-end name options enabled, you'll need to change volume_backend_name to: 'HpSanISCSIDriver'.

I can't figure out where/why the LIO helper is getting picked up, but try fixing up the cinder.conf file and see where that gets us and we'll go from there.

John Griffith (john-griffith) wrote :

Ahh... the LIO is a red-herring, the issue is as I pointed out that the iscsi_helper option isn't a valid option in the driver group.

Shanthakumar K (shantha-kumar) wrote :

Thanks for your response

As you said, iscsi_helper is not needed and volume_backend_name needs to in same name as drivername.

clarification needed:

1. Why this is hard-coded with respective storage arrays name
2. I'm referring bk-block-storage-adminguide-trunk.pdf" for multi backend storageconfiguration, its not mentioned like particular name has to be mention for volume backend
3.Can you please let me know where this has been documented?

We have resolved this by debugging the cinder-scheduler log

>>grzrc3@driver-3', u'capabilities': {u'volume_backend_name': u'HP3PARFCDriver'
>>grzrc3@driver-2', u'capabilities': {u'volume_backend_name': u'HpSanISCSIDriver'

John Griffith (john-griffith) wrote :

Hey Shausy,

Glad to hear those were the issues. With respect to your questions:

1. Why this is hard-coded with respective storage arrays name

When we initially did capabilities and reporting the backend-name for the driver was static and hard coded (either by a string or using the class name). When we added multi-backend support and enhanced it to allow multiple backends of same type we added the capability to specify the backend name to use. Unfortunately some drivers are more actively maintained than others, and this one slipped through the cracks and was not updated.

2. I'm referring bk-block-storage-adminguide-trunk.pdf" for multi backend storageconfiguration, its not mentioned like particular name has to be mention for volume backend

So there are two use cases here which I think introduces some confusion. In the docs, the first two LVM configurations are intended to just have seemless additional VG's to be used in scheduling. In order to specify the back-end via type (and therefore name) you MUST specify a unique back-end name as in LVM-3.

3.Can you please let me know where this has been documented
We'll need to clear up the documentation to be more explicit

I'll modify this bug to actually specify the root cause of the LHN driver, and we'll get that fixed up. We should also log a bug against docs to improve/clarify how the multi-backend stuff works.

summary: - Unable to attach multibackend cinder volume to VM instance
+ Can't specify custom backend-name for HP/Lefthand driver
Changed in cinder:
status: New → Triaged
importance: Undecided → High
milestone: none → havana-1
tags: added: grizzly-backport

Fix proposed to branch: master
Review: https://review.openstack.org/27837

Changed in cinder:
assignee: nobody → John Griffith (john-griffith)
status: Triaged → In Progress
Shanthakumar K (shantha-kumar) wrote :

Thanks alot for your valuable response.

>>We should also log a bug against docs to improve/clarify how the multi-backend stuff works.
Shall I raise the bug for the same ?

Reviewed: https://review.openstack.org/27837
Committed: http://github.com/openstack/cinder/commit/006d673d24778abe6c47e3ee7e1a19e163912440
Submitter: Jenkins
Branch: master

commit 006d673d24778abe6c47e3ee7e1a19e163912440
Author: John Griffith <email address hidden>
Date: Tue Apr 30 13:05:40 2013 -0600

    Fix LHN driver to allow backend name configuration

    The LHN driver wasn't allowing custom volume_backend_name to be set
    via multi-backend configuration input. In addition there were some
    issues with the updating that are also addressed in this patch.

    There are other drivers that are going to need updated/fixed for
    this same problem, but those will be addressed in a separate patch/bug.

    Fixes bug: 1173037

    Change-Id: Iae247a500739d02e145511ebe96dddaff8966419

Changed in cinder:
status: In Progress → Fix Committed
Shanthakumar K (shantha-kumar) wrote :

Thanks for your response.

How to get the fixed code and put into in my setup for the testing the same.

Thierry Carrez (ttx) on 2013-05-29
Changed in cinder:
status: Fix Committed → Fix Released
Thierry Carrez (ttx) on 2013-10-17
Changed in cinder:
milestone: havana-1 → 2013.2
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers