generic driver: Nova VM is not recognized for service instance when using name instead of uuid

Bug #1535775 reported by Thomas Bechtold
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Shared File Systems Service (Manila)
Fix Released
Medium
Tom Patzig

Bug Description

# discovered with Liberty generic driver with DHSS=False #

When setting service_instance_name_or_id to a name instead of an UUID, the VM is not discovered and I get:

016-01-19 15:03:58.653 7725 ERROR oslo_messaging.rpc.dispatcher [req-23f88ef9-3274-4f71-9aea-cf47846c8213 ] Exception during message handling: Failed to get Nova VM. No server
 with a name or ID of 'manila-service' exists.
2016-01-19 15:03:58.653 7725 ERROR oslo_messaging.rpc.dispatcher Traceback (most recent call last):
2016-01-19 15:03:58.653 7725 ERROR oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/oslo_messaging/rpc/dispatcher.py", line 142, in _dispatch_and_reply
2016-01-19 15:03:58.653 7725 ERROR oslo_messaging.rpc.dispatcher executor_callback))
2016-01-19 15:03:58.653 7725 ERROR oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/oslo_messaging/rpc/dispatcher.py", line 186, in _dispatch
2016-01-19 15:03:58.653 7725 ERROR oslo_messaging.rpc.dispatcher executor_callback)
2016-01-19 15:03:58.653 7725 ERROR oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/oslo_messaging/rpc/dispatcher.py", line 129, in _do_dispatch
2016-01-19 15:03:58.653 7725 ERROR oslo_messaging.rpc.dispatcher result = func(ctxt, **new_args)
2016-01-19 15:03:58.653 7725 ERROR oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/manila/share/manager.py", line 110, in wrapped
2016-01-19 15:03:58.653 7725 ERROR oslo_messaging.rpc.dispatcher return f(self, *args, **kwargs)
2016-01-19 15:03:58.653 7725 ERROR oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/manila/share/manager.py", line 767, in create_share_instance
2016-01-19 15:03:58.653 7725 ERROR oslo_messaging.rpc.dispatcher {'status': constants.STATUS_ERROR}
2016-01-19 15:03:58.653 7725 ERROR oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 195, in __exit__
2016-01-19 15:03:58.653 7725 ERROR oslo_messaging.rpc.dispatcher six.reraise(self.type_, self.value, self.tb)
2016-01-19 15:03:58.653 7725 ERROR oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/manila/share/manager.py", line 738, in create_share_instance
2016-01-19 15:03:58.653 7725 ERROR oslo_messaging.rpc.dispatcher context, share_instance, share_server=share_server)
2016-01-19 15:03:58.653 7725 ERROR oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/manila/share/drivers/generic.py", line 103, in wrap
2016-01-19 15:03:58.653 7725 ERROR oslo_messaging.rpc.dispatcher server = self.service_instance_manager.get_common_server()
2016-01-19 15:03:58.653 7725 ERROR oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/manila/share/drivers/service_instance.py", line 242, in get_common_ser
ver
2016-01-19 15:03:58.653 7725 ERROR oslo_messaging.rpc.dispatcher self.get_config_option('service_instance_name_or_id'))
2016-01-19 15:03:58.653 7725 ERROR oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/manila/compute/nova.py", line 201, in server_get_by_name_or_id
2016-01-19 15:03:58.653 7725 ERROR oslo_messaging.rpc.dispatcher raise exception.ManilaException(msg)
2016-01-19 15:03:58.653 7725 ERROR oslo_messaging.rpc.dispatcher ManilaException: Failed to get Nova VM. No server with a name or ID of 'manila-service' exists.
2016-01-19 15:03:58.653 7725 ERROR oslo_messaging.rpc.dispatcher

The exact same setup works if I simply use the UUID of the nova instance called "manila-service".

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/269777

Changed in manila:
assignee: nobody → Thomas Bechtold (toabctl)
status: New → In Progress
tags: added: liberty-backport-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on manila (master)

Change abandoned by Thomas Bechtold (<email address hidden>) on branch: master
Review: https://review.openstack.org/269777
Reason: As discussed on irc, there should be a config parameter to set the tenant_id for the service VM.

Marc Koderer (m-koderer)
Changed in manila:
assignee: Thomas Bechtold (toabctl) → Marc Koderer (m-koderer)
Tom Patzig (tom-patzig)
Changed in manila:
assignee: Marc Koderer (m-koderer) → Tom Patzig (tom-patzig)
Changed in manila:
milestone: none → mitaka-rc1
importance: Undecided → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to manila (master)

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

commit bca18c6f10a186f9ffa94a4339b57c3a11da186a
Author: Thomas Bechtold <email address hidden>
Date: Tue Jan 19 18:05:20 2016 +0100

    service instance: also recognize instance name

    Using the generic driver needs a service instance. The variable
    "service_instance_name_or_id" indicates that it's possible to use
    the UUID or the name of the Nova VM. Using the VM name currently only
    works, when the instance is in the current tenant.
    This fix searches the instance at first in the current tenant and
    if not found, it searches again over all tenants.
    Without this fix, you get the following error when using the name:

    Failed to get Nova VM. No server with a name or ID of 'myname' exists.

    Change-Id: I8770eff9752b76ebe490abf03a7ea6548282bf9b
    Closes-Bug: #1535775

Changed in manila:
status: In Progress → Fix Released
Revision history for this message
Doug Hellmann (doug-hellmann) wrote : Fix included in openstack/manila 2.0.0.0rc1

This issue was fixed in the openstack/manila 2.0.0.0rc1 release candidate.

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

This issue was fixed in the openstack/manila 2.0.0 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.