From 88a3f2d21c7081f4f64fff3fb8d22120376e3927 Mon Sep 17 00:00:00 2001 From: Angus Salkeld Date: Fri, 19 Feb 2016 12:14:39 +1000 Subject: [PATCH] Make the memcached dependency optional Otherwise if you don't have memcached horizon will never start. Change-Id: Ibd3f5c5be20a70d6b7983b8ef9c0c34cd44a15cc --- services/horizon/horizon.yml.j2 | 6 +++++- tools/validate-service.py | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/services/horizon/horizon.yml.j2 b/services/horizon/horizon.yml.j2 index 04307795..add4eb9b 100644 --- a/services/horizon/horizon.yml.j2 +++ b/services/horizon/horizon.yml.j2 @@ -8,7 +8,11 @@ container: service: daemon: command: /usr/sbin/{{ apache_cmd }} -DFOREGROUND - dependencies: [horizon/bootstrap, memcached/daemon] + dependencies: + - horizon/bootstrap + {% if enable_memcached | bool %} + - memcached/daemon + {% endif %} files: 000-default.conf: source: config/horizon/templates/horizon.conf.j2 diff --git a/tools/validate-service.py b/tools/validate-service.py index 8a0aa7d6..182be17e 100644 --- a/tools/validate-service.py +++ b/tools/validate-service.py @@ -91,6 +91,7 @@ def validate_command(filename, cmd, cmd_info, deps, role): def validate(filename, deps): mini_vars = {'cinder_volume_driver': 'lvm', + 'enable_memcached': 'yes', 'deployment_id': 'test'} role = filename.replace('.yml.j2', '') role_vars = ROLE_VARS_MAP.get(role, {})