From 5c6aa56e11b2dc79adc70154187d3a029e8e0976 Mon Sep 17 00:00:00 2001 From: Mehdi Abaakouk Date: Thu, 26 Jan 2017 11:31:58 +0100 Subject: [PATCH] Don't assume nova-manage is present tools/discover_hosts.sh is run by devstack-gate, and breaks all dsvm job that doesn't use nova. nova-manage is perhaps not installed if nova services are not enabled. This change checks the presence of nova-. Change-Id: Ic555d241f98d0fa027897c69a7115d1be88f6c96 --- tools/discover_hosts.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/discover_hosts.sh b/tools/discover_hosts.sh index 65966c3d04..4ec6a40511 100755 --- a/tools/discover_hosts.sh +++ b/tools/discover_hosts.sh @@ -15,4 +15,6 @@ # In other words this should be run on the primary # (API) node in a multi-node setup. -nova-manage cell_v2 discover_hosts --verbose +if [[ -x $(which nova-manage) ]]; then + nova-manage cell_v2 discover_hosts --verbose +fi