On today shift we successfully ported the Virgo Automation (metatron) from python 2 to python 3.
For the purpose we followed those steps:
- backup the current (python2 based) automation user code (in /virgoDev/Automation/userapps) into: /data/archive/software/SWRepository/misc/Automation/userapps/
- convert all scripts in /virgoDev/Automation/userapps to python 3 using the 2to3 utility including Meta_library
- reach the best locking achievable state (LOCKED_ARMS_BEAT_DRMI_1F) and then bring ITF_LOCK to DOWN and stop all nodes
- attempt manually to restart few test nodes (INJ_MAIN, SUS_*) using the latest version of python3 metatron installed in the production area: /virgoApp/metatron
- make default command line metatron and metamedm executables point to python3 install, ex:
- metatron -> /virgoApp/metatron/v0r2p1/Linux-x86_64-CL7/bin/metatron-conda
- metamedm -> /virgoApp/metatron/v0r2p1/Linux-x86_64-CL7/bin/metamedm-conda
- and so updating also the VPM configuration (which use the default metatron command)
- For all automation nodes (one at a time)
- start the node from VPM
- Run the corresponding python3 medm interface to control the node from ICEwm menu
- Drive the node in the further achievable state in stand alone
- Once all nodes have been started with python3 attempt to put the ITF in the further achievable locking state
While working and discovering some problem we have cycled trough the procedure 8.1-8.4 few times until stabilizing on version v0r2p1. In particular:
- It was required that the python-ezca package was updated to include some extra conversions to python3.
- In addition the metatron package was updated to include the metamedm-conda executable and to also kill any ghost guardian processes.
- To get the medm client from the conda environment the epics-medm package was installed. The conda installation also installed the (LIGO) ezca package (which was required by the cdsutils package and must of been force removed before). But since we want to use the (VIRGO) ezca, the (LIGO) ezca was uninstalled along with cdsutils.
- There was a problem with sudden missing channels, which could be due to the virgoLog filling ongoing at that moment. Once the filling (due to core files flooding by MBTA processes) was solved the probem did not occurr anymore.
- It was also necessary to add guardlog into the InstallArea so the guardlog from conda would not be picked up.
At the end of the shift we leave all automation nodes running with python3 and the metamedm user interface pointing to the python3 version.
For full comparison, attached to this entry are the differences for all files into the userapp directory that have been introduced by our activities.
Activitiy and tests have started on the SQZ nodes at the end of our shift and will probably reported on a separate entry.
Further details:
- The python3 based version of metratron (as separate guardian/ezca branches) are in Gitlab:
- https://git.ligo.org/virgo/virgoapp/guardian-py3/-/tree/virgo
- https://git.ligo.org/virgo/virgoapp/python-ezca/-/tree/virgo
- This metatron version is taking all its dependencies from the cmt-conda standards environments inline with all the rest of python3 control application in Cascina (at the moment: /virgo/conda/envs/cmt-conda-py39-20220317)
- In order to ease the python3 porting, what has been done is a pure replica of the existing integration of guardian into the Virgo environment and DAQ. A planned future step (most probably for the O5 timeframe) is the development of a unified IGWN guardian/metatron (similarly to the current effort for the kafka python client).
3 comments
This morning I found that several metatron servers are using 100% of an olserver52 core :
PID TID PPID USER TT PSR %CPU NI PRI POL WCHAN VSZ SZ ELAPSED COMMAND
12349 12349 12343 virgod ? 18 99.8 0 19 TS - 2095956 523989 15:25:30 guardian ITF_LOCK /virgoDev/Automation/userapps/ITF_LOCK.py
12952 12952 12946 virgod ? 22 99.8 0 19 TS - 2095956 523989 15:25:25 guardian ITF_LOCK /virgoDev/Automation/userapps/ITF_LOCK.py
23872 23872 23866 virgod ? 21 99.9 0 19 TS - 2183412 545853 1-13:41:56 guardian SQZ_MAIN /virgoDev/Automation/userapps/SQZ_MAIN.py
34108 34108 34094 virgod ? 31 99.9 0 19 TS - 2183412 545853 1-12:47:26 guardian SQZ_MAIN /virgoDev/Automation/userapps/SQZ_MAIN.py
5854 5854 5845 virgod ? 25 99.9 0 19 TS - 2093132 523283 1-07:03:41 guardian SQZ_FLT /virgoDev/Automation/userapps/SQZ_FLT.py
Morevover it seems that there is more than one instance of the ITF_LOCK and SQZ_MAIN metatron servers. Below the ITF_LOCK case where there is 3 instances of the ITF_LOCK metatron server
PID TID PPID USER TT PSR %CPU NI PRI POL WCHAN VSZ SZ ELAPSED COMMAND
17222 17222 1 virgod ? 16 0.0 0 19 TS poll_s 28948 7237 1-14:15:22 /usr/bin/k5start -U -b -f /home/virgod/krb5keytab_virgod /virgo/InstallArea/Linux-x86_64-CL7/bin/metatron /virgoData/Automation/ITF_LOCK.cfg ITF_LOCK
17223 17223 17222 virgod ? 9 0.0 0 19 TS do_wai 113420 28355 1-14:15:22 bash /virgo/InstallArea/Linux-x86_64-CL7/bin/metatron /virgoData/Automation/ITF_LOCK.cfg ITF_LOCK
17966 17966 17223 virgod ? 27 0.0 0 19 TS do_wai 113300 28325 1-14:15:22 bash /virgoApp/metatron/v0r2p1/Linux-x86_64-CL7/bin/metatron /virgoData/Automation/ITF_LOCK.cfg ITF_LOCK
19151 19151 17966 virgod ? 22 3.5 0 19 TS poll_s 2104916 526229 1-14:15:20 guardian ITF_LOCK /virgoDev/Automation/userapps/ITF_LOCK.py
19151 19248 17966 virgod ? 24 0.0 0 19 TS futex_ 2104916 526229 1-14:15:16 guardian ITF_LOCK /virgoDev/Automation/userapps/ITF_LOCK.py
19250 19250 19151 virgod ? 18 1.3 1 18 TS futex_ 2602420 650605 1-14:15:16 guardian-worker ITF_LOCK /virgoDev/Automation/userapps/ITF_LOCK.py
19250 19261 19151 virgod ? 24 0.0 1 18 TS futex_ 2602420 650605 1-14:15:16 guardian-worker ITF_LOCK /virgoDev/Automation/userapps/ITF_LOCK.py
19250 19262 19151 virgod ? 29 0.2 1 18 TS futex_ 2602420 650605 1-14:15:16 guardian-worker ITF_LOCK /virgoDev/Automation/userapps/ITF_LOCK.py
19250 19269 19151 virgod ? 29 0.0 1 18 TS skb_wa 2602420 650605 1-14:15:15 guardian-worker ITF_LOCK /virgoDev/Automation/userapps/ITF_LOCK.py
19250 19272 19151 virgod ? 28 0.0 1 18 TS sk_wai 2602420 650605 1-14:15:15 guardian-worker ITF_LOCK /virgoDev/Automation/userapps/ITF_LOCK.py
19250 19273 19151 virgod ? 26 0.0 1 18 TS futex_ 2602420 650605 1-14:15:15 guardian-worker ITF_LOCK /virgoDev/Automation/userapps/ITF_LOCK.py
19250 19275 19151 virgod ? 20 0.0 1 18 TS sk_wai 2602420 650605 1-14:15:15 guardian-worker ITF_LOCK /virgoDev/Automation/userapps/ITF_LOCK.py
19250 19276 19151 virgod ? 20 0.0 1 18 TS futex_ 2602420 650605 1-14:15:15 guardian-worker ITF_LOCK /virgoDev/Automation/userapps/ITF_LOCK.py
19250 19277 19151 virgod ? 28 0.0 1 18 TS sk_wai 2602420 650605 1-14:15:14 guardian-worker ITF_LOCK /virgoDev/Automation/userapps/ITF_LOCK.py
19250 19278 19151 virgod ? 28 0.0 1 18 TS futex_ 2602420 650605 1-14:15:14 guardian-worker ITF_LOCK /virgoDev/Automation/userapps/ITF_LOCK.py
19250 19281 19151 virgod ? 22 0.0 1 18 TS sk_wai 2602420 650605 1-14:14:51 guardian-worker ITF_LOCK /virgoDev/Automation/userapps/ITF_LOCK.py
19250 19282 19151 virgod ? 29 0.0 1 18 TS futex_ 2602420 650605 1-14:14:51 guardian-worker ITF_LOCK /virgoDev/Automation/userapps/ITF_LOCK.py
11868 11868 1 virgod ? 2 0.0 0 19 TS poll_s 28948 7237 15:39:58 /usr/bin/k5start -U -b -f /home/virgod/krb5keytab_virgod /virgo/InstallArea/Linux-x86_64-CL7/bin/metatron /virgoData/Automation/ITF_LOCK.cfg ITF_LOCK
11869 11869 11868 virgod ? 9 0.0 0 19 TS do_wai 113420 28355 15:39:58 bash /virgo/InstallArea/Linux-x86_64-CL7/bin/metatron /virgoData/Automation/ITF_LOCK.cfg ITF_LOCK
12343 12343 11869 virgod ? 28 0.0 0 19 TS do_wai 113300 28325 15:39:57 bash /virgoApp/metatron/v0r2p1/Linux-x86_64-CL7/bin/metatron /virgoData/Automation/ITF_LOCK.cfg ITF_LOCK
12349 12349 12343 virgod ? 30 99.8 0 19 TS - 2095956 523989 15:39:55 guardian ITF_LOCK /virgoDev/Automation/userapps/ITF_LOCK.py
12349 12968 12343 virgod ? 21 0.0 0 19 TS futex_ 2095956 523989 15:39:48 guardian ITF_LOCK /virgoDev/Automation/userapps/ITF_LOCK.py
12471 12471 1 virgod ? 8 0.0 0 19 TS poll_s 28948 7237 15:39:53 /usr/bin/k5start -U -b -f /home/virgod/krb5keytab_virgod /virgo/InstallArea/Linux-x86_64-CL7/bin/metatron /virgoData/Automation/ITF_LOCK.cfg ITF_LOCK
12472 12472 12471 virgod ? 4 0.0 0 19 TS do_wai 113420 28355 15:39:53 bash /virgo/InstallArea/Linux-x86_64-CL7/bin/metatron /virgoData/Automation/ITF_LOCK.cfg ITF_LOCK
12946 12946 12472 virgod ? 27 0.0 0 19 TS do_wai 113300 28325 15:39:52 bash /virgoApp/metatron/v0r2p1/Linux-x86_64-CL7/bin/metatron /virgoData/Automation/ITF_LOCK.cfg ITF_LOCK
12952 12952 12946 virgod ? 28 99.8 0 19 TS - 2095956 523989 15:39:50 guardian ITF_LOCK /virgoDev/Automation/userapps/ITF_LOCK.py
12952 12974 12946 virgod ? 29 0.0 0 19 TS futex_ 2095956 523989 15:39:46 guardian ITF_LOCK /virgoDev/Automation/userapps/ITF_LOCK.py
12970 12970 12349 virgod ? 26 0.0 1 18 TS futex_ 2102308 525577 15:39:48 guardian-worker ITF_LOCK /virgoDev/Automation/userapps/ITF_LOCK.py
12976 12976 12952 virgod ? 28 0.0 1 18 TS futex_ 2102308 525577 15:39:46 guardian-worker ITF_LOCK /virgoDev/Automation/userapps/ITF_LOCK.py
The situation has to be improved by the experts
The quick fix in order to prevent this problem occurring again was to have the killing of automation node duplicated process (zombies) mechanism restored. The duplicated process were not being killed anymore because of a change in behavior of the command to stop processes (most likely introduced in the computing upgrade). This has been resolved by correcting the command to stop the process before starting a new node process. This required a new version of metatron v0r2p2 to be deployed, this was tested by stopping and restarting a low-impact Node (ITF_STATUS) selected by the operator along with further test to the GUI log, graph and edit.
A longer term investigation on restoring full proper stopping/restarting of automation nodes from VPM has been started.
This morning there is still one metatron server ITF_STATUS using 100% of one of the olserver52 cpus :
Tue Jul 12 07:32:01 CEST 2022
27273 27273 26542 virgod ? 25 0.0 0 19 TS do_wai 113300 28325 14:57:00 bash /virgoApp/metatron/v0r2p2/Linux-x86_64-CL7/bin/metatron /virgoData/Automation/ITF_STATUS.cfg ITF_STATUS
27583 27583 26817 virgod ? 30 0.0 0 19 TS do_wai 113304 28326 14:57:00 bash /virgoApp/metatron/v0r2p2/Linux-x86_64-CL7/bin/metatron /virgoData/Automation/ITF_STATUS.cfg ITF_STATUS
26542 26542 26541 virgod ? 14 0.0 0 19 TS do_wai 113420 28355 14:57:01 bash /virgo/InstallArea/Linux-x86_64-CL7/bin/metatron /virgoData/Automation/ITF_STATUS.cfg ITF_STATUS
26817 26817 26815 virgod ? 9 0.0 0 19 TS do_wai 113420 28355 14:57:01 bash /virgo/InstallArea/Linux-x86_64-CL7/bin/metatron /virgoData/Automation/ITF_STATUS.cfg ITF_STATUS
27593 27623 27583 virgod ? 31 0.0 0 19 TS futex_ 2104116 526029 14:56:54 guardian ITF_STATUS /virgoDev/Automation/userapps/ITF_STATUS.py
27592 27621 27273 virgod ? 23 0.0 0 19 TS futex_ 2104116 526029 14:56:55 guardian ITF_STATUS /virgoDev/Automation/userapps/ITF_STATUS.py
43538 43538 15909 virgod pts/4 43 0.0 0 19 TS pipe_w 112816 28204 00:00 grep --color=auto -E PID|ITF_STATUS
26541 26541 1 virgod ? 24 0.0 0 19 TS poll_s 28948 7237 14:57:01 /usr/bin/k5start -U -b -f /home/virgod/krb5keytab_virgod /virgo/InstallArea/Linux-x86_64-CL7/bin/metatron /virgoData/Automation/ITF_STATUS.cfg ITF_STATUS
26815 26815 1 virgod ? 22 0.0 0 19 TS poll_s 28948 7237 14:57:01 /usr/bin/k5start -U -b -f /home/virgod/krb5keytab_virgod /virgo/InstallArea/Linux-x86_64-CL7/bin/metatron /virgoData/Automation/ITF_STATUS.cfg ITF_STATUS
27627 27627 27592 virgod ? 30 0.0 1 18 TS futex_ 2106192 526548 14:56:54 guardian-worker ITF_STATUS /virgoDev/Automation/userapps/ITF_STATUS.py
27626 27639 27593 virgod ? 23 0.0 1 18 TS futex_ 2449616 612404 14:56:21 guardian-worker ITF_STATUS /virgoDev/Automation/userapps/ITF_STATUS.py
27626 27631 27593 virgod ? 18 0.0 1 18 TS futex_ 2449616 612404 14:56:53 guardian-worker ITF_STATUS /virgoDev/Automation/userapps/ITF_STATUS.py
27626 27635 27593 virgod ? 22 0.0 1 18 TS futex_ 2449616 612404 14:56:53 guardian-worker ITF_STATUS /virgoDev/Automation/userapps/ITF_STATUS.py
27626 27633 27593 virgod ? 25 0.0 1 18 TS skb_wa 2449616 612404 14:56:53 guardian-worker ITF_STATUS /virgoDev/Automation/userapps/ITF_STATUS.py
27626 27638 27593 virgod ? 26 0.0 1 18 TS sk_wai 2449616 612404 14:56:21 guardian-worker ITF_STATUS /virgoDev/Automation/userapps/ITF_STATUS.py
27626 27634 27593 virgod ? 28 0.0 1 18 TS sk_wai 2449616 612404 14:56:53 guardian-worker ITF_STATUS /virgoDev/Automation/userapps/ITF_STATUS.py
27626 27632 27593 virgod ? 19 0.2 1 18 TS futex_ 2449616 612404 14:56:53 guardian-worker ITF_STATUS /virgoDev/Automation/userapps/ITF_STATUS.py
27626 27626 27593 virgod ? 30 1.0 1 18 TS poll_s 2449616 612404 14:56:54 guardian-worker ITF_STATUS /virgoDev/Automation/userapps/ITF_STATUS.py
27593 27593 27583 virgod ? 28 2.9 0 19 TS poll_s 2104116 526029 14:56:58 guardian ITF_STATUS /virgoDev/Automation/userapps/ITF_STATUS.py
27592 27592 27273 virgod ? 22 99.9 0 19 TS - 2104116 526029 14:56:58 guardian ITF_STATUS /virgoDev/Automation/userapps/ITF_STATUS.py
PID TID PPID USER TT PSR %CPU NI PRI POL WCHAN VSZ SZ ELAPSED COMMAND
All the ITF_STATUS processes were stopped by hand and the ITF_STATUS Metatron server restarted from VPM