mdsplus
mdsplus copied to clipboard
TCL's `set current` command does not work in "thick-client" mode
Affiliation MIT PSFC
Version(s) Affected Current alpha
Platform Ubuntu 20 and Rocky 9.3
Describe the bug
When in "thick-client" mode, cannot change the "current shot" with TCL's set current
command.
To Reproduce
- Although mdsip operation typically involves two computers, this bug can also be reproduced with a single computer (VM, container). These steps are for a single computer.
- Configure the computer for mdsip operation.
- Make sure that
$MDSPLUS_DIR
has been set and thensource $MDSPLUS_DIR/setup.sh
. - Execute the following commands:
$ echo “stuff_path /tmp/stuff_trees” >> $MDSPLUS_DIR/local/envsyms
$
$ mkdir /tmp/stuff_trees
$ chmod 777 /tmp/stuff_trees
$
$ # Access will be “local”
$ export stuff_path=/tmp/stuff_trees
$
$ mdstcl
TCL> edit stuff/shot=-1 /new
TCL> add node num1/usage=numeric
TCL> dir
\STUFF::TOP
:NUM1
Total of 1 node.
TCL> write
TCL> close
TCL>
TCL> set current stuff 111
TCL> show current stuff
Current shot is 111
TCL>
TCL> quit
$
$ # Find the IP address for this computer (for illustration assume it is 1.2.3.4)
$ ip addr
$
$
$ # Access via thick-client
$ export stuff_path=1.2.3.4::
$
$ mdstcl
TCL> show current stuff
Current shot is 111
TCL>
TCL> set current stuff 222
Error: Unable to change current shot
Error message was: %TREE-E-FAILURE, Operation NOT successful
mdsdcl: --> failed on line 'set current stuff 222'
TCL>
Expected behavior
When using thick-client, TCL's set current
command should work (i.e., update the shotid.sys
file located in the tree's directory).
Screenshots n/a
Additional context This bug was found while investigating Issue #2684.
Hi @kgerickson,
Will you also need this fix for set current
with thick-client in the new stable release? And if so, should this be labeled as a U.S. Priority bug?
Now for the details . . .
On 11-Jan-2024, Issue #2684 (show current
with thick-client) was filed as a U.S. Priority bug. Eventually, it was determined that it is a duplicate bug and was fixed by PR #2418 on 15-Nov-2021. And although that PR was supposed to fix both "get/set" (i.e., show/set current
), it only fixed show current
.
The same fix is also needed for set current
with thick-client. So will be submitting a new PR to fix this issue in alpha.