default=socket.gethostname(),
help='Name of this node. This can be an opaque identifier. '
'It is not necessarily a hostname, FQDN, or IP address.'),
- cfg.StrOpt('node_availability_zone',
+ cfg.StrOpt('storage_availability_zone',
default='cinder',
help='availability zone of this node'),
cfg.StrOpt('notification_driver',
class SimpleScheduler(chance.ChanceScheduler):
"""Implements Naive Scheduler that tries to find least loaded host."""
- def schedule_create_volume(self, context, volume_id, *_args, **_kwargs):
+ def schedule_create_volume(self, context, volume_id, **_kwargs):
"""Picks a host that is up and has the fewest volumes."""
elevated = context.elevated()
self.timers.append(periodic)
def _create_service_ref(self, context):
- zone = FLAGS.node_availability_zone
+ zone = FLAGS.storage_availability_zone
service_ref = db.service_create(context,
{'host': self.host,
'binary': self.binary,
def report_state(self):
"""Update the state of this service in the datastore."""
ctxt = context.get_admin_context()
- zone = FLAGS.node_availability_zone
+ zone = FLAGS.storage_availability_zone
state_catalog = {}
try:
try:
FLAGS = flags.FLAGS
FLAGS.register_opt(volume_host_opt)
-flags.DECLARE('storage_availability_zone', 'cinder.volume.manager')
LOG = logging.getLogger(__name__)
:volume_manager: The module name of a class derived from
:class:`manager.Manager` (default:
:class:`cinder.volume.manager.Manager`).
-:storage_availability_zone: Defaults to `cinder`.
:volume_driver: Used by :class:`Manager`. Defaults to
:class:`cinder.volume.driver.ISCSIDriver`.
:volume_group: Name of the group that will contain exported volumes (default:
LOG = logging.getLogger(__name__)
volume_manager_opts = [
- cfg.StrOpt('storage_availability_zone',
- default='cinder',
- help='availability zone of this service'),
cfg.StrOpt('volume_driver',
default='cinder.volume.driver.ISCSIDriver',
help='Driver to use for volume creation'),
###### (StrOpt) ip address of this host
# my_ip="10.0.0.1"
###### (StrOpt) availability zone of this node
-# node_availability_zone="cinder"
+# storage_availability_zone="cinder"
###### (StrOpt) Default driver for sending notifications
# notification_driver="cinder.notifier.no_op_notifier"
###### (StrOpt) kernel image that indicates not to use a kernel, but to use a raw disk image instead
# rpc_thread_pool_size=1024
###### (StrOpt) File name of clean sqlite db
# sqlite_clean_db="clean.sqlite"
-###### (StrOpt) availability zone of this service
-# storage_availability_zone="cinder"
###### (BoolOpt) if True, will not discover local volumes
# use_local_volumes=true
###### (StrOpt) Driver to use for volume creation