From 148d58c3519aca4723edd6eb59fc7150b92e74d7 Mon Sep 17 00:00:00 2001 From: Sean Dague Date: Thu, 4 May 2017 13:08:25 -0400 Subject: [PATCH] Make devstack fail early for common systemd pitfalls There are a couple of issues that have ended up being hit by devstack plugin authors which we can detect and error in a much nicer way instead of them having a cryptic systemd failure. Change-Id: I45e4ac363aeefb4503015f9e1b57c58f79b58f40 --- functions-common | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/functions-common b/functions-common index 90f540017c..fe608b4a48 100644 --- a/functions-common +++ b/functions-common @@ -1480,10 +1480,41 @@ function write_uwsgi_user_unit_file { $SYSTEMCTL daemon-reload } +function _common_systemd_pitfalls { + local cmd=$1 + # do some sanity checks on $cmd to see things we don't expect to work + + if [[ "$cmd" =~ "sudo" ]]; then + local msg=<