diff --git a/synced-pool.go b/synced-pool.go index abd5e09..3cb2c67 100644 --- a/synced-pool.go +++ b/synced-pool.go @@ -36,7 +36,6 @@ func (k *K8sDiscovery) DiscoverInNamespace(namespace string) ([]string, error) { hosts := make([]string, 0, len(pods.Items)) for _, pod := range pods.Items { hosts = append(hosts, pod.Name) - log.Printf("Found pod %s\n", pod.Name) } return hosts, nil } @@ -92,6 +91,10 @@ func NewSyncedPool(local *GrainLocalPool, hostname string, d Discovery) (*Synced return } for _, h := range hosts { + if h == hostname { + continue + } + log.Printf("Discovered host %s\n", h) err := pool.AddRemote(h) if err != nil { log.Printf("Error adding remote %s: %v\n", h, err)