From 1df02fd9b1cf3c998dce314cc4e79d81fda1152f Mon Sep 17 00:00:00 2001 From: digambar Date: Mon, 13 Apr 2015 12:20:12 +0800 Subject: [PATCH] Enabld conductor check new template path The conductor should check template in k8s_atomic_template_path or k8s_coreos_template_path Change-Id: I2a36ce96803f60b0159a153d5bc06ae29ec09862 Closes-Bug: #1442477 --- magnum/cmd/conductor.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/magnum/cmd/conductor.py b/magnum/cmd/conductor.py index 0f0f451fd6..f9f3155149 100644 --- a/magnum/cmd/conductor.py +++ b/magnum/cmd/conductor.py @@ -47,9 +47,13 @@ def main(): bay_k8s_heat.Handler() ] - if not os.path.isfile(cfg.CONF.k8s_heat.template_path): - LOG.error(_LE("The Heat template %s is not found. Install template.") - % (cfg.CONF.k8s_heat.template_path)) + if (not os.path.isfile(cfg.CONF.bay.k8s_atomic_template_path) + and not os.path.isfile(cfg.CONF.bay.k8s_coreos_template_path)): + LOG.error(_LE("The Heat template for both k8s atomic " + "%(atomic_template)s and coreos (coreos_template)%s " + "can not be found. Install template.") % + {'atomic_template': cfg.CONF.bay.k8s_atomic_template_path, + 'coreos_template': cfg.CONF.bay.k8s_coreos_template_path}) exit(-1) server = service.Service(cfg.CONF.conductor.topic,