From ce7c8dfba800874fec7411393e6799d81064f939 Mon Sep 17 00:00:00 2001 From: Manojkiran Date: Thu, 4 Sep 2014 18:03:57 +0530 Subject: [PATCH] Set default pool value to system in gpfs driver The configuration option gpfs_storage_pool is assigned with default value of None. And it gets initialized with None instead of system, where as the intention is to set the default value as system. This change sets default value of gpfs_storage_pool to system instead of None. DocImpact Needs an update in gpfs driver documentation, as this patch proposes a change in default value of configuration option (gpfs_storage_pool) Change-Id: Ib4c2a2e4593a940ae563d329fd59d2d5fe3d4520 Closes-Bug: #1365474 --- cinder/volume/drivers/ibm/gpfs.py | 6 +++--- etc/cinder/cinder.conf.sample | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/cinder/volume/drivers/ibm/gpfs.py b/cinder/volume/drivers/ibm/gpfs.py index 160caf417..ee6c0a293 100644 --- a/cinder/volume/drivers/ibm/gpfs.py +++ b/cinder/volume/drivers/ibm/gpfs.py @@ -73,9 +73,9 @@ gpfs_opts = [ 'volume is created as a fully allocated file, in which ' 'case, creation may take a significantly longer time.')), cfg.StrOpt('gpfs_storage_pool', - default=None, + default='system', help=('Specifies the storage pool that volumes are assigned ' - 'to. By default, the system storage pool is used.')), + 'to. By default, the system storage pool is used.')), ] CONF = cfg.CONF CONF.register_opts(gpfs_opts) @@ -333,7 +333,7 @@ class GPFSDriver(driver.VolumeDriver): raise exception.VolumeBackendAPIException(data=msg) pool = self.configuration.safe_get('gpfs_storage_pool') - self._storage_pool = pool or 'system' + self._storage_pool = pool if not self._verify_gpfs_pool(self._storage_pool): msg = (_('Invalid storage pool %s specificed.') % self._storage_pool) diff --git a/etc/cinder/cinder.conf.sample b/etc/cinder/cinder.conf.sample index 046fc3622..a719f7195 100644 --- a/etc/cinder/cinder.conf.sample +++ b/etc/cinder/cinder.conf.sample @@ -1399,9 +1399,9 @@ # may take a significantly longer time. (boolean value) #gpfs_sparse_volumes=true -# Specifies the storage pool that volumes are assigned to. By +# Specifies the storage pool that volumes are assigned to. By # default, the system storage pool is used. (string value) -#gpfs_storage_pool= +#gpfs_storage_pool=system # -- 2.45.2