Bug 1415734

Summary: Uninstalling Horizon plugins leaves stale files that result in failure of httpd
Product: [Community] RDO Reporter: Mohammed Naser <mnaser>
Component: openstack-horizonAssignee: Radomir Dopieralski <rdopiera>
Status: CLOSED NOTABUG QA Contact: wes hayutin <whayutin>
Severity: medium Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: chris.brown, mnaser, rdopiera
Target Milestone: ---   
Target Release: trunk   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-12-23 21:01:27 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Mohammed Naser 2017-01-23 15:11:28 UTC
Description of problem:
When uninstalling any plugin (example: openstack-app-catalog-ui), the removal does not make sure that any *.pyc files are removed from `/usr/share/openstack-dashboard/openstack_dashboard/local/enabled/`.  The related `.py` files are removed however, but the `.pyc` are read and cause failures

Version-Release number of selected component (if applicable):
Newton release

How reproducible:


Steps to Reproduce:
1. Install openstack-dashboard
2. Install openstack-app-catalog-ui (or any other UI)
3. Restart httpd
4. Uninstall openstack-app-catalog-ui
5. Restart httpd

Actual results:
The service doesn't start due to errors of missing imports

Expected results:
The service starts with no problem

Additional info:

Comment 1 Radomir Dopieralski 2017-01-23 15:23:00 UTC
That looks like a problem. I wonder if we can find some way to clean up the .pyc files. If not, there is also a way to disable their generation in the first place -- that will make horizon startup time marginally slower, though.

Comment 2 Mohammed Naser 2017-01-24 22:03:06 UTC
The start up is slow enough as is right now as it runs compress+collectstatic on every httpd restart so I don't think it would be that much of a big impact (or will it?)

Comment 3 Christopher Brown 2017-06-22 16:08:44 UTC
Hello Mohammed,

Is this still a problem?

Is it just the (murano?) package the doesn't remove the compiled files or, as appears to be the case, other packages that are also having problems. Do we need to open bugs against all ui components?

Comment 4 Mohammed Naser 2019-12-23 21:01:27 UTC
No longer an issue.