Skip to content

Commit 4fe6b36

Browse files
Jenkinsopenstack-gerrit
authored andcommitted
Merge "Update comments to reflect current USE_SCREEN usage"
2 parents 0ab9da1 + 9329290 commit 4fe6b36

2 files changed

Lines changed: 5 additions & 7 deletions

File tree

functions-common

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1352,6 +1352,7 @@ function is_running {
13521352
# If the command includes shell metachatacters (;<>*) it must be run using a shell
13531353
# If an optional group is provided sg will be used to run the
13541354
# command as that group.
1355+
# Uses globals ``USE_SCREEN``
13551356
# run_process service "command-line" [group]
13561357
function run_process {
13571358
local service=$1
@@ -1370,7 +1371,7 @@ function run_process {
13701371

13711372
# Helper to launch a process in a named screen
13721373
# Uses globals ``CURRENT_LOG_TIME``, ```LOGDIR``, ``SCREEN_LOGDIR``, `SCREEN_NAME``,
1373-
# ``SERVICE_DIR``, ``USE_SCREEN``, ``SCREEN_IS_LOGGING``
1374+
# ``SERVICE_DIR``, ``SCREEN_IS_LOGGING``
13741375
# screen_process name "command-line" [group]
13751376
# Run a command in a shell in a screen window, if an optional group
13761377
# is provided, use sg to set the group of the command.
@@ -1381,7 +1382,6 @@ function screen_process {
13811382

13821383
SCREEN_NAME=${SCREEN_NAME:-stack}
13831384
SERVICE_DIR=${SERVICE_DIR:-${DEST}/status}
1384-
USE_SCREEN=$(trueorfalse True USE_SCREEN)
13851385

13861386
screen -S $SCREEN_NAME -X screen -t $name
13871387

@@ -1465,14 +1465,13 @@ function screen_rc {
14651465
# If a PID is available use it, kill the whole process group via TERM
14661466
# If screen is being used kill the screen window; this will catch processes
14671467
# that did not leave a PID behind
1468-
# Uses globals ``SCREEN_NAME``, ``SERVICE_DIR``, ``USE_SCREEN``
1468+
# Uses globals ``SCREEN_NAME``, ``SERVICE_DIR``
14691469
# screen_stop_service service
14701470
function screen_stop_service {
14711471
local service=$1
14721472

14731473
SCREEN_NAME=${SCREEN_NAME:-stack}
14741474
SERVICE_DIR=${SERVICE_DIR:-${DEST}/status}
1475-
USE_SCREEN=$(trueorfalse True USE_SCREEN)
14761475

14771476
if is_service_enabled $service; then
14781477
# Clean up the screen window
@@ -1490,7 +1489,6 @@ function stop_process {
14901489
local service=$1
14911490

14921491
SERVICE_DIR=${SERVICE_DIR:-${DEST}/status}
1493-
USE_SCREEN=$(trueorfalse True USE_SCREEN)
14941492

14951493
if is_service_enabled $service; then
14961494
# Kill via pid if we have one available
@@ -1552,11 +1550,11 @@ function service_check {
15521550
}
15531551

15541552
# Tail a log file in a screen if USE_SCREEN is true.
1553+
# Uses globals ``USE_SCREEN``
15551554
function tail_log {
15561555
local name=$1
15571556
local logfile=$2
15581557

1559-
USE_SCREEN=$(trueorfalse True USE_SCREEN)
15601558
if [[ "$USE_SCREEN" = "True" ]]; then
15611559
screen_process "$name" "sudo tail -f $logfile"
15621560
fi

stackrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ HORIZON_APACHE_ROOT="/dashboard"
101101
# ctrl-c, up-arrow, enter to restart the service. Starting services
102102
# this way is slightly unreliable, and a bit slower, so this can
103103
# be disabled for automated testing by setting this value to False.
104-
USE_SCREEN=True
104+
USE_SCREEN=$(trueorfalse True USE_SCREEN)
105105

106106
# When using screen, should we keep a log file on disk? You might
107107
# want this False if you have a long-running setup where verbose logs

0 commit comments

Comments
 (0)