You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "Yuva (JIRA)" <ji...@apache.org> on 2018/12/18 09:42:00 UTC
[jira] [Created] (AIRFLOW-3536) Airflow impersonation doesnt work
as expected.
Yuva created AIRFLOW-3536:
-----------------------------
Summary: Airflow impersonation doesnt work as expected.
Key: AIRFLOW-3536
URL: https://issues.apache.org/jira/browse/AIRFLOW-3536
Project: Apache Airflow
Issue Type: Bug
Components: configuration
Affects Versions: 1.10.1
Reporter: Yuva
Airflow impersonation makes the Dag to fail due to below error.
sudo: airflow: command not found
{{[2018-12-18 01:12:57,186] \{models.py:1595} INFO - Executing <Task(BashOperator): print_hello> on 2018-12-18T03:30:00+00:00 [2018-12-18 01:12:57,187] \{base_task_runner.py:118} INFO - Running: ['bash', '-c', 'sudo -E -H -u airflowgcp airflow run PP_AIRFLOW_TEST print_hello 2018-12-18T03:30:00+00:00 --job_id 295 --raw -sd DAGS_FOLDER/PP_AIRFLOW_TEST.py --cfg_path /tmp/tmpcclcaqvv'] [2018-12-18 01:12:57,222] \{base_task_runner.py:101} INFO - Job 295: Subtask print_hello sudo: airflow: command not found [2018-12-18 01:13:02,166] \{logging_mixin.py:95} INFO - [2018-12-18 01:13:02,164] \{jobs.py:2627} INFO - Task exited with return code 1}}
{{Here is the snippet}}
default_args = { 'owner': 'airflow', 'start_date': datetime.now(), 'retries': 1, 'retry_delay': dt.timedelta(minutes=5), 'queue': 'airflowgcp', 'run_as_user': 'airflowgcp' }
Services run as user 'airflow' and tried executing the jobs with airflowgcp with run_as_user argument. Added the Airflow/Python path to .bashrc of airflowgcp user. Still the job fails with same error.
Also can we have a detailed documentation on the setup / config of impersonation.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)