From fc92d5ce4359a8f095683888ea5c01e494320c6f Mon Sep 17 00:00:00 2001 From: Vasyl Saienko Date: Fri, 5 Aug 2016 09:39:39 +0300 Subject: [PATCH] Update add nova user to baremetal_admin behaviour Some jobs/installations install ironic without nova. We need to check that nova service is enabled/installed before adding nova user to baremetal_admin. Otherwise it leads to deployment errors. Change-Id: I7d753085d5c8ff6633fba3947752aed0e99c72b2 Closes-Bug: #1610011 --- devstack/lib/ironic | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/devstack/lib/ironic b/devstack/lib/ironic index 88953d0671..c87d43f44e 100644 --- a/devstack/lib/ironic +++ b/devstack/lib/ironic @@ -745,7 +745,9 @@ function create_ironic_accounts { # Create additional bare metal tenant and roles get_or_create_role baremetal_admin get_or_create_role baremetal_observer - get_or_add_user_project_role baremetal_admin nova $SERVICE_PROJECT_NAME + if is_service_enabled nova; then + get_or_add_user_project_role baremetal_admin nova $SERVICE_PROJECT_NAME + fi get_or_add_user_project_role baremetal_observer demo demo fi }