Fix horizon debian binary docker image

Debian packages are different from ubuntu packages.
Differencies in /etc/openstack-dashboard:
  - Symlinking {{ python_path }}/openstack_dashboard/local/enabled/ -> /etc/openstack-dashboard/enabled
  - Symlinking {{ python_path }}/openstack_dashboard/local_settings.d/ -> /etc/openstack-dashboard/local_settings.d
  - Symlinking {{ python_path }}/openstack_dashboard/conf/ -> /etc/openstack-dashboard/policy

Every dashboard-plugin debian package is copying his policy files, local_settings, enabled to above locations.
Every dashboard-plugin is triggering dpkg and collect-static, compress is done by openstack-dashboard package.
Kolla has to remove all these debian package's configs and provide kolla configs.
Move also /etc/openstack-dashboard/policy to standard location and delete symlink as kolla-ansible is overriding
default policy files path to /etc/openstack-dashboard/.

Change-Id: Ieca15bdb315d52e9547d798df11641ef36485b26
Depends-On: https://review.opendev.org/733612
(cherry picked from commit 46f8eed88a)
This commit is contained in:
Michal Arbet 2020-06-04 15:09:46 +02:00 committed by Mark Goddard
parent 21b5b65113
commit 4103b0b151
1 changed files with 4 additions and 3 deletions

View File

@ -92,9 +92,10 @@ RUN echo > /etc/apache2/ports.conf \
&& for locale in /usr/lib/python3/dist-packages/*/locale; do \
(cd ${locale%/*} && /usr/bin/django-admin compilemessages) \
done {% if install_type == 'binary' and base_distro == 'debian' %} \
&& find /etc/openstack-dashboard/enabled/ -type f | grep -Ev \
`dpkg -L openstack-dashboard python3-django-horizon | \
grep '/etc/openstack-dashboard/enabled/' | sed 's/\.py/.*.py/g' |xargs -l1 basename | xargs | tr ' ' '|'` | xargs rm
&& rm -rf /etc/openstack-dashboard/enabled/* \
/etc/openstack-dashboard/local_settings.d/* \
/usr/lib/python3/dist-packages/openstack_dashboard/conf \
&& mv /etc/openstack-dashboard/policy /usr/lib/python3/dist-packages/openstack_dashboard/conf
{% endif %}
{% endblock %}