-
Type:
Bug
-
Status: Closed (View Workflow)
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 1.10.0
-
Component/s: None
-
Labels:None
I have analysed the multi instance problem and found that it's not related to Mastership Role change issue, rather it was a BUG in NetconfActiveComponent:-
Earlier behaviour :-
When composite request for DELETE/POST was sent and below behaviour observed :
1. Some both the devices were getting configured
2. Some time only one of the device only getting configured.
3. Some none of the devices were getting configured
Root Cause :-
In active component when we collect all the events from store in InternalEventAccummulator, There we are getting the device id form the event-subject and checking for its master.
If ONOS instance is not master for the requested device , then it was returning from there and not even processing the other collected event in accumulator.
Code:-
checkNotNull(event, "process:Event cannot be null");
DeviceId deviceId = getDeviceId(event.subject());
if (!isMaster(deviceId)) {
log.info("NetConfListener: not master, ignoring config for {}", event.type());
return; <---- This was the problem
}
Behaviour Randomness :-
If first event received by any of the instance and same instance is master for that device, Then it was processing it and configuring it on device too.
Solution :-
In Active component if received event instance is not master of the requested device , then it suppose to drop that event and continue processing the other present event in accumulator.
I have incorporated the change in my branch also.