-
Notifications
You must be signed in to change notification settings - Fork 20
Closed
Description
Please suppose that there are multiple cfenv
function calls in the same host at the same time - in the specific cases, for examples, Concourse CI kicks multiple cfenv
function calls in the same virtual machine.
Sometimes one of the cfenv
function calls fails with the following error.
ENOENT: no such file or directory, rename '/root/.ports.json.tmp' -> '/root/.ports.json'
16 | const service = appEnv.getService(name);
17 | return service && service.credentials;
> 18 | };
| ^
19 |
at write_json (node_modules/ports/index.js:54:6)
at Object.getPort (node_modules/ports/index.js:40:3)
at getPort (node_modules/cfenv/lib/cfenv.js:224:32)
at new AppEnv (node_modules/cfenv/lib/cfenv.js:45:19)
at Object.<anonymous>.cfenv.getAppEnv (node_modules/cfenv/lib/cfenv.js:23:12)
at Object.<anonymous> (../common/env.ts:18:3)
It seems that one cfenv
function call has deleted the temporary json file while another tries to rename the same temporary json file.
Please consider to fix this race condition.
Metadata
Metadata
Assignees
Labels
No labels