service instance can not be created if ssh keys unavailable

Bug #1356820 reported by Valeriy Ponomaryov
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Shared File Systems Service (Manila)
Fix Released
High
Vladimir Vechkanov

Bug Description

If we do not provide pathes for ssh keys, or it is absent by provided pathes, then we get following error trying create share with generic driver, that uses "service_instance" module:

2014-08-14 10:23:09.483 12609 ERROR manila.share.manager [req-1a754673-bba1-4d4a-96b5-16a79a676602 None] Failed to get share server for share creation.
2014-08-14 10:23:09.496 12609 ERROR oslo.messaging.rpc.dispatcher [req-1a754673-bba1-4d4a-96b5-16a79a676602 ] Exception during message handling: 'NoneType' object is not iterable
2014-08-14 10:23:09.496 12609 TRACE oslo.messaging.rpc.dispatcher Traceback (most recent call last):
2014-08-14 10:23:09.496 12609 TRACE oslo.messaging.rpc.dispatcher File "/usr/lib64/python2.6/site-packages/oslo/messaging/rpc/dispatcher.py", line 133, in _dispatch_and_reply
2014-08-14 10:23:09.496 12609 TRACE oslo.messaging.rpc.dispatcher incoming.message))
2014-08-14 10:23:09.496 12609 TRACE oslo.messaging.rpc.dispatcher File "/usr/lib64/python2.6/site-packages/oslo/messaging/rpc/dispatcher.py", line 176, in _dispatch
2014-08-14 10:23:09.496 12609 TRACE oslo.messaging.rpc.dispatcher return self._do_dispatch(endpoint, method, ctxt, args)
2014-08-14 10:23:09.496 12609 TRACE oslo.messaging.rpc.dispatcher File "/usr/lib64/python2.6/site-packages/oslo/messaging/rpc/dispatcher.py", line 122, in _do_dispatch
2014-08-14 10:23:09.496 12609 TRACE oslo.messaging.rpc.dispatcher result = getattr(endpoint, method)(ctxt, **new_args)
2014-08-14 10:23:09.496 12609 TRACE oslo.messaging.rpc.dispatcher File "/usr/lib64/python2.6/site-packages/manila/share/manager.py", line 188, in create_share
2014-08-14 10:23:09.496 12609 TRACE oslo.messaging.rpc.dispatcher {'status': 'error'})
2014-08-14 10:23:09.496 12609 TRACE oslo.messaging.rpc.dispatcher File "/usr/lib64/python2.6/site-packages/manila/openstack/common/excutils.py", line 82, in __exit__
2014-08-14 10:23:09.496 12609 TRACE oslo.messaging.rpc.dispatcher six.reraise(self.type_, self.value, self.tb)
2014-08-14 10:23:09.496 12609 TRACE oslo.messaging.rpc.dispatcher File "/usr/lib64/python2.6/site-packages/manila/share/manager.py", line 182, in create_share
2014-08-14 10:23:09.496 12609 TRACE oslo.messaging.rpc.dispatcher context, share_network_id, share_id)
2014-08-14 10:23:09.496 12609 TRACE oslo.messaging.rpc.dispatcher File "/usr/lib64/python2.6/site-packages/manila/share/manager.py", line 139, in _provide_share_server_for_share
2014-08-14 10:23:09.496 12609 TRACE oslo.messaging.rpc.dispatcher return _provide_share_server_for_share()
2014-08-14 10:23:09.496 12609 TRACE oslo.messaging.rpc.dispatcher File "/usr/lib64/python2.6/site-packages/manila/openstack/common/lockutils.py", line 325, in inner
2014-08-14 10:23:09.496 12609 TRACE oslo.messaging.rpc.dispatcher return f(*args, **kwargs)
2014-08-14 10:23:09.496 12609 TRACE oslo.messaging.rpc.dispatcher File "/usr/lib64/python2.6/site-packages/manila/share/manager.py", line 128, in _provide_share_server_for_share
2014-08-14 10:23:09.496 12609 TRACE oslo.messaging.rpc.dispatcher share_server = self._setup_server(context, share_network)
2014-08-14 10:23:09.496 12609 TRACE oslo.messaging.rpc.dispatcher File "/usr/lib64/python2.6/site-packages/manila/share/manager.py", line 416, in _setup_server
2014-08-14 10:23:09.496 12609 TRACE oslo.messaging.rpc.dispatcher self.network_api.deallocate_network(context, share_network)
2014-08-14 10:23:09.496 12609 TRACE oslo.messaging.rpc.dispatcher File "/usr/lib64/python2.6/site-packages/manila/openstack/common/excutils.py", line 82, in __exit__
2014-08-14 10:23:09.496 12609 TRACE oslo.messaging.rpc.dispatcher six.reraise(self.type_, self.value, self.tb)
2014-08-14 10:23:09.496 12609 TRACE oslo.messaging.rpc.dispatcher File "/usr/lib64/python2.6/site-packages/manila/share/manager.py", line 404, in _setup_server
2014-08-14 10:23:09.496 12609 TRACE oslo.messaging.rpc.dispatcher metadata=metadata)
2014-08-14 10:23:09.496 12609 TRACE oslo.messaging.rpc.dispatcher File "/usr/lib64/python2.6/site-packages/manila/share/drivers/generic.py", line 501, in setup_server
2014-08-14 10:23:09.496 12609 TRACE oslo.messaging.rpc.dispatcher network_info['neutron_subnet_id'],
2014-08-14 10:23:09.496 12609 TRACE oslo.messaging.rpc.dispatcher File "/usr/lib64/python2.6/site-packages/manila/share/drivers/service_instance.py", line 291, in set_up_service_instance
2014-08-14 10:23:09.496 12609 TRACE oslo.messaging.rpc.dispatcher neutron_subnet_id)
2014-08-14 10:23:09.496 12609 TRACE oslo.messaging.rpc.dispatcher File "/usr/lib64/python2.6/site-packages/manila/share/drivers/service_instance.py", line 359, in _create_service_instance
2014-08-14 10:23:09.496 12609 TRACE oslo.messaging.rpc.dispatcher key_name, key_path = self._get_key(context)
2014-08-14 10:23:09.496 12609 TRACE oslo.messaging.rpc.dispatcher TypeError: 'NoneType' object is not iterable
2014-08-14 10:23:09.496 12609 TRACE oslo.messaging.rpc.dispatcher

Ssh key can be omitted if provided valid password, so, absense of ssh key should be handled properly.

Changed in manila:
importance: Undecided → Medium
Changed in manila:
status: New → Confirmed
Changed in manila:
assignee: nobody → Vladimir Vechkanov (vvechkanov)
Changed in manila:
status: Confirmed → In Progress
Changed in manila:
importance: Medium → High
Changed in manila:
milestone: none → juno-rc1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to manila (master)

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

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

Reviewed: https://review.openstack.org/119621
Committed: https://git.openstack.org/cgit/openstack/manila/commit/?id=c323c6439f991e513cb454b378cbe6392a2c2d8d
Submitter: Jenkins
Branch: master

commit c323c6439f991e513cb454b378cbe6392a2c2d8d
Author: Vladimir Vechkanov <email address hidden>
Date: Fri Sep 5 03:55:49 2014 -0400

    Fix getting ssh key if ssh path is not set

    Add check for get_key function because it should return tuple,
    but can also return None.

    Closes-Bug: #1356820

    Change-Id: I827a9a24c2decfa245d50d90bdee2b64b59da5b1

Changed in manila:
status: In Progress → Fix Committed
Changed in manila:
status: Fix Committed → Fix Released
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.