Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(12)

Unified Diff: testing/legion/client_controller.py

Issue 951673002: Revert "Pull chromium at 2c3ffb2355a27c32f45e508ef861416b820c823b" (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « testing/commit_queue/config.json ('k') | testing/legion/client_lib.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: testing/legion/client_controller.py
diff --git a/testing/legion/run_task.py b/testing/legion/client_controller.py
similarity index 61%
rename from testing/legion/run_task.py
rename to testing/legion/client_controller.py
index 6a55073551f98819af34bf095ca221089c3f4fc3..dd80c2948d073251603ea7113fec08b016494c91 100755
--- a/testing/legion/run_task.py
+++ b/testing/legion/client_controller.py
@@ -3,7 +3,11 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
-"""The main task entrypoint."""
+"""The main client_controller code.
+
+This code is the main entry point for the client machines and handles
+registering with the host server and running the local RPC server.
+"""
import argparse
import logging
@@ -12,32 +16,32 @@ import sys
import time
#pylint: disable=relative-import
+import client_rpc_server
import common_lib
-import rpc_server
def main():
print ' '.join(sys.argv)
common_lib.InitLogging()
- logging.info('Task starting')
+ logging.info('Client controller starting')
parser = argparse.ArgumentParser()
parser.add_argument('--otp',
help='One time token used to authenticate with the host')
- parser.add_argument('--controller',
- help='The ip address of the controller machine')
+ parser.add_argument('--host',
+ help='The ip address of the host')
parser.add_argument('--idle-timeout', type=int,
default=common_lib.DEFAULT_TIMEOUT_SECS,
help='The idle timeout for the rpc server in seconds')
args, _ = parser.parse_known_args()
logging.info(
- 'Registering with registration server at %s using OTP "%s"',
- args.controller, args.otp)
- server = common_lib.ConnectToServer(args.controller).RegisterTask(
+ 'Registering with discovery server at %s using OTP %s', args.host,
+ args.otp)
+ server = common_lib.ConnectToServer(args.host).RegisterClient(
args.otp, common_lib.MY_IP)
- server = rpc_server.RPCServer(args.controller, args.idle_timeout)
+ server = client_rpc_server.RPCServer(args.host, args.idle_timeout)
server.serve_forever()
return 0
« no previous file with comments | « testing/commit_queue/config.json ('k') | testing/legion/client_lib.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698