STF daemon: add message error if server is already running by current user.
authorYaroslav Brustinov <[email protected]>
Mon, 20 Feb 2017 14:01:59 +0000 (16:01 +0200)
committerYaroslav Brustinov <[email protected]>
Mon, 20 Feb 2017 14:01:59 +0000 (16:01 +0200)
Change-Id: I35400a64d976ce690d298d560dce2ae2254bfb6b
Signed-off-by: Yaroslav Brustinov <[email protected]>
scripts/automation/trex_control_plane/server/trex_server.py

index 8abd883..60febc6 100755 (executable)
@@ -334,9 +334,10 @@ class CTRexServer(object):
                     logger.info("TRex is reserved to another user ({res_user}). Only that user is allowed to initiate new runs.".format(res_user = self.__reservation['user']))
                     return Fault(-33, "TRex is reserved to another user ({res_user}). Only that user is allowed to initiate new runs.".format(res_user = self.__reservation['user']))  # raise at client TRexRequestDenied
             elif self.trex.get_status() != TRexStatus.Idle:
-                logger.info("TRex is already taken, cannot create another run until done.")
-                return Fault(-13, '')  # raise at client TRexInUseError
-            
+                err = 'TRex is already taken, cannot create another run until done.'
+                logger.info(err)
+                return Fault(-13, err) # raise at client TRexInUseError
+
             try:
                 server_cmd_data = self.generate_run_cmd(stateless = stateless, debug_image = debug_image, trex_args = trex_args, **trex_cmd_options)
                 self.zmq_monitor.first_dump = True