-
Type:
Bug
-
Status: Closed (View Workflow)
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: 1.6.0
-
Fix Version/s: 1.10.0
-
Component/s: DynamicConfiguration
-
Environment:
Linux 4.4.0-53-generic #74~14.04.1-Ubuntu SMP x86_64 x86_64 x86_64 GNU/Linux
-
Story Points:3
If a of device is already disconnected from the ONOS cluster, may be because of reboot or other reasons, and hence we need to remove the device from the device store..
It throws the following error: IllegalStateException "Requesting timestamp for " + deviceId + " without mastership".
The ONOS node cannot remove the device from the store -> because it cannot get mastership for the device -> because it cannot reach the device.
The error occurs when we try to access removeDevice(DeviceId deviceId) from DeviceManager.java.
To reproduce:
1) set controller to be the onos node in a switch, now the of device will be connected to the onos. You may check the device by accessing the "devices" cli
2) From the switch remove the controller configuration
3) The device status is changed to available=false and role=none in "devices" cli
4) Now, try to remove the device with "device-remove" cli
5) It should throw an exception as mentioned above
Solution:
1) If none of the ONOS nodes in the cluster is a master for this device, then it should be possible to remove this device from the store with the lowest possible mastership based timestamp
# | Subject | Branch | Project | Status | CR | V |
---|---|---|---|---|---|---|
13474,2 | [ONOS-6210] Should be able to remove device from store if device is not reachable | master | onos | Status: ABANDONED | 0 | -1 |
13483,5 | [ONOS-6210] Should be able to remove device from store if device is not reachable | master | onos | Status: MERGED | +2 | +1 |
13552,5 | Make getTimestamp() safer to call | master | onos | Status: MERGED | +2 | +1 |