Bug 1232683

Summary: horizon manage.py syncdb errors on "App 'openstack_auth' doesn't have a 'user' model."
Product: [Community] RDO Reporter: Jasper Spit <js>
Component: python-django-openstack-authAssignee: Matthias Runge <mrunge>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: KiloCC: mrunge, yeylon
Target Milestone: ---   
Target Release: Kilo   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: python-django-openstack-auth-1.2.0-4.el7.noarch.rpm Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1234250 (view as bug list) Environment:
Last Closed: 2015-09-10 07:19:25 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:
Bug Depends On:    
Bug Blocks: 1234250    

Description Jasper Spit 2015-06-17 09:52:12 UTC
Description of problem:

When running /usr/share/openstack-dashboard/manage.py syncdb --noinput after creating the database it errors with this message:

                                Traceback (most recent call last):
                                  File "/usr/share/openstack-dashboard/manage.py", line 23, in <module>
                                    execute_from_command_line(sys.argv)
                                  File "/usr/lib/python2.7/site-packages/django/core/management/__init__.py", line 338, in execute_from_command_line
                                    utility.execute()
                                  File "/usr/lib/python2.7/site-packages/django/core/management/__init__.py", line 330, in execute
                                    self.fetch_command(subcommand).run_from_argv(self.argv)
                                  File "/usr/lib/python2.7/site-packages/django/core/management/base.py", line 390, in run_from_argv
                                    self.execute(*args, **cmd_options)
                                  File "/usr/lib/python2.7/site-packages/django/core/management/base.py", line 440, in execute
                                    self.check()
                                  File "/usr/lib/python2.7/site-packages/django/core/management/base.py", line 478, in check
                                    include_deployment_checks=include_deployment_checks,
                                  File "/usr/lib/python2.7/site-packages/django/core/checks/registry.py", line 72, in run_checks
                                    new_errors = check(app_configs=app_configs)
                                  File "/usr/lib/python2.7/site-packages/django/contrib/auth/checks.py", line 12, in check_user_model
                                    cls = apps.get_model(settings.AUTH_USER_MODEL)
                                  File "/usr/lib/python2.7/site-packages/django/apps/registry.py", line 202, in get_model
                                    return self.get_app_config(app_label).get_model(model_name.lower())
                                  File "/usr/lib/python2.7/site-packages/django/apps/config.py", line 162, in get_model
                                    "App '%s' doesn't have a '%s' model." % (self.label, model_name))
                                LookupError: App 'openstack_auth' doesn't have a 'user' model.

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

openstack-dashboard-2015.1.0-7.el7.noarch.rpm

How reproducible:


Steps to Reproduce:
1. Install openstack-dashboard-2015.1.0-7.el7.noarch.rpm
2. Create MySQL database & configure it in local_settings
3. Run /usr/share/openstack-dashboard/manage.py syncdb

Actual results:

Error above

Expected results:

No error and a populated horizon database.

Additional info:

Comment 1 Matthias Runge 2015-06-19 19:06:53 UTC
I was able to fix this issue by adding

from user import User

to
openstack_auth/__init__.py:


git diff
diff --git a/openstack_auth/__init__.py b/openstack_auth/__init__.py
index 67e4860..cf681c2 100644
--- a/openstack_auth/__init__.py
+++ b/openstack_auth/__init__.py
@@ -13,5 +13,6 @@
 
 import pbr.version
 
+from user import User
 
 __version__ = pbr.version.VersionInfo('django_openstack_auth').version_string()


A package update will follow shortly.

Comment 2 Matthias Runge 2015-06-22 08:46:03 UTC
build for f23 http://koji.fedoraproject.org/koji/taskinfo?taskID=10175913

Comment 3 Matthias Runge 2015-07-02 12:56:02 UTC
The version should be in repos now.

Comment 4 Matthias Runge 2015-07-02 13:00:18 UTC
one additional word:

for django-1.8, one should rather use
./manage.py migrate

Comment 5 Jasper Spit 2015-09-02 12:44:28 UTC
Thanks Matthias! Looking good.