Kadu Vido
unread,Jul 1, 2021, 9:55:32 AM7/1/21Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to cloud-composer-discuss
Hello,
I have use KubernetesPodOperator launching docker images in all my DAGs, but my latest deployment has been raising some odd warnings and errors that I have never seen.
I'm running composer-1.16.7-airflow-1.10.15, with secret manager as the secrets backend. No other DAGs are having this issue.
My DAG consists of a BranchOperator launching one of 3 different KubernetesPodOperators on specific occasions, all run the same docker image with different env vars (so, essentially, my branch operator just picks the env vars for the next task).
All of the failed tasks have this warning, which I've never seen before:
WARNING - /usr/local/lib/airflow/airflow/kubernetes/pod_launcher.py:331: DeprecationWarning: Using `airflow.contrib.kubernetes.pod.Pod` is deprecated. Please use `k8s.V1Pod`
After the warning, either the task takes a while and fails with this error:
ERROR - Pod Launching failed: Pod Launching failed: Pod took too long to start
Or it fails immediately with this one:
ERROR - Exception when attempting to create Namespaced Pod
(...)
kubernetes.client.rest.ApiException: (400
Reason: Bad Reques
HTTP response headers: HTTPHeaderDict({'Audit-Id': '85d06cfd-abb4-4fb2-88d5-ca55926a52ed', 'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Date': 'Thu, 01 Jul 2021 00:01:31 GMT', 'Content-Length': '520'}
HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"Pod in version \"v1\" cannot be handled as a Pod:(...)
The only change between these two is the env vars dictionary. I have no idea how this would cause this type issue, but for what it's worth, here's what they look like respectively:
{"ACTION": "SELL","GOOGLE_CREDENTIALS": {{var.value.commitment_manager_credentials}}",}
{"ACTION": "BUY", "COMMITMENT_SIZE": 400, "GOOGLE_CREDENTIALS": "{{var.value.commitment_manager_credentials}}",}
I checked and the credentials are rendering correctly, so that's not it. I'm completely stumped, if anyone has any ideas I'm open to suggestions.