pcdshub / pcdsdaq

Utilities for using the DAQ's pydaq, pycdb, and pyami libraries in conjunction with Bluesky
https://pcdshub.github.io/pcdsdaq
Other
0 stars 9 forks source link

Get ami proxy fails #70

Closed ZLLentz closed 4 years ago

ZLLentz commented 4 years ago

https://github.com/pcdshub/pcdsdaq/blob/48ff9c4302e65c7c0a2f314da3bba94ec361c1ec/pcdsdaq/ext_scripts.py#L48-L65

The format of the config files has changed, so this script no longer works

ZLLentz commented 4 years ago

Output of the script at xcs:

/reg/g/pcds/dist/pds/tools/procmgr/procmgr: using config file 'p0.cnf.last'
Not running, last started on host xcs-daq by user xcsopr.
Warning! If current host xcs-control is not on the same subnets as start host xcs-daq, status could be incorrect.
Host          UniqueID     Status     PID    PORT   Command+Args
daq-xcs-mon01 ami_proxy    NOCONNECT  -      29015  /reg/neh/home4/ddamiani/Workarea/daq/ami-dev/build/ami/bin/x86_64-rhel7-opt/ami_proxy -I daq-xcs-mon01 -i daq-xcs-mon01 -s 239.255.35.0
ZLLentz commented 4 years ago

Related parseable lines from the cnf file:

ami_group_base  = '239.255.35'
ami_group_top = ami_group_base+'.0'
ZLLentz commented 4 years ago

Will attempt to resolve using a simpler regex, rather than a very specific one: ami_proxy.*-s\s+(?P<ip>\d+\.\d+\.\d+\.\d+)

ZLLentz commented 4 years ago

Old output according to the test suite here:

/reg/g/pcds/dist/pds/tools/procmgr/procmgr: using config file '/reg/g/pcds/dist/pds/xpp/scripts/p1.cnf.last'
Running, started on host xpp-daq by user xppopr.
Warning! If current host xpp-control is not on the same subnets as start host xpp-daq, status could be incorrect.
Host          UniqueID     Status     PID    PORT   Command+Args
172.21.22.64  ami_proxy    RUNNING    7145   29118  /reg/g/pcds/dist/pds/ami-8.8.14-p8.9.0/build/ami/bin/x86_64-rhel7-opt/ami_proxy -I 172.21.38.64 -i 172.21.22.64 -s 239.255.35.1

And according to the test, the correct ip was 172.21.38.64

ZLLentz commented 4 years ago

The new correct regex may instead be: ami_proxy.+-I\s+(?P<proxy>\S+)\s We're given a hostname now instead of an IP