generic driver: SSHException: Check whether private key or password are correctly set. Error connecting via ssh: [Errno 2] No such file or directory: '/var/lib/manila/.ssh/id_rsa'

Bug #1522074 reported by Thomas Bechtold
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Shared File Systems Service (Manila)
Fix Released
Undecided
Ben Swartzlander

Bug Description

Using the multi-backend support in Liberty, I get from the manila-share service:

2015-12-02 15:41:07.565 9918 WARNING manila.share.manager [req-ef64677a-8bf6-41d0-8b63-b6deaa69bbbf ] Share instance information in exception can not be written to db because it contains {} and it is not a dictionary.
2015-12-02 15:41:07.573 9918 ERROR oslo_messaging.rpc.dispatcher [req-ef64677a-8bf6-41d0-8b63-b6deaa69bbbf ] Exception during message handling: Check whether private key or password are correctly set. Error connecting via ssh: [Errno 2] No such file or directory: '/var/lib/manila/.ssh/id_rsa'
2015-12-02 15:41:07.573 9918 ERROR oslo_messaging.rpc.dispatcher Traceback (most recent call last):
2015-12-02 15:41:07.573 9918 ERROR oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/oslo_messaging/rpc/dispatcher.py", line 142, in _dispatch_and_reply
2015-12-02 15:41:07.573 9918 ERROR oslo_messaging.rpc.dispatcher executor_callback))
2015-12-02 15:41:07.573 9918 ERROR oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/oslo_messaging/rpc/dispatcher.py", line 186, in _dispatch
2015-12-02 15:41:07.573 9918 ERROR oslo_messaging.rpc.dispatcher executor_callback)
2015-12-02 15:41:07.573 9918 ERROR oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/oslo_messaging/rpc/dispatcher.py", line 129, in _do_dispatch
2015-12-02 15:41:07.573 9918 ERROR oslo_messaging.rpc.dispatcher result = func(ctxt, **new_args)
2015-12-02 15:41:07.573 9918 ERROR oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/manila/share/manager.py", line 110, in wrapped
2015-12-02 15:41:07.573 9918 ERROR oslo_messaging.rpc.dispatcher return f(self, *args, **kwargs)
2015-12-02 15:41:07.573 9918 ERROR oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/manila/share/manager.py", line 767, in create_share_instance
2015-12-02 15:41:07.573 9918 ERROR oslo_messaging.rpc.dispatcher {'status': constants.STATUS_ERROR}
2015-12-02 15:41:07.573 9918 ERROR oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 195, in __exit__
2015-12-02 15:41:07.573 9918 ERROR oslo_messaging.rpc.dispatcher six.reraise(self.type_, self.value, self.tb)
2015-12-02 15:41:07.573 9918 ERROR oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/manila/share/manager.py", line 738, in create_share_instance
2015-12-02 15:41:07.573 9918 ERROR oslo_messaging.rpc.dispatcher context, share_instance, share_server=share_server)
2015-12-02 15:41:07.573 9918 ERROR oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/manila/share/drivers/generic.py", line 123, in wrap
2015-12-02 15:41:07.573 9918 ERROR oslo_messaging.rpc.dispatcher return f(self, context, *args, **kwargs)
2015-12-02 15:41:07.573 9918 ERROR oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/manila/share/drivers/generic.py", line 218, in create_share
2015-12-02 15:41:07.573 9918 ERROR oslo_messaging.rpc.dispatcher self._format_device(server_details, volume)
2015-12-02 15:41:07.573 9918 ERROR oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/manila/share/drivers/generic.py", line 229, in _format_device
2015-12-02 15:41:07.573 9918 ERROR oslo_messaging.rpc.dispatcher self._ssh_exec(server_details, command)
2015-12-02 15:41:07.573 9918 ERROR oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/manila/share/drivers/generic.py", line 159, in _ssh_exec
2015-12-02 15:41:07.573 9918 ERROR oslo_messaging.rpc.dispatcher ssh = ssh_pool.create()
2015-12-02 15:41:07.573 9918 ERROR oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/manila/utils.py", line 119, in create
2015-12-02 15:41:07.573 9918 ERROR oslo_messaging.rpc.dispatcher raise exception.SSHException(msg)
2015-12-02 15:41:07.573 9918 ERROR oslo_messaging.rpc.dispatcher SSHException: Check whether private key or password are correctly set. Error connecting via ssh: [Errno 2] No such file or directory: '/var/lib/manila/.ssh/id_rsa'
2015-12-02 15:41:07.573 9918 ERROR oslo_messaging.rpc.dispatcher
2015-12-02 15:41:07.663 9918 DEBUG paramiko.transport [-] EOF in transport thread _log /usr/lib/python2.7/site-packages/paramiko/transport.py:1430

My configuration has a share section with:

[backend-generic-0]
share_driver=manila.share.drivers.generic.GenericShareDriver
share_backend_name=sddsfds
driver_handles_share_servers=False
service_instance_user=root
service_instance_password=linux
service_instance_name_or_id=255129b1-3e58-481e-ac71-28cdb9fad047
service_net_name_or_ip=fixed
tenant_net_name_or_ip=fixed

So there is a password given but not a path to a private key (but that is set per default in the [DEFAULT] section. So there is no way to use password auth currently. Even setting "path_to_private_key" in [backend-generic-0] leads to the same error.

tags: added: liberty-backport-potential
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/257358

Changed in manila:
assignee: nobody → Thomas Bechtold (toabctl)
status: New → In Progress
Changed in manila:
assignee: Thomas Bechtold (toabctl) → Ben Swartzlander (bswartz)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to manila (master)

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

commit 43fbbe61c82ac5101b1694f25b5fdbcfba4807d1
Author: Thomas Bechtold <email address hidden>
Date: Mon Dec 14 14:38:26 2015 +0100

    Change instance service default path for private key to None

    When setting the default for path_to_private_key to "~/.ssh/id_rsa"
    it's impossible to disable private_key usage within a driver section.
    So set the default to "None".

    Change-Id: I17f6b24fc6581dde2b1784b9cdb7778d251145c1
    Closes-Bug: #1522074

Changed in manila:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to manila (stable/liberty)

Fix proposed to branch: stable/liberty
Review: https://review.openstack.org/259723

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

Reviewed: https://review.openstack.org/259723
Committed: https://git.openstack.org/cgit/openstack/manila/commit/?id=560548f7f8819b8cfe6c7b29f1ab8524fe9133ce
Submitter: Jenkins
Branch: stable/liberty

commit 560548f7f8819b8cfe6c7b29f1ab8524fe9133ce
Author: Thomas Bechtold <email address hidden>
Date: Mon Dec 14 14:38:26 2015 +0100

    Change instance service default path for private key to None

    When setting the default for path_to_private_key to "~/.ssh/id_rsa"
    it's impossible to disable private_key usage within a driver section.
    So set the default to "None".

    Change-Id: I17f6b24fc6581dde2b1784b9cdb7778d251145c1
    Closes-Bug: #1522074
    (cherry picked from commit 43fbbe61c82ac5101b1694f25b5fdbcfba4807d1)

tags: added: in-stable-liberty
Revision history for this message
Thierry Carrez (ttx) wrote : Fix included in openstack/manila 1.0.1

This issue was fixed in the openstack/manila 1.0.1 release.

Revision history for this message
Thierry Carrez (ttx) wrote : Fix included in openstack/manila 2.0.0.0b2

This issue was fixed in the openstack/manila 2.0.0.0b2 development milestone.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/manila 1.0.1

This issue was fixed in the openstack/manila 1.0.1 release.

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.