10gen / mongo-orchestration

Apache License 2.0
7 stars 11 forks source link

Look for "configurations" directory in MONGO_ORCHESTRATION_HOME. #86

Closed llvtt closed 10 years ago

llvtt commented 10 years ago

Addresses #83.

Changes:

behackett commented 10 years ago

Looks OK to me, assuming @gjmurakami-10gen is happy.

gjmurakami-10gen commented 10 years ago

In server.py, if MONGO_ORCHESTRATION_HOME is not set, can we set it to work_dir, so that we can always look up the configurations via a full path and not be affected by any chdir?

llvtt commented 10 years ago

@gjmurakami-10gen MONGO_ORCHESTRATION_HOME is now set to work_dir on startup, if unset.

gjmurakami-10gen commented 10 years ago

The above plus the following works for me. An alternative would be a global workdir, we'd probably need to have an appropriate global for tests which don't use server.py.

diff --git a/server.py b/server.py index de7dcd4..c2a9e39 100644 --- a/server.py +++ b/server.py @@ -15,6 +15,9 @@ work_dir = os.path.split(os.path.join(os.getcwd(), file))[0] pid_file = os.path.join(work_dir, 'server.pid') log_file = os.path.join(work_dir, 'server.log')

+if not os.environ.get("MONGO_ORCHESTRATION_HOME"):

gjmurakami-10gen commented 10 years ago

LGTM

llvtt commented 10 years ago

merged manually in a5eb4876921e21c0cfee14f3d02b9fa2fb21129a and 126a0e79cc2d5a9e7422a05e7b3037dfa64f12b6 due to merge conflicts.