]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Execute mount.nfs check as root
authorTom Patzig <tom.patzig@sap.com>
Mon, 11 Jan 2016 19:55:01 +0000 (20:55 +0100)
committerTom Patzig <tom.patzig@sap.com>
Mon, 11 Jan 2016 20:04:51 +0000 (21:04 +0100)
commitc811d98c8b3991a9c298fce914f091b2a9ac215f
tree5e5813bd89843130d339ef684e7bcb2b434ce2ce
parent81f7986c16ecd589017486e60fb39544c5c409a8
Execute mount.nfs check as root

Currently the existence of 'mount.nfs' is checked with a
non-root user, in this case cinder. This results, for example on SUSE,
in the error:

      NfsException: mount.nfs is not installed

Because mount.nfs is located under /sbin, unprivileged users do not
have /sbin in their PATH to search for executables.
This change switches the parameter run_as_root to true, to find
the binary in privileged directories, as well.

Change-Id: Id1dcc9a7653f1317532da2eb83aa1ecbb5cf5ec8
Closes-Bug: #1510150
cinder/tests/unit/test_nfs.py
cinder/volume/drivers/nfs.py