Rahul Iyer created MADLIB-1182:
----------------------------------
Summary: Install-check test user not dropped gracefully
Key: MADLIB-1182
URL: https://issues.apache.org/jira/browse/MADLIB-1182
Project: Apache MADlib
Issue Type: Bug
Components: Madpack
Reporter: Rahul Iyer
Fix For: v2.0
Madpack creates a test user to run the install-check tests. This user is
dropped at the end of the tests.
There are two problems with this:
1. The test user is not dropped if the install-check tests don't fail
gracefully.
2. If a lingering test user exists in one database, it leads to failure in the
install-check run on another database (since the user name is not database
specific).
In the example below, install-check is run for database {{madlib-pg100}}, but
it fails due to a lingering user in database {{madlib-test}}.
{code}
madpack.py : INFO : Detected PostgreSQL version 10.1.
madpack.py : INFO : *** Installing MADlib ***
madpack.py : INFO : MADlib tools version = 1.13-dev
(/Users/riyer/Work/MADlib/madlib_builds/build_debug/src/bin/../madpack/madpack.py)
madpack.py : INFO : MADlib database version = None (host=localhost:54100,
db=madlib-pg100, schema=madlib)
madpack.py : INFO : Testing PL/Python environment...
madpack.py : INFO : > PL/Python environment OK (version: 2.7.14)
madpack.py : INFO : Installing MADlib into MADLIB schema...
madpack.py : INFO : > Creating MADLIB schema
madpack.py : INFO : > Creating MADLIB.MigrationHistory table
madpack.py : INFO : > Writing version info in MigrationHistory table
madpack.py : INFO : > Creating objects for modules:
madpack.py : INFO : > - array_ops
madpack.py : INFO : > - bayes
madpack.py : INFO : > - crf
madpack.py : INFO : > - elastic_net
madpack.py : INFO : > - linalg
madpack.py : INFO : > - pmml
madpack.py : INFO : > - prob
madpack.py : INFO : > - sketch
madpack.py : INFO : > - svec
madpack.py : INFO : > - svm
madpack.py : INFO : > - tsa
madpack.py : INFO : > - stemmer
madpack.py : INFO : > - conjugate_gradient
madpack.py : INFO : > - knn
madpack.py : INFO : > - lda
madpack.py : INFO : > - stats
madpack.py : INFO : > - svec_util
madpack.py : INFO : > - utilities
madpack.py : INFO : > - assoc_rules
madpack.py : INFO : > - convex
madpack.py : INFO : > - glm
madpack.py : INFO : > - graph
madpack.py : INFO : > - linear_systems
madpack.py : INFO : > - recursive_partitioning
madpack.py : INFO : > - regress
madpack.py : INFO : > - sample
madpack.py : INFO : > - summary
madpack.py : INFO : > - kmeans
madpack.py : INFO : > - pca
madpack.py : INFO : > - validation
madpack.py : INFO : MADlib 1.13-dev installed successfully in MADLIB schema.
madpack.py : INFO : Arguments: Namespace(command=['install-check'],
connstr=['riyer@localhost:54100/madlib-pg100'], keeplogs=True,
platform=['postgres'], schema=['madlib'],
testcase='recursive_partitioning/decision_tree', tmpdir='/tmp/', verbose=True)
madpack.py : INFO : Testing database connection...
madpack.py : INFO : Detected PostgreSQL version 10.1.
madpack.py : ERROR : SQL command failed:
SQL: DROP USER IF EXISTS madlib_113_dev_installcheck;
ERROR: role "madlib_113_dev_installcheck" cannot be dropped because some
objects depend on it
DETAIL: 9 objects in database *madlib-test*
Traceback (most recent call last):
File
"/Users/riyer/Work/MADlib/madlib_builds/build_debug/src/bin/../madpack/madpack.py",
line 1440, in <module>
main(sys.argv[1:])
File
"/Users/riyer/Work/MADlib/madlib_builds/build_debug/src/bin/../madpack/madpack.py",
line 1312, in main
_internal_run_query("DROP USER IF EXISTS %s;" % (test_user), True)
File
"/Users/riyer/Work/MADlib/madlib_builds/build_debug/src/bin/../madpack/madpack.py",
line 178, in _internal_run_query
return run_query(sql, show_error, con_args)
File
"/Users/riyer/Work/MADlib/madlib_builds/build_debug/src/bin/../madpack/madpack.py",
line 143, in run_query
raise Exception
Exception
{code}
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)