From 7f00beed678a80432df2e10ec4b62e32e174b5cc Mon Sep 17 00:00:00 2001 From: Lloyd Hilaiel <lloyd@hilaiel.com> Date: Wed, 30 Nov 2011 15:34:30 -0700 Subject: [PATCH] fix regression in keysigner - ensure non-default VAR_PATH is relayed to compute processes - issue #213 --- bin/keysigner | 5 ++++- lib/configuration.js | 5 +++++ package.json | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/bin/keysigner b/bin/keysigner index f8b0e0585..4e7ab7aad 100755 --- a/bin/keysigner +++ b/bin/keysigner @@ -84,8 +84,11 @@ app.use(function(req, resp, next) { // parse POST bodies app.use(express.bodyParser()); -// allocate a compute cluster try { + // explicitly relay VAR_PATH to children + process.env['VAR_PATH'] = config.get('var_path'); + + // allocate a compute cluster var cc = new computecluster({ module: path.join(__dirname, "..", "lib", "keysigner", "subprocess.js"), max_processes: config.get('max_compute_processes') diff --git a/lib/configuration.js b/lib/configuration.js index d24973ca4..d154c038b 100644 --- a/lib/configuration.js +++ b/lib/configuration.js @@ -213,6 +213,11 @@ if (process.env['MAX_COMPUTE_PROCESSES']) { g_config.max_compute_processes = parseInt(process.env['MAX_COMPUTE_PROCESSES']); } +// allow var_path to be specified in the environment +if (process.env['VAR_PATH']) { + g_config.var_path = process.env['VAR_PATH']; +} + // what host/port shall we bind to? g_config.bind_to = { host: process.env['IP_ADDRESS'] || process.env['HOST'] || "127.0.0.1", diff --git a/package.json b/package.json index c4f284eb9..e5c680168 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,7 @@ , "node-statsd": "https://github.com/mojodna/node-statsd/tarball/2584c08fad" , "connect-logger-statsd": "0.0.1" , "semver": "1.0.12" - , "compute-cluster": "0.0.2" + , "compute-cluster": "0.0.4" } , "scripts": { "postinstall": "./scripts/generate_ephemeral_keys.sh", -- GitLab