You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2021/01/19 14:19:45 UTC
[GitHub] [airflow] ururu-fy opened a new issue #13764: SQLALCHEMY_DATABASE_URI multiple hosts support
ururu-fy opened a new issue #13764:
URL: https://github.com/apache/airflow/issues/13764
**Apache Airflow version**: 2.0
**Environment**: conda
- **OS** (e.g. from /etc/os-release): debian buster
- **Kernel** (e.g. `uname -a`): 5.4.19
**What happened**:
I have master-slave postgres cluster.
I try to configure multiple connection to Postgres.
I use sql_alchemy_conn = postgresql+psycopg2://airflow:airflow@?host=host1&host=host2/airflow
When I run airflow db init I have next error:
Traceback (most recent call last):
File "/usr/local/conda/envs/airflow/bin/airflow", line 8, in <module>
sys.exit(main())
File "/usr/local/conda/envs/airflow/lib/python3.6/site-packages/airflow/__main__.py", line 40, in main
args.func(args)
File "/usr/local/conda/envs/airflow/lib/python3.6/site-packages/airflow/cli/cli_parser.py", line 48, in command
return func(*args, **kwargs)
File "/usr/local/conda/envs/airflow/lib/python3.6/site-packages/airflow/cli/commands/db_command.py", line 31, in initdb
db.initdb()
File "/usr/local/conda/envs/airflow/lib/python3.6/site-packages/airflow/utils/db.py", line 549, in initdb
upgradedb()
File "/usr/local/conda/envs/airflow/lib/python3.6/site-packages/airflow/utils/db.py", line 688, in upgradedb
command.upgrade(config, 'heads')
File "/usr/local/conda/envs/airflow/lib/python3.6/site-packages/alembic/command.py", line 298, in upgrade
script.run_env()
File "/usr/local/conda/envs/airflow/lib/python3.6/site-packages/alembic/script/base.py", line 489, in run_env
util.load_python_file(self.dir, "env.py")
File "/usr/local/conda/envs/airflow/lib/python3.6/site-packages/alembic/util/pyfiles.py", line 98, in load_python_file
module = load_module_py(module_id, path)
File "/usr/local/conda/envs/airflow/lib/python3.6/site-packages/alembic/util/compat.py", line 184, in load_module_py
spec.loader.exec_module(module)
File "<frozen importlib._bootstrap_external>", line 678, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/usr/local/conda/envs/airflow/lib/python3.6/site-packages/airflow/migrations/env.py", line 108, in <module>
run_migrations_online()
File "/usr/local/conda/envs/airflow/lib/python3.6/site-packages/airflow/migrations/env.py", line 102, in run_migrations_online
context.run_migrations()
File "<string>", line 8, in run_migrations
File "/usr/local/conda/envs/airflow/lib/python3.6/site-packages/alembic/runtime/environment.py", line 846, in run_migrations
self.get_context().run_migrations(**kw)
File "/usr/local/conda/envs/airflow/lib/python3.6/site-packages/alembic/runtime/migration.py", line 522, in run_migrations
step.migration_fn(**kw)
File "/usr/local/conda/envs/airflow/lib/python3.6/site-packages/airflow/migrations/versions/2c6edca13270_resource_based_permissions.py", line 310, in upgrade
remap_permissions()
File "/usr/local/conda/envs/airflow/lib/python3.6/site-packages/airflow/migrations/versions/2c6edca13270_resource_based_permissions.py", line 287, in remap_permissions
appbuilder = create_app(config={'FAB_UPDATE_PERMS': False}).appbuilder
File "/usr/local/conda/envs/airflow/lib/python3.6/site-packages/airflow/www/app.py", line 74, in create_app
flask_app.config.from_pyfile(settings.WEBSERVER_CONFIG, silent=True)
File "/usr/local/conda/envs/airflow/lib/python3.6/site-packages/flask/config.py", line 118, in from_pyfile
exec(compile(config_file.read(), filename, "exec"), d.__dict__)
File "/var/lib/data/airflow/webserver_config.py", line 28
SQLALCHEMY_DATABASE_URI = conf.get(\u2018core\u2019, \u2018SQL_ALCHEMY_CONN\u2019)
**What you expected to happen**:
Maybe flask-sqlalchemy doesn't support multiple connection?
**How to reproduce it**:
Set up multiple connection string:
sql_alchemy_conn = postgresql+psycopg2://airflow:airflow@?host=host1&host=host2/airflow
and run airflow db init
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] ururu-fy commented on issue #13764: SQLALCHEMY_DATABASE_URI multiple hosts support
Posted by GitBox <gi...@apache.org>.
ururu-fy commented on issue #13764:
URL: https://github.com/apache/airflow/issues/13764#issuecomment-762930769
done
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] mik-laj commented on issue #13764: SQLALCHEMY_DATABASE_URI multiple hosts support
Posted by GitBox <gi...@apache.org>.
mik-laj commented on issue #13764:
URL: https://github.com/apache/airflow/issues/13764#issuecomment-762929237
Is it still valid?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] ururu-fy commented on issue #13764: SQLALCHEMY_DATABASE_URI multiple hosts support
Posted by GitBox <gi...@apache.org>.
ururu-fy commented on issue #13764:
URL: https://github.com/apache/airflow/issues/13764#issuecomment-762886549
Sorry, it was my mistake in config file
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] boring-cyborg[bot] commented on issue #13764: SQLALCHEMY_DATABASE_URI multiple hosts support
Posted by GitBox <gi...@apache.org>.
boring-cyborg[bot] commented on issue #13764:
URL: https://github.com/apache/airflow/issues/13764#issuecomment-762868929
Thanks for opening your first issue here! Be sure to follow the issue template!
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] ururu-fy closed issue #13764: SQLALCHEMY_DATABASE_URI multiple hosts support
Posted by GitBox <gi...@apache.org>.
ururu-fy closed issue #13764:
URL: https://github.com/apache/airflow/issues/13764
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] mik-laj edited a comment on issue #13764: SQLALCHEMY_DATABASE_URI multiple hosts support
Posted by GitBox <gi...@apache.org>.
mik-laj edited a comment on issue #13764:
URL: https://github.com/apache/airflow/issues/13764#issuecomment-762929237
Is it still valid? Should we close it?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] ururu-fy closed issue #13764: SQLALCHEMY_DATABASE_URI multiple hosts support
Posted by GitBox <gi...@apache.org>.
ururu-fy closed issue #13764:
URL: https://github.com/apache/airflow/issues/13764
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org