Configuring Manila for MapR
About this task
To configure the MapR manila driver:
Procedure
- 1. Log in to the host where manila is installed.
-
Open
/etc/manila/manila.conf
file and append the following to themanila.conf
file:[maprfs] share_driver=manila.share.drivers.maprfs.maprfs_native.MapRFSNativeShareDriver share_backend_name=maprfs maprfs_clinode_ip=<maprclinode> maprfs_ssh_port=22 maprfs_ssh_name=root maprfs_ssh_pw=mapr maprfs_share_proto=MAPRFS default_share_type = default_share_type driver_handles_share_servers=False maprfs_base_volume_dir=<base-vol-dir> maprfs_rename_managed_volume=False
NOTE: Create the directory specified formaprfs_base_volume_dir
parameter undermaprfs
before starting the manila driver. The value for<maprclinode>
must be one or more (comma-separated list of) IP addresses of the nodes from where themaprcli
commands can be run. The value fordriver-handles-share-servers
must beFalse
as the driver does not manage the lifecycle of share-servers. -
Ensure that the list of protocols for share creation includes MAPRFS by verifying
the value for the property
enabled_share_protocols
.For example, yourmanila.conf
file entry for this property should look something similar to the following:# Specify list of protocols to be allowed for share creation. # Available values are '('NFS', 'CIFS', 'GLUSTERFS', 'HDFS', # 'CEPHFS')' (list value) #enabled_share_protocols = NFS,CIFS enabled_share_protocols = NFS,CIFS,MAPRFS
-
Set the
enabled_share_backends
property in themanila.conf
file tomarpfs
.For example, yourmanila.conf
file entry for this property should look something similar to the following:#enabled_share_backends = <None> enabled_share_backends = maprfs
- Save and close the file.
-
Add
MAPRFS
to the/usr/lib/python2.7/site-packages/manila/common/constants.py
fileSUPPORTED_SHARE_PROTOCOLS
parameter.For example:SUPPORTED_SHARE_PROTOCOLS = ('NFS', 'CIFS', 'GLUSTERFS', 'HDFS', 'CEPHFS', 'MAPRFS')
-
Append the following to
/usr/lib/python2.7/site-packages/manila/exception.py
file:class MapRFSException(ManilaException): message = _("MapRFS exception occurred!")
-
Create a directory for the MapR manila driver in
/usr/lib/python2.7/site-packages/manila/share/drivers
directory.For example:mkdir /usr/lib/python2.7/site-packages/manila/share/drivers/maprfs
-
Copy the
MaprManilaDriver.tar.gz
fromhttp://mapr-multitenancy.s3-us-west-2.amazonaws.com/list.html
to your local host and unzip it. -
Copy the MapR manila driver,
maprfs_native.py and driver_util.py
, from the location whereMaprManilaDriver.tar.gz
was unzipped to the directory for the MapR manila driver.For example:cp maprfs_native.py /usr/lib/python2.7/site-packages/manila/share/drivers/maprfs/ cp driver_util.py /usr/lib/python2.7/site-packages/manila/share/drivers/maprfs/
-
Run the following command:
touch /usr/lib/python2.7/site-packages/manila/share/drivers/maprfs/__init__.py
- Restart the openstack-manila-share service.
What to do next
/etc/manila/manila.conf
file for the MapR
driver, the openstack-manila-share service may fail with the following error in the log
file if you do not have the latest oslo.config
python libraries:
"2016-10-17 06:14:19.611 24338 ERROR manila File "/usr/lib/python2.7/site-packages/manila/share/drivers/maprfs/maprfs_native.py", line 31, in <module>
2016-10-17 06:14:19.611 24338 ERROR manila cfg.PortOpt('maprfs_ssh_port',
2016-10-17 06:14:19.611 24338 ERROR manila AttributeError: 'module' object has no attribute 'PortOpt'"
Install the latest osla.config
python libraries using the following
command: pip install oslo.config --upgrade