diff options
author | zhouya <zhou.ya@zte.com.cn> | 2018-01-05 11:19:52 +0800 |
---|---|---|
committer | zhouya <zhou.ya@zte.com.cn> | 2018-01-16 11:09:47 +0800 |
commit | 371916c2ad016c460cee384db0e9ca1c97d11b6f (patch) | |
tree | ce9247ecf23fd00c9832646da20fcb6713102e7c /deploy/prepare | |
parent | 1591bb64f538e0a51ee2e80995d94443711edb99 (diff) |
Add extra parameter to integrate with doctor
Need to change some parameter of ceilometer
to run doctor. In order not to influence
other scenario, add an extra '-d' argument
for doctor test only to change event_pipelint.yaml
template file in kolla-ansible code.
Change-Id: Ia5536658b2a2698bc1384e255328d4d719cc566c
Signed-off-by: zhouya <zhou.ya@zte.com.cn>
Diffstat (limited to 'deploy/prepare')
-rw-r--r-- | deploy/prepare/execute.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/deploy/prepare/execute.py b/deploy/prepare/execute.py index 11939b8d..909d3001 100644 --- a/deploy/prepare/execute.py +++ b/deploy/prepare/execute.py @@ -12,6 +12,7 @@ import os from deploy.config.network import NetworkConfig KOLLA_CONF_PATH = '/etc/kolla/config' +DOCTOR_EXTRA_FILE = '/home/kolla_install/kolla-ansible/ansible/roles/ceilometer/templates/event_pipeline.yaml.j2' def _make_dirs(path): @@ -59,6 +60,11 @@ def _set_trusts_auth(): 'trusts_delegated_roles =\n' +def _config_doctor_extra_configuration(): + with open(DOCTOR_EXTRA_FILE, 'a') as fp: + fp.write(' - notifier://?topic=alarm.all\n') + + def main(): parser = argparse.ArgumentParser() parser.add_argument('-nw', '--network-file', @@ -69,11 +75,18 @@ def main(): type=str, required=True, help='0 for virtual, 1 for baremetal') + parser.add_argument('-d', '--run-doctor', + type=str, + required=True, + help='1 for run doctor, other do not run doctor') args = parser.parse_args() if args.is_baremetal == '0': _set_qemu_compute() + if args.run_doctor == '1': + _config_doctor_extra_configuration() + _set_default_floating_pool(args.network_file) _set_trusts_auth() |