Skip to content

Commit

Permalink
Fixing the issue where libnetwork deletes vrs vports that are not man…
Browse files Browse the repository at this point in the history
…aged by plugin
  • Loading branch information
sareti committed Aug 27, 2017
1 parent ec52939 commit aeaf29b
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions client/vrsclient.go
Original file line number Diff line number Diff line change
Expand Up @@ -319,11 +319,13 @@ func (nvrsc *NuageVRSClient) auditOVSDB() error {
}

for _, portName := range portNames {
containerInfo[nuageConfig.BridgePortKey] = portName
containerInfo[nuageConfig.UUIDKey] = entity
err := nvrsc.deleteEntries(containerInfo)
if err != nil {
log.Errorf("Deleting entries in audit failed with error %v", err)
if strings.HasPrefix(portName, nuageConfig.BasePrefix) { //manage ports with only libnetwork prefix
containerInfo[nuageConfig.BridgePortKey] = portName
containerInfo[nuageConfig.UUIDKey] = entity
err := nvrsc.deleteEntries(containerInfo)
if err != nil {
log.Errorf("Deleting entries in audit failed with error %v", err)
}
}
}
}
Expand Down

0 comments on commit aeaf29b

Please sign in to comment.