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.
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
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