The Manila architecture defines an abstraction layer for network resource provisioning, and it provides a number of concrete network plugins, allowing administrators to choose from a variety of options for how network resources are assigned to their tenants’ networked storage. This document describes how network plugins may be configured and used in Manila.
A network plugin is a python class that uses a specific facility (e.g. Neutron or Nova network) to provide network resources to the manila-share service.
A Manila share driver may be configured in one of two modes, where it is managing the lifecycle of share servers on its own or where it is merely providing storage resources on a pre-configured share server. This mode is defined using the boolean option driver_handles_share_servers in the Manila configuration file. A network plugin is only useful when a driver is handling its own share servers.
Note
Not all share drivers support both modes. Each driver must report which mode(s) it supports to the manila-share service.
When driver_handles_share_servers is set to True, a share driver will be called to create share servers for shares using information provided within a share network. This information will be provided to one of the enabled network plugins that will handle reservation, creation and deletion of network resources including IP addresses and network interfaces.
As an exception, any share drivers that use Nova for the creation of share servers should use some wrapper for network plugins, because Nova handles the creation of network resources for its VMs. In the Manila Kilo version, only the Generic driver uses Nova with the help of its own network helpers, which serve the same needs but are related only to this share driver.
There are three different network plugins and five python classes in Manila:
It allows one to use any network segmentation that Neutron supports. It is up to each share driver to support at least one network segmentation type.
When only a single network is needed, the NeutronSingleNetworkPlugin (1.2) is a simple solution. Otherwise NeutronNetworkPlugin (1.1) should be chosen.
It supports either flat networks or VLAN-segmented networks.
When only a single network is needed, the NovaSingleNetworkPlugin (2.2) is a simple solution. Otherwise NovaNetworkPlugin (1.1) should be chosen.
networking services.
Note
These network plugins were introduced in the OpenStack Kilo release. In the OpenStack Juno version, only NeutronNetworkPlugin is available. Plugins in 1.2, 2.2, and 3.1 all ignore what the user supplies in the share_network and instead always provide IP addresses from a single network.
Each manila-share service may have its own network plugin or one that is shared with other services. All configuration options for network plugins may be set in three ways by priorities:
For this case, the config opt network_config_group should be defined in the config group of the manila-share service and have the name of the config group with the defined options for the network plugin. First priority.
Using config group of manila-share service. Second priority.
Using config group [DEFAULT]. Lowest priority.
A specific network plugin is enabled by setting the configuration option network_api_class to one of the values defined in the previous section What network plugins are available?. This option can be defined in any of the approaches above along with options for the network plugin itself.
Let’s configure three manila-share services that use different approaches for configuration of network plugins. As noted in section What network plugins are available?, in the Kilo version of OpenStack there are 5 (five) network plugins, three of which require configuration options - 1.2, 2.2 and 3.1. We will use a configuration example using network plugin 1.2, the NeutronSingleNetworkPlugin.
Here is the configuration:
[DEFAULT]
enabled_share_backends = SHARE_BACKEND_1,SHARE_BACKEND_2,SHARE_BACKEND_3
network_api_class = manila.network.neutron.neutron_network_plugin.NeutronSingleNetworkPlugin
neutron_net_id = neutron_net_id_DEFAULT
neutron_subnet_id = neutron_subnet_id_DEFAULT
[NETWORK_PLUGIN]
neutron_net_id = neutron_net_id_NETWORK_PLUGIN
neutron_subnet_id = neutron_subnet_id_NETWORK_PLUGIN
[SHARE_BACKEND_1]
# This share backend is enabled for handling of share servers using opts
# for network plugin defined in separate config group called `NETWORK_PLUGIN`.
network_config_group = NETWORK_PLUGIN
driver_handles_share_servers = True
[SHARE_BACKEND_2]
# This share backend is enabled for handling of share servers using opts
# defined in its own config group.
driver_handles_share_servers = True
neutron_net_id = neutron_net_id_SHARE_BACKEND_2
neutron_subnet_id = neutron_subnet_id_SHARE_BACKEND_2
[SHARE_BACKEND_3]
# This share backend is enabled for handling of share servers using opts
# defined in config group [DEFAULT].
driver_handles_share_servers = True
Here is a list of neutron_net_id and neutron_subnet_id values for our manila-share services:
The value for option network_api_class was taken by each manila-share service from group [DEFAULT] because it was not redefined in other places.
Note
The last approach - use of [DEFAULT] group - is not preferred for setting network plugin options and will generate warnings in your manila-share logs. Either of the first two approaches is recommended.