The goal of the shift was to verify the safety of lock losses when autorelock_failsafe is engaged.
The procedure was the following:
- restart the of the node ITF_STATUS and verify the new channels generated by the node (added by Diego in the last days):
- DQ_META_AUTORELOCK_ENABLED: 0 if autorelock not engaged; 1 if autorelock engaged.
- DQ_META_AUTORELOCK_DURATION: indicates how many seconds have passed since the start of current locking attempt.
- DQ_META_AUTORELOCK_RETRIES: indicates the retry number the machine is currently at.
- Test the autorelock in case the current locking attempt exceeds the max allowed duration set in the ini file. For this test we set: locked_state_index = 105, locked_state_sqz_index = 105, max_lock_retries = 1, max_trans_duration = 300, tf_lock_fallback_state = LOCKED_ARMS_IR. The aurorelock was activate during a lock acquisition, the current lock acquisition exceeded 300s and triggered the safe condition: ITF_STATUS asked to ITF_LOCK to go in LOCKED_ARMS_IR and stopped to try lock (see plot1).
- Test the autorelock in case the retry number of locking attemps exceeds max allowed number set in the ini file. For this test we set: locked_state_index = 105, locked_state_sqz_index = 105, max_lock_retries = 10, max_trans_duration = 2400, tf_lock_fallback_state = LOCKED_ARMS_IR. To generate the unlock we have modified the function LSC_ENABLE_tripped() in meta library to always return a False value. We collected 9 unlocks at LOCKING_CARM_MC_IR and one 'natural unlock'; the tenth unlocks triggered the safe condition: ITF_STATUS asked to ITF_LOCK to go in LOCKED_ARMS_IR and stopped the lock retries (see plot2).
- Test that the two counters are reset once reached the LOCKED status CARM_NULL_1F. For this test we set: locked_state_index = 105, locked_state_sqz_index = 105, max_lock_retries = 10, max_trans_duration = 2400, tf_lock_fallback_state = LOCKED_ARMS_IR. To generate the unlock during the lock acquisition we manually open the WE loop, then the ITF was relocked and the counters reset. (see plot3)
We accumulated also few unlock/relock while in the CARM_NULL_1F status and verified that the relock mechanism was correctly triggered.
During the preparation/performing of those tests we checked/fixed the folowings:
- A wrong indentation of the ezca['GRD-ITF_STATUS_REQUEST'] = 'LOCKED' statement in the LOCKING run() was preventing the correct state transition and the correct relock attempt counting
- We realized that every time an unlock occurred/was triggered the ITF_LOCK node (now managed by ITF_STATUS) was going into STALLED. To fix this we have added the @unstall_nodes(nodes) decorator in the LOCKED, NOT_LOCKED and LOCKING states (It should be probably added to all the rest of states just to stay on the safe side, to be discussed)