Browse code

Merge "Allow disabling of debug logging"

Jenkins authored on 2013/08/14 02:24:53
Showing 6 changed files
... ...
@@ -212,7 +212,7 @@ function configure_cinder() {
212 212
 
213 213
     cp $CINDER_DIR/etc/cinder/cinder.conf.sample $CINDER_CONF
214 214
     iniset $CINDER_CONF DEFAULT auth_strategy keystone
215
-    iniset $CINDER_CONF DEFAULT debug True
215
+    iniset $CINDER_CONF DEFAULT debug $ENABLE_DEBUG_LOG_LEVEL
216 216
     iniset $CINDER_CONF DEFAULT verbose True
217 217
     if [ "$CINDER_MULTI_LVM_BACKEND" = "True" ]; then
218 218
         iniset $CINDER_CONF DEFAULT enabled_backends lvmdriver-1,lvmdriver-2
... ...
@@ -71,7 +71,7 @@ function configure_glance() {
71 71
 
72 72
     # Copy over our glance configurations and update them
73 73
     cp $GLANCE_DIR/etc/glance-registry.conf $GLANCE_REGISTRY_CONF
74
-    iniset $GLANCE_REGISTRY_CONF DEFAULT debug True
74
+    iniset $GLANCE_REGISTRY_CONF DEFAULT debug $ENABLE_DEBUG_LOG_LEVEL
75 75
     inicomment $GLANCE_REGISTRY_CONF DEFAULT log_file
76 76
     local dburl=`database_connection_url glance`
77 77
     iniset $GLANCE_REGISTRY_CONF DEFAULT sql_connection $dburl
... ...
@@ -87,7 +87,7 @@ function configure_glance() {
87 87
     iniset $GLANCE_REGISTRY_CONF keystone_authtoken signing_dir $GLANCE_AUTH_CACHE_DIR/registry
88 88
 
89 89
     cp $GLANCE_DIR/etc/glance-api.conf $GLANCE_API_CONF
90
-    iniset $GLANCE_API_CONF DEFAULT debug True
90
+    iniset $GLANCE_API_CONF DEFAULT debug $ENABLE_DEBUG_LOG_LEVEL
91 91
     inicomment $GLANCE_API_CONF DEFAULT log_file
92 92
     iniset $GLANCE_API_CONF DEFAULT sql_connection $dburl
93 93
     iniset $GLANCE_API_CONF DEFAULT use_syslog $SYSLOG
... ...
@@ -123,7 +123,7 @@ function configure_glance() {
123 123
     cp -p $GLANCE_DIR/etc/glance-api-paste.ini $GLANCE_API_PASTE_INI
124 124
 
125 125
     cp $GLANCE_DIR/etc/glance-cache.conf $GLANCE_CACHE_CONF
126
-    iniset $GLANCE_CACHE_CONF DEFAULT debug True
126
+    iniset $GLANCE_CACHE_CONF DEFAULT debug $ENABLE_DEBUG_LOG_LEVEL
127 127
     inicomment $GLANCE_CACHE_CONF DEFAULT log_file
128 128
     iniset $GLANCE_CACHE_CONF DEFAULT use_syslog $SYSLOG
129 129
     iniset $GLANCE_CACHE_CONF DEFAULT filesystem_store_datadir $GLANCE_IMAGE_DIR/
... ...
@@ -68,7 +68,7 @@ function configure_heat() {
68 68
     # Cloudformation API
69 69
     HEAT_API_CFN_CONF=$HEAT_CONF_DIR/heat-api-cfn.conf
70 70
     cp $HEAT_DIR/etc/heat/heat-api-cfn.conf $HEAT_API_CFN_CONF
71
-    iniset $HEAT_API_CFN_CONF DEFAULT debug True
71
+    iniset $HEAT_API_CFN_CONF DEFAULT debug $ENABLE_DEBUG_LOG_LEVEL
72 72
     inicomment $HEAT_API_CFN_CONF DEFAULT log_file
73 73
     iniset $HEAT_API_CFN_CONF DEFAULT use_syslog $SYSLOG
74 74
     iniset $HEAT_API_CFN_CONF DEFAULT bind_host $HEAT_API_CFN_HOST
... ...
@@ -90,7 +90,7 @@ function configure_heat() {
90 90
     # OpenStack API
91 91
     HEAT_API_CONF=$HEAT_CONF_DIR/heat-api.conf
92 92
     cp $HEAT_DIR/etc/heat/heat-api.conf $HEAT_API_CONF
93
-    iniset $HEAT_API_CONF DEFAULT debug True
93
+    iniset $HEAT_API_CONF DEFAULT debug $ENABLE_DEBUG_LOG_LEVEL
94 94
     inicomment $HEAT_API_CONF DEFAULT log_file
95 95
     iniset $HEAT_API_CONF DEFAULT use_syslog $SYSLOG
96 96
     iniset $HEAT_API_CONF DEFAULT bind_host $HEAT_API_HOST
... ...
@@ -112,7 +112,7 @@ function configure_heat() {
112 112
     # engine
113 113
     HEAT_ENGINE_CONF=$HEAT_CONF_DIR/heat-engine.conf
114 114
     cp $HEAT_DIR/etc/heat/heat-engine.conf $HEAT_ENGINE_CONF
115
-    iniset $HEAT_ENGINE_CONF DEFAULT debug True
115
+    iniset $HEAT_ENGINE_CONF DEFAULT debug $ENABLE_DEBUG_LOG_LEVEL
116 116
     inicomment $HEAT_ENGINE_CONF DEFAULT log_file
117 117
     iniset $HEAT_ENGINE_CONF DEFAULT use_syslog $SYSLOG
118 118
     iniset $HEAT_ENGINE_CONF DEFAULT bind_host $HEAT_ENGINE_HOST
... ...
@@ -128,7 +128,7 @@ function configure_heat() {
128 128
     # Cloudwatch API
129 129
     HEAT_API_CW_CONF=$HEAT_CONF_DIR/heat-api-cloudwatch.conf
130 130
     cp $HEAT_DIR/etc/heat/heat-api-cloudwatch.conf $HEAT_API_CW_CONF
131
-    iniset $HEAT_API_CW_CONF DEFAULT debug True
131
+    iniset $HEAT_API_CW_CONF DEFAULT debug $ENABLE_DEBUG_LOG_LEVEL
132 132
     inicomment $HEAT_API_CW_CONF DEFAULT log_file
133 133
     iniset $HEAT_API_CW_CONF DEFAULT use_syslog $SYSLOG
134 134
     iniset $HEAT_API_CW_CONF DEFAULT bind_host $HEAT_API_CW_HOST
... ...
@@ -537,7 +537,7 @@ function _configure_neutron_dhcp_agent() {
537 537
     cp $NEUTRON_DIR/etc/dhcp_agent.ini $Q_DHCP_CONF_FILE
538 538
 
539 539
     iniset $Q_DHCP_CONF_FILE DEFAULT verbose True
540
-    iniset $Q_DHCP_CONF_FILE DEFAULT debug True
540
+    iniset $Q_DHCP_CONF_FILE DEFAULT debug $ENABLE_DEBUG_LOG_LEVEL
541 541
     iniset $Q_DHCP_CONF_FILE DEFAULT use_namespaces $Q_USE_NAMESPACE
542 542
     iniset $Q_DHCP_CONF_FILE DEFAULT root_helper "$Q_RR_COMMAND"
543 543
 
... ...
@@ -557,7 +557,7 @@ function _configure_neutron_l3_agent() {
557 557
     cp $NEUTRON_DIR/etc/l3_agent.ini $Q_L3_CONF_FILE
558 558
 
559 559
     iniset $Q_L3_CONF_FILE DEFAULT verbose True
560
-    iniset $Q_L3_CONF_FILE DEFAULT debug True
560
+    iniset $Q_L3_CONF_FILE DEFAULT debug $ENABLE_DEBUG_LOG_LEVEL
561 561
     iniset $Q_L3_CONF_FILE DEFAULT use_namespaces $Q_USE_NAMESPACE
562 562
     iniset $Q_L3_CONF_FILE DEFAULT root_helper "$Q_RR_COMMAND"
563 563
 
... ...
@@ -573,7 +573,7 @@ function _configure_neutron_metadata_agent() {
573 573
     cp $NEUTRON_DIR/etc/metadata_agent.ini $Q_META_CONF_FILE
574 574
 
575 575
     iniset $Q_META_CONF_FILE DEFAULT verbose True
576
-    iniset $Q_META_CONF_FILE DEFAULT debug True
576
+    iniset $Q_META_CONF_FILE DEFAULT debug $ENABLE_DEBUG_LOG_LEVEL
577 577
     iniset $Q_META_CONF_FILE DEFAULT nova_metadata_ip $Q_META_DATA_IP
578 578
     iniset $Q_META_CONF_FILE DEFAULT root_helper "$Q_RR_COMMAND"
579 579
 
... ...
@@ -597,7 +597,7 @@ function _configure_neutron_plugin_agent() {
597 597
     # ensure that an agent's configuration can override the default
598 598
     iniset /$Q_PLUGIN_CONF_FILE agent root_helper "$Q_RR_COMMAND"
599 599
     iniset $NEUTRON_CONF DEFAULT verbose True
600
-    iniset $NEUTRON_CONF DEFAULT debug True
600
+    iniset $NEUTRON_CONF DEFAULT debug $ENABLE_DEBUG_LOG_LEVEL
601 601
 
602 602
     # Configure agent for plugin
603 603
     neutron_plugin_configure_plugin_agent
... ...
@@ -620,7 +620,7 @@ function _configure_neutron_service() {
620 620
     fi
621 621
 
622 622
     iniset $NEUTRON_CONF DEFAULT verbose True
623
-    iniset $NEUTRON_CONF DEFAULT debug True
623
+    iniset $NEUTRON_CONF DEFAULT debug $ENABLE_DEBUG_LOG_LEVEL
624 624
     iniset $NEUTRON_CONF DEFAULT policy_file $Q_POLICY_FILE
625 625
     iniset $NEUTRON_CONF DEFAULT allow_overlapping_ips $Q_ALLOW_OVERLAPPING_IP
626 626
 
... ...
@@ -430,7 +430,7 @@ function create_nova_conf() {
430 430
     # (Re)create ``nova.conf``
431 431
     rm -f $NOVA_CONF
432 432
     iniset $NOVA_CONF DEFAULT verbose "True"
433
-    iniset $NOVA_CONF DEFAULT debug "True"
433
+    iniset $NOVA_CONF DEFAULT debug "$ENABLE_DEBUG_LOG_LEVEL"
434 434
     iniset $NOVA_CONF DEFAULT auth_strategy "keystone"
435 435
     iniset $NOVA_CONF DEFAULT allow_resize_to_same_host "True"
436 436
     iniset $NOVA_CONF DEFAULT api_paste_config "$NOVA_API_PASTE_INI"
... ...
@@ -252,6 +252,9 @@ OFFLINE=`trueorfalse False $OFFLINE`
252 252
 # operation.
253 253
 ERROR_ON_CLONE=`trueorfalse False $ERROR_ON_CLONE`
254 254
 
255
+# Whether to enable the debug log level in OpenStack services
256
+ENABLE_DEBUG_LOG_LEVEL=`trueorfalse True $ENABLE_DEBUG_LOG_LEVEL`
257
+
255 258
 # Destination path for service data
256 259
 DATA_DIR=${DATA_DIR:-${DEST}/data}
257 260
 sudo mkdir -p $DATA_DIR