openshiftio / openshift.io

Red Hat OpenShift.io is an end-to-end development environment for planning, building and deploying modern applications.
https://openshift.io
97 stars 66 forks source link

fatal: unable to look up current user in the passwd file: no such user #1299

Closed tuxdna closed 6 years ago

tuxdna commented 6 years ago

When scheduling scan of Go packages using Jobs API, following error is encountered in the staging cluster:

2017-11-07 10:25:45,950 [INFO] celery.worker.strategy: Received task: selinon.SelinonTaskEnvelope[7208ed00-f8d7-4901-bf64-6998824967c7]  
{"task_name": "InitAnalysisFlow", "flow_name": "bayesianFlow", "task_id": "7208ed00-f8d7-4901-bf64-6998824967c7", "node_args": {"name": "github.com/jmoiron/sqlx", "force": true, "job_id": "14524ba1-3548-4c5b-a814-669abcd3c8a6", "ecosystem": "go", "force_graph_sync": false, "version": "3379e5993990b1f927fc8db926485e6f6becf2d2"}, "queue": "STAGE_ingestion_InitAnalysisFlow_v0", "event": "TASK_START", "dispatcher_id": "8ebdd442-42fd-46e9-b756-eb984bbedc6d", "parent": {}}
2017-11-07 10:25:46,179 [WARNING] f8a_worker.object_cache: Failed to retrieve go/github.com/jmoiron/sqlx/3379e5993990b1f927fc8db926485e6f6becf2d2/meta.json
# cd .; git clone https://github.com/jmoiron/sqlx /var/lib/f8a_worker/worker_data/tmpkrm_3w_q/src/github.com/jmoiron/sqlx
Cloning into '/var/lib/f8a_worker/worker_data/tmpkrm_3w_q/src/github.com/jmoiron/sqlx'...
fatal: unable to look up current user in the passwd file: no such user
Unexpected end of command stream
package github.com/jmoiron/sqlx: exit status 128
2017-11-07 10:25:46,852 [WARNING] f8a_worker.utils: command ['go', 'get', '-d', 'github.com/jmoiron/sqlx'] ended with 1

{"dispatcher_id": "8ebdd442-42fd-46e9-b756-eb984bbedc6d", "task_id": "7208ed00-f8d7-4901-bf64-6998824967c7", "flow_name": "bayesianFlow", "what": "Traceback (most recent call last):\n  File \"/usr/lib/python3.4/site-packages/selinon/selinonTaskEnvelope.py\", line 115, in run\n    result = task.run(node_args)\n  File \"/usr/lib/python3.4/site-packages/f8a_worker/base.py\", line 41, in run\n    result = self.execute(node_args)\n  File \"/usr/lib/python3.4/site-packages/f8a_worker/workers/init_analysis_flow.py\", line 48, in execute\n    target_dir=cache_path\n  File \"/usr/lib/python3.4/site-packages/f8a_worker/process.py\", line 502, in fetch_artifact\n    digest, artifact_path = IndianaJones.fetch_scm_artifact(artifact, version, target_dir)\n  File \"/usr/lib/python3.4/site-packages/f8a_worker/process.py\", line 464, in fetch_scm_artifact\n    with cwd(package_dir):\n  File \"/usr/lib64/python3.4/contextlib.py\", line 59, in __enter__\n    return next(self.gen)\n  File \"/usr/lib/python3.4/site-packages/f8a_worker/utils.py\", line 141, in cwd\n    chdir(target)\nFileNotFoundError: [Errno 2] No such file or directory: '/var/lib/f8a_worker/worker_data/tmpkrm_3w_q/src/github.com/jmoiron/sqlx'\n", "task_name": "InitAnalysisFlow", "retried_count": 0, "node_args": {"name": "github.com/jmoiron/sqlx", "force": true, "job_id": "14524ba1-3548-4c5b-a814-669abcd3c8a6", "ecosystem": "go", "force_graph_sync": false, "version": "3379e5993990b1f927fc8db926485e6f6becf2d2"}, "queue": "STAGE_ingestion_InitAnalysisFlow_v0", "event": "TASK_FAILURE", "parent": {}}
{"task_name": "InitAnalysisFlow", "task_id": "7208ed00-f8d7-4901-bf64-6998824967c7", "node_args": {"name": "github.com/jmoiron/sqlx", "force": true, "job_id": "14524ba1-3548-4c5b-a814-669abcd3c8a6", "ecosystem": "go", "force_graph_sync": false, "version": "3379e5993990b1f927fc8db926485e6f6becf2d2"}, "flow_name": "bayesianFlow", "event": "STORAGE_OMIT_STORE_ERROR", "error_traceback": "  File \"/usr/lib/python3.4/site-packages/selinon/selinonTaskEnvelope.py\", line 115, in run\n    result = task.run(node_args)\n  File \"/usr/lib/python3.4/site-packages/f8a_worker/base.py\", line 41, in run\n    result = self.execute(node_args)\n  File \"/usr/lib/python3.4/site-packages/f8a_worker/workers/init_analysis_flow.py\", line 48, in execute\n    target_dir=cache_path\n  File \"/usr/lib/python3.4/site-packages/f8a_worker/process.py\", line 502, in fetch_artifact\n    digest, artifact_path = IndianaJones.fetch_scm_artifact(artifact, version, target_dir)\n  File \"/usr/lib/python3.4/site-packages/f8a_worker/process.py\", line 464, in fetch_scm_artifact\n    with cwd(package_dir):\n  File \"/usr/lib64/python3.4/contextlib.py\", line 59, in __enter__\n    return next(self.gen)\n  File \"/usr/lib/python3.4/site-packages/f8a_worker/utils.py\", line 141, in cwd\n    chdir(target)\n", "error_type": "<class 'FileNotFoundError'>", "error_value": "[Errno 2] No such file or directory: '/var/lib/f8a_worker/worker_data/tmpkrm_3w_q/src/github.com/jmoiron/sqlx'"}
2017-11-07 10:25:46,901 [ERROR] celery.app.trace: Task selinon.SelinonTaskEnvelope[7208ed00-f8d7-4901-bf64-6998824967c7] raised unexpected: FileNotFoundError(2, 'No such file or directory')
Traceback (most recent call last):
  File "/usr/lib/python3.4/site-packages/celery/app/trace.py", line 367, in trace_task
    R = retval = fun(*args, **kwargs)
  File "/usr/lib/python3.4/site-packages/celery/app/trace.py", line 622, in __protected_call__
    return self.run(*args, **kwargs)
  File "/usr/lib/python3.4/site-packages/selinon/selinonTaskEnvelope.py", line 170, in run
    raise self.retry(max_retries=0, exc=exc)
  File "/usr/lib/python3.4/site-packages/celery/app/task.py", line 668, in retry
    raise_with_context(exc)
  File "/usr/lib/python3.4/site-packages/selinon/selinonTaskEnvelope.py", line 115, in run
    result = task.run(node_args)
  File "/usr/lib/python3.4/site-packages/f8a_worker/base.py", line 41, in run
    result = self.execute(node_args)
  File "/usr/lib/python3.4/site-packages/f8a_worker/workers/init_analysis_flow.py", line 48, in execute
    target_dir=cache_path
  File "/usr/lib/python3.4/site-packages/f8a_worker/process.py", line 502, in fetch_artifact
    digest, artifact_path = IndianaJones.fetch_scm_artifact(artifact, version, target_dir)
  File "/usr/lib/python3.4/site-packages/f8a_worker/process.py", line 464, in fetch_scm_artifact
    with cwd(package_dir):
  File "/usr/lib64/python3.4/contextlib.py", line 59, in __enter__
    return next(self.gen)
  File "/usr/lib/python3.4/site-packages/f8a_worker/utils.py", line 141, in cwd
    chdir(target)
FileNotFoundError: [Errno 2] No such file or directory: '/var/lib/f8a_worker/worker_data/tmpkrm_3w_q/src/github.com/jmoiron/sqlx'
2017-11-07 10:25:46,902 [INFO] celery.worker.strategy: Received task: selinon.SelinonTaskEnvelope[9e25d6c4-485b-4413-84db-0c8c65424c4c]  

Full logs available here: http://pastebin.test.redhat.com/529956

tuxdna commented 6 years ago

This could've been a temporary error, because it is not reproducible. I scheduled 200 golang package analyses and then 400 golang packages again, but no error was encountered in the Jobs API logs.

joshuawilson commented 6 years ago

Can this be closed?

GeorgeActon commented 6 years ago

@tuxdna If it is not reproducible, can this be closed now?

miteshvp commented 6 years ago

@tuxdna - any updates here? Can this be closed since it is not reproducible anymore?