This patch allows a user to override the default chunk size in
cinder.conf. When the driver is initialized, the default configuration
values in CONF are merged with the user-provided overrides into
self.configuration. In most cases, self.configuration is used unless
the original default value is needed. In this case, CONF was mistakenly
used when self.configuration was intended, which has the effect of
preventing the user from overriding the default chunk size by ignoring
the provided value.
Related-Bug: #
1477706
Change-Id: I66a99950b7c4080de932be7ddac2f1595b9d59f4
LOG.debug("creating volume '%s'", volume['name'])
- chunk_size = CONF.rbd_store_chunk_size * units.Mi
+ chunk_size = self.configuration.rbd_store_chunk_size * units.Mi
order = int(math.log(chunk_size, 2))
with RADOSClient(self) as client:
self.delete_volume(volume)
- chunk_size = CONF.rbd_store_chunk_size * units.Mi
+ chunk_size = self.configuration.rbd_store_chunk_size * units.Mi
order = int(math.log(chunk_size, 2))
# keep using the command line import instead of librbd since it
# detects zeroes to preserve sparseness in the image