Bug 1426519 - non-configuration files of openstack-dashboard are modified autoly
Summary: non-configuration files of openstack-dashboard are modified autoly
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: python-django-horizon
Version: unspecified
Hardware: Unspecified
OS: Unspecified
Target Milestone: beta
: 12.0 (Pike)
Assignee: Radomir Dopieralski
QA Contact: Ido Ovadia
Depends On:
TreeView+ depends on / blocked
Reported: 2017-02-24 06:14 UTC by QinXie
Modified: 2018-02-05 19:04 UTC (History)
9 users (show)

Fixed In Version: python-django-horizon-12.0.0-0.20170807210226.0a1a566.el7ost
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2017-12-13 21:11:31 UTC
Target Upstream Version:

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2017:3462 0 normal SHIPPED_LIVE Red Hat OpenStack Platform 12.0 Enhancement Advisory 2018-02-16 01:43:25 UTC

Description QinXie 2017-02-24 06:14:40 UTC
There are two RHOSP certs, we found some files of openstack-dashboard are modified and partner confirmed they didn't do any manual modification to these files and file /etc/openstack-dashboard/local_settings. 

Following are the list: 
Error: Verification failed for 'openstack-dashboard-9.0.1-3.el7ost.noarch'
SM5....T. /usr/share/openstack-dashboard/openstack_dashboard/local/local_settings.pyc
..5....T. /usr/share/openstack-dashboard/static/dashboard/manifest.json
S.5....T. /usr/share/openstack-dashboard/static/horizon/lib/jquery-ui/ui/jquery-ui.js

If they are configuration files, they should be labeled with "c" in rpm package.

Comment 2 Radomir Dopieralski 2017-06-19 14:38:17 UTC
I'm looking at this, and here's what I found so far:

* All the .pyc and .pyo files are generated automatically, and re-generated when their corresponding .py files change. I'm not sure we should be including any of the .pyo and .pyc files in the rpm, or if they should be generated automatically when the rpm is being installed.
* Still, even if the local_settings file is modified, the user Horizon runs at shouldn't have the permissions to change the corresponding .pyc file, unless someone ran it as root?
* We probably should exclude the .pyc and .pyo files for local_settings anyways, as it is supposed to be edited by users.
* The static files, including manifest, are generated once Horiozn is installed, we probably shouldn't be including them in the rpm at all.

I will work on applying those and testing the resulting builds.

Comment 3 Radomir Dopieralski 2017-06-21 20:18:13 UTC
The relevant files have been removed from the spec file, and the next build will not contain them.

Comment 4 jinhua li 2017-07-11 08:03:07 UTC
Hi Radomir,

 Ask one question, whether "/usr/share/openstack-dashboard/static/dashboard/manifest.json" is it a config file?

Jinhua Li

Comment 5 Radomir Dopieralski 2017-07-17 10:12:38 UTC
I'm not sure what you mean by "config file" exactly.

This file (and everything else under /usr/share/openstack-dashboard/static/) is automatically generated from other files in Horizon every time the httpd service is restarted.

On the other hand, that file is then served by the http server and used by the JavaScript code in the client's browser as configuration.

So it really depends on what is your definition of "config file". If it's a file that would be edited by the user, then no, this is not a configuration file, because any changes made to it will be overwritten next time you restart the httpd service. If it's a file that controls how the application works, then yes.

In the end, since the file is generated anyways, there is no point of including it inside the RPM package, so I removed it.

Comment 10 errata-xmlrpc 2017-12-13 21:11:31 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.


Note You need to log in before you can comment on or make changes to this bug.