Hi,
it seems to me that the way of adding extra NFS options to the cinder
backend is somewhat confusing.

1. There is  nfs_mount_options in cinder config file [1]

2. Then I can put my options to the nfs_shares_config file - that
it could contain additional options mentiones [2] or the
commit message that adds the feature [3]

Now, when I put my options to both of these places, cinder-volume
actually uses them twice and executes the command like this

mount -t nfs -o nfsvers=3 -o nfsvers=3
192.168.241.10:/srv/nfs/vi7/cinder 
/var/lib/cinder/mnt/f5689da9ea41a66eff2ce0ef89b37bce

BTW, the options coming from nfs_shares_config are called 'flags' by
cinder/volume/drivers/nfs ([4]).

Now, to make it more fun, when I actually want to attach a volume to
running instance, nova uses different way of realizing which NFS options to use:

- It reads them from _nova_ config option of libvirt.nfs_mount_options
[5]
- or it uses those it gets them from cinder when creating cinder
connection [6] But these are only the options defined in
nfs_shares_config file, NOT those nfs_mount_options specified in cinder
config file.


So. If I put my options to both places, nfs_shares_config file and
nfs_mount_options, it actually works how I want it to work, as
current mount does not complain that the option was provided twice. 

But it looks ugly. And I'm wondering - am I doing it wrong, or
is there a problem with either cinder or nova (or both)?


Jiri


[1] https://docs.openstack.org/admin-guide/blockstorage-nfs-backend.html
[2]
https://docs.openstack.org/newton/config-reference/block-storage/drivers/nfs-volume-driver.html
[3]
https://github.com/openstack/cinder/commit/553e0d92c40c73aa1680743c4287f31770131c97
[4]
https://github.com/openstack/cinder/blob/stable/newton/cinder/volume/drivers/nfs.py#L163
[5]
https://github.com/openstack/nova/blob/stable/newton/nova/virt/libvirt/volume/nfs.py#L87
[6] 
https://github.com/openstack/nova/blob/stable/newton/nova/virt/libvirt/volume/nfs.py#L89

-- 
Jiri Suchomel

SUSE LINUX, s.r.o.
CORSO IIa
Krizikova 148/34
18600 Praha 8

__________________________________________________________________________
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev

Reply via email to