diff --git a/contrail_provisioning/openstack/setup.py b/contrail_provisioning/openstack/setup.py index 0445432b..a3e696ef 100755 --- a/contrail_provisioning/openstack/setup.py +++ b/contrail_provisioning/openstack/setup.py @@ -195,10 +195,12 @@ def fixup_config_files(self): barbican_ini_file = "/etc/barbican/vassals/barbican-api.ini" # TODO till post of openstack-horizon.spec is fixed... - if (os.path.isdir("/etc/openstack_dashboard")): + if (os.path.isfile("/etc/openstack_dashboard/local_settings")): dashboard_setting_file = "/etc/openstack_dashboard/local_settings" - else: + elif (os.path.isfile("/etc/openstack-dashboard/local_settings")): dashboard_setting_file = "/etc/openstack-dashboard/local_settings" + else: + dashboard_setting_file = "/etc/openstack-dashboard/local_settings.py" if self.pdist in ['fedora', 'centos', 'redhat']: dashboard_version = self.get_openstack_dashboard_version() @@ -208,7 +210,6 @@ def fixup_config_files(self): else: local("sudo sed -i 's/ALLOWED_HOSTS =/#ALLOWED_HOSTS =/g' %s" %(dashboard_setting_file)) - dashboard_setting_file = "/etc/openstack-dashboard/local_settings.py" with settings(warn_only=True): is_v3 = local('grep "^OPENSTACK_KEYSTONE_MULTIDOMAIN_SUPPORT = True" %s' % dashboard_setting_file) if self._args.keystone_version == 'v3' and is_v3.failed: