From 2086f318a8c43d7b905aa3bd460dd44a7d2c678f Mon Sep 17 00:00:00 2001 From: Liam Young Date: Fri, 11 Dec 2015 14:38:21 +0000 Subject: [PATCH] Restart on change --- barbican/reactive/barbican.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/barbican/reactive/barbican.py b/barbican/reactive/barbican.py index 6fe5276..5b3be14 100644 --- a/barbican/reactive/barbican.py +++ b/barbican/reactive/barbican.py @@ -22,6 +22,7 @@ from charmhelpers.core.templating import render from charmhelpers.core.hookenv import unit_private_ip from charmhelpers.contrib.openstack.templating import get_loader from charmhelpers.contrib.openstack.utils import os_release +from charmhelpers.core.host import restart_on_change API_PORTS = { 'barbican-api': 9311, @@ -112,6 +113,9 @@ def setup_endpoint(keystone): @when('shared-db.available') @when('identity-service.available') @when('amqp.available') +@restart_on_change({ + '/etc/barbican/barbican*': [ 'barbican-api', 'barbican-worker' ] +}) def render_stuff(*args): adapters = BarbicanAdapters(args) #release = os_release('barbican-common')