Merge "Set debug level of nova container_config_scripts only when enabled" into stable/stein

changes/20/657120/1
Zuul 4 years ago committed by Gerrit Code Review
commit 715761ed19
  1. 9
      container_config_scripts/nova_cell_v2_discover_hosts.py
  2. 9
      container_config_scripts/nova_statedir_ownership.py
  3. 9
      container_config_scripts/nova_wait_for_compute_service.py
  4. 9
      container_config_scripts/nova_wait_for_placement_service.py
  5. 30
      deployment/nova/nova-compute-container-puppet.yaml

@ -22,7 +22,14 @@ import time
random.seed()
logging.basicConfig(stream=sys.stdout, level=logging.DEBUG)
debug = os.getenv('__OS_DEBUG', 'false')
if debug.lower() == 'true':
loglevel = logging.DEBUG
else:
loglevel = logging.INFO
logging.basicConfig(stream=sys.stdout, level=loglevel)
LOG = logging.getLogger('nova_cell_v2_discover_hosts')
iterations = 10

@ -20,7 +20,14 @@ import pwd
import stat
import sys
logging.basicConfig(stream=sys.stdout, level=logging.DEBUG)
debug = os.getenv('__OS_DEBUG', 'false')
if debug.lower() == 'true':
loglevel = logging.DEBUG
else:
loglevel = logging.INFO
logging.basicConfig(stream=sys.stdout, level=loglevel)
LOG = logging.getLogger('nova_statedir')

@ -28,7 +28,14 @@ from novaclient import client
from six.moves.configparser import SafeConfigParser
logging.basicConfig(stream=sys.stdout, level=logging.DEBUG)
debug = os.getenv('__OS_DEBUG', 'false')
if debug.lower() == 'true':
loglevel = logging.DEBUG
else:
loglevel = logging.INFO
logging.basicConfig(stream=sys.stdout, level=loglevel)
LOG = logging.getLogger('nova_wait_for_compute_service')
iterations = 60

@ -32,7 +32,14 @@ import requests
from six.moves.configparser import SafeConfigParser
logging.basicConfig(stream=sys.stdout, level=logging.DEBUG)
debug = os.getenv('__OS_DEBUG', 'false')
if debug.lower() == 'true':
loglevel = logging.DEBUG
else:
loglevel = logging.INFO
logging.basicConfig(stream=sys.stdout, level=loglevel)
LOG = logging.getLogger('nova_wait_for_placement_service')
iterations = 60

@ -545,6 +545,13 @@ outputs:
- ''
- - 'TRIPLEO_DEPLOY_IDENTIFIER='
- {get_param: DeployIdentifier}
- list_join:
- ''
- - '__OS_DEBUG='
- yaql:
expression: str($.data.debug)
data:
debug: {get_attr: [NovaBase, role_data, config_settings, 'nova::logging::debug']}
step_4:
map_merge:
- nova_wait_for_placement_service:
@ -558,6 +565,14 @@ outputs:
- /var/lib/container-config-scripts/:/container-config-scripts/:z
- /var/lib/config-data/puppet-generated/nova_libvirt/etc/nova:/etc/nova:ro
command: "/container-config-scripts/pyshim.sh /container-config-scripts/nova_wait_for_placement_service.py"
environment:
- list_join:
- ''
- - '__OS_DEBUG='
- yaql:
expression: str($.data.debug)
data:
debug: {get_attr: [NovaBase, role_data, config_settings, 'nova::logging::debug']}
- nova_compute:
start_order: 3
image: *nova_compute_image
@ -616,6 +631,14 @@ outputs:
- /var/lib/container-config-scripts/:/container-config-scripts/
user: nova
command: "/container-config-scripts/pyshim.sh /container-config-scripts/nova_wait_for_compute_service.py"
environment:
- list_join:
- ''
- - '__OS_DEBUG='
- yaql:
expression: str($.data.debug)
data:
debug: {get_attr: [NovaBase, role_data, config_settings, 'nova::logging::debug']}
- {}
step_5:
if:
@ -642,6 +665,13 @@ outputs:
- ''
- - 'TRIPLEO_DEPLOY_IDENTIFIER='
- {get_param: DeployIdentifier}
- list_join:
- ''
- - '__OS_DEBUG='
- yaql:
expression: str($.data.debug)
data:
debug: {get_attr: [NovaBase, role_data, config_settings, 'nova::logging::debug']}
- {}
host_prep_tasks:
list_concat:

Loading…
Cancel
Save