[ https://issues.apache.org/jira/browse/AIRFLOW-4497?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Philippe Gagnon reassigned AIRFLOW-4497: ---------------------------------------- Assignee: Philippe Gagnon > KubernetesExecutor fails to launch pods when using run_as_user or fs_group > options > ---------------------------------------------------------------------------------- > > Key: AIRFLOW-4497 > URL: https://issues.apache.org/jira/browse/AIRFLOW-4497 > Project: Apache Airflow > Issue Type: Bug > Components: executors > Affects Versions: 1.10.3 > Reporter: Nick Digati > Assignee: Philippe Gagnon > Priority: Minor > Labels: kubernetes > > If you set the run_as_user or the fs_group options in the airflow.cfg file > when using the KubernetesExecutor the pods will fail to launch with the > following error message: > > {noformat} > [2019-05-10 05:36:09,207] {pod_launcher.py:60} ERROR - Exception when > attempting to create Namespaced Pod. > Traceback (most recent call last): > File > "/usr/local/lib/python3.6/site-packages/airflow/contrib/kubernetes/pod_launcher.py", > line 57, in run_pod_async > resp = self._client.create_namespaced_pod(body=req, namespace=pod.namespace) > File > "/usr/local/lib/python3.6/site-packages/kubernetes/client/apis/core_v1_api.py", > line 6115, in create_namespaced_pod > (data) = self.create_namespaced_pod_with_http_info(namespace, body, **kwargs) > File > "/usr/local/lib/python3.6/site-packages/kubernetes/client/apis/core_v1_api.py", > line 6206, in create_namespaced_pod_with_http_info > collection_formats=collection_formats) > File > "/usr/local/lib/python3.6/site-packages/kubernetes/client/api_client.py", > line 334, in call_api > _return_http_data_only, collection_formats, _preload_content, > _request_timeout) > File > "/usr/local/lib/python3.6/site-packages/kubernetes/client/api_client.py", > line 168, in __call_api > _request_timeout=_request_timeout) > File > "/usr/local/lib/python3.6/site-packages/kubernetes/client/api_client.py", > line 377, in request > body=body) > File "/usr/local/lib/python3.6/site-packages/kubernetes/client/rest.py", line > 266, in POST > body=body) > File "/usr/local/lib/python3.6/site-packages/kubernetes/client/rest.py", line > 222, in request > raise ApiException(http_resp=r) > kubernetes.client.rest.ApiException: (400) > Reason: Bad Request > HTTP response headers: HTTPHeaderDict({'Content-Type': 'application/json', > 'Date': 'Fri, 10 May 2019 05:36:09 GMT', 'Content-Length': '428'}) > HTTP response body: > {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"Pod > in version \"v1\" cannot be handled as a Pod: v1.Pod.Spec: > v1.PodSpec.SecurityContext: v1.PodSecurityContext.FSGroup: readUint64: > unexpected character: \ufffd, error found in #10 byte of ...|sGroup\": > \"65533\"}}}|..., bigger context ...|, \"affinity\": {}, \"securityContext\": > {\"fsGroup\": \"65533\"}}}|...","reason":"BadRequest","code":400}{noformat} > > It seems like those two options are getting put into the pod manifest as > strings instead of integers? > > My airflow.cfg options: > > {noformat} > [kubernetes] > run_as_user = 1000 > fs_group = 65533{noformat} > -- This message was sent by Atlassian JIRA (v7.6.3#76005)