Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[RFC1213]: Initialize lag oid map in reinit_data instead of (#232)
- What I did Initialize lag oid map in reinit_data instead of updating in update_data. Updating lag oid map in update_data can cause descrepancy as interface oid map is updated in reinit_data. There could be a scenario when lag oid map has lag oids updated in update_data but interfaces oid map is not updated as interfaces oid map is updated in reinit_data. When SNMP service comes up, there could be a short instance of time when interfaces oid map (oid_sai_map) is empty or not complete but lag oid map (oid_lag_name_map) is updated with lag oids and lag members. At this short span, if a SNMP query is done to get interfaces counters, current code will try to get LAG counters and will fail at https://github.com/Azure/sonic-snmpagent/blob/master/src/sonic_ax_impl/mibs/ietf/rfc1213.py#L383 when trying to get oid of lag members' oid. This can lead to key error : sai_id = self.oid_sai_map[oid]#012KeyError. This change is to avoid this scenario. - How I did it init_sync_d_lag_tables in reinit_data instead of invoking in update_data. - How to verify it unit-test pass. SNMP walk of interface MIB output is complete.
- Loading branch information