From e19d61d875953034bb396d006084af64bbdd380c Mon Sep 17 00:00:00 2001 From: Alexey Stupnikov Date: Fri, 18 Nov 2016 14:47:21 +0300 Subject: [PATCH] Run fix-configs-on-startup by nailgun-agent It looks like mcollective is restarted two times duting boot process. First, it simply restarted by nailgun-agent to change node's ID. And then it gets restarted by fix-configs-on-startup after it fixes mcollective's configuration file. It turns out that such sequence of restarts may cause node's provisioning problems when node's boot process is delayed. The simpe workaround is to run fix-configs-on-startup by nailgun-agent instead of simply restarting mcollective. Change-Id: I43e1ec46bf145ebcf23d044c7a6f08f2b60542d9 Partial-bug: #1642377 (cherry picked from commit 94633af411c6692f98c44337d30a4af031176430) --- agent | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/agent b/agent index aaf5373..ca1effa 100755 --- a/agent +++ b/agent @@ -127,7 +127,7 @@ class McollectiveConfig @logger.info "Identity in mcollective server.cfg has not been found. Setting to '#{new_id}'" File.open(@configfile, "w") { |f| f.write(config) } end - puts `service mcollective restart` + puts `/usr/bin/fix-configs-on-startup` end end end