Stop, disable, exit os-collect-config early

When using ansible based updates we want to prevent blocking on a long
running os-refresh-config process. We are disabling os-collect-config
and exiting it once we perform ssh host key preservation if a sentinel
file exists.

Change-Id: I439cf748c3910e41282d36f9808a6defc1abaefc
This commit is contained in:
Gregory Haynes 2014-12-09 15:37:48 -08:00 committed by Julia Kreger
parent 294480f484
commit d885fe30b0
3 changed files with 19 additions and 0 deletions

View File

@ -0,0 +1,7 @@
Stop, disable, and exit os-collect-config
When using a non-standard updating tool (such as ansible) we want to avoid
blocking on a long running os-refresh-config process when we attempt to
perform an update. By setting /mnt/state/disable-os-collect-config and
installing this element a tool can cause os-collect-config to disable itself
early on during an initial run.

View File

@ -0,0 +1,11 @@
#!/bin/bash
set -eu
set -o pipefail
if [ -f /mnt/state/disable-os-collect-config ]; then
service os-collect-config stop
os-svc-enable-upstart os-collect-config disable
echo "Found os-collect-config disable file, disabling and exiting!"
exit 1
fi

View File

@ -0,0 +1 @@
disable-os-collect-config