Kubernetes中的气流DAG在访问PostgreSQL数据库时询问OAUTH Google Cloud Platform

时间:2018-11-23 16:23:46

标签: kubernetes google-cloud-platform airflow

我已经在Kubernetes中设置并设置了Airflow。在同一集群的其他Pod中使用Postgresql数据库进行此Airflow。

当我尝试使用配置的选项运行一些连接到同一postgresql的dag时,与postgresql pod的连接会要求获得OAUTH授权

 Reading local file: /root/airflow/logs/anu_funnel_analysis_v2/task_4_get_bigquery_pandas/2018-06-29T02:30:00+00:00/1.log
[2018-11-23 15:56:22,796] {models.py:1335} INFO - Dependencies all met for <TaskInstance: anu_funnel_analysis_v2.task_4_get_bigquery_pandas 2018-06-29T02:30:00+00:00 [queued]>
[2018-11-23 15:56:22,820] {models.py:1335} INFO - Dependencies all met for <TaskInstance: anu_funnel_analysis_v2.task_4_get_bigquery_pandas 2018-06-29T02:30:00+00:00 [queued]>
[2018-11-23 15:56:22,821] {models.py:1547} INFO - 
--------------------------------------------------------------------------------
Starting attempt 1 of 6
--------------------------------------------------------------------------------

[2018-11-23 15:56:22,838] {models.py:1569} INFO - Executing <Task(PythonOperator): task_4_get_bigquery_pandas> on 2018-06-29T02:30:00+00:00
[2018-11-23 15:56:22,839] {base_task_runner.py:124} INFO - Running: ['bash', '-c', u'airflow run anu_funnel_analysis_v2 task_4_get_bigquery_pandas 2018-06-29T02:30:00+00:00 --job_id 82 --raw -sd DAGS_FOLDER/bigquery_for_funnel.py --cfg_path /tmp/tmpJ1Pe0O']
[2018-11-23 15:56:23,656] {base_task_runner.py:107} INFO - Job 82: Subtask task_4_get_bigquery_pandas [2018-11-23 15:56:23,655] {settings.py:174} INFO - setting.configure_orm(): Using pool settings. pool_size=5, pool_recycle=1800
[2018-11-23 15:56:23,817] {base_task_runner.py:107} INFO - Job 82: Subtask task_4_get_bigquery_pandas [2018-11-23 15:56:23,816] {__init__.py:51} INFO - Using executor SequentialExecutor
[2018-11-23 15:56:23,952] {base_task_runner.py:107} INFO - Job 82: Subtask task_4_get_bigquery_pandas [2018-11-23 15:56:23,950] {models.py:258} INFO - Filling up the DagBag from /root/airflow/dags/bigquery_for_funnel.py
[2018-11-23 15:56:24,737] {base_task_runner.py:107} INFO - Job 82: Subtask task_4_get_bigquery_pandas /usr/local/lib/python2.7/dist-packages/airflow/contrib/operators/bigquery_operator.py:148: DeprecationWarning: Deprecated parameter `bql` used in Task id: task_2_bq_read_new_table_funnel. Use `sql` parameter instead to pass the sql to be executed. `bql` parameter is deprecated and will be removed in a future version of Airflow.
[2018-11-23 15:56:24,738] {base_task_runner.py:107} INFO - Job 82: Subtask task_4_get_bigquery_pandas   category=DeprecationWarning)
[2018-11-23 15:56:24,778] {base_task_runner.py:107} INFO - Job 82: Subtask task_4_get_bigquery_pandas [2018-11-23 15:56:24,777] {cli.py:492} INFO - Running <TaskInstance: anu_funnel_analysis_v2.task_4_get_bigquery_pandas 2018-06-29T02:30:00+00:00 [running]> on host airflow-5d87576f5b-v5qmg
[2018-11-23 15:56:24,837] {logging_mixin.py:95} INFO - [2018-11-23 15:56:24,837] {base_hook.py:83} INFO - Using connection to: anudata-postgresql-service

[2018-11-23 15:56:25,335] {logging_mixin.py:95} INFO - Please visit this URL to authorize this application: https://accounts.google.com/o/oauth2/auth?response_type=code&client_id=495642085510-k0tmvj2m941jhre2nbqka17vqpjfddtd.apps.googleusercontent.com&redirect_uri=urn%3Aietf%3Awgxxxxxxxxxxxxxxxxxxx

为什么会这样?在同一豆荚中,一个人要求OAUTH,而另一个人不要求吗?

0 个答案:

没有答案