[VOL-2174] Race condition when creating NNI port

This commit fixes the race condition where a the NNI logical port
is not created.  The root cause is that at the time an addport
request is received the parent id of the root device was not set
leadint the addport to believe that it does not exist even if it
does.

Change-Id: Ib9de9f4d3fd74fc142c35a75ba5f9a836985715b
diff --git a/rw_core/core/logical_device_manager.go b/rw_core/core/logical_device_manager.go
index b957d59..ac4a5e2 100644
--- a/rw_core/core/logical_device_manager.go
+++ b/rw_core/core/logical_device_manager.go
@@ -174,6 +174,13 @@
 
 	agent := newLogicalDeviceAgent(id, device.Id, ldMgr, ldMgr.deviceMgr, ldMgr.clusterDataProxy, ldMgr.defaultTimeout)
 	ldMgr.addLogicalDeviceAgentToMap(agent)
+
+	// Update the root device with the logical device Id reference
+	if err := ldMgr.deviceMgr.setParentId(device, id); err != nil {
+		log.Errorw("failed-setting-parent-id", log.Fields{"logicalDeviceId": id, "deviceId": device.Id})
+		return nil, err
+	}
+
 	go agent.start(ctx, false)
 
 	log.Debug("creating-logical-device-ends")