Check that the configuration file sample is up to date

We added this check recently to Ceilometer, and it helps a lot to keep this
file always up to date and not falling behind.

Change-Id: I5ad2c6366032a39c2e55dd11a16b9f1780ab9ed0
This commit is contained in:
Julien Danjou 2013-07-01 15:57:06 +02:00
parent f947ea27c6
commit 923a7eeaa3
5 changed files with 192 additions and 48 deletions

@ -93,7 +93,7 @@
#pybasedir=/usr/lib/python/site-packages #pybasedir=/usr/lib/python/site-packages
# Directory where nova binaries are installed (string value) # Directory where nova binaries are installed (string value)
#bindir=$pybasedir/bin #bindir=/usr/local/bin
# Top-level directory for maintaining nova's state (string # Top-level directory for maintaining nova's state (string
# value) # value)
@ -311,7 +311,8 @@
# Options defined in nova.api.auth # Options defined in nova.api.auth
# #
# whether to rate limit the api (boolean value) # whether to use per-user rate limiting for the api. (boolean
# value)
#api_rate_limit=true #api_rate_limit=true
# The strategy to use for auth: noauth or keystone. (string # The strategy to use for auth: noauth or keystone. (string
@ -442,15 +443,6 @@
#fping_path=/usr/sbin/fping #fping_path=/usr/sbin/fping
#
# Options defined in nova.api.openstack.compute.contrib.hide_server_addresses
#
# List of instance states that should hide network info (list
# value)
#osapi_hide_server_address_states=building
# #
# Options defined in nova.api.openstack.compute.contrib.os_tenant_networks # Options defined in nova.api.openstack.compute.contrib.os_tenant_networks
# #
@ -475,6 +467,15 @@
#osapi_compute_extension=nova.api.openstack.compute.contrib.standard_extensions #osapi_compute_extension=nova.api.openstack.compute.contrib.standard_extensions
#
# Options defined in nova.api.openstack.compute.plugins.v3.hide_server_addresses
#
# List of instance states that should hide network info (list
# value)
#osapi_hide_server_address_states=building
# #
# Options defined in nova.api.openstack.compute.servers # Options defined in nova.api.openstack.compute.servers
# #
@ -493,6 +494,15 @@
#osapi_max_request_body_size=114688 #osapi_max_request_body_size=114688
#
# Options defined in nova.cells.opts
#
# The full class name of the compute API class to use
# (deprecated) (string value)
#compute_api_class=nova.compute.api.API
# #
# Options defined in nova.cert.rpcapi # Options defined in nova.cert.rpcapi
# #
@ -588,15 +598,6 @@
#spicehtml5proxy_port=6082 #spicehtml5proxy_port=6082
#
# Options defined in nova.compute
#
# The full class name of the compute API class to use
# (deprecated) (string value)
#compute_api_class=nova.compute.api.API
# #
# Options defined in nova.compute.api # Options defined in nova.compute.api
# #
@ -671,6 +672,10 @@
# rebooted (boolean value) # rebooted (boolean value)
#resume_guests_state_on_host_boot=false #resume_guests_state_on_host_boot=false
# Number of times to retry network allocation on failures
# (integer value)
#network_allocate_retries=0
# interval to pull bandwidth usage info (integer value) # interval to pull bandwidth usage info (integer value)
#bandwidth_poll_interval=600 #bandwidth_poll_interval=600
@ -698,6 +703,15 @@
# value) # value)
#volume_usage_poll_interval=0 #volume_usage_poll_interval=0
# Interval in seconds for polling shelved instances to offload
# (integer value)
#shelved_poll_interval=3600
# Time in seconds before a shelved instance is eligible for
# removing from a host. -1 never offload, 0 offload when
# shelved (integer value)
#shelved_offload_time=0
# Action to take if a running deleted instance is # Action to take if a running deleted instance is
# detected.Valid options are 'noop', 'log' and 'reap'. Set to # detected.Valid options are 'noop', 'log' and 'reap'. Set to
# 'noop' to disable. (string value) # 'noop' to disable. (string value)
@ -932,6 +946,15 @@
#ipv6_backend=rfc2462 #ipv6_backend=rfc2462
#
# Options defined in nova.keymgr
#
# The full class name of the key manager API class (string
# value)
#keymgr_api_class=nova.keymgr.key_mgr.KeyManager
# #
# Options defined in nova.network # Options defined in nova.network
# #
@ -1297,7 +1320,7 @@
# The SQLAlchemy connection string used to connect to the # The SQLAlchemy connection string used to connect to the
# database (string value) # database (string value)
#sql_connection=sqlite:////common/db/$sqlite_db #sql_connection=sqlite:////nova/openstack/common/db/$sqlite_db
# the filename to use with sqlite (string value) # the filename to use with sqlite (string value)
#sqlite_db=nova.sqlite #sqlite_db=nova.sqlite
@ -1413,9 +1436,9 @@
# (string value) # (string value)
#log_config=<None> #log_config=<None>
# A logging.Formatter log message format string which may use # DEPRECATED. A logging.Formatter log message format string
# any of the available logging.LogRecord attributes. This # which may use any of the available logging.LogRecord
# option is deprecated. Please use # attributes. This option is deprecated. Please use
# logging_context_format_string and # logging_context_format_string and
# logging_default_format_string instead. (string value) # logging_default_format_string instead. (string value)
#log_format=<None> #log_format=<None>
@ -1461,7 +1484,7 @@
# Default publisher_id for outgoing notifications (string # Default publisher_id for outgoing notifications (string
# value) # value)
#default_publisher_id=$host #default_publisher_id=<None>
# #
@ -1515,15 +1538,6 @@
#control_exchange=openstack #control_exchange=openstack
#
# Options defined in nova.openstack.common.rpc.amqp
#
# Enable a fast single reply queue if using AMQP based RPC
# like RabbitMQ or Qpid. (boolean value)
#amqp_rpc_single_reply_queue=false
# #
# Options defined in nova.openstack.common.rpc.impl_kombu # Options defined in nova.openstack.common.rpc.impl_kombu
# #
@ -1656,9 +1670,6 @@
# Options defined in nova.openstack.common.rpc.matchmaker # Options defined in nova.openstack.common.rpc.matchmaker
# #
# Matchmaker ring file (JSON) (string value)
#matchmaker_ringfile=/etc/nova/matchmaker_ring.json
# Heartbeat frequency (integer value) # Heartbeat frequency (integer value)
#matchmaker_heartbeat_freq=300 #matchmaker_heartbeat_freq=300
@ -1695,8 +1706,11 @@
# Options defined in nova.scheduler.filters.core_filter # Options defined in nova.scheduler.filters.core_filter
# #
# Virtual CPU to Physical CPU allocation ratio (floating point # Virtual CPU to physical CPU allocation ratio which affects
# value) # all CPU filters. This configuration specifies a global ratio
# for CoreFilter. For AggregateCoreFilter, it will fall back
# to this configuration value if no per-aggregate setting
# found. (floating point value)
#cpu_allocation_ratio=16.0 #cpu_allocation_ratio=16.0
@ -1741,8 +1755,11 @@
# Options defined in nova.scheduler.filters.ram_filter # Options defined in nova.scheduler.filters.ram_filter
# #
# virtual ram to physical ram allocation ratio (floating point # Virtual ram to physical ram allocation ratio which affects
# value) # all ram filters. This configuration specifies a global ratio
# for RamFilter. For AggregateRamFilter, it will fall back to
# this configuration value if no per-aggregate setting found.
# (floating point value)
#ram_allocation_ratio=1.5 #ram_allocation_ratio=1.5
@ -2654,6 +2671,14 @@
# Type of cell: api or compute (string value) # Type of cell: api or compute (string value)
#cell_type=<None> #cell_type=<None>
# Number of seconds after which a lack of capability and
# capacity updates signals the child cell is to be treated as
# a mute. (integer value)
#mute_child_interval=300
# Seconds between bandwidth updates for cells. (integer value)
#bandwidth_update_interval=600
# #
# Options defined in nova.cells.rpc_driver # Options defined in nova.cells.rpc_driver
@ -2696,6 +2721,11 @@
# value) # value)
#db_check_interval=60 #db_check_interval=60
# Configuration file from which to read cells configuration.
# If given, overrides reading cells from the database. (string
# value)
#cells_config=<None>
# #
# Options defined in nova.cells.weights.mute_child # Options defined in nova.cells.weights.mute_child
@ -2709,11 +2739,6 @@
# be positive.) (floating point value) # be positive.) (floating point value)
#mute_weight_value=1000.0 #mute_weight_value=1000.0
# Number of seconds after which a lack of capability and
# capacity updates signals the child cell is to be treated as
# a mute. (integer value)
#mute_child_interval=300
# #
# Options defined in nova.cells.weights.ram_by_instance_type # Options defined in nova.cells.weights.ram_by_instance_type
@ -2843,6 +2868,10 @@
# value) # value)
#pxe_deploy_timeout=0 #pxe_deploy_timeout=0
# If set, pass the network configuration details to the
# initramfs via cmdline. (boolean value)
#pxe_network_config=false
# #
# Options defined in nova.virt.baremetal.tilera_pdu # Options defined in nova.virt.baremetal.tilera_pdu
@ -2958,6 +2987,108 @@
#attestation_auth_timeout=60 #attestation_auth_timeout=60
[upgrade_levels]
#
# Options defined in nova.baserpc
#
# Set a version cap for messages sent to the base api in any
# service (string value)
#baseapi=<None>
#
# Options defined in nova.cells.rpc_driver
#
# Set a version cap for messages sent between cells services
# (string value)
#intercell=<None>
#
# Options defined in nova.cells.rpcapi
#
# Set a version cap for messages sent to local cells services
# (string value)
#cells=<None>
#
# Options defined in nova.cert.rpcapi
#
# Set a version cap for messages sent to cert services (string
# value)
#cert=<None>
#
# Options defined in nova.compute.rpcapi
#
# Set a version cap for messages sent to compute services
# (string value)
#compute=<None>
#
# Options defined in nova.conductor.rpcapi
#
# Set a version cap for messages sent to conductor services
# (string value)
#conductor=<None>
#
# Options defined in nova.console.rpcapi
#
# Set a version cap for messages sent to console services
# (string value)
#console=<None>
#
# Options defined in nova.consoleauth.rpcapi
#
# Set a version cap for messages sent to consoleauth services
# (string value)
#consoleauth=<None>
#
# Options defined in nova.network.rpcapi
#
# Set a version cap for messages sent to network services
# (string value)
#network=<None>
#
# Options defined in nova.scheduler.rpcapi
#
# Set a version cap for messages sent to scheduler services
# (string value)
#scheduler=<None>
[matchmaker_ring]
#
# Options defined in nova.openstack.common.rpc.matchmaker_ring
#
# Matchmaker ring file (JSON) (string value)
#ringfile=/etc/oslo/matchmaker_ring.json
[vmware] [vmware]
# #
@ -2996,4 +3127,4 @@
#keymap=en-us #keymap=en-us
# Total option count: 608 # Total option count: 624

@ -12,6 +12,9 @@ mox==0.5.3
MySQL-python MySQL-python
psycopg2 psycopg2
pylint==0.25.2 pylint==0.25.2
# Imported by ldapdns so required to generate
# the sample configuration file
python-ldap==2.3.13
python-subunit python-subunit
setuptools_git>=0.4 setuptools_git>=0.4
sphinx>=1.1.2 sphinx>=1.1.2

9
tools/conf/check_uptodate.sh Executable file

@ -0,0 +1,9 @@
#!/bin/sh
TMPFILE=`mktemp`
trap "rm -f ${TMPFILE}" EXIT
tools/conf/generate_sample.sh "${TMPFILE}"
if ! diff "${TMPFILE}" etc/nova/nova.conf.sample
then
echo "E: nova.conf.sample is not up to date, please run tools/conf/generate_sample.sh"
exit 42
fi

@ -25,5 +25,5 @@ FILES=$(find nova -type f -name "*.py" ! -path "nova/tests/*" \
export EVENTLET_NO_GREENDNS=yes export EVENTLET_NO_GREENDNS=yes
MODULEPATH=$(dirname "$0")/../../nova/openstack/common/config/generator.py MODULEPATH=$(dirname "$0")/../../nova/openstack/common/config/generator.py
OUTPUTPATH=etc/nova/nova.conf.sample OUTPUTPATH=${1:-etc/nova/nova.conf.sample}
PYTHONPATH=./:${PYTHONPATH} python $MODULEPATH $FILES > $OUTPUTPATH PYTHONPATH=./:${PYTHONPATH} python $MODULEPATH $FILES > $OUTPUTPATH

@ -22,6 +22,7 @@ downloadcache = ~/cache/pip
sitepackages = False sitepackages = False
commands = commands =
flake8 {posargs} flake8 {posargs}
{toxinidir}/tools/conf/check_uptodate.sh
[testenv:pylint] [testenv:pylint]
setenv = VIRTUAL_ENV={envdir} setenv = VIRTUAL_ENV={envdir}