Ask Your Question
0

NoMoreTargets: An unknown exception occurred when attaching a volume to instance

asked 2015-12-22 05:01:06 -0500

sunzen.wang gravatar image

The critical log in related cinder volume node is as following:

2015-12-22 18:15:48.911 43956 ERROR cinder.volume.manager [req-3173227d-7cfd-4549-8ab3-10821fff373c 6e34546a7f604db083db828e982c723c ef43a0aabdea40a29f1870a377db7e90 - - -] Unable to create export for volume eeacca5c-5e0c-49a2-a362-65b56f11b1ee
2015-12-22 18:15:48.911 43956 TRACE cinder.volume.manager Traceback (most recent call last):
2015-12-22 18:15:48.911 43956 TRACE cinder.volume.manager   File "/usr/lib/python2.7/site-packages/cinder/volume/manager.py", line 902, in initialize_connection
2015-12-22 18:15:48.911 43956 TRACE cinder.volume.manager     volume)
2015-12-22 18:15:48.911 43956 TRACE cinder.volume.manager   File "/usr/lib/python2.7/site-packages/osprofiler/profiler.py", line 105, in wrapper
2015-12-22 18:15:48.911 43956 TRACE cinder.volume.manager     return f(*args, **kwargs)
2015-12-22 18:15:48.911 43956 TRACE cinder.volume.manager   File "/usr/lib/python2.7/site-packages/cinder/volume/drivers/lvm.py", line 548, in create_export
2015-12-22 18:15:48.911 43956 TRACE cinder.volume.manager     return self._create_export(context, volume)
2015-12-22 18:15:48.911 43956 TRACE cinder.volume.manager   File "/usr/lib/python2.7/site-packages/cinder/volume/drivers/lvm.py", line 560, in _create_export
2015-12-22 18:15:48.911 43956 TRACE cinder.volume.manager     self.configuration)
2015-12-22 18:15:48.911 43956 TRACE cinder.volume.manager   File "/usr/lib/python2.7/site-packages/cinder/volume/iscsi.py", line 42, in create_export
2015-12-22 18:15:48.911 43956 TRACE cinder.volume.manager     max_targets)
2015-12-22 18:15:48.911 43956 TRACE cinder.volume.manager   File "/usr/lib/python2.7/site-packages/cinder/volume/iscsi.py", line 148, in _get_target_and_lun
2015-12-22 18:15:48.911 43956 TRACE cinder.volume.manager     volume['host'])
2015-12-22 18:15:48.911 43956 TRACE cinder.volume.manager   File "/usr/lib/python2.7/site-packages/cinder/db/api.py", line 167, in volume_allocate_iscsi_target
2015-12-22 18:15:48.911 43956 TRACE cinder.volume.manager     return IMPL.volume_allocate_iscsi_target(context, volume_id, host)
2015-12-22 18:15:48.911 43956 TRACE cinder.volume.manager   File "/usr/lib/python2.7/site-packages/cinder/db/sqlalchemy/api.py", line 154, in wrapper
2015-12-22 18:15:48.911 43956 TRACE cinder.volume.manager     return f(*args, **kwargs)
2015-12-22 18:15:48.911 43956 TRACE cinder.volume.manager   File "/usr/lib/python2.7/site-packages/cinder/db/sqlalchemy/api.py", line 210, in wrapped
2015-12-22 18:15:48.911 43956 TRACE cinder.volume.manager     return f(*args, **kwargs)
2015-12-22 18:15:48.911 43956 TRACE cinder.volume.manager   File "/usr/lib/python2.7/site-packages/cinder/db/sqlalchemy/api.py", line 1014, in volume_allocate_iscsi_target
2015-12-22 18:15:48.911 43956 TRACE cinder.volume.manager     raise exception.NoMoreTargets()
2015-12-22 18:15:48.911 43956 TRACE cinder.volume.manager NoMoreTargets: An unknown exception occurred.

The event point is at volume_allocate_iscsi_target of cinder/db/sqlalchemy/api.py:

def volume_allocate_iscsi_target(context, volume_id, host):
    session = get_session()
    with session.begin():
        iscsi_target_ref = model_query(context, models.IscsiTarget,
                                       session=session, read_deleted="no").\
            filter_by(volume=None).\
            filter_by(host=host).\
            with_lockmode('update').\
            first()

        # NOTE(vish): if with_lockmode isn't supported, as in sqlite,
        #             then this has concurrency issues
        if not iscsi_target_ref:
            raise exception.NoMoreTargets()

        iscsi_target_ref.volume_id ...
(more)
edit retag flag offensive close merge delete

Comments

No comment yet. Let me add up an piece of update. Thinking it is somewhat strange that there is a corresponding record in iscsi_targets table, I decided to try deleting that record, attaching volume re-starts to work. while, I have not understood what's the root-cause. DB sync/update error?

sunzen.wang gravatar imagesunzen.wang ( 2015-12-22 20:39:12 -0500 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2015-12-22 20:41:11 -0500

sunzen.wang gravatar image

No comment yet. Let me add up an piece of update. Thinking it is somewhat strange that there is a corresponding record in iscsi_targets table, I decided to try deleting that record, attaching volume re-starts to work. while, I have not understood what's the root-cause. DB sync/update error?

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

2 followers

Stats

Asked: 2015-12-22 05:01:06 -0500

Seen: 95 times

Last updated: Dec 22 '15