summaryrefslogtreecommitdiffstats
path: root/patches/fuel-agent/0001-TEMP-bootstrap-etc-rc.local-force-mco-start.patch
blob: ba4c382ce2cfa6d06073e2e285ae86e4b873cded (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
: Copyright (c) 2017 Enea AB and others.
:
: All rights reserved. This program and the accompanying materials
: are made available under the terms of the Apache License, Version 2.0
: which accompanies this distribution, and is available at
: http://www.apache.org/licenses/LICENSE-2.0
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
From: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
Date: Wed, 22 Feb 2017 21:43:48 +0100
Subject: [PATCH] TEMP: bootstrap: /etc/rc.local: force mco start

Temporary workaround for upstream bug:
"Mcollective fails to start in bootstrap of baremetal servers" [1]

This should be reverted as soon as upstream merges a fix.

[1] https://bugs.launchpad.net/fuel/newton/+bug/1656150

Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
---
 contrib/fuel_bootstrap/files/xenial/etc/rc.local | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/contrib/fuel_bootstrap/files/xenial/etc/rc.local b/contrib/fuel_bootstrap/files/xenial/etc/rc.local
index 9712ba7..12262e3 100755
--- a/contrib/fuel_bootstrap/files/xenial/etc/rc.local
+++ b/contrib/fuel_bootstrap/files/xenial/etc/rc.local
@@ -2,3 +2,18 @@

 # Perform fuel bootstrap configuration
 /usr/bin/fix-configs-on-startup || /bin/true
+
+# FIXME: Temporary workaround for:
+# https://bugs.launchpad.net/fuel/newton/+bug/1656150
+set +e
+until false
+do
+    sleep 60
+    /etc/init.d/mcollective status > /dev/null 2>&1
+    if [ $? -eq 0 ]
+    then
+        break
+    else
+        /usr/bin/fix-configs-on-startup || /bin/true
+    fi
+done