Skip to content

Commit

Permalink
fix connector reconcile
Browse files Browse the repository at this point in the history
  • Loading branch information
ajssmith committed Nov 30, 2023
1 parent d840642 commit 89da54a
Show file tree
Hide file tree
Showing 2 changed files with 195 additions and 24 deletions.
24 changes: 15 additions & 9 deletions pkg/flow/flow_mem_driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -2436,18 +2436,24 @@ func (fc *FlowCollector) reconcileConnectorRecords() error {
}
for _, process := range fc.Processes {
if siteId == process.Parent {
if process.SourceHost != nil {
if process.SourceHost != nil && matchHost != nil {
if *matchHost == *process.SourceHost {
connector.ProcessId = &process.Identity
connector.Target = process.Name
process.connector = &connector.Identity
process.ProcessBinding = &Bound
fc.updateNetworkStatus()
log.Printf("COLLECTOR: Connector %s/%s associated to process %s\n", connector.Identity, *connector.Address, *process.Name)
delete(fc.connectorsToReconcile, connId)
found = true
break
}
} else if process.HostName != nil {
if *process.HostName == *connector.DestHost {
found = true
}
}
if found {
connector.ProcessId = &process.Identity
connector.Target = process.Name
process.connector = &connector.Identity
process.ProcessBinding = &Bound
fc.updateNetworkStatus()
log.Printf("COLLECTOR: Connector %s/%s associated to process %s\n", connector.Identity, *connector.Address, *process.Name)
delete(fc.connectorsToReconcile, connId)
break
}
}
}
Expand Down
Loading

0 comments on commit 89da54a

Please sign in to comment.