mirror of
https://github.com/opennetworkinglab/onos.git
synced 2026-05-05 12:16:13 +02:00
Fix NPE in DeviceManager for an offline device
Change-Id: Ib105b029efd0519c6ed54abf8e89c7be6c905987
This commit is contained in:
parent
056e0c144c
commit
4ef245e8ea
@ -420,6 +420,12 @@ public class DeviceManager
|
||||
checkNotNull(deviceId, PORT_NUMBER_NULL);
|
||||
NodeId masterId = mastershipService.getMasterFor(deviceId);
|
||||
|
||||
if (masterId == null) {
|
||||
// No master found; device is offline
|
||||
log.info("No master found for port state change for {}", deviceId);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!masterId.equals(localNodeId)) {
|
||||
//Send the request to the master node for the device
|
||||
log.info("Device {} is managed by {}, forwarding the request to the MASTER",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user