Uploaded image for project: 'Apache MADlib'
  1. Apache MADlib
  2. MADLIB-1182

Install-check test user not dropped gracefully

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • v1.15
    • Madpack
    • None

    Description

      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.

      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
      

      Attachments

        Issue Links

          Activity

            People

              njayaram Nandish Jayaram
              riyer Rahul Iyer
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: