CLI

Features

  • Reports health, readiness, and business status
  • Controls execution throughout all phases: setup, pre-processing, start, status monitoring, stop, and post-processing

Healty

The health procedure consists of tools that give a clear assessment of the system’s capability to execute scenarios.

Liveness

./sbin/liveness.sh -a <disk_space_avail_threshold_in_kb> -u <disk_space_usage_threshold_in_percent>

The liveness test indicates whether the system has all the necessary tools properly set up.

Usage: liveness.sh -a <disk_space_avail_threshold_in_kb> -u <disk_space_usage_threshold_in_percent>
[root@SEA_01 sg-runner]# ./sbin/liveness.sh 
INFO: Checking disk space of file_system=/opt/sea/sg-runner/shared and threshold is 95%.
DEBUG: Current disk space usage is 82% for file_system=/opt/sea/sg-runner/shared
INFO: sg-runner disk space is sufficient.
INFO: Liveness check ret_ds_use=0 - disk space use for /opt/sea/sg-runner/shared is below 95%
INFO: Checking disk space available in Kb of files_system=/opt/sea/sg-runner/shared of sg-runner...
DEBUG: Current disk space available is 3316752 Kb for files_system=/opt/sea/sg-runner/shared
INFO: sg-runner disk space is sufficient.
INFO: Liveness check - disk space available return code: 0 should be more than 10240 Kb
INFO: Checking tool cmd=seagull -help exitCode=0 of sg-runner...
...
DEBUG: Tool command ec=0 response:
INFO: sg-runner tool seagull -help is working as expected.
INFO: Liveness check - sg-runner tool return code: 0
INFO: Checking tool cmd=yq --version exitCode=0 of sg-runner...
DEBUG: Tool command ec=0 response: yq 3.1.0
INFO: sg-runner tool yq --version is working as expected.
INFO: Liveness check - yq tool return code: 0
INFO: Checking tool cmd=realpath --version exitCode=0 of sg-runner...
DEBUG: Tool command ec=0 response: realpath (GNU coreutils) 8.30 Copyright (C) 2018 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Written by Padraig Brady.
INFO: sg-runner tool realpath --version is working as expected.
INFO: Liveness check - realpath tool return code: 0
INFO: Checking tool cmd=readlink --version exitCode=0 of sg-runner...
DEBUG: Tool command ec=0 response: readlink (GNU coreutils) 8.30 Copyright (C) 2018 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Written by Dmitry V. Levin.
INFO: sg-runner tool readlink --version is working as expected.
INFO: Liveness check - readlink tool return code: 0
INFO: LIVENESS CHECK PASSED - sg-runner is healthy
[root@SEA_01 sg-runner]# 
Readiness

./sbin/readyness.sh

It indicates whether SG-Runner is ready for a new test execution, whether there is sufficient space, and if any tests are currently running.

[root@SEA_01 sg-runner]# ./sbin/readiness.sh
INFO: Checking disk space of file_system=/opt/sea/sg-runner/shared and threshold is 97%.
DEBUG: Current disk space usage is 82% for file_system=/opt/sea/sg-runner/shared
INFO: sg-runner disk space is sufficient.
INFO: Readiness check - - disk space use return code: 0 for /opt/sea/sg-runner/shared is below 97%
INFO: Checking disk space available in Kb of files_system=/opt/sea/sg-runner/shared of sg-runner...
DEBUG: Current disk space available is 3307872 Kb for files_system=/opt/sea/sg-runner/shared
INFO: sg-runner disk space is sufficient.
INFO: Readiness check - disk space available return code: 0 should be more than 10240 Kb
INFO: Checking is not process_name=seagull of sg-runner running...
INFO: sg-runner process seagull is not running.
INFO: Readiness check - is_not_process seagull return code: 0
INFO: Checking is not process_name=mixer.pl of sg-runner running...
INFO: sg-runner process mixer.pl is not running.
INFO: Readiness check - is_not_process mixer.pl return code: 0
INFO: Checking is not process_name=gplot of sg-runner running...
INFO: sg-runner process gplot is not running.
INFO: Readiness check - is_not_process gplot return code: 0
INFO: READINESS CHECK PASSED - sg-runner processes are running
[root@SEA_01 sg-runner]# 
Bussiness

./sbin/business.sh

Indicates whether any tests are still running.

[root@SEA_01 sg-runner]# ./sbin/readiness.sh
INFO: Checking disk space of file_system=/opt/sea/sg-runner/shared and threshold is 97%.
DEBUG: Current disk space usage is 82% for file_system=/opt/sea/sg-runner/shared
INFO: sg-runner disk space is sufficient.
INFO: Readiness check - - disk space use return code: 0 for /opt/sea/sg-runner/shared is below 97%
INFO: Checking disk space available in Kb of files_system=/opt/sea/sg-runner/shared of sg-runner...
DEBUG: Current disk space available is 3307872 Kb for files_system=/opt/sea/sg-runner/shared
INFO: sg-runner disk space is sufficient.
INFO: Readiness check - disk space available return code: 0 should be more than 10240 Kb
INFO: Checking is not process_name=seagull of sg-runner running...
INFO: sg-runner process seagull is not running.
INFO: Readiness check - is_not_process seagull return code: 0
INFO: Checking is not process_name=mixer.pl of sg-runner running...
INFO: sg-runner process mixer.pl is not running.
INFO: Readiness check - is_not_process mixer.pl return code: 0
INFO: Checking is not process_name=gplot of sg-runner running...
INFO: sg-runner process gplot is not running.
INFO: Readiness check - is_not_process gplot return code: 0
INFO: READINESS CHECK PASSED - sg-runner processes are running
[root@SEA_01 sg-runner]# ./sbin/business.sh 
INFO: Checking is process_name=seagull of sg-runner running ...
ERROR: sg-runner process seagull is not running.
INFO: Busniness check - is_process seagull return code: 1
INFO: Checking is process_name=mixer.pl of sg-runner running ...
ERROR: sg-runner process mixer.pl is not running.
INFO: Busniness check - is_process mixer.pl return code: 1
INFO: Checking is process_name=gplot of sg-runner running ...
ERROR: sg-runner process gplot is not running.
INFO: Busniness check - is_process gplot return code: 1
INFO: BUSINESS CHECK PASSED - sg-runner processes are running
[root@SEA_01 sg-runner]# 

Procedures

More details are available at Procedures

Setup

./sbin/setup.sh

INFO: Test -setup started /opt/sea/sg-runner
-----------------------------------------------------------------
 
    Usage: setup.sh [-e ENV] -t TESTNAME -s SCENARIO [-d] [-p] [-b] [-v] [-h]
 
      -h  show this help message and exit
      -e  test enviroment
      -t  test name
      -s  scenario name
      -b  backup test directory
      -d  debug test tool
      -p  packet capturing
      -v  increase the verbosity of the bash script
Pre-Processing

pre_proc.sh

Start

start.sh

Status

status.sh

Stop

stop.sh

Post-Processing

post_proc.sh