VOL-2514: Clean up mib download task under load
- under load mib download task is falsely tried again
seemingly due to exception handling. simplify a bit
now that most work has been removed from this task
- also strobe watchdog after successful omci_cc call
- do not start pm/test jobs until mib is in sync
also start at a random offset
- any task failures now try again in the same way and do
not overwrite the instance deferred.
also retry at a random offset
- one less core reason update
Change-Id: I2563f9228194c8a605e1981cb115b499d3c89c4d
diff --git a/python/adapters/brcm_openomci_onu/omci/brcm_uni_lock_task.py b/python/adapters/brcm_openomci_onu/omci/brcm_uni_lock_task.py
index 3884620..eb090e1 100644
--- a/python/adapters/brcm_openomci_onu/omci/brcm_uni_lock_task.py
+++ b/python/adapters/brcm_openomci_onu/omci/brcm_uni_lock_task.py
@@ -81,6 +81,7 @@
super(BrcmUniLockTask, self).start()
self._local_deferred = reactor.callLater(0, self.perform_lock)
+ @inlineCallbacks
def perform_lock(self):
"""
Perform the lock/unlock
@@ -99,29 +100,29 @@
for entity_id in pptp_list:
msg = PptpEthernetUniFrame(entity_id,
attributes=dict(administrative_state=state))
- self._send_omci_msg(msg)
+ yield self._send_omci_msg(msg)
for entity_id in veip_list:
msg = VeipUniFrame(entity_id,
attributes=dict(administrative_state=state))
- self._send_omci_msg(msg)
+ yield self._send_omci_msg(msg)
msg = OntGFrame(attributes={'administrative_state': state})
- self._send_omci_msg(msg)
+ yield self._send_omci_msg(msg)
else:
# ontg must be unlocked first, then unis
msg = OntGFrame(attributes={'administrative_state': state})
- self._send_omci_msg(msg)
+ yield self._send_omci_msg(msg)
for entity_id in pptp_list:
msg = PptpEthernetUniFrame(entity_id,
attributes=dict(administrative_state=state))
- self._send_omci_msg(msg)
+ yield self._send_omci_msg(msg)
for entity_id in veip_list:
msg = VeipUniFrame(entity_id,
attributes=dict(administrative_state=state))
- self._send_omci_msg(msg)
+ yield self._send_omci_msg(msg)
self.deferred.callback('setting-uni-lock-state-finished')