ncbi / pgap

NCBI Prokaryotic Genome Annotation Pipeline
Other
310 stars 90 forks source link

[BUG] schema_salad.exceptions.ValidationException: [Errno 13] Permission denied: '/pgap/user_input/pgap_input.yaml' #192

Closed MDSharma closed 2 years ago

MDSharma commented 2 years ago

Describe the bug A clear and concise description of what the bug is.

To Reproduce curl -OL https://github.com/ncbi/pgap/raw/prod/scripts/pgap.py

./pgap.py --update PGAP version 2022-02-10.build5872 is up to date.

./pgap.py -r -o test ./input.yaml

Expected behavior Expect PGAP to execute. However, it terminates with the following error:

PGAP version 2022-02-10.build5872 is up to date.
Output will be placed in: /home/assemblies/annotation1/test.3
PGAP failed, docker exited with rc = 1
Unable to find error in log file.

A look at the error log shows the following:

--- Start Runtime Report --- { "CPU cores": 64, "Docker image": "ncbi/pgap:2022-02-10.build5872", "cpu flags": "fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc art rep_good nopl nonstop_tsc extd_apicid amd_dcm aperfmperf pni pclmulqdq monitor ssse3 fma cx16 sse4_1 sse4_2 popcnt aes xsave avx f16c lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs xop skinit wdt fma4 tce nodeid_msr tbm topoext perfctr_core perfctr_nb cpb hw_pstate retpoline_amd ssbd ibpb vmmcall bmi1 arat npt lbrv svm_lock nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold", "cpu model": "AMD Opteron(tm) Processor 6366 HE", "max user processes": 1048576, "memory (GiB)": 251.7, "memory per CPU core (GiB)": 3.9, "open files": 1048576, "tmp disk space (GiB)": 22.6, "virtual memory": "unlimited", "work disk space (GiB)": 20678.7 } --- End Runtime Report --- so, plenty of resources for this...

[2022-03-14 04:05:07] INFO /pgap/venv/bin/cwltool 3.1.20220210171524 [2022-03-14 04:05:07] INFO Resolved 'pgap/pgap.cwl' to 'file:///pgap/pgap/pgap.cwl' [2022-03-14 04:05:07] ERROR Tool definition failed validation: [Errno 13] Permission denied: '/pgap/user_input/pgap_input.yaml' Traceback (most recent call last): File "/pgap/venv/lib/python3.9/site-packages/schema_salad/fetcher.py", line 85, in fetch_text with open( PermissionError: [Errno 13] Permission denied: '/pgap/user_input/pgap_input.yaml'

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/pgap/venv/lib/python3.9/site-packages/cwltool/main.py", line 1094, in main job_order_object, input_basedir, jobloader = load_job_order( File "/pgap/venv/lib/python3.9/site-packages/cwltool/main.py", line 373, in load_job_order job_order_object, _ = loader.resolve_ref( File "schema_salad/ref_resolver.py", line 519, in resolve_ref File "schema_salad/ref_resolver.py", line 981, in fetch File "/pgap/venv/lib/python3.9/site-packages/schema_salad/fetcher.py", line 92, in fetch_text raise ValidationException(str(err)) from err schema_salad.exceptions.ValidationException: [Errno 13] Permission denied: '/pgap/user_input/pgap_input.yaml'

The docker command - as per the error log was:

Docker command: /usr/bin/docker run -i --rm --user 848364470:848298497 --volume /home2/userdir/input-2022-02-10.build5872:/pgap/input:ro,z --volume /home2/userdir/boo/assemblies/annotation1:/pgap/user_input:z --volume /home2/userdir/boo/assemblies/annotation1/pgap_input_m5nsl0jq.yaml:/pgap/user_input/pgap_input.yaml:ro,z --volume /tmp:/tmp:rw,z --volume /home2/userdir/boo/assemblies/annotation1/test.3:/pgap/output:rw,z ncbi/pgap:2022-02-10.build5872 cwltool --timestamps --debug --disable-color --preserve-entire-environment --outdir /pgap/output pgap/pgap.cwl /pgap/user_input/pgap_input.yaml

Software versions (please complete the following information):

Log Files no additional logs are generated when using the --debug option in this instance. only empty debug directory is created.

Additional context

azat-badretdin commented 2 years ago

Thank you for your report!

As the report says, you have permission issues between your local filesystem and docker:


Permission denied: '/pgap/user_input/pgap_input.yaml'

This is, most likely, a consequence of some site-specific docker setting for directories mapped to the docker container during PGAP run.

azat-badretdin commented 2 years ago

Linking old ticket with similar messages: https://github.com/ncbi/pgap/issues/20

azat-badretdin commented 2 years ago

Have you tried to run anything else with this installation before?

MDSharma commented 2 years ago

Thank you for your report!

As the report says, you have permission issues between your local filesystem and docker:


Permission denied: '/pgap/user_input/pgap_input.yaml'

This is, most likely, a consequence of some site-specific docker setting for directories mapped to the docker container during PGAP run.

Hi, yes - so I thought as well.. but selinux is in permissive mode and the permission issue does not make immediate sense atmo.. even running docker as root it does not work.. I also tried the previous image.. no joy

azat-badretdin commented 2 years ago

Closing. We can't do anything on our side.