Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

superset init-db pod fails for the tag 0.16.0 #51

Open
dunefro opened this issue May 20, 2022 · 0 comments
Open

superset init-db pod fails for the tag 0.16.0 #51

dunefro opened this issue May 20, 2022 · 0 comments

Comments

@dunefro
Copy link

dunefro commented May 20, 2022

Installation of superset helm chart through terraform failed
These are the pods

$ kubectl get pods -n superset
NAME                                   READY   STATUS    RESTARTS   AGE
superset-7ffd9d84b8-kh2k9              1/1     Running   0          11m
superset-7ffd9d84b8-tg8fw              1/1     Running   0          11m
superset-celerybeat-7fb5bcdc9d-24g26   1/1     Running   0          11m
superset-init-db-dfzpc                 0/1     Error     0          10m
superset-init-db-fmhr8                 0/1     Error     0          8m27s
superset-init-db-k9j6t                 0/1     Error     0          11m
superset-init-db-r56d8                 0/1     Error     0          9m48s
superset-init-db-rjvrt                 0/1     Error     0          11m
superset-init-db-vbpkn                 0/1     Error     0          10m
superset-init-db-zvwgt                 0/1     Error     0          5m47s
superset-worker-6d745f6977-bm7xj       1/1     Running   0          11m
superset-worker-6d745f6977-j44jh       1/1     Running   0          11m

The logs of the pod -init-db are as follows

INFO  [alembic.runtime.migration] Running upgrade af30ca79208f -> 585b0b1a7b18, add exec info to saved queries
INFO  [alembic.runtime.migration] Running upgrade 585b0b1a7b18 -> 96e99fb176a0, add_import_mixing_to_saved_query
INFO  [alembic.runtime.migration] Running upgrade 96e99fb176a0 -> 49b5a32daba5, add report schedules
INFO  [alembic.runtime.migration] Running upgrade 49b5a32daba5 -> a8173232b786, Add path to logs
INFO  [alembic.runtime.migration] Running upgrade a8173232b786 -> e38177dbf641, security converge saved queries
Loaded your LOCAL configuration at [/app/pythonpath/superset_config.py]

Cleaning up slice uuid from dashboard position json.. Done.      

Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 1276, in _execute_context
    self.dialect.do_execute(
  File "/usr/local/lib/python3.8/site-packages/sqlalchemy/engine/default.py", line 608, in do_execute
    cursor.execute(statement, parameters)
psycopg2.errors.UndefinedTable: relation "ab_permission_view_role" does not exist
LINE 2: FROM ab_role LEFT OUTER JOIN (ab_permission_view_role AS ab_...
                                      ^


The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/local/bin/superset", line 33, in <module>
    sys.exit(load_entry_point('apache-superset', 'console_scripts', 'superset')())
  File "/usr/local/lib/python3.8/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/flask/cli.py", line 586, in main
    return super(FlaskGroup, self).main(*args, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.8/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python3.8/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python3.8/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.8/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/click/decorators.py", line 21, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/flask/cli.py", line 426, in decorator
    return __ctx.invoke(f, *args, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/flask_migrate/cli.py", line 149, in upgrade
    _upgrade(directory, revision, sql, tag, x_arg)
  File "/usr/local/lib/python3.8/site-packages/flask_migrate/__init__.py", line 98, in wrapped
    f(*args, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/flask_migrate/__init__.py", line 185, in upgrade
    command.upgrade(config, revision, sql=sql, tag=tag)
  File "/usr/local/lib/python3.8/site-packages/alembic/command.py", line 294, in upgrade
    script.run_env()
  File "/usr/local/lib/python3.8/site-packages/alembic/script/base.py", line 490, in run_env
    util.load_python_file(self.dir, "env.py")
  File "/usr/local/lib/python3.8/site-packages/alembic/util/pyfiles.py", line 97, in load_python_file
    module = load_module_py(module_id, path)
  File "/usr/local/lib/python3.8/site-packages/alembic/util/compat.py", line 184, in load_module_py
    spec.loader.exec_module(module)
  File "<frozen importlib._bootstrap_external>", line 843, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/app/superset/migrations/env.py", line 124, in <module>
    run_migrations_online()
  File "/app/superset/migrations/env.py", line 116, in run_migrations_online
    context.run_migrations()
  File "<string>", line 8, in run_migrations
  File "/usr/local/lib/python3.8/site-packages/alembic/runtime/environment.py", line 813, in run_migrations
    self.get_context().run_migrations(**kw)
  File "/usr/local/lib/python3.8/site-packages/alembic/runtime/migration.py", line 561, in run_migrations
    step.migration_fn(**kw)
  File "/app/superset/migrations/versions/e38177dbf641_security_converge_saved_queries.py", line 65, in upgrade
    migrate_roles(session, PVM_MAP)
  File "/app/superset/migrations/shared/security_converge.py", line 235, in migrate_roles
    roles = session.query(Role).options(Load(Role).joinedload(Role.permissions)).all()
  File "/usr/local/lib/python3.8/site-packages/sqlalchemy/orm/query.py", line 3373, in all
    return list(self)
  File "/usr/local/lib/python3.8/site-packages/sqlalchemy/orm/query.py", line 3535, in __iter__
    return self._execute_and_instances(context)
  File "/usr/local/lib/python3.8/site-packages/sqlalchemy/orm/query.py", line 3560, in _execute_and_instances
    result = conn.execute(querycontext.statement, self._params)
  File "/usr/local/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 1011, in execute
    return meth(self, multiparams, params)
  File "/usr/local/lib/python3.8/site-packages/sqlalchemy/sql/elements.py", line 298, in _execute_on_connection
    return connection._execute_clauseelement(self, multiparams, params)
  File "/usr/local/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 1124, in _execute_clauseelement
    ret = self._execute_context(
  File "/usr/local/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 1316, in _execute_context
    self._handle_dbapi_exception(
  File "/usr/local/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 1510, in _handle_dbapi_exception
    util.raise_(
  File "/usr/local/lib/python3.8/site-packages/sqlalchemy/util/compat.py", line 182, in raise_
    raise exception
  File "/usr/local/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 1276, in _execute_context
    self.dialect.do_execute(
  File "/usr/local/lib/python3.8/site-packages/sqlalchemy/engine/default.py", line 608, in do_execute
    cursor.execute(statement, parameters)
sqlalchemy.exc.ProgrammingError: (psycopg2.errors.UndefinedTable) relation "ab_permission_view_role" does not exist
LINE 2: FROM ab_role LEFT OUTER JOIN (ab_permission_view_role AS ab_...
                                      ^

[SQL: SELECT ab_role.id AS ab_role_id, ab_role.name AS ab_role_name, ab_permission_view_1.id AS ab_permission_view_1_id, ab_permission_view_1.permission_id AS ab_permission_view_1_permission_id, ab_permission_view_1.view_menu_id AS ab_permission_view_1_view_menu_id 
FROM ab_role LEFT OUTER JOIN (ab_permission_view_role AS ab_permission_view_role_1 JOIN ab_permission_view AS ab_permission_view_1 ON ab_permission_view_1.id = ab_permission_view_role_1.permission_view_id) ON ab_role.id = ab_permission_view_role_1.role_id]
(Background on this error at: http://sqlalche.me/e/13/f405)

Confirmation of the pod and the images

$ kubectl get pods -n superset -o custom-columns=NAME:.metadata.name,IMAGE:.spec.containers[0].image
NAME                                   IMAGE
superset-7ffd9d84b8-kh2k9              blotout/superset:0.16.0
superset-7ffd9d84b8-tg8fw              blotout/superset:0.16.0
superset-celerybeat-7fb5bcdc9d-24g26   blotout/superset:0.16.0
superset-init-db-dfzpc                 blotout/superset:0.16.0
superset-init-db-fmhr8                 blotout/superset:0.16.0
superset-init-db-k9j6t                 blotout/superset:0.16.0
superset-init-db-r56d8                 blotout/superset:0.16.0
superset-init-db-rjvrt                 blotout/superset:0.16.0
superset-init-db-vbpkn                 blotout/superset:0.16.0
superset-init-db-zvwgt                 blotout/superset:0.16.0
superset-worker-6d745f6977-bm7xj       blotout/superset:0.16.0
superset-worker-6d745f6977-j44jh       blotout/superset:0.16.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant