ambari-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mahadev konar (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (AMBARI-8911) Ambari uses filename that conflicts with python's "mysql" package
Date Wed, 24 Dec 2014 20:46:13 GMT

    [ https://issues.apache.org/jira/browse/AMBARI-8911?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14258509#comment-14258509
] 

Mahadev konar commented on AMBARI-8911:
---------------------------------------

+1

> Ambari uses filename that conflicts with python's "mysql" package
> -----------------------------------------------------------------
>
>                 Key: AMBARI-8911
>                 URL: https://issues.apache.org/jira/browse/AMBARI-8911
>             Project: Ambari
>          Issue Type: Task
>          Components: ambari-server
>    Affects Versions: 2.0.0
>            Reporter: Dmitry Lysnichenko
>            Assignee: Dmitry Lysnichenko
>             Fix For: 2.0.0
>
>         Attachments: AMBARI-8911.patch
>
>
> Unit tests fail for me with 
> {code}
> > ----------------------------------------------------------------------
> > Failed tests:
> > ERROR: test_clean_default (test_mysql_server.TestMySqlServer)
> > ----------------------------------------------------------------------
> > Traceback (most recent call last):
> >   File "/media/plextor/ambari/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_mysql_server.py",
line 119, in test_clean_default
> >     target = RMFTestCase.TARGET_COMMON_SERVICES
> >   File "/media/plextor/ambari/ambari-server/src/test/python/stacks/utils/RMFTestCase.py",
line 110, in executeScript
> >     script_module = imp.load_source(classname, script_path)
> >   File "/media/plextor/ambari/ambari-server/src/test/python/stacks/utils/../../../../main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/mysql_server.py",
line 27, in <module>
> >     from mysql import mysql_configure
> > ImportError: cannot import name mysql_configure
> >
> > ERROR: test_clean_secured (test_mysql_server.TestMySqlServer)
> > ----------------------------------------------------------------------
> > Traceback (most recent call last):
> >   File "/media/plextor/ambari/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_mysql_server.py",
line 130, in test_clean_secured
> >     target = RMFTestCase.TARGET_COMMON_SERVICES
> >   File "/media/plextor/ambari/ambari-server/src/test/python/stacks/utils/RMFTestCase.py",
line 110, in executeScript
> >     script_module = imp.load_source(classname, script_path)
> >   File "/media/plextor/ambari/ambari-server/src/test/python/stacks/utils/../../../../main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/mysql_server.py",
line 27, in <module>
> >     from mysql import mysql_configure
> > ImportError: cannot import name mysql_configure
> >
> > ERROR: test_configure_default (test_mysql_server.TestMySqlServer)
> > ----------------------------------------------------------------------
> > Traceback (most recent call last):
> >   File "/media/plextor/ambari/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_mysql_server.py",
line 33, in test_configure_default
> >     target = RMFTestCase.TARGET_COMMON_SERVICES
> >   File "/media/plextor/ambari/ambari-server/src/test/python/stacks/utils/RMFTestCase.py",
line 110, in executeScript
> >     script_module = imp.load_source(classname, script_path)
> >   File "/media/plextor/ambari/ambari-server/src/test/python/stacks/utils/../../../../main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/mysql_server.py",
line 27, in <module>
> >     from mysql import mysql_configure
> > ImportError: cannot import name mysql_configure
> >
> > ERROR: test_configure_secured (test_mysql_server.TestMySqlServer)
> > ----------------------------------------------------------------------
> > Traceback (most recent call last):
> >   File "/media/plextor/ambari/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_mysql_server.py",
line 76, in test_configure_secured
> >     target = RMFTestCase.TARGET_COMMON_SERVICES
> >   File "/media/plextor/ambari/ambari-server/src/test/python/stacks/utils/RMFTestCase.py",
line 110, in executeScript
> >     script_module = imp.load_source(classname, script_path)
> >   File "/media/plextor/ambari/ambari-server/src/test/python/stacks/utils/../../../../main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/mysql_server.py",
line 27, in <module>
> >     from mysql import mysql_configure
> > ImportError: cannot import name mysql_configure
> >
> > ERROR: test_start_default (test_mysql_server.TestMySqlServer)
> > ----------------------------------------------------------------------
> > Traceback (most recent call last):
> >   File "/media/plextor/ambari/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_mysql_server.py",
line 44, in test_start_default
> >     target = RMFTestCase.TARGET_COMMON_SERVICES
> >   File "/media/plextor/ambari/ambari-server/src/test/python/stacks/utils/RMFTestCase.py",
line 110, in executeScript
> >     script_module = imp.load_source(classname, script_path)
> >   File "/media/plextor/ambari/ambari-server/src/test/python/stacks/utils/../../../../main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/mysql_server.py",
line 27, in <module>
> >     from mysql import mysql_configure
> > ImportError: cannot import name mysql_configure
> >
> > ERROR: test_start_secured (test_mysql_server.TestMySqlServer)
> > ----------------------------------------------------------------------
> > Traceback (most recent call last):
> >   File "/media/plextor/ambari/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_mysql_server.py",
line 87, in test_start_secured
> >     target = RMFTestCase.TARGET_COMMON_SERVICES
> >   File "/media/plextor/ambari/ambari-server/src/test/python/stacks/utils/RMFTestCase.py",
line 110, in executeScript
> >     script_module = imp.load_source(classname, script_path)
> >   File "/media/plextor/ambari/ambari-server/src/test/python/stacks/utils/../../../../main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/mysql_server.py",
line 27, in <module>
> >     from mysql import mysql_configure
> > ImportError: cannot import name mysql_configure
> >
> > ERROR: test_stop_default (test_mysql_server.TestMySqlServer)
> > ----------------------------------------------------------------------
> > Traceback (most recent call last):
> >   File "/media/plextor/ambari/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_mysql_server.py",
line 60, in test_stop_default
> >     target = RMFTestCase.TARGET_COMMON_SERVICES
> >   File "/media/plextor/ambari/ambari-server/src/test/python/stacks/utils/RMFTestCase.py",
line 110, in executeScript
> >     script_module = imp.load_source(classname, script_path)
> >   File "/media/plextor/ambari/ambari-server/src/test/python/stacks/utils/../../../../main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/mysql_server.py",
line 27, in <module>
> >     from mysql import mysql_configure
> > ImportError: cannot import name mysql_configure
> >
> > ERROR: test_stop_secured (test_mysql_server.TestMySqlServer)
> > ----------------------------------------------------------------------
> > Traceback (most recent call last):
> >   File "/media/plextor/ambari/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_mysql_server.py",
line 103, in test_stop_secured
> >     target = RMFTestCase.TARGET_COMMON_SERVICES
> >   File "/media/plextor/ambari/ambari-server/src/test/python/stacks/utils/RMFTestCase.py",
line 110, in executeScript
> >     script_module = imp.load_source(classname, script_path)
> >   File "/media/plextor/ambari/ambari-server/src/test/python/stacks/utils/../../../../main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/mysql_server.py",
line 27, in <module>
> >     from mysql import mysql_configure
> > ImportError: cannot import name mysql_configure
> >
> > ----------------------------------------------------------------------
> {code}
> Investigation shows that file ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/mysql.py
is not imported because it conflicts with standard python package "mysql" that is installed
on my machine.
> {code}
> >>> import mysql
> >>> print mysql
> <module 'mysql' from '/usr/lib/pymodules/python2.7/mysql/__init__.pyc'>
> {code}
> *This code may also fail on some production environments.*
> The solution is to rename file at our project



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message