Base driver requires redundant IPv6 capabilities
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Shared File Systems Service (Manila) |
Fix Released
|
Undecided
|
Ben Swartzlander |
Bug Description
In order for a driver to implement IPv6 support, it is currently necessary to set certain variables and implement a method. See the LVM driver for example:
1) First, the driver needs to set ipv6_implemented = True so the Access helper can pass IPv6 access rules requests to the driver. If a driver does not set this flag, the IPv6 access rules are filtered out and remain "Queued_to_apply" in the API.
2) The driver needs to return ipv6_support = True in the capabilities in order to make use of the extra spec defined in share types that map to this backend.
3) The driver needs to implement a function that runs once during startup to obtain which IP versions are currently configured in the backend.
Having all these 3 requirements seem redundant for what we want to accomplish:
1) There should be a flag that is capable of identifying if the driver has ipv6 implemented, even if not currently configured, so access rules can be accepted and eventually be effective
2) We want to report what the driver currently has enabled. For this, we would the driver to retrieve what IP versions are configured in the backend and have this information memoized so it doesn't have to query the update at every update_stats call.
We can clearly derive the ipv6_supported value from the values returned from get_configured_
In the base driver class, the method get_configured_
That causes the value returned from get_configured_
Ideally, the logic highlighted in L2501 should be removed, no driver should be required to return ipv6_support=True in the capabilities because the base driver class appends its value to it according to the value in ip_version attribute, which is obtained from get_configured_
For more information about the discussion, see: http://
Changed in manila: | |
assignee: | nobody → Ben Swartzlander (bswartz) |
Changed in manila: | |
status: | New → In Progress |
Reviewed: https:/ /review. openstack. org/524236 /git.openstack. org/cgit/ openstack/ manila/ commit/ ?id=42db1e34a7a afa14073d47b02c 0753b20ecbbb9e
Committed: https:/
Submitter: Zuul
Branch: master
commit 42db1e34a7aafa1 4073d47b02c0753 b20ecbbb9e
Author: Ben Swartzlander <email address hidden>
Date: Thu Nov 30 11:01:44 2017 -0500
Simplify the way drivers report support for ipv6
Driver shouldn't have to report support for ipv6 in two d=True just ip_versions. Likewise
places. Drivers that assert ipv6_implemente
need to implement get_configured_
ipv4 support is computed by the same method.
Closes-bug: #1734127
Change-Id: I382767918a65b9 1e99ac1e604304a d01fac332e6