From 45ca3393b2e0348754fd943a00c4fcb2cf5c60d5 Mon Sep 17 00:00:00 2001 From: Zhiteng Huang Date: Mon, 8 Oct 2012 15:36:39 +0800 Subject: [PATCH] Configuration Options clean up Small clean up of configuration options including: * unused config opts: - reclaim_instance_interval * rename 'instance' in config opts name/help message to 'volume' - 'instance_usage_audit_period' to 'volume_usage_audit_period' - help message of 'volume_name_template' This change also re-generates cinder.conf.sample file. Change-Id: I3d6c43cf56a5335b4bf768c51d65d76735213431 --- cinder/db/api.py | 2 +- cinder/flags.py | 7 ++--- cinder/utils.py | 2 +- etc/cinder/cinder.conf.sample | 48 ++++++++++++++++++++--------------- 4 files changed, 31 insertions(+), 28 deletions(-) diff --git a/cinder/db/api.py b/cinder/db/api.py index 093d7fd47..120dad789 100644 --- a/cinder/db/api.py +++ b/cinder/db/api.py @@ -58,7 +58,7 @@ db_opts = [ help='Services to be added to the available pool on create'), cfg.StrOpt('volume_name_template', default='volume-%s', - help='Template string to be used to generate instance names'), + help='Template string to be used to generate volume names'), cfg.StrOpt('snapshot_name_template', default='snapshot-%s', help='Template string to be used to generate snapshot names'), diff --git a/cinder/flags.py b/cinder/flags.py index 87103c83a..1c61cad7a 100644 --- a/cinder/flags.py +++ b/cinder/flags.py @@ -184,9 +184,9 @@ global_opts = [ cfg.ListOpt('memcached_servers', default=None, help='Memcached servers or None for in process cache.'), - cfg.StrOpt('instance_usage_audit_period', + cfg.StrOpt('volume_usage_audit_period', default='month', - help='time period to generate instance usages for. ' + help='time period to generate volume usages for. ' 'Time period must be hour, day, month or year'), cfg.StrOpt('root_helper', default='sudo', @@ -201,9 +201,6 @@ global_opts = [ cfg.ListOpt('monkey_patch_modules', default=[], help='List of modules/decorators to monkey patch'), - cfg.IntOpt('reclaim_instance_interval', - default=0, - help='Interval in seconds for reclaiming deleted instances'), cfg.IntOpt('service_down_time', default=60, help='maximum time since last check-in for up service'), diff --git a/cinder/utils.py b/cinder/utils.py index 100bbd6a8..c6510a7ec 100644 --- a/cinder/utils.py +++ b/cinder/utils.py @@ -312,7 +312,7 @@ def last_completed_audit_period(unit=None): The begin timestamp of this audit period is the same as the end of the previous.""" if not unit: - unit = FLAGS.instance_usage_audit_period + unit = FLAGS.volume_usage_audit_period offset = 0 if '@' in unit: diff --git a/etc/cinder/cinder.conf.sample b/etc/cinder/cinder.conf.sample index fd27e3134..a675939f6 100644 --- a/etc/cinder/cinder.conf.sample +++ b/etc/cinder/cinder.conf.sample @@ -135,15 +135,15 @@ #### (StrOpt) Name of this node. This can be an opaque identifier. It is #### not necessarily a hostname, FQDN, or IP address. -# storage_availability_zone=cinder +# storage_availability_zone=nova #### (StrOpt) availability zone of this node -# notification_driver=cinder.openstack.common.notifier.no_op_notifier -#### (StrOpt) Default driver for sending notifications +# memcached_servers= +#### (ListOpt) Memcached servers or None for in process cache. -# instance_usage_audit_period=month -#### (StrOpt) time period to generate instance usages for. Time period -#### must be hour, day, month or year +# volume_usage_audit_period=month +#### (StrOpt) time period to generate volume usages for. Time period must +#### be hour, day, month or year # root_helper=sudo #### (StrOpt) Deprecated: command to use for running commands as root @@ -158,9 +158,6 @@ # monkey_patch_modules= #### (ListOpt) List of modules/decorators to monkey patch -# reclaim_instance_interval=0 -#### (IntOpt) Interval in seconds for reclaiming deleted instances - # service_down_time=60 #### (IntOpt) maximum time since last check-in for up service @@ -262,7 +259,7 @@ #### (BoolOpt) Services to be added to the available pool on create # volume_name_template=volume-%s -#### (StrOpt) Template string to be used to generate instance names +#### (StrOpt) Template string to be used to generate volume names # snapshot_name_template=snapshot-%s #### (StrOpt) Template string to be used to generate snapshot names @@ -317,8 +314,7 @@ ######## defined in cinder.openstack.common.notifier.api ######## -# notification_driver=cinder.openstack.common.notifier.no_op_notifier -#### (StrOpt) Default driver for sending notifications +#### (MultiStrOpt) Driver or drivers to handle sending notifications # default_notification_level=INFO #### (StrOpt) Default notification level for outgoing notifications @@ -327,10 +323,10 @@ #### (StrOpt) Default publisher_id for outgoing notifications -######## defined in cinder.openstack.common.notifier.list_notifier ######## +######## defined in cinder.openstack.common.notifier.rabbit_notifier ######## -# list_notifier_drivers=cinder.openstack.common.notifier.no_op_notifier -#### (MultiStrOpt) List of drivers to send notifications +# notification_topics=notifications +#### (ListOpt) AMQP topic used for openstack notifications ######## defined in cinder.openstack.common.rpc ######## @@ -374,10 +370,13 @@ #### (StrOpt) SSL certification authority file (valid only if SSL enabled) # rabbit_host=localhost -#### (StrOpt) the RabbitMQ host +#### (StrOpt) The RabbitMQ broker address where a single node is used # rabbit_port=5672 -#### (IntOpt) the RabbitMQ port +#### (IntOpt) The RabbitMQ broker port where a single node is used + +# rabbit_hosts=$rabbit_host:$rabbit_port +#### (ListOpt) RabbitMQ HA cluster host:port pairs # rabbit_use_ssl=false #### (BoolOpt) connect over SSL for RabbitMQ @@ -405,6 +404,10 @@ # rabbit_durable_queues=false #### (BoolOpt) use durable queues in RabbitMQ +# rabbit_ha_queues=false +#### (BoolOpt) use H/A queues in RabbitMQ (x-ha-policy: all).You need to +#### wipe RabbitMQ database when changing this option. + ######## defined in cinder.openstack.common.rpc.impl_qpid ######## @@ -441,7 +444,7 @@ # qpid_reconnect_interval=0 #### (IntOpt) Equivalent to setting max and min to the same value -# qpid_heartbeat=5 +# qpid_heartbeat=60 #### (IntOpt) Seconds between connection keepalive heartbeats # qpid_protocol=tcp @@ -464,6 +467,9 @@ # rpc_zmq_port=9501 #### (IntOpt) ZeroMQ receiver listening port +# rpc_zmq_port_pub=9502 +#### (IntOpt) ZeroMQ fanout publisher port + # rpc_zmq_contexts=1 #### (IntOpt) Number of ZeroMQ contexts, defaults to 1 @@ -752,8 +758,8 @@ #### (BoolOpt) Enable Easy Tier for volumes # storwize_svc_flashcopy_timeout=120 -#### (StrOpt) Maximum number of seconds to wait for FlashCopy to -#### beprepared. Maximum value is 600 seconds (10 minutes). +#### (StrOpt) Maximum number of seconds to wait for FlashCopy to be +#### prepared. Maximum value is 600 seconds (10 minutes). ######## defined in cinder.volume.xiv ######## @@ -804,4 +810,4 @@ #### (BoolOpt) Don't halt on deletion of non-existing volumes -# Total option count: 217 +# Total option count: 219 -- 2.45.2