Corrects SELinux enablement, lbaasv2 dashboard installation

- corrects SELinux enablement on RHEL platform families.
- switches lbaasv2 dashboard to use system Python, so that it gets
  picked up correctly.

Change-Id: I8b10381b169e8dd56c9cee990f1e3c7d3283d1b0
This commit is contained in:
Samuel Cassiba 2017-03-06 15:59:28 -08:00
parent a90290cb07
commit 766cc54a50
4 changed files with 10 additions and 5 deletions

View File

@ -194,7 +194,7 @@ apache_site 'openstack-dashboard' do
end
execute 'restore-selinux-context' do
command 'restorecon -Rv /etc/httpd /etc/pki; chcon -R -t httpd_sys_content_t /usr/share/openstack-dashboard || :'
command 'restorecon -Rv /etc/httpd /etc/pki; chcon -R -t httpd_sys_content_t /usr/share/openstack-dashboard /var/www/html || :'
action :nothing
only_if { platform_family?('fedora') }
end

View File

@ -115,7 +115,7 @@ package 'openstack-dashboard-ubuntu-theme' do
end
# resource can be triggered from other recipes (e.g. in
# recipe/neutron-lbaas-dashboard.rb)
# recipes/neutron-lbaas-dashboard.rb)
execute 'openstack-dashboard collectstatic' do
cwd django_path
environment 'PYTHONPATH' => "/etc/openstack-dashboard:#{django_path}:$PYTHONPATH"

View File

@ -17,12 +17,17 @@
include_recipe 'openstack-dashboard::horizon'
python_runtime '2'
django_path = node['openstack']['dashboard']['django_path']
# use system python for lbaasv2 dashboard
python_runtime 'neutron-lbaas-dashboard' do
provider :system
version '2.7'
end
python_package 'neutron-lbaas-dashboard' do
version node['openstack']['dashboard']['lbaas']['version']
notifies :run, 'execute[restore-selinux-context]', :immediately
notifies :run, 'execute[openstack-dashboard collectstatic]'
end

View File

@ -17,7 +17,7 @@ describe 'openstack-dashboard::neutron-lbaas-dashboard' do
end
it do
expect(chef_run).to install_python_runtime('2')
expect(chef_run).to install_python_runtime('neutron-lbaas-dashboard')
end
it do