netapp driver has code incompatible with oslo.config backend drivers

Bug #2012742 reported by Romain Dupont
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Shared File Systems Service (Manila)
In Progress
Medium
Romain Dupont

Bug Description

https://opendev.org/openstack/manila/src/branch/master/manila/share/drivers/netapp/dataontap/cluster_mode/data_motion.py#L45

This code lists sections of a config file and assume the driver configuration will be set there, but when working with oslo.config drivers, only sections describing the config sources are in the config file and the rest is external.

Meaning that this code would work if the check on the lines 45 to 55 in linked code was just deleted.

Changed in manila:
assignee: nobody → Romain Dupont (rdupontovh)
Revision history for this message
Vida Haririan (vhariria) wrote :
Changed in manila:
importance: Undecided → Medium
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/+/880831

Changed in manila:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on manila (master)

Change abandoned by "Romain Dupont <email address hidden>" on branch: master
Review: https://review.opendev.org/c/openstack/manila/+/880831
Reason: Duplicated

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

> when working with oslo.config drivers, only sections describing the config sources are in the config file and the rest is external.

Hey Romain,

Is it possible to share a sanitized version of how this configuration looks?

Revision history for this message
Romain Dupont (rdupontovh) wrote (last edit ):

Hi, sure,

At OVHcloud we use a Vault like app to store secrets, so we do retrieve them with oslo.config backend drivers, which means the config file does only contain this:

------
[DEFAULT]
config_source = external_service_config,external_database_config

[external_service_config]
driver = ext_oslo_config_driver
secret_alias = config

[external_database_config]
driver = ext_oslo_config_driver
secret_alias = database
------

We only have backend drivers define in the config, all the manila config and netapp backends are defined in the external secret and our ext_oslo_config_driver class implements the interface to get group and options from this as oslo.config drivers suggest.

The secret could look like something like this:

------
DEFAULT:
....debug: false
....share_manager: "xxx"
....enabled_share_backends: "netappcluster1,netappcluster2"
netappcluster1:
....share_backend_name: "netappcluster1"
....share_driver: "xxx"
....netapp_server_hostname: "xxx"
....netapp_server_port: "443"
....netapp_login: "xxx"
....driver_handles_share_servers: true
netappcluster2:
....share_backend_name: "netappcluster2"
....share_driver: "xxx"
....netapp_server_hostname: "yyy"
....netapp_server_port: "443"
....netapp_login: "yyy"
....driver_handles_share_servers: true
------

What i don't like about the stanza check is that it is not compliant with the fact that backend drivers do not expose the group they have, they only respond to a get on groups/options and returns no value if it does not exist, so there is no mechanism to know if a group exists without requesting it, that's why list_all_sections is outdated.

Revision history for this message
Romain Dupont (rdupontovh) wrote :

If you need any more information don't hesitate to contact me

Changed in manila:
milestone: none → bobcat-rc1
Changed in manila:
milestone: bobcat-rc1 → caracal-1
Changed in manila:
milestone: caracal-1 → caracal-2
Changed in manila:
milestone: caracal-2 → caracal-3
Changed in manila:
milestone: caracal-3 → dalmation-1
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.