[VOL-1514] Add port notification to the logical device
This update sends port status notifications to the OFAgent. This
commit also refactored the port creation logic to ensure we can
add a port to a logical device anytime.
Change-Id: Ied78e93d0feef4621b588cfd4e10bbead79b0a5b
diff --git a/db/kvstore/etcdclient.go b/db/kvstore/etcdclient.go
index 639ea75..1d2031d 100644
--- a/db/kvstore/etcdclient.go
+++ b/db/kvstore/etcdclient.go
@@ -313,7 +313,7 @@
c.writeLock.Lock()
defer c.writeLock.Unlock()
if leaseID, ok = c.keyReservations[key]; !ok {
- return errors.New("key-not-reserved")
+ return nil
}
if leaseID != nil {
_, err := c.ectdAPI.Revoke(context.Background(), *leaseID)