ensure_export() fails to re-export volumes after c-vol service is restart by LVM backend and TgtAdm

Bug #1408121 reported by Mitsuhiro Tanino
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
High
Mitsuhiro Tanino

Bug Description

After introducing commit 9651f547147188645942466602c92cce06666483, these three variables are obsolete in ensure_export(). By remaining these variable, ensure_export() fails to re-export volumes after c-vol service is restart because the caller of ensure_export() in lvm driver does not pass these variables..

- iscsi_name, volume_group, config

commit 9651f547147188645942466602c92cce06666483
Author: John Griffith <email address hidden>
Date: Tue Nov 18 00:46:54 2014 +0000

Traceback:
======================================================================
2015-01-06 14:55:36.259 DEBUG cinder.volume.manager [req-85680e17-77d6-4ff1-81a4-7c03fc418a05 None None] Re-exporting 2 volumes from (pid=10403) init_host /opt/stack/cinder/cinder/volume/manager.py:288
2015-01-06 14:55:36.261 ERROR cinder.volume.manager [req-85680e17-77d6-4ff1-81a4-7c03fc418a05 None None] Failed to re-export volume bee3b4f0-8c83-4ef8-a05f-f74c96b93bbe: setting to error state
2015-01-06 14:55:36.268 DEBUG cinder.volume.manager [req-25e26d3d-23f4-435a-8bea-d6427023f5ad None None] Re-exporting 0 volumes from (pid=10400) init_host /opt/stack/cinder/cinder/volume/manager.py:288
2015-01-06 14:55:36.269 DEBUG cinder.volume.manager [req-25e26d3d-23f4-435a-8bea-d6427023f5ad None None] Resuming any in progress delete operations from (pid=10400) init_host /opt/stack/cinder/cinder/volume/manager.py:329
2015-01-06 14:55:36.270 INFO cinder.volume.manager [req-25e26d3d-23f4-435a-8bea-d6427023f5ad None None] Updating volume status
2015-01-06 14:55:36.271 DEBUG cinder.volume.drivers.lvm [req-25e26d3d-23f4-435a-8bea-d6427023f5ad None None] Updating volume stats from (pid=10400) _update_volume_stats /opt/stack/cinder/cinder/volume/drivers/lvm.py:166
2015-01-06 14:55:36.273 DEBUG oslo_concurrency.processutils [req-25e26d3d-23f4-435a-8bea-d6427023f5ad None None] Running cmd (subprocess): sudo cinder-rootwrap /etc/cinder/rootwrap.conf env LC_ALL=C vgs --noheadings --unit=g -o name,size,free,lv_count,uuid --separator : --nosuffix stack-volumes from (pid=10400) execute /usr/lib/python2.7/site-packages/oslo_concurrency/processutils.py:191
2015-01-06 14:55:36.262 ERROR cinder.volume.manager [req-85680e17-77d6-4ff1-81a4-7c03fc418a05 None None] ensure_export() takes exactly 7 arguments (4 given)
2015-01-06 14:55:36.262 TRACE cinder.volume.manager Traceback (most recent call last):
2015-01-06 14:55:36.262 TRACE cinder.volume.manager File "/opt/stack/cinder/cinder/volume/manager.py", line 301, in init_host
2015-01-06 14:55:36.262 TRACE cinder.volume.manager self.driver.ensure_export(ctxt, volume)
2015-01-06 14:55:36.262 TRACE cinder.volume.manager File "/usr/lib/python2.7/site-packages/osprofiler/profiler.py", line 105, in wrapper
2015-01-06 14:55:36.262 TRACE cinder.volume.manager return f(*args, **kwargs)
2015-01-06 14:55:36.262 TRACE cinder.volume.manager File "/opt/stack/cinder/cinder/volume/drivers/lvm.py", line 551, in ensure_export
2015-01-06 14:55:36.262 TRACE cinder.volume.manager volume_path=volume_path)
2015-01-06 14:55:36.262 TRACE cinder.volume.manager TypeError: ensure_export() takes exactly 7 arguments (4 given)
2015-01-06 14:55:36.262 TRACE cinder.volume.manager
2015-01-06 14:55:36.407 DEBUG cinder.volume.manager [req-85680e17-77d6-4ff1-81a4-7c03fc418a05 None None] Resuming any in progress delete operations from (pid=10403) init_host /opt/stack/cinder/cinder/volume/manager.py:329
2015-01-06 14:55:36.408 INFO cinder.volume.manager [req-85680e17-77d6-4ff1-81a4-7c03fc418a05 None None] Updating volume status
2015-01-06 14:55:36.409 DEBUG cinder.volume.drivers.lvm [req-85680e17-77d6-4ff1-81a4-7c03fc418a05 None None] Updating volume stats from (pid=10403) _update_volume_stats /opt/stack/cinder/cinder/volume/drivers/lvm.py:166

Tags: drivers lvm
Changed in cinder:
assignee: nobody → Mitsuhiro Tanino (mitsuhiro-tanino)
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/145381

Changed in cinder:
status: New → In Progress
summary: ensure_export() fails to re-export volumes after c-vol service is
- restart
+ restart by LVM backend and TgtAdm
tags: added: drivers lvm
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (master)

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

commit 73363c1cacac15e8caee0df44db4a7dfdea9cc35
Author: Mitsuhiro Tanino <email address hidden>
Date: Fri Jan 9 20:11:43 2015 -0500

    Remove unused variables from ensure_export()

    After introducing commit 9651f547147188645942466602c92cce06666483,
    these three variables are obsolete in ensure_export().
    By remaining these variable, ensure_export() fails to export
    volumes after c-vol service is restart because the caller of
    ensure_export() in lvm driver does not pass these variables.

    - iscsi_name, volume_group, config

    Main clean up is done by commit Ibfd1feefd72c43ef316b267e9d6645f2e67e2558.
    This patch adds some tests for tgt, lio, and iser targets.
    And also adds initialization of chap_auth_userid and chap_auth_password
    in create_iscsi_target() because these variables might be referred
    before definition.

    Closes-bug: 1408121
    Related-bug: 1408171
    Change-Id: I8766eee33ae07fea71873809bfec37b8352c3a89

Changed in cinder:
status: In Progress → Fix Committed
Mike Perez (thingee)
Changed in cinder:
milestone: none → kilo-2
importance: Undecided → High
Thierry Carrez (ttx)
Changed in cinder:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in cinder:
milestone: kilo-2 → 2015.1.0
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.