Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 475854 - Django requires MySQLdb-1.2.1p2 t run properly.
Django requires MySQLdb-1.2.1p2 t run properly.
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: MySQL-python (Show other bugs)
5.4
All Linux
urgent Severity high
: ---
: ---
Assigned To: Tom Lane
qe-baseos-daemons
:
: 472195 622370 (view as bug list)
Depends On:
Blocks: 502912 590060 719046 668957
  Show dependency treegraph
 
Reported: 2008-12-10 15:01 EST by Joe Sauer
Modified: 2013-07-02 23:20 EDT (History)
18 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-02-21 00:29:26 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2012:0181 normal SHIPPED_LIVE MySQL-python bug fix update 2012-02-20 09:54:46 EST

  None (edit)
Description Joe Sauer 2008-12-10 15:01:36 EST
Description of problem: bcfg2-info can not run properly and shows the following output

 problem:

[root@mako ~]# bcfg2-info 
Traceback (most recent call last):
  File "/usr/sbin/bcfg2-info", line 314, in ?
    setup['encoding'], False)
  File "/usr/sbin/bcfg2-info", line 32, in __init__
    passwd, svn, encoding)
  File "/usr/lib/python2.4/site-packages/Bcfg2/Server/Core.py", line 59, in __init__
    self.init_plugins(plugin)    
  File "/usr/lib/python2.4/site-packages/Bcfg2/Server/Core.py", line 108, in init_plugins
    mod = getattr(__import__("Bcfg2.Server.Plugins.%s" %
  File "/usr/lib/python2.4/site-packages/Bcfg2/Server/Plugins/DBStats.py", line 2, in ?
    import Bcfg2.Server.Reports.importscript
  File "/usr/lib/python2.4/site-packages/Bcfg2/Server/Reports/importscript.py", line 19, in ?
    from Bcfg2.Server.Reports.reports.models import Client, Interaction, Entries, Entries_interactions, Performance, Reason, Ping, TYPE_CHOICES, InternalDatabaseVersion
  File "/usr/lib/python2.4/site-packages/Bcfg2/Server/Reports/reports/models.py", line 4, in ?
    from models_new import *
  File "/usr/lib/python2.4/site-packages/Bcfg2/Server/Reports/reports/models_new.py", line 2, in ?
    from django.db import models
  File "/usr/lib/python2.4/site-packages/django/db/__init__.py", line 16, in ?
    backend = __import__('%s%s.base' % (_import_path, settings.DATABASE_ENGINE), {}, {}, [''])
  File "/usr/lib/python2.4/site-packages/django/db/backends/mysql/base.py", line 22, in ?
    raise ImproperlyConfigured("MySQLdb-1.2.1p2 or newer is required; you have %s" % Database.__version__)
django.core.exceptions.ImproperlyConfigured: MySQLdb-1.2.1p2 or newer is required; you have 1.2.1



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

MySQL-python-1.2.1-1

bcfg2-server-0.9.6-1.el5


How reproducible:
every time you run bcfg2-info when bcfg2 is running w/ mysql backend


Steps to Reproduce:
1. enable epel
2. install bcfg2-server, mysql-server and MySQL-python 
3. try to run bcfg2-info when running w/ a mysql back end.
  
Actual results:

will not run, see above

Expected results:

no errors and normal output

Additional info: fully updated centos5.2 and epel. No other repos enabled.
Comment 1 Michel Alexandre Salim 2009-01-01 15:57:27 EST
One way out is to upgrade MySQL-python; either way, it's either a bcfg2-server bug (if it can only use MySQL backend) or a MySQL-python bug.

Unless we are to split out Django's database backends, and disable the mysql backend on EPEL for the time being. Seems rather drastic, given that the other backends work just fine.
Comment 2 Tom Lane 2009-01-01 17:28:54 EST
Don't hold your breath waiting for a MySQL-python rebase in RHEL-5; in previous go-rounds it's taken literally years to get permission to fix anything in that package :-(

Still, we seem to have managed to get into a state where RHEL-5 is shipping an older version than RHEL-4 (1.2.1 vs 1.2.1p2), which is definitely a bad thing.  I'll put this into the request queue for 5.4 and we'll see what happens.
Comment 4 Tom Lane 2009-03-10 18:44:23 EDT
Hmph.  So the actual problem here is that the django people completely failed to think about whether their minimum requirement was 1.2.1, or 1.2.1_p2.  As per our mailing list discussion just now, the two versions are equivalent if you're talking to a 4.1 or newer mysql server; or at least that's what the author says.

If we were going to do a rebase in RHEL-5, the appropriate target would be 1.2.2 (or maybe 1.2.3, if it's final by the time permission comes through).  This would fix a few bugs, but the odds of it happening are not good unless a few requests get escalated through the Proper Channels :-(
Comment 5 RHEL Product and Program Management 2009-03-26 12:47:50 EDT
This request was evaluated by Red Hat Product Management for
inclusion, but this component is not scheduled to be updated in
the current Red Hat Enterprise Linux release. If you would like
this request to be reviewed for the next minor release, ask your
support representative to set the next rhel-x.y flag to "?".
Comment 6 Tom Lane 2009-04-07 18:01:29 EDT
*** Bug 472195 has been marked as a duplicate of this bug. ***
Comment 9 Tom Lane 2010-08-09 09:51:47 EDT
*** Bug 622370 has been marked as a duplicate of this bug. ***
Comment 10 RHEL Product and Program Management 2010-08-09 14:14:30 EDT
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated in the
current release, Red Hat is unfortunately unable to address this
request at this time. Red Hat invites you to ask your support
representative to propose this request, if appropriate and relevant,
in the next release of Red Hat Enterprise Linux.
Comment 12 RHEL Product and Program Management 2011-01-11 15:05:37 EST
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated in the
current release, Red Hat is unfortunately unable to address this
request at this time. Red Hat invites you to ask your support
representative to propose this request, if appropriate and relevant,
in the next release of Red Hat Enterprise Linux.
Comment 23 RHEL Product and Program Management 2011-05-31 10:07:13 EDT
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated in the
current release, Red Hat is unfortunately unable to address this
request at this time. Red Hat invites you to ask your support
representative to propose this request, if appropriate and relevant,
in the next release of Red Hat Enterprise Linux.
Comment 33 Karel Volný 2011-10-26 13:34:53 EDT
could we have the steps to reproduce clarified?

I've tried to install the packages, run "bcfg2-admin init", changed database_* records in /etc/bcfg2.conf, started mysqld, created user & database according to those settings, started bcfg2-server service, run bcfg-info ... and no traceback happened
Comment 35 Edouard Bourguignon 2012-01-19 04:20:23 EST
Same problem here with django. Just create a new django project. Modify the settings.py to use your mysql-server. Try to sync the database (./manage.py syncdb):

./manage.py syncdb --noinput
Traceback (most recent call last):
  File "./manage.py", line 11, in ?
    execute_manager(settings)
  File "/usr/lib/python2.4/site-packages/django/core/management/__init__.py", line 362, in execute_manager
    utility.execute()
  File "/usr/lib/python2.4/site-packages/django/core/management/__init__.py", line 303, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/lib/python2.4/site-packages/django/core/management/base.py", line 195, in run_from_argv
    self.execute(*args, **options.__dict__)
  File "/usr/lib/python2.4/site-packages/django/core/management/base.py", line 221, in execute
    self.validate()
  File "/usr/lib/python2.4/site-packages/django/core/management/base.py", line 249, in validate
    num_errors = get_validation_errors(s, app)
  File "/usr/lib/python2.4/site-packages/django/core/management/validation.py", line 22, in get_validation_errors
    from django.db import models, connection
  File "/usr/lib/python2.4/site-packages/django/db/__init__.py", line 41, in ?
    backend = load_backend(settings.DATABASE_ENGINE)
  File "/usr/lib/python2.4/site-packages/django/db/__init__.py", line 17, in load_backend
    return import_module('.base', 'django.db.backends.%s' % backend_name)
  File "/usr/lib/python2.4/site-packages/django/utils/importlib.py", line 35, in import_module
    __import__(name)
  File "/usr/lib/python2.4/site-packages/django/db/backends/mysql/base.py", line 22, in ?
    raise ImproperlyConfigured("MySQLdb-1.2.1p2 or newer is required; you have %s" % Database.__version__)
django.core.exceptions.ImproperlyConfigured: MySQLdb-1.2.1p2 or newer is required; you have 1.2.1
Comment 36 errata-xmlrpc 2012-02-21 00:29:26 EST
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.

http://rhn.redhat.com/errata/RHBA-2012-0181.html

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