Fix Issue #2148: loadups fail on WSL1 with Xvnc server errors - fixed by adding new flag to medley script, use this flag in loadup script (#2163)
* Fix Issue #2155 (loadup -f -b -x fails can't find full.sysout). Reordered loadup so that the sysouts are copied to loadups before loadup-aux and loadup-db are run, and that the product of loadup-aux are copied to loadups before loadup-db is run -- all to make sure that the right prerequisites are available in loadups when needed. Also forced a run of loadup-aux if full.sysout is newer than exports.all when -db is specified. * Fix Issue 2148 - loadups fail on WSL1 with Xvnc server error. Root cause of 2148 is that certain Medley sessions in loadups run very quickly - less that a second or 2. This causes the medley script to improperly detect an Xvnc server error. Fixed by adding a cli flag --automation that forces the medley script to skip the check for Xvnc server errors. Changed loadup script to call medley with this flag set. Also add a cl flag to loadup --forcevnc that forces loadup to use vnc even on WSL2. This is intended for testing purposes only.
This commit is contained in:
@@ -284,6 +284,15 @@ environment variable LDEREPEATCM.</p>
|
|||||||
<p>On Windows/Cygwin installations, <em>FILE</em> is specified in the
|
<p>On Windows/Cygwin installations, <em>FILE</em> is specified in the
|
||||||
Medley file system, not the host Windows file system.</p>
|
Medley file system, not the host Windows file system.</p>
|
||||||
</dd>
|
</dd>
|
||||||
|
<dt>-am, –automation</dt>
|
||||||
|
<dd>
|
||||||
|
<p>Useful only when using –vnc (and always on WSL1). When calling medley
|
||||||
|
as part of an automation script, often Medley will run for a very short
|
||||||
|
time (< a couple of seconds). This can cause issues with medley code
|
||||||
|
that detects Xvnc server failures. Setting this flag notifies Medley
|
||||||
|
that very short Medley sessions are possible and the Xvnc error
|
||||||
|
detection needs to be adjusted accordingly.</p>
|
||||||
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
<h2>Other Options</h2>
|
<h2>Other Options</h2>
|
||||||
<dl>
|
<dl>
|
||||||
|
|||||||
@@ -386,6 +386,15 @@ environment variable LDEREPEATCM.
|
|||||||
On Windows/Cygwin installations, \f[I]FILE\f[R] is specified in the
|
On Windows/Cygwin installations, \f[I]FILE\f[R] is specified in the
|
||||||
Medley file system, not the host Windows file system.
|
Medley file system, not the host Windows file system.
|
||||||
.RE
|
.RE
|
||||||
|
.TP
|
||||||
|
-am, \[en]automation
|
||||||
|
Useful only when using \[en]vnc (and always on WSL1).
|
||||||
|
When calling medley as part of an automation script, often Medley will
|
||||||
|
run for a very short time (< a couple of seconds).
|
||||||
|
This can cause issues with medley code that detects Xvnc server
|
||||||
|
failures.
|
||||||
|
Setting this flag notifies Medley that very short Medley sessions are
|
||||||
|
possible and the Xvnc error detection needs to be adjusted accordingly.
|
||||||
.SS Other Options
|
.SS Other Options
|
||||||
.PP
|
.PP
|
||||||
\
|
\
|
||||||
|
|||||||
Binary file not shown.
@@ -216,7 +216,7 @@ specified in the Medley file system, not the host Windows file system.
|
|||||||
If the given value is "-", Medley will start up without using REM.CM file.
|
If the given value is "-", Medley will start up without using REM.CM file.
|
||||||
|
|
||||||
There is no default Medley REM.CM file.
|
There is no default Medley REM.CM file.
|
||||||
|
|
||||||
On Windows/Cygwin installations, *FILE* is
|
On Windows/Cygwin installations, *FILE* is
|
||||||
specified in the Medley file system, not the host Windows file system.
|
specified in the Medley file system, not the host Windows file system.
|
||||||
|
|
||||||
@@ -254,10 +254,15 @@ for the parameter will be reset to the default value - which in the case of *Hos
|
|||||||
|
|
||||||
-cc \[*FILE* | -], \-\-repeat \[*FILE* | -]
|
-cc \[*FILE* | -], \-\-repeat \[*FILE* | -]
|
||||||
: Run Medley once. And then as long as *FILE* exists and is greater then zero length, repeatedly run Medley using *FILE* as the REM.CM file that Medley reads and executes at startup. Each run of Medley can change the contents of *FILE* to effect the subsequent run of Medley. To end the cycle, Medley needs to delete *FILE*. WIthin Medley, *FILE* can be found as the value of the environment variable LDEREPEATCM.
|
: Run Medley once. And then as long as *FILE* exists and is greater then zero length, repeatedly run Medley using *FILE* as the REM.CM file that Medley reads and executes at startup. Each run of Medley can change the contents of *FILE* to effect the subsequent run of Medley. To end the cycle, Medley needs to delete *FILE*. WIthin Medley, *FILE* can be found as the value of the environment variable LDEREPEATCM.
|
||||||
|
|
||||||
On Windows/Cygwin installations, *FILE* is
|
On Windows/Cygwin installations, *FILE* is
|
||||||
specified in the Medley file system, not the host Windows file system.
|
specified in the Medley file system, not the host Windows file system.
|
||||||
|
|
||||||
|
-am, --automation
|
||||||
|
: Useful only when using --vnc (and always on WSL1). When calling medley as part of an automation script, often Medley
|
||||||
|
will run for a very short time (< a couple of seconds). This can cause issues with medley code that detects Xvnc server failures.
|
||||||
|
Setting this flag notifies Medley that very short Medley sessions are possible and the Xvnc error detection needs to be adjusted accordingly.
|
||||||
|
|
||||||
|
|
||||||
Other Options
|
Other Options
|
||||||
-------------
|
-------------
|
||||||
|
|||||||
@@ -157,6 +157,11 @@ main() {
|
|||||||
# internal
|
# internal
|
||||||
noendmsg=true
|
noendmsg=true
|
||||||
;;
|
;;
|
||||||
|
--forcevnc)
|
||||||
|
# internal - for testing
|
||||||
|
# WSL only -otherwise warning msg from medley
|
||||||
|
force_vnc="+"
|
||||||
|
;;
|
||||||
-z | -man | --man )
|
-z | -man | --man )
|
||||||
if [ "$(uname)" = "Darwin" ]
|
if [ "$(uname)" = "Darwin" ]
|
||||||
then
|
then
|
||||||
|
|||||||
@@ -161,6 +161,7 @@ loadup_finish () {
|
|||||||
exit ${exit_code}
|
exit ${exit_code}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
force_vnc="-"
|
||||||
run_medley () {
|
run_medley () {
|
||||||
/bin/sh "${MEDLEYDIR}/scripts/medley/medley.command" \
|
/bin/sh "${MEDLEYDIR}/scripts/medley/medley.command" \
|
||||||
--config - \
|
--config - \
|
||||||
@@ -171,6 +172,8 @@ run_medley () {
|
|||||||
--rem.cm "${cmfile}" \
|
--rem.cm "${cmfile}" \
|
||||||
--greet "${initfile}" \
|
--greet "${initfile}" \
|
||||||
--sysout "$1" \
|
--sysout "$1" \
|
||||||
|
--automation \
|
||||||
|
--vnc "${force_vnc}" \
|
||||||
"$2" "$3" "$4" "$5" "$6" "$7" ;
|
"$2" "$3" "$4" "$5" "$6" "$7" ;
|
||||||
exit_code=$?
|
exit_code=$?
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -586,6 +586,8 @@ flags:
|
|||||||
|
|
||||||
-x - | --logindir - : use MEDLEYDIR/logindir as LOGINDIR in Medley
|
-x - | --logindir - : use MEDLEYDIR/logindir as LOGINDIR in Medley
|
||||||
|
|
||||||
|
-am | --automation : this call to medley is being used in automation, adjust timings. Relevant in -vnc case only.
|
||||||
|
|
||||||
-cm FILE | --rem.cm FILE : use FILE as the REM.CM when starting up Medley. FILE must be absolute pathname.
|
-cm FILE | --rem.cm FILE : use FILE as the REM.CM when starting up Medley. FILE must be absolute pathname.
|
||||||
|
|
||||||
-cm - | --rem.cm - : do not use an REM.CM. Negate any prior setting, e.g., from config file.
|
-cm - | --rem.cm - : do not use an REM.CM. Negate any prior setting, e.g., from config file.
|
||||||
@@ -638,6 +640,7 @@ pixelscale_arg=""
|
|||||||
borderwidth_arg=""
|
borderwidth_arg=""
|
||||||
remcm_arg="${LDEREMCM}"
|
remcm_arg="${LDEREMCM}"
|
||||||
repeat_cm=""
|
repeat_cm=""
|
||||||
|
automation=false
|
||||||
|
|
||||||
# Add marker at end of args so we can accumulate pass-on args in args array
|
# Add marker at end of args so we can accumulate pass-on args in args array
|
||||||
set -- "$@" "--start_of_pass_args"
|
set -- "$@" "--start_of_pass_args"
|
||||||
@@ -915,6 +918,9 @@ do
|
|||||||
fi
|
fi
|
||||||
exit 0
|
exit 0
|
||||||
;;
|
;;
|
||||||
|
-am | --automation)
|
||||||
|
automation=true
|
||||||
|
;;
|
||||||
-nf | -NF | --nofork)
|
-nf | -NF | --nofork)
|
||||||
# for use in loadups
|
# for use in loadups
|
||||||
case $2 in
|
case $2 in
|
||||||
@@ -1702,7 +1708,7 @@ do
|
|||||||
"$(ip_addr)":"${VNC_PORT}" \
|
"$(ip_addr)":"${VNC_PORT}" \
|
||||||
>>"${LOG}" 2>&1 &
|
>>"${LOG}" 2>&1 &
|
||||||
wait $!
|
wait $!
|
||||||
if [ $(( $(date +%s) - start_time )) -lt 5 ]
|
if [ "${automation}" = false ] && [ $(( $(date +%s) - start_time )) -lt 5 ]
|
||||||
then
|
then
|
||||||
if [ -z "$(pgrep -f "Xvnc ${DISPLAY}")" ]
|
if [ -z "$(pgrep -f "Xvnc ${DISPLAY}")" ]
|
||||||
then
|
then
|
||||||
|
|||||||
@@ -48,6 +48,7 @@ pixelscale_arg=""
|
|||||||
borderwidth_arg=""
|
borderwidth_arg=""
|
||||||
remcm_arg="${LDEREMCM}"
|
remcm_arg="${LDEREMCM}"
|
||||||
repeat_cm=""
|
repeat_cm=""
|
||||||
|
automation=false
|
||||||
|
|
||||||
# Add marker at end of args so we can accumulate pass-on args in args array
|
# Add marker at end of args so we can accumulate pass-on args in args array
|
||||||
set -- "$@" "--start_of_pass_args"
|
set -- "$@" "--start_of_pass_args"
|
||||||
@@ -325,6 +326,9 @@ do
|
|||||||
fi
|
fi
|
||||||
exit 0
|
exit 0
|
||||||
;;
|
;;
|
||||||
|
-am | --automation)
|
||||||
|
automation=true
|
||||||
|
;;
|
||||||
-nf | -NF | --nofork)
|
-nf | -NF | --nofork)
|
||||||
# for use in loadups
|
# for use in loadups
|
||||||
case $2 in
|
case $2 in
|
||||||
|
|||||||
@@ -115,6 +115,8 @@ flags:
|
|||||||
|
|
||||||
-x - | --logindir - : use MEDLEYDIR/logindir as LOGINDIR in Medley
|
-x - | --logindir - : use MEDLEYDIR/logindir as LOGINDIR in Medley
|
||||||
|
|
||||||
|
-am | --automation : this call to medley is being used in automation, adjust timings. Relevant in -vnc case only.
|
||||||
|
|
||||||
-cm FILE | --rem.cm FILE : use FILE as the REM.CM when starting up Medley. FILE must be absolute pathname.
|
-cm FILE | --rem.cm FILE : use FILE as the REM.CM when starting up Medley. FILE must be absolute pathname.
|
||||||
|
|
||||||
-cm - | --rem.cm - : do not use an REM.CM. Negate any prior setting, e.g., from config file.
|
-cm - | --rem.cm - : do not use an REM.CM. Negate any prior setting, e.g., from config file.
|
||||||
|
|||||||
@@ -215,7 +215,7 @@
|
|||||||
"$(ip_addr)":"${VNC_PORT}" \
|
"$(ip_addr)":"${VNC_PORT}" \
|
||||||
>>"${LOG}" 2>&1 &
|
>>"${LOG}" 2>&1 &
|
||||||
wait $!
|
wait $!
|
||||||
if [ $(( $(date +%s) - start_time )) -lt 5 ]
|
if [ "${automation}" = false ] && [ $(( $(date +%s) - start_time )) -lt 5 ]
|
||||||
then
|
then
|
||||||
if [ -z "$(pgrep -f "Xvnc ${DISPLAY}")" ]
|
if [ -z "$(pgrep -f "Xvnc ${DISPLAY}")" ]
|
||||||
then
|
then
|
||||||
|
|||||||
Reference in New Issue
Block a user