From ef3e8dccbd9d755ee840ddaaa05b02c28e7fe07b Mon Sep 17 00:00:00 2001 From: Dan Prince Date: Wed, 21 Feb 2018 08:58:29 -0500 Subject: [PATCH] Undercloud: inspection_runbench, inspection_extras Add support for the inspection_runbench and inspection_extras options for undercloud.conf. Change-Id: I94d0a7cdf5c7ce8d0a7c31eb2eb0c9c0422ea675 --- tripleoclient/v1/undercloud_config.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/tripleoclient/v1/undercloud_config.py b/tripleoclient/v1/undercloud_config.py index 325e64cef..1d75a1ffc 100644 --- a/tripleoclient/v1/undercloud_config.py +++ b/tripleoclient/v1/undercloud_config.py @@ -488,6 +488,23 @@ def _process_drivers_and_hardware_types(conf, env): env['IronicEnabledPowerInterfaces'] = sorted(mgmt_interfaces) +def _process_ipa_args(conf, env): + """Populate the environment with IPA kernal args .""" + inspection_kernel_args = [] + if conf.undercloud_debug: + inspection_kernel_args.append('ipa-debug=1') + if conf.inspection_runbench: + inspection_kernel_args.append('ipa-inspection-benchmarks=cpu,mem,disk') + if conf.inspection_extras: + inspection_kernel_args.append('ipa-inspection-dhcp-all-interfaces=1') + inspection_kernel_args.append('ipa-collect-lldp=1') + env['IronicInspectorCollectors'] = ('default,extra-hardware,' + 'numa-topology,logs') + else: + env['IronicInspectorCollectors'] = 'default,logs' + env['IronicInspectorKernelArgs'] = ' '.join(inspection_kernel_args) + + def prepare_undercloud_deploy(upgrade=False, no_validations=False): """Prepare Undercloud deploy command based on undercloud.conf""" @@ -570,6 +587,7 @@ def prepare_undercloud_deploy(upgrade=False, no_validations=False): "environments/services-docker/ironic-inspector.yaml")] _process_drivers_and_hardware_types(CONF, env_data) + _process_ipa_args(CONF, env_data) if CONF.get('enable_mistral'): deploy_args += ['-e', os.path.join(