From 6d2d88c187d04f00272eeb6ba9d0772b6e32a813 Mon Sep 17 00:00:00 2001 From: Eric Harney Date: Fri, 10 May 2013 14:08:43 -0400 Subject: [PATCH] Set default values for NFS/GlusterFS share_config files By default, set: nfs_shares_config = /etc/cinder/nfs_shares glusterfs_shares_config = /etc/cinder/glusterfs_shares This makes use of these drivers require one less manual configuration step. Also fix wording of help for glusterfs/nfs_mount_point_base options. Change-Id: I93bd3a8f08d4d5307f78e983d1080afae663dfe4 --- cinder/volume/drivers/glusterfs.py | 4 ++-- cinder/volume/drivers/nfs.py | 4 ++-- etc/cinder/cinder.conf.sample | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/cinder/volume/drivers/glusterfs.py b/cinder/volume/drivers/glusterfs.py index 3e287411f..21f3c30c9 100644 --- a/cinder/volume/drivers/glusterfs.py +++ b/cinder/volume/drivers/glusterfs.py @@ -29,11 +29,11 @@ LOG = logging.getLogger(__name__) volume_opts = [ cfg.StrOpt('glusterfs_shares_config', - default=None, + default='/etc/cinder/glusterfs_shares', help='File with the list of available gluster shares'), cfg.StrOpt('glusterfs_mount_point_base', default='$state_path/mnt', - help='Base dir where gluster expected to be mounted'), + help='Base dir containing mount points for gluster shares'), cfg.StrOpt('glusterfs_disk_util', default='df', help='Use du or df for free space calculation'), diff --git a/cinder/volume/drivers/nfs.py b/cinder/volume/drivers/nfs.py index 4638e1268..c8def7495 100755 --- a/cinder/volume/drivers/nfs.py +++ b/cinder/volume/drivers/nfs.py @@ -29,11 +29,11 @@ LOG = logging.getLogger(__name__) volume_opts = [ cfg.StrOpt('nfs_shares_config', - default=None, + default='/etc/cinder/nfs_shares', help='File with the list of available nfs shares'), cfg.StrOpt('nfs_mount_point_base', default='$state_path/mnt', - help='Base dir where nfs expected to be mounted'), + help='Base dir containing mount points for nfs shares'), cfg.StrOpt('nfs_disk_util', default='df', help='Use du or df for free space calculation'), diff --git a/etc/cinder/cinder.conf.sample b/etc/cinder/cinder.conf.sample index 36b8e10d4..b3a8afc94 100644 --- a/etc/cinder/cinder.conf.sample +++ b/etc/cinder/cinder.conf.sample @@ -837,7 +837,7 @@ # File with the list of available gluster shares (string # value) -#glusterfs_shares_config= +#glusterfs_shares_config=/etc/cinder/glusterfs_shares # Base dir where gluster expected to be mounted (string value) #glusterfs_mount_point_base=$state_path/mnt @@ -1030,7 +1030,7 @@ # # File with the list of available nfs shares (string value) -#nfs_shares_config= +#nfs_shares_config=/etc/cinder/nfs_shares # Base dir where nfs expected to be mounted (string value) #nfs_mount_point_base=$state_path/mnt -- 2.45.2