unittest crashes on installation

Bug #1752527 reported by xinni on 2018-03-01
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
heat-dashboard
Fix Released
High
xinni

Bug Description

Crashes dump as follows
for i in 3.6 ; do \
        PYTHONPATH=/home/zigo/sources/openstack/queens/services/heat-dashboard/build-area/heat-dashboard-1.0.2/debian/tmp/usr/lib/python3/dist-packages \
                NOSE_WITH_OPENSTACK=1 \
                NOSE_OPENSTACK_COLOR=1 \
                NOSE_OPENSTACK_RED=0.05 \
                NOSE_OPENSTACK_YELLOW=0.025 \
                NOSE_OPENSTACK_SHOW_ELAPSED=1 \
                python$i /home/zigo/sources/openstack/queens/services/heat-dashboard/build-area/heat-dashboard-1.0.2/manage.py test heat_dashboard -v 2 --settings=heat_dashboard.test.settings ; \
done
No local_settings file found.
Traceback (most recent call last):
  File "/home/zigo/sources/openstack/queens/services/heat-dashboard/build-area/heat-dashboard-1.0.2/manage.py", line 23, in <module>
    execute_from_command_line(sys.argv)
  File "/usr/lib/python3/dist-packages/django/core/management/__init__.py", line 364, in execute_from_command_line
    utility.execute()
  File "/usr/lib/python3/dist-packages/django/core/management/__init__.py", line 308, in execute
    settings.INSTALLED_APPS
  File "/usr/lib/python3/dist-packages/django/conf/__init__.py", line 56, in __getattr__
    self._setup(name)
  File "/usr/lib/python3/dist-packages/django/conf/__init__.py", line 41, in _setup
    self._wrapped = Settings(settings_module)
  File "/usr/lib/python3/dist-packages/django/conf/__init__.py", line 110, in __init__
    mod = importlib.import_module(self.SETTINGS_MODULE)
  File "/usr/lib/python3.6/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 678, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/home/zigo/sources/openstack/queens/services/heat-dashboard/build-area/heat-dashboard-1.0.2/heat_dashboard/test/settings.py", line 35, in <module>
    INSTALLED_APPS
  File "/usr/lib/python3/dist-packages/openstack_dashboard/utils/settings.py", line 115, in update_dashboards
    for key, config in import_dashboard_config(modules):
  File "/usr/lib/python3/dist-packages/openstack_dashboard/utils/settings.py", line 44, in import_dashboard_config
    for submodule in import_submodules(module).values():
  File "/usr/lib/python3/dist-packages/openstack_dashboard/utils/settings.py", line 29, in import_submodules
    submodule = import_module(name)
  File "/usr/lib/python3.6/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 678, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/home/zigo/sources/openstack/queens/services/heat-dashboard/build-area/heat-dashboard-1.0.2/heat_dashboard/enabled/_1650_project_template_generator_panel.py", line 20, in <module>
    from openstack_dashboard.settings import STATIC_URL
  File "/usr/lib/python3/dist-packages/openstack_dashboard/settings.py", line 474, in <module>
    '.secret_key_store'))
  File "/usr/lib/python3/dist-packages/horizon/utils/secret_key.py", line 70, in generate_or_read_from_file
    key = read_from_file(key_file)
  File "/usr/lib/python3/dist-packages/horizon/utils/secret_key.py", line 51, in read_from_file
    os.path.abspath(key_file))
horizon.utils.secret_key.FilePermissionError: Insecure permissions on key file /usr/lib/python3/dist-packages/openstack_dashboard/local/.secret_key_store, should be 0600.
make[1]: *** [debian/rules:23: override_dh_install] Error 1

Fix proposed to branch: master
Review: https://review.openstack.org/548924

Changed in heat-dashboard:
status: New → In Progress

Reviewed: https://review.openstack.org/548924
Committed: https://git.openstack.org/cgit/openstack/heat-dashboard/commit/?id=3e3a2add46fcbc4dfbdf7f3f79232687ade475d6
Submitter: Zuul
Branch: master

commit 3e3a2add46fcbc4dfbdf7f3f79232687ade475d6
Author: Xinni Ge <email address hidden>
Date: Thu Mar 1 11:30:26 2018 +0000

    Delete settings import STATIC_URL

    Delete import STATIC_URL in enabled settings.
    Delete unnecessary css files.
    Switch to scss instead of css.

    Change-Id: I9b05888d35543ec166a905270f02de110cadbfac
    Closes-Bug: #1752527

Changed in heat-dashboard:
status: In Progress → Fix Released
xinni (xinni-ge) wrote :

Unittest crashes due to an STATIC_URL import statement in the enabled setting file.
Delete the statement to fix the issue.

This issue was fixed in the openstack/heat-dashboard 1.1.0 release.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers