airflow-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Lane <Peter.L...@ama-assn.org>
Subject Re: Pod template substitutions not working
Date Sat, 06 Feb 2021 02:02:29 GMT
FWIW, I was able to get a template working, though I’m still left with some questions. First,
I upgraded to Airflow 2.0.0 largely because I saw it had logging statements. Second, I was
only able to specify a pod_template_file in the scheduler config. The KubernetesPodOperator
parameter doesn’t work. Similarly, overriding the pod image does not work by using the KPO’s
image constructor parameter. I had to use the executor_config/pod_override method.

Am I missing the point of having those parameters in the KPO constructor? Are these legacy
parameters that don’t work anymore and should be removed?

Thanks,
Peter

From: Peter Lane <Peter.Lane@ama-assn.org>
Reply-To: "users@airflow.apache.org" <users@airflow.apache.org>
Date: Thursday, February 4, 2021 at 5:55 PM
To: "users@airflow.apache.org" <users@airflow.apache.org>
Subject: Re: Pod template substitutions not working

Hi Daniel,

Thanks for responding. Sorry for the months-long delay. Had other stuff I had to focus on.

I am using Airflow 1.10.12.

Here is a link to a public repo with the scheduler logs and template file:

https://github.com/MuffinSpawn/AirflowDebug/tree/main<https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_MuffinSpawn_AirflowDebug_tree_main&d=DwMGaQ&c=iqeSLYkBTKTEV8nJYtdW_A&r=kvBf2hZ8ILK_fyYNp9ArlfEC5_dzeChyAb7MXIoSTUM&m=b-VRncu4Y9U-dqTAelnBF9fT6aI0HpEL8zGTbZiKqv0&s=qHmRWsG7QFeT9_jhgZuIwnZ4t3wqMlJbiMmw0NeJt5A&e=>

The Pod gives me the message “Failed to pull image "dummy_image": rpc error: code = Unknown
desc = repository docker.io/dummy_image not found: does not exist or no pull access”.  The
most recent run was an excerpt from this example: https://airflow.apache.org/docs/apache-airflow-providers-cncf-kubernetes/stable/_modules/airflow/providers/cncf/kubernetes/example_dags/example_kubernetes.html<https://urldefense.proofpoint.com/v2/url?u=https-3A__airflow.apache.org_docs_apache-2Dairflow-2Dproviders-2Dcncf-2Dkubernetes_stable_-5Fmodules_airflow_providers_cncf_kubernetes_example-5Fdags_example-5Fkubernetes.html&d=DwMGaQ&c=iqeSLYkBTKTEV8nJYtdW_A&r=kvBf2hZ8ILK_fyYNp9ArlfEC5_dzeChyAb7MXIoSTUM&m=b-VRncu4Y9U-dqTAelnBF9fT6aI0HpEL8zGTbZiKqv0&s=gdyLjqHL1VeTO7UReGBOwOzU8PFjl4-suxzXeXzJbpU&e=>
It’s in the repo as well as test_xcom.py. My understanding was that this should work as
well with the template, substituting the image parameter for the dummy base image in the template.
I also included my scheduler config YAML if that helps. Any help would be appreciated.

Peter

From: Daniel Imberman <daniel.imberman@gmail.com>
Reply-To: "users@airflow.apache.org" <users@airflow.apache.org>
Date: Monday, December 7, 2020 at 11:37 AM
To: "users@airflow.apache.org" <users@airflow.apache.org>
Cc: "users@airflow.apache.org" <users@airflow.apache.org>
Subject: Re: Pod template substitutions not working

[Warning External Email]
Hi Peter,

What version of airflow are you using? Can you post a link to your pod_template_file and the
logs?
via Newton Mail<https://urldefense.proofpoint.com/v2/url?u=https-3A__cloudmagic.com_k_d_mailapp-3Fct-3Ddx-26cv-3D10.0.51-26pv-3D10.15.7-26source-3Demail-5Ffooter-5F2&d=DwMFaQ&c=iqeSLYkBTKTEV8nJYtdW_A&r=kvBf2hZ8ILK_fyYNp9ArlfEC5_dzeChyAb7MXIoSTUM&m=UhljKF5J6Y5hg-xyuxQypoUpNZdEuHok-kWxLUXApdg&s=WJzTQkLGDGP3EMzi7xJl6IA065K2qf7skKe-V0oYrfM&e=>

On Tue, Dec 1, 2020 at 4:19 PM, Peter Lane <Peter.Lane@ama-assn.org> wrote:
I am having a terribly difficult time getting Airflow to run on Kubernetes (OpenShift, to
be exact. My current hurdle is that I am able to specify a custom worker pod template, but
the default container image is not being replaced when I set the AIRFLOW__KUBERNETES__WORKER_CONTAINER_REPOSITORY
and AIRFLOW__KUBERNETES__WORKER_CONTAINER_TAG in the deployment environment. I directly customized
the git-sync example, and my init container works fine. The base container image can’t get
pulled because the default value for the image (dummy_image) is still in the pod configuration.
Is there some magic flag I need to set or something to get this to work?

Thanks,
Peter

Mime
View raw message