Currently ip access rule type only supports IPv4. A valid format is xxx.xxx.xxx.xxx or xxx.xxx.xxx.xxx/xx. This is not enough when users want to enable IPv6 in manila. The most affected areas are API (access rules) and the drivers (access rules & export locations).
End users with IPv6 interfaces also want to access their shares, and manila currently only supports IPv4 protocol when access is IP-based.
As agreed by the manila community in IRC meeting (topic IPv6) , manila can address this requirement by adding the IPv6 format validation for ip access rule type. Change the validation approach from our own function (_validate_ip_range) to a standard module ‘ipaddress’ (both IPv4 and IPv6 are supported).
With the ipaddress module, the IPv6 formats below are all considered acceptable:
2001:0DB8:02de:0000:0000:0000:0000:0e13 #uncompressed 2001:DB8:2de:0:0:0:0:0e13 #leading zeros removed 2001:DB8:2de::0e13 #consecutive sections of zeroes omitted 2001:dB8:2De::0E13 #mixed case 2001:dB8::/32 #network range
and manila will convert all of these into lower and compressed format, which means the result of first example will be like (it’s also a canonical format which is recommended in RFC5952 ):
The standalone and neutron network plugins (nova network plugins are ignored as they are being deprecated) will have to be modified to support IPv6.
As the export location support’s status varies in different drivers, manila will introduce two extra_specs (and driver capabilities) ‘ipv4_support’, ‘ipv6_support’ to make backends and users easy to support and configure.
The API microversion will have to be bumped for this.
Drivers will be updated so that existing drivers that use IPv4 addresses will report ipv4_support=True. When drivers support both IPv4 and IPv6, they need report their support versions based on their capabilities and configuration of the storage backend. Also the following functions might need to be changed:
Also, drivers must export locations as addresses rather than as host names since addresses are specifically IPv4 or IPv6 whereas host names could resolve to either an IPv4 or an IPv6 address at any particular time.
python-manilaclient will be changed to reflect the validation approach changes for ip access type.
The access-allow command with IPv6 supported will be like:
manila access-allow test_share ip "AD80:0:0:0:ABAA:0:C2:2"
manila-ui will have corresponding UI changes to deal with the valid value for ip access rule type after python-manilaclient implementation.
Deployers must ensure their IP version preferences are reflected on the storage backends, such that data interfaces have IPv4 and IPv6 addresses as desired.
Changes to the driver interface are noted above. Third party backends will implement these changes and report their IPv6’s ability if they want to enable IPv6 in their drivers (the support matrix can be found here ).