Skip to content
Snippets Groups Projects
Commit 7f00beed authored by Lloyd Hilaiel's avatar Lloyd Hilaiel
Browse files

fix regression in keysigner - ensure non-default VAR_PATH is relayed to...

fix regression in keysigner - ensure non-default VAR_PATH is relayed to compute processes - issue #213
parent 58668a77
No related branches found
No related tags found
No related merge requests found
...@@ -84,8 +84,11 @@ app.use(function(req, resp, next) { ...@@ -84,8 +84,11 @@ app.use(function(req, resp, next) {
// parse POST bodies // parse POST bodies
app.use(express.bodyParser()); app.use(express.bodyParser());
// allocate a compute cluster
try { try {
// explicitly relay VAR_PATH to children
process.env['VAR_PATH'] = config.get('var_path');
// allocate a compute cluster
var cc = new computecluster({ var cc = new computecluster({
module: path.join(__dirname, "..", "lib", "keysigner", "subprocess.js"), module: path.join(__dirname, "..", "lib", "keysigner", "subprocess.js"),
max_processes: config.get('max_compute_processes') max_processes: config.get('max_compute_processes')
......
...@@ -213,6 +213,11 @@ if (process.env['MAX_COMPUTE_PROCESSES']) { ...@@ -213,6 +213,11 @@ if (process.env['MAX_COMPUTE_PROCESSES']) {
g_config.max_compute_processes = parseInt(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? // what host/port shall we bind to?
g_config.bind_to = { g_config.bind_to = {
host: process.env['IP_ADDRESS'] || process.env['HOST'] || "127.0.0.1", host: process.env['IP_ADDRESS'] || process.env['HOST'] || "127.0.0.1",
......
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
, "node-statsd": "https://github.com/mojodna/node-statsd/tarball/2584c08fad" , "node-statsd": "https://github.com/mojodna/node-statsd/tarball/2584c08fad"
, "connect-logger-statsd": "0.0.1" , "connect-logger-statsd": "0.0.1"
, "semver": "1.0.12" , "semver": "1.0.12"
, "compute-cluster": "0.0.2" , "compute-cluster": "0.0.4"
} }
, "scripts": { , "scripts": {
"postinstall": "./scripts/generate_ephemeral_keys.sh", "postinstall": "./scripts/generate_ephemeral_keys.sh",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment