Merge pull request #33 from xujyan/jyx/cleanups

Some cleanups.
diff --git a/mysos/executor/executor.py b/mysos/executor/executor.py
index 8019c40..1ffbb51 100644
--- a/mysos/executor/executor.py
+++ b/mysos/executor/executor.py
@@ -1,4 +1,5 @@
 import json
+import traceback
 
 from mysos.common.decorators import logged
 
@@ -77,6 +78,7 @@
       self._send_update(task.task_id.value, mesos_pb2.TASK_FAILED)
     except Exception as e:
       log.error("Error occurred while executing the task: %s" % e)
+      log.error(traceback.format_exc())
       # Send TASK_LOST for unknown errors.
       self._send_update(task.task_id.value, mesos_pb2.TASK_LOST)
 
diff --git a/mysos/scheduler/scheduler.py b/mysos/scheduler/scheduler.py
index b3f0139..8c1e36d 100644
--- a/mysos/scheduler/scheduler.py
+++ b/mysos/scheduler/scheduler.py
@@ -3,6 +3,7 @@
 import posixpath
 import random
 import threading
+import traceback
 import sys
 
 from mysos.common.cluster import get_cluster_path
@@ -240,6 +241,7 @@
       self._recover()
     except Exception as e:
       log.error("Stopping scheduler because: %s" % e)
+      log.error(traceback.format_exc())
       self._stop()
       return
 
diff --git a/vagrant/bin/mysos_executor.sh b/vagrant/bin/mysos_executor.sh
index 474cd0e..132fb97 100755
--- a/vagrant/bin/mysos_executor.sh
+++ b/vagrant/bin/mysos_executor.sh
@@ -9,8 +9,9 @@
 
 # 'protobuf' is a a dependency of mesos.interface's but we install it separately because otherwise
 # 3.0.0-alpha is installed and it breaks the mesos.interface install.
-venv/bin/python venv/bin/pip install 'protobuf==2.6.1'
-venv/bin/python venv/bin/pip install --find-links /home/vagrant/mysos/deps mesos.native
-venv/bin/python venv/bin/pip install --pre --find-links . mysos[executor]
+venv/bin/python venv/bin/pip install --find-links /home/vagrant/mysos/deps \
+    'protobuf==2.6.1' mesos.native
+venv/bin/python venv/bin/pip install --pre --find-links /home/vagrant/mysos/deps --find-links . \
+    mysos[executor]
 
 venv/bin/python venv/bin/vagrant_mysos_executor
diff --git a/vagrant/bin/mysos_scheduler.sh b/vagrant/bin/mysos_scheduler.sh
index c050591..500dc66 100755
--- a/vagrant/bin/mysos_scheduler.sh
+++ b/vagrant/bin/mysos_scheduler.sh
@@ -8,9 +8,9 @@
 
 # 'protobuf' is a dependency of mesos.interface's but we install it separately because otherwise
 # 3.0.0-alpha is installed and it breaks the mesos.interface install.
-$TMPDIR/bin/pip install 'protobuf==2.6.1'
-$TMPDIR/bin/pip install --find-links /home/vagrant/mysos/deps mesos.native
-$TMPDIR/bin/pip install --pre --find-links /home/vagrant/mysos/dist mysos[scheduler]
+$TMPDIR/bin/pip install --find-links /home/vagrant/mysos/deps 'protobuf==2.6.1' mesos.native
+$TMPDIR/bin/pip install --pre --find-links /home/vagrant/mysos/dist \
+    --find-links /home/vagrant/mysos/deps mysos[scheduler]
 
 ZK_HOST=192.168.33.17
 API_PORT=55001