Bug 1237145

Summary: Need support for NFS for cinder
Product: Red Hat OpenStack Reporter: Mike Burns <mburns>
Component: rhosp-directorAssignee: Jiri Stransky <jstransk>
Status: CLOSED ERRATA QA Contact: Yogev Rabl <yrabl>
Severity: urgent Docs Contact:
Priority: urgent    
Version: DirectorCC: dnavale, kbasil, mburns, rhel-osp-director-maint, sasha
Target Milestone: gaKeywords: Triaged
Target Release: Director   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: openstack-tripleo-puppet-elements-0.0.1-4.el7ost openstack-tripleo-heat-templates-0.8.6-31.el7ost Doc Type: Enhancement
Doc Text:
With this release, a new enhancement adds NFS backend for the Block Storage service to provide a greater variety of possible Block Storage backends. As a result, Overcloud Block Storage service can be configured with a NFS backend with the following parameters: * CinderEnableNfsBackend * CinderNfsMountOptions * CinderNfsServers
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-08-05 13:57:49 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1248374    
Bug Blocks:    

Description Mike Burns 2015-06-30 13:26:34 UTC
Description of problem:
Currently, with director, we can only deploy Cinder with support for lvm and/or ceph

We need to support at least NFS for cinder as well.

Version-Release number of selected component (if applicable):
beta

How reproducible:
always


Additional info:
The result of no NFS is multi-fold.  

* We essentially lock out the larger storage vendors who support NFS but are not already integrated.
* We basically say no HA without Ceph (lvm doesn't scale without manual work to make it a clustered FS which is not currently done)
* We hurt POC cases where setting up a random NFS server is easy, but Ceph deployment is more complicated/resource intensive/time consuming

Comment 1 Jiri Stransky 2015-07-02 16:00:32 UTC
Progress info:

Patch to tripleo-puppet-elements to install nfs-utils in the compute element (if we always build a common image for all roles, we won't need to backport it because nfs-utils is pulled in by the controller element already):
https://review.openstack.org/#/c/197934/

Patch to tripleo-heat-templates:
https://review.openstack.org/#/c/197934/

^ Just wrote it but didn't test it yet as there's some HW problem with my lab machine (eng-ops will investigate). Meanwhile i'm rebuilding a dev env on a different machine, hoping to test Cinder with NFS tomorrow.

Comment 2 Jiri Stransky 2015-07-03 14:03:12 UTC
Sorry i posted the same link twice above. The link for tripleo-puppet-elements patch is:

https://review.openstack.org/#/c/197944/

-----------------------------------

I updated the tripleo-heat-template patch and successfully tested the NFS backend with patchset 4. Here's how to test:

Create a NFS export reachable from the overcloud. I'm using virtual
setup, so i'm exporting from the bare metal host.

yum -y install nfs-utils
systemctl start rpcbind
systemctl start nfs-server
setsebool -P nfs_export_all_rw 1

mkdir -p /export/cinder
chown -R nfsnobody:nfsnobody /export
echo "/export/cinder *(rw,sync,no_root_squash)" > /etc/exports
exportfs -rav

showmount -e


Set these parameters on the overcloud heat stack (i used an extra
environment file, but the workflow with Tuskar might be different):

parameters:
  CinderEnableIscsiBackend: false
  CinderEnableNfsBackend: true
  CinderNfsMountOptions: 'retry=1'
  CinderNfsServers: 192.168.122.1:/export/cinder


Then after deploying and sourcing overcloudrc you can create a cinder
volume:

cinder create 1 --display-name test

And verify that on the bare metal the volume appeared in the exported
directory:

ls /export/cinder
# ^ output: volume-854f84c4-f46b-43a8-bfc0-b704f10f517f

Mounting a volume into an instance worked too (that's been automatically tested by devtest script when creating a demo instance in nova).

Comment 3 Jiri Stransky 2015-07-09 11:42:57 UTC
Typo in the testing steps above -- use all_squash instead of no_root_squash when exporting the directory on NFS host:

echo "/export/cinder *(rw,sync,all_squash)" > /etc/exports

Comment 5 Jiri Stransky 2015-07-31 16:29:21 UTC
This is probably not fully blocked by bug 1247585 (removing it from depends-on list). <- That bug would probably just cause iSCSI backend to stay switched on, so both would get deployed.

Comment 6 Alexander Chuzhoy 2015-07-31 18:12:33 UTC
Verified:

Environment:
openstack-tripleo-puppet-elements-0.0.1-4.el7ost.noarch
instack-undercloud-2.1.2-22.el7ost.noarch
openstack-heat-templates-0-0.6.20150605git.el7ost.noarch
openstack-tripleo-heat-templates-0.8.6-45.el7ost.noarch



Added the following under parameters section in yaml file:
  CinderEnableIscsiBackend: false                                     
  CinderEnableNfsBackend: true                                        
  CinderNfsMountOptions: 'retry=1'                                    
  CinderNfsServers: [IP:/share]

Deployed with:

openstack overcloud deploy --templates --control-scale 3  --compute-scale 1  --ceph-storage-scale 0 --block-storage-scale 0 --swift-storage-scale 0 -e [path to yaml].


Created the cinder image with:
cinder create 1 --display-name test
Verified it was added under the share name.

Was able to attach the volume to a launched instance.

Comment 8 errata-xmlrpc 2015-08-05 13:57:49 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHEA-2015:1549