Description of problem: Currently director only deploys glance with local file, Ceph, or swift backends. We need to have NFS support as well for glance Additional info: * We essentially lock out the larger storage vendors who support NFS but are not already integrated. * We hurt POC cases where setting up a random NFS server is easy, but Ceph deployment is more complicated/resource intensive/time consuming * We essentially require swift or ceph for HA use case.
On review upstream: https://review.openstack.org/#/c/199152/ How i tested: 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/glance chown -R nfsnobody:nfsnobody /export echo "/export/glance *(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: GlanceBackend: file GlanceFilePcmkDevice: 192.168.122.1:/export/glance GlanceFilePcmkManage: true GlanceFilePcmkOptions: retry=1 You can verify that everything works as expected by uploading a glance image and launching an instance in the overcloud. And verify that on the bare metal the volume appeared in the exported directory: You can see the mount on the controllers: mount | grep glance And any image files present on the NFS host: ls /export/glance
Typo in the testing steps above -- use all_squash instead of no_root_squash when exporting the directory on NFS host: echo "/export/glance *(rw,sync,all_squash)" > /etc/exports
Verified: FailedQA Environment: instack-undercloud-2.1.2-22.el7ost.noarch openstack-tripleo-heat-templates-0.8.6-45.el7ost.noarch Wasn't able to create an image with glance command. In order to overcome, had to: 1. Apply this patch: https://gist.github.com/jistr/08d3d6ae82f1e99773d1 prior to the overcloud deployment. 2. Re-mount the NFS share with these args: "mount -t nfs -o context=system_u:object_r:glance_var_lib_t:s0" * This can be achieved with placing the following lines in the parameters section of the yaml file: GlanceBackend: file GlanceFilePcmkDevice: [IP:/share] GlanceFilePcmkManage: true GlanceFilePcmkOptions: context=system_u:object_r:glance_var_lib_t:s0
This is resolved with the fix for bug 1247585
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