generic driver: service instance name template is ignored

Bug #1945463 reported by Arturo Borrero Gonzalez
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Shared File Systems Service (Manila)
Fix Released
Medium
David Caro

Bug Description

Dear manila developers & maintainers,

thanks you for your work with this project, it is really appreciated.

When using manila with the generic driver and DHSS=true, I noticed the following setting is being ignored:

# Name of service instance. Only used if
# driver_handles_share_servers=True. (string value)
service_instance_name_template = manila-service-instance-%s

The nova VM created by manila has an uuid as name instead of this template.

I think I was able to identify the problem in the source code.

In manila/share/drivers/service_instance.py, in the function set_up_service_instance() has:

  instance_name = network_info['server_id']

I believe it should be instead:

  instance_name = _get_service_instance_name(share_server_id)

In fact, _get_service_instance_name() is not used anywhere in the code (checked with `git grep`).

I could try patching that myself, but I don't know where to get the 'share_server_id' information in that context.

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

Fix proposed to branch: master
Review: https://review.opendev.org/c/openstack/manila/+/811736

Changed in manila:
status: New → In Progress
Vida Haririan (vhariria)
Changed in manila:
assignee: nobody → David Caro (dcaro)
Revision history for this message
David Caro (dcaro) wrote :

Hi @Vida, the patch is up for review and passing all the tests, is there anything else that's expected from me?

Thanks!

Changed in manila:
assignee: David Caro (dcaro) → nobody
Revision history for this message
David Caro (dcaro) wrote :

Please reassing back to me if that's the case, thanks!

Revision history for this message
Goutham Pacha Ravi (gouthamr) wrote :

> Please reassing back to me if that's the case, thanks!

Thanks for filing this bug, Arturo - and for submitting the corresponding fix David. I've added a minor comment requesting a release note on the bugfix patch. Please take a look.

We retain bug-owners through the merge process here; so no need to change the assignee :)

Changed in manila:
importance: Undecided → Medium
milestone: none → yoga-1
assignee: nobody → David Caro (dcaro)
Revision history for this message
David Caro (dcaro) wrote :

Thanks Goutham!

Release notes added :}

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

Reviewed: https://review.opendev.org/c/openstack/manila/+/811736
Committed: https://opendev.org/openstack/manila/commit/abfa2e2311a4462798acb6aff33a4ac9c24a0ceb
Submitter: "Zuul (22348)"
Branch: master

commit abfa2e2311a4462798acb6aff33a4ac9c24a0ceb
Author: David Caro <email address hidden>
Date: Wed Sep 29 16:07:10 2021 +0200

    service_instance: allow overriding the instance name

    This uses the method _get_service_instance_name to generate the name
    of the share service instance, instead of using directly the share
    service id.

    Note that it changes the default value of the
    service_instance_name_template option to match the current default and
    keep backwards compatibility.

    Closes-Bug: #1945463
    Change-Id: I3ee10f53315a37b47bd66eba082502b4209f4d95
    Signed-off-by: David Caro <email address hidden>

Changed in manila:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/manila 14.0.0.0rc1

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

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers