From 682eed618fbbb7b38d753a55672f50d599a2c441 Mon Sep 17 00:00:00 2001 From: Matthew Mosesohn Date: Tue, 12 May 2015 14:33:58 +0300 Subject: [PATCH] Inhibit start of supervisord for nailgun Starting supervisord starts nailgun app too early before it is ready to serve requests. It will be started later in the docker container in the foreground. This prevents a race condition where DB upgrade takes place and nailgun is stopped. Change-Id: Icd27758f00e8f472041eb83019cb89dcb030afd1 Closes-Bug: #1453400 --- deployment/puppet/nailgun/examples/nailgun-only.pp | 7 ++++--- deployment/puppet/nailgun/manifests/supervisor.pp | 5 +++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/deployment/puppet/nailgun/examples/nailgun-only.pp b/deployment/puppet/nailgun/examples/nailgun-only.pp index 75cf8c0c14..17e5b903a3 100644 --- a/deployment/puppet/nailgun/examples/nailgun-only.pp +++ b/deployment/puppet/nailgun/examples/nailgun-only.pp @@ -141,9 +141,10 @@ class { "nailgun::client": keystone_pass => $::fuel_settings['FUEL_ACCESS']['password'], } class { "nailgun::supervisor": - nailgun_env => $env_path, - ostf_env => $env_path, - conf_file => "nailgun/supervisord.conf.nailgun.erb", + service_enabled => false, + nailgun_env => $env_path, + ostf_env => $env_path, + conf_file => "nailgun/supervisord.conf.nailgun.erb", } package { 'crontabs': diff --git a/deployment/puppet/nailgun/manifests/supervisor.pp b/deployment/puppet/nailgun/manifests/supervisor.pp index f3e6cec33a..9f237b1ab3 100644 --- a/deployment/puppet/nailgun/manifests/supervisor.pp +++ b/deployment/puppet/nailgun/manifests/supervisor.pp @@ -1,4 +1,5 @@ class nailgun::supervisor( + $service_enabled = true, $nailgun_env, $ostf_env, $conf_file = "nailgun/supervisord.conf.erb", @@ -33,8 +34,8 @@ class nailgun::supervisor( } service { "supervisord": - ensure => "running", - enable => true, + ensure => $service_enabled, + enable => $service_enabled, require => [ Package["supervisor"], ],