rtstool 'Failed to bind to IPv6' messages causes create failure

Bug #1405228 reported by Dan Prince
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
High
Dan Prince

Bug Description

As of 4ad6ca1ac93bd82db5f93b14411ad7b5dfa62e62 (Outputs the message about failing to bind to IPv6) I'm getting failures when using cinder-rtstool. Everything seems to have gone fine except Cinder thinks it wrong due to invalid handling around the rtstool command output.

612355 83534c6ee13b44b0ade8a6c277f3ef7a - - -] Unexpected error while running command.
Command: sudo cinder-rootwrap /etc/cinder/rootwrap.conf cinder-rtstool create /dev/cinder-volumes/volume-61b5cb64-7e68-4f4e-bfb4-bff4b4f3db76 iqn.2010-10.org.openstack:volume-61b5cb64-7e68-4f4e-bfb4-bff4b4f3db76 Qgu37jgpP6o5oUdqpcMD VTnw35w7pVFNKmZ4
Exit code: 1
Stdout: u''
Stderr: u'Traceback (most recent call last):\n File "/bin/cinder-rtstool", line 10, in <module>\n sys.exit(main())\n File "/usr/lib/python2.7/site-packages/cinder/cmd/rtstool.py", line 192, in main\n create(backing_device, name, userid, password, initiator_iqns)\n File "/usr/lib/python2.7/site-packages/cinder/cmd/rtstool.py", line 80, in create\n print(_(\'Failed to bind to IPv6.\'))\n File "/usr/lib/python2.7/site-packages/oslo/i18n/_message.py", line 167, in __str__\n raise UnicodeError(msg)\nUnicodeError\n'
2014-12-23 16:49:29.263 9517 ERROR oslo.messaging.rpc.dispatcher [req-00fb0e3c-b8bc-4dec-b643-52387bff0edb e26f0d5b843a4e6099fe77b33d612355 83534c6ee13b44b0ade8a6c277f3ef7a - - -] Exception during message handling: Failed to create iscsi target for volume volume-61b5cb64-7e68-4f4e-bfb4-bff4b4f3db76.
2014-12-23 16:49:29.263 9517 TRACE oslo.messaging.rpc.dispatcher Traceback (most recent call last):
2014-12-23 16:49:29.263 9517 TRACE oslo.messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/oslo/messaging/rpc/dispatcher.py", line 137, in _dispatch_and_reply
2014-12-23 16:49:29.263 9517 TRACE oslo.messaging.rpc.dispatcher incoming.message))
2014-12-23 16:49:29.263 9517 TRACE oslo.messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/oslo/messaging/rpc/dispatcher.py", line 180, in _dispatch
2014-12-23 16:49:29.263 9517 TRACE oslo.messaging.rpc.dispatcher return self._do_dispatch(endpoint, method, ctxt, args)
2014-12-23 16:49:29.263 9517 TRACE oslo.messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/oslo/messaging/rpc/dispatcher.py", line 126, in _do_dispatch
2014-12-23 16:49:29.263 9517 TRACE oslo.messaging.rpc.dispatcher result = getattr(endpoint, method)(ctxt, **new_args)
2014-12-23 16:49:29.263 9517 TRACE oslo.messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/osprofiler/profiler.py", line 105, in wrapper
2014-12-23 16:49:29.263 9517 TRACE oslo.messaging.rpc.dispatcher return f(*args, **kwargs)
2014-12-23 16:49:29.263 9517 TRACE oslo.messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/cinder/volume/manager.py", line 894, in initialize_connection
2014-12-23 16:49:29.263 9517 TRACE oslo.messaging.rpc.dispatcher volume)
2014-12-23 16:49:29.263 9517 TRACE oslo.messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/osprofiler/profiler.py", line 105, in wrapper
2014-12-23 16:49:29.263 9517 TRACE oslo.messaging.rpc.dispatcher return f(*args, **kwargs)
2014-12-23 16:49:29.263 9517 TRACE oslo.messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/cinder/volume/drivers/lvm.py", line 547, in create_export
2014-12-23 16:49:29.263 9517 TRACE oslo.messaging.rpc.dispatcher return self._create_export(context, volume)
2014-12-23 16:49:29.263 9517 TRACE oslo.messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/cinder/volume/drivers/lvm.py", line 576, in _create_export
2014-12-23 16:49:29.263 9517 TRACE oslo.messaging.rpc.dispatcher self.configuration)
2014-12-23 16:49:29.263 9517 TRACE oslo.messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/cinder/volume/iscsi.py", line 64, in create_export
2014-12-23 16:49:29.263 9517 TRACE oslo.messaging.rpc.dispatcher conf.iscsi_write_cache)
2014-12-23 16:49:29.263 9517 TRACE oslo.messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/cinder/brick/iscsi/iscsi.py", line 560, in create_iscsi_target
2014-12-23 16:49:29.263 9517 TRACE oslo.messaging.rpc.dispatcher raise exception.ISCSITargetCreateFailed(volume_id=vol_id)
2014-12-23 16:49:29.263 9517 TRACE oslo.messaging.rpc.dispatcher ISCSITargetCreateFailed: Failed to create iscsi target for volume volume-61b5cb64-7e68-4f4e-bfb4-bff4b4f3db76.

Dan Prince (dan-prince)
Changed in cinder:
assignee: nobody → Dan Prince (dan-prince)
importance: Undecided → High
status: New → In Progress
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/143695

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

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

commit 892afe9aa5799e7556586d24dc57ef760f62369b
Author: Dan Prince <email address hidden>
Date: Tue Dec 23 11:56:17 2014 -0500

    Revert "Outputs the message about failing to bind

    This reverts commit 8b59396182ceacb704e00afe1aee040a19e2a187.

    This commit broke the ability to create Iscsi targets w/
    cinder-rtstool. Everything seems to be working fine except there
    are issues with regards to how rtstool output is parsed in that
    any output (regardless of exit status) causes the command
    to be marked as failed.

    Suggesting this as a quick revert until we can investigate
    the proper fix for error handling with cinder-rtstool.

    Change-Id: I439433571ed1d01d162f685f8441b28bd6bffa43
    Closes-bug: #1405228

Changed in cinder:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in cinder:
milestone: none → kilo-2
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.