Fix .push python-ibm-db-django polluting common attribute
A Common attribute was having a dashboard specific package added to it. This has side effects as it will effect other cookbooks using that attribute. * Create attrbute to hold dashboard specific database packages * Tests unchanged as they are still correct outcome Change-Id: I9dae9dfc7a118203a80492160514cbf7d0f975e9 Closes-Bug: #1364508
This commit is contained in:
parent
55a60d2ad0
commit
0a2cf2e414
@ -9,6 +9,7 @@ This file is used to list changes made in each version of the openstack-dashboar
|
|||||||
* Sync conf files with Juno
|
* Sync conf files with Juno
|
||||||
* Add optional section support for local_settings template
|
* Add optional section support for local_settings template
|
||||||
* Update local_settings from 0644 to 0640
|
* Update local_settings from 0644 to 0640
|
||||||
|
* Fix python-ibm-db-django package polluting common package attribute
|
||||||
|
|
||||||
## 9.1
|
## 9.1
|
||||||
* python_packages database client attributes have been moved to the -common cookbook
|
* python_packages database client attributes have been moved to the -common cookbook
|
||||||
|
@ -62,6 +62,15 @@ default['openstack']['dashboard']['secret_key_content'] = nil
|
|||||||
|
|
||||||
default['openstack']['dashboard']['webroot'] = '/'
|
default['openstack']['dashboard']['webroot'] = '/'
|
||||||
|
|
||||||
|
# Dashboard specific database packages
|
||||||
|
# Put common ones here and platform specific ones below.
|
||||||
|
default['openstack']['dashboard']['db_python_packages'] = {
|
||||||
|
db2: [],
|
||||||
|
mysql: [],
|
||||||
|
postgresql: [],
|
||||||
|
sqlite: []
|
||||||
|
}
|
||||||
|
|
||||||
case node['platform_family']
|
case node['platform_family']
|
||||||
when 'rhel'
|
when 'rhel'
|
||||||
default['openstack']['dashboard']['horizon_user'] = 'apache'
|
default['openstack']['dashboard']['horizon_user'] = 'apache'
|
||||||
@ -73,7 +82,7 @@ when 'rhel'
|
|||||||
default['openstack']['dashboard']['login_url'] = "#{node['openstack']['dashboard']['webroot']}auth/login/"
|
default['openstack']['dashboard']['login_url'] = "#{node['openstack']['dashboard']['webroot']}auth/login/"
|
||||||
default['openstack']['dashboard']['logout_url'] = "#{node['openstack']['dashboard']['webroot']}auth/logout/"
|
default['openstack']['dashboard']['logout_url'] = "#{node['openstack']['dashboard']['webroot']}auth/logout/"
|
||||||
default['openstack']['dashboard']['login_redirect_url'] = node['openstack']['dashboard']['webroot']
|
default['openstack']['dashboard']['login_redirect_url'] = node['openstack']['dashboard']['webroot']
|
||||||
default['openstack']['db']['python_packages']['db2'].push 'python-ibm-db-django'
|
default['openstack']['dashboard']['db_python_packages']['db2'] = ['python-ibm-db-django']
|
||||||
default['openstack']['dashboard']['platform'] = {
|
default['openstack']['dashboard']['platform'] = {
|
||||||
'horizon_packages' => ['openstack-dashboard'],
|
'horizon_packages' => ['openstack-dashboard'],
|
||||||
'memcache_python_packages' => ['python-memcached'],
|
'memcache_python_packages' => ['python-memcached'],
|
||||||
|
@ -68,6 +68,8 @@ db_pass = get_password 'db', 'horizon'
|
|||||||
db_info = db 'dashboard'
|
db_info = db 'dashboard'
|
||||||
|
|
||||||
python_packages = node['openstack']['db']['python_packages'][db_info['service_type']]
|
python_packages = node['openstack']['db']['python_packages'][db_info['service_type']]
|
||||||
|
# Add dashboard specific database packages
|
||||||
|
python_packages += Array(node['openstack']['dashboard']['db_python_packages'][db_info['service_type']])
|
||||||
(platform_options['horizon_packages'] + python_packages).each do |pkg|
|
(platform_options['horizon_packages'] + python_packages).each do |pkg|
|
||||||
package pkg do
|
package pkg do
|
||||||
action :upgrade
|
action :upgrade
|
||||||
|
Loading…
Reference in New Issue
Block a user