Repository: aurora Updated Branches: refs/heads/master 8256000d5 -> c8d4d1f34
Introduce a --ip option to Thermos observer This enables operators to bind the observer to a specific interface, just like it is possible for the Aurora scheduler and Mesos. Reviewed at https://reviews.apache.org/r/52834/ Project: http://git-wip-us.apache.org/repos/asf/aurora/repo Commit: http://git-wip-us.apache.org/repos/asf/aurora/commit/c8d4d1f3 Tree: http://git-wip-us.apache.org/repos/asf/aurora/tree/c8d4d1f3 Diff: http://git-wip-us.apache.org/repos/asf/aurora/diff/c8d4d1f3 Branch: refs/heads/master Commit: c8d4d1f342e29481bcfee56f3c5d4b7525aa9921 Parents: 8256000 Author: Stephan Erb <s...@apache.org> Authored: Fri Oct 14 23:00:03 2016 +0200 Committer: Stephan Erb <s...@apache.org> Committed: Fri Oct 14 23:00:03 2016 +0200 ---------------------------------------------------------------------- RELEASE-NOTES.md | 2 ++ examples/vagrant/upstart/aurora-thermos-observer.conf | 1 + src/main/python/apache/aurora/tools/thermos_observer.py | 10 +++++++++- src/test/sh/org/apache/aurora/e2e/test_end_to_end.sh | 6 +++--- 4 files changed, 15 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/aurora/blob/c8d4d1f3/RELEASE-NOTES.md ---------------------------------------------------------------------- diff --git a/RELEASE-NOTES.md b/RELEASE-NOTES.md index 03349b0..368f917 100644 --- a/RELEASE-NOTES.md +++ b/RELEASE-NOTES.md @@ -4,6 +4,8 @@ ### New/updated: - A task's tier is now mapped to a label on the Mesos `TaskInfo` proto. - The Aurora client is now using the Thrift binary protocol to communicate with the scheduler. +- Introduce a new `--ip` option to bind the Thermos observer to a specific rather than all + interfaces. ### Deprecations and removals: http://git-wip-us.apache.org/repos/asf/aurora/blob/c8d4d1f3/examples/vagrant/upstart/aurora-thermos-observer.conf ---------------------------------------------------------------------- diff --git a/examples/vagrant/upstart/aurora-thermos-observer.conf b/examples/vagrant/upstart/aurora-thermos-observer.conf index 9cda0ec..dfb93b8 100644 --- a/examples/vagrant/upstart/aurora-thermos-observer.conf +++ b/examples/vagrant/upstart/aurora-thermos-observer.conf @@ -16,6 +16,7 @@ respawn post-stop exec sleep 5 exec /home/vagrant/aurora/dist/thermos_observer.pex \ + --ip=192.168.33.7 \ --port=1338 \ --log_to_disk=NONE \ --log_to_stderr=google:INFO http://git-wip-us.apache.org/repos/asf/aurora/blob/c8d4d1f3/src/main/python/apache/aurora/tools/thermos_observer.py ---------------------------------------------------------------------- diff --git a/src/main/python/apache/aurora/tools/thermos_observer.py b/src/main/python/apache/aurora/tools/thermos_observer.py index 1a4fb55..0a07df7 100644 --- a/src/main/python/apache/aurora/tools/thermos_observer.py +++ b/src/main/python/apache/aurora/tools/thermos_observer.py @@ -34,6 +34,14 @@ app.add_option( app.add_option( + '--ip', + dest='ip', + type='string', + default='0.0.0.0', + help='The IP address the observer will bind to.') + + +app.add_option( '--port', dest='port', type='int', @@ -66,7 +74,7 @@ def main(_, options): observer.start() root_server = configure_server(observer) - thread = ExceptionalThread(target=lambda: root_server.run('0.0.0.0', options.port, 'cherrypy')) + thread = ExceptionalThread(target=lambda: root_server.run(options.ip, options.port, 'cherrypy')) thread.daemon = True thread.start() http://git-wip-us.apache.org/repos/asf/aurora/blob/c8d4d1f3/src/test/sh/org/apache/aurora/e2e/test_end_to_end.sh ---------------------------------------------------------------------- diff --git a/src/test/sh/org/apache/aurora/e2e/test_end_to_end.sh b/src/test/sh/org/apache/aurora/e2e/test_end_to_end.sh index c93be9b..67702d2 100755 --- a/src/test/sh/org/apache/aurora/e2e/test_end_to_end.sh +++ b/src/test/sh/org/apache/aurora/e2e/test_end_to_end.sh @@ -78,7 +78,7 @@ test_version() { } test_health_check() { - [[ $(_curl "localhost:8081/health") == 'OK' ]] + [[ $(_curl "$TEST_SLAVE_IP:8081/health") == 'OK' ]] } test_config() { @@ -117,7 +117,7 @@ test_scheduler_ui() { local _role=$1 _env=$2 _job=$3 # Check that scheduler UI pages shown - base_url="localhost:8081" + base_url="$TEST_SLAVE_IP:8081" check_url_live "$base_url/leaderhealth" check_url_live "$base_url/scheduler" check_url_live "$base_url/scheduler/$_role" @@ -128,7 +128,7 @@ test_observer_ui() { local _cluster=$1 _role=$2 _job=$3 # Check the observer page - observer_url="localhost:1338" + observer_url="$TEST_SLAVE_IP:1338" check_url_live "$observer_url" # Poll the observer, waiting for it to receive and show information about the task.