Creating data source i got this error, maybe someo...
# troubleshoot
r
Creating data source i got this error, maybe someone could help? Version: 0.9.0
Copy code
RUN_INGEST - {'errors': [],
 'exec_id': '5aa6b080-4493-450a-ad72-dc7a7ab9e9ee',
 'infos': ['2022-12-23 09:06:34.833273 [exec_id=5aa6b080-4493-450a-ad72-dc7a7ab9e9ee] INFO: Starting execution for task with name=RUN_INGEST',
           '2022-12-23 09:06:34.834367 [exec_id=5aa6b080-4493-450a-ad72-dc7a7ab9e9ee] INFO: Caught exception EXECUTING '
           'task_id=5aa6b080-4493-450a-ad72-dc7a7ab9e9ee, name=RUN_INGEST, stacktrace=Traceback (most recent call last):\n'
           '  File "/usr/local/lib/python3.10/site-packages/acryl/executor/execution/default_executor.py", line 123, in execute_task\n'
           '    task_event_loop.run_until_complete(task_future)\n'
           '  File "/usr/local/lib/python3.10/asyncio/base_events.py", line 646, in run_until_complete\n'
           '    return future.result()\n'
           '  File "/usr/local/lib/python3.10/site-packages/acryl/executor/execution/sub_process_ingestion_task.py", line 73, in execute\n'
           '    SubProcessTaskUtil._write_recipe_to_file(exec_out_dir, file_name, recipe)\n'
           '  File "/usr/local/lib/python3.10/site-packages/acryl/executor/execution/sub_process_task_common.py", line 105, in '
           '_write_recipe_to_file\n'
           '    os.makedirs(dir_path, mode = 0o777, exist_ok = True)\n'
           '  File "/usr/local/lib/python3.10/os.py", line 215, in makedirs\n'
           '    makedirs(head, exist_ok=exist_ok)\n'
           '  File "/usr/local/lib/python3.10/os.py", line 225, in makedirs\n'
           '    mkdir(name, mode)\n'
           "PermissionError: [Errno 13] Permission denied: '/tmp/datahub/ingest'\n"]}
Execution finished with errors.
✅ 1
h
Hey Lukas! This should not happen. How is your datahub deployed ? helm or docker-compose ?
r
Helm chart
I was thinking, maybe the security context problem. Platform: openshift
h
hmm, it is possible to change permissions to allow write to
/tmp/datahub/ingest
?
/tmp/datahub
r
That’s intresting why initially inside container there is no rights
It’s runnin non-root
h
hmm, ideally this just works. Checking whats might have gone wrong . Can you share output of
ls -l /tmp/datahub
on actions pod
r
Yes one sec
this UID: 10009900 <- it's security context
probably inside deployment i should set securitycontext
I set to runAsUser: 10009900
But still nothing
it's controlled by root by default 😕
o
Hi Lukas! This is probably related to using OpenShift and RHEL based systems. We have had quite a few issues on RHEL in the past with people running into permissions errors and blocked ports since RHEL defaults to more restrictive defaults. In our Dockerfile we specifically run a chown on
tmp/datahub
to change the owner to
datahub
, so this is not being honored on the container you have deployed? What does
ls -al /tmp/datahub
output (i.e. is
tmp/datahub
itself also owned by root?)
r
Yes you are totally right tmp/datahub owner is root.
a
Hi @rough-flag-51828, is this issue still affecting you?
r
Yes, still a problem
What i have done to work on openshift i gave privileged scc to service account
That means running with root, but it’s not good from security perspective
o
This seems to just be how OpenShift does things and our Dockerfile (and thus the published Docker image) is not really designed for this, unfortunately. Looks like you may be able to use the "root group" though instead of a root privileged user which, according to Red Hat, does not have security concerns: https://stackoverflow.com/questions/58473832/how-do-i-change-the-permissions-in-openshift-container-platform https://docs.openshift.com/container-platform/4.11/openshift_images/create-images.html The issue seems to revolve around our use of USER in the Dockerfile and how OpenShift pretty much ignores any settings that rely on setting up a non-random user: https://stackoverflow.com/questions/71125661/how-to-give-proper-permission-for-file-system-in-containers-running-on-ocp