The Shared File Systems service can be configured to use Nova VMs and Cinder volumes. There are two modules that handle them in manila: 1) ‘service_instance’ module creates VMs in Nova with predefined image called service image. This module can be used by any backend driver for provisioning of service VMs to be able to separate share resources among tenants. 2) ‘generic’ module operates with Cinder volumes and VMs created by ‘service_instance’ module, then creates shared filesystems based on volumes attached to VMs.
Each backend driver can handle networking in its own way, see: https://wiki.openstack.org/wiki/Manila/Networking
Linux based distro
NFS server
Samba server >=3.2.0, that can be configured by data stored in registry
SSH server
Two net interfaces configured to DHCP (see network approaches)
‘exportfs’ and ‘net conf’ libraries used for share actions
least symlinks for them:
While the generic driver only supports Linux instances, you may use the Windows SMB driver when Windows VMs are preferred.
For more details, please check out the following page: Windows SMB driver.
manila.share.drivers.generic
Module¶Generic Driver for shares.
GenericShareDriver
(*args, **kwargs)Bases: manila.share.driver.ExecuteMixin
, manila.share.driver.ShareDriver
Executes commands relating to Shares.
check_for_setup_error
()Returns an error if prerequisites aren’t met.
create_share
(context, *args, **kwargs)create_share_from_snapshot
(context, *args, **kwargs)create_snapshot
(context, snapshot, share_server=None)Creates a snapshot.
delete_share
(context, share, share_server=None)Deletes share.
delete_snapshot
(context, snapshot, share_server=None)Deletes a snapshot.
do_setup
(context)Any initialization the generic driver does while starting.
ensure_share
(context, *args, **kwargs)extend_share
(context, *args, **kwargs)get_network_allocations_number
()Get number of network interfaces to be created.
manage_existing
(share, driver_options)Manage existing share to manila.
Generic driver accepts only one driver_option ‘volume_id’. If an administrator provides this option, then appropriate Cinder volume will be managed by Manila as well.
Parameters: |
|
---|---|
Returns: | dict with share size, example: {‘size’: 1} |
manage_existing_snapshot
(snapshot, driver_options)Manage existing share snapshot with manila.
Parameters: |
|
---|---|
Returns: | dict with share snapshot size, example: {‘size’: 1} |
shrink_share
(context, *args, **kwargs)unmanage_snapshot
(snapshot)Unmanage share snapshot with manila.
update_access
(context, *args, **kwargs)ensure_server
(f)manila.share.drivers.service_instance
Module¶Module for managing nova instances for share drivers.
BaseNetworkhelper
(service_instance_manager)Bases: object
NAME
Returns code name of network helper.
get_network_name
(network_info)Returns name of network for service instance.
setup_connectivity_with_service_instances
()Sets up connectivity between Manila host and service instances.
setup_network
(network_info)Sets up network for service instance.
teardown_network
(server_details)Teardowns network resources provided for service instance.
NeutronNetworkHelper
(service_instance_manager)Bases: manila.share.drivers.service_instance.BaseNetworkhelper
NAME
Returns code name of network helper.
admin_project_id
get_network_name
(network_info)Returns name of network for service instance.
neutron_api
service_network_id
setup_connectivity_with_service_instances
()Sets up connectivity with service instances.
Creates host port in service network and/or admin network, creating and setting up required network devices.
setup_network
(network_info)Sets up network for service instance.
teardown_network
(server_details)Teardowns network resources provided for service instance.
ServiceInstanceManager
(driver_config=None)Bases: object
Manages nova instances for various share drivers.
This class provides following external methods:
delete_service_instance
(context, server_details)Removes share infrastructure.
Deletes service vm and subnet, associated to share network.
ensure_service_instance
(context, server)Ensures that server exists and active.
get_common_server
()get_config_option
(key)Returns value of config option.
Parameters: | key – key of config’ option. |
---|---|
Returns: | str – value of config’s option. first priority is driver’s config, second priority is global config. |
network_helper
reboot_server
(server, soft_reboot=False)set_up_service_instance
(context, network_info)Finds or creates and sets up service vm.
Parameters: |
|
---|---|
Returns: | dict with service instance details |
Raises: | exception.ServiceInstanceException |
wait_for_instance_to_be_active
(instance_id, timeout)Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.