]> review.fuel-infra Code Review - openstack-build/heat-build.git/commitdiff
Don't reload haproxy and use ensureRunning=true
authorAngus Salkeld <asalkeld@redhat.com>
Mon, 15 Jul 2013 23:08:13 +0000 (09:08 +1000)
committerAngus Salkeld <asalkeld@redhat.com>
Mon, 15 Jul 2013 23:08:13 +0000 (09:08 +1000)
the ensureRunning option results in cfn-hup doing a restart and the
hook does a reload. these two options result in the failed state
of haproxy.

This patch rolls the two into "reload-or-restart", which is run from
cron.

bug 1201621
Change-Id: Idb42b3915cb86c613876b67abf1c6999972e19e2

heat/engine/resources/loadbalancer.py

index a30dc1e40a945968732d1c02a211da48d5a80c66..5b6b7cd0d969c084ebc9eb4f810b962f402f3ec3 100644 (file)
@@ -68,8 +68,7 @@ lb_template = r'''
             },
             "services": {
               "systemd": {
-                "crond"     : { "enabled" : "true", "ensureRunning" : "true" },
-                "haproxy"   : { "enabled": "true", "ensureRunning": "true" }
+                "crond"     : { "enabled" : "true", "ensureRunning" : "true" }
               }
             },
             "files": {
@@ -109,7 +108,7 @@ lb_template = r'''
                   "[reload]\n",
                   "triggers=post.update\n",
                   "path=Resources.LB_instance.Metadata\n",
-                  "action=systemctl reload haproxy.service\n",
+                  "action=systemctl reload-or-restart haproxy.service\n",
                   "runas=root\n"
                 ]]},
                 "mode"    : "000400",