# Interaction Between discovery.zen.ping.unicast.hosts and discovery-gce in Elasticsearch 6.5.3

**URL:** <https://discuss.elastic.co/t/interaction-between-discovery-zen-ping-unicast-hosts-and-discovery-gce-in-elasticsearch-6-5-3/381021>\
**Category:** Elasticsearch\
**Created:** [August 13, 2025, 9:13pm UTC](https://discuss.elastic.co/t/interaction-between-discovery-zen-ping-unicast-hosts-and-discovery-gce-in-elasticsearch-6-5-3/381021 "2025-08-13T21:13:57Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![sisindri](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sisindri/32/140035_2.png) [@sisindri](https://discuss.elastic.co/u/sisindri)\
**Post date:** [August 13, 2025, 9:13pm UTC](https://discuss.elastic.co/t/interaction-between-discovery-zen-ping-unicast-hosts-and-discovery-gce-in-elasticsearch-6-5-3/381021/1 "2025-08-13T21:13:57Z")

</div>

We are running Elasticsearch **6.5.3** on GCP with the **discovery-gce** plugin enabled. All master nodes have both:

`discovery.zen.ping.unicast.hosts: ["ip1:9300", "ip2:9300", "ip3:9300"] discovery.gce.project: "my-project" `  
`discovery.gce.tags: "es-master" `

Our challenge:

1. We want **new nodes to join automatically** using `discovery-gce` (via tags) without having to manually update `unicast.hosts`.

2. In tests, when both are set, **unicast hosts take precedence** and new nodes without `unicast.hosts` do not join automatically.

3. If we remove `unicast.hosts` from masters but leave it in data nodes, will restarted data nodes still find the masters without causing unassigned shards?

4. How exactly is master discovery precedence handled in **6.5.3** when both `unicast.hosts` and `discovery-gce` are configured? Does unicast always override plugin-based discovery?

5. For **7.x** , where `discovery.seed_hosts` replaces `unicast.hosts`, is the behavior the same?

Looking for the **recommended approach** to migrate from unicast-based discovery to fully dynamic GCE tag-based discovery without risking cluster instability or shard loss

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [August 14, 2025, 12:31pm UTC](https://discuss.elastic.co/t/interaction-between-discovery-zen-ping-unicast-hosts-and-discovery-gce-in-elasticsearch-6-5-3/381021/2 "2025-08-14T12:31:12Z")

</div>

> [@sisindri](#):
>
> We are running Elasticsearch **6.5.3** […] Looking for the **recommended approach** to migrate from unicast-based discovery to fully dynamic GCE tag-based discovery without risking cluster instability or shard loss

This version has not been supported for more than 5 years. You need to upgrade to a supported version as a matter of urgency. That’s the recommended approach.

> [@sisindri](#):
>
> For **7.x** , where `discovery.seed_hosts` replaces `unicast.hosts`, is the behavior the same?

In 7.x Elasticsearch will use addresses from all host providers, both `discovery-gce` and `discovery.seed_hosts`, which I think is what you want. I don’t remember how 6.x did it but it sounds like it doesn’t work how you want. An upgrade will fix that.

---

<div class="post-metadata">

**Author:** ![sisindri](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sisindri/32/140035_2.png) [@sisindri](https://discuss.elastic.co/u/sisindri)\
**Post date:** [August 19, 2025, 9:31am UTC](https://discuss.elastic.co/t/interaction-between-discovery-zen-ping-unicast-hosts-and-discovery-gce-in-elasticsearch-6-5-3/381021/3 "2025-08-19T09:31:24Z")

</div>

> [@sisindri](#):
>
> For **7.x** , where `discovery.seed_hosts` replaces `unicast.hosts`, is the behavior the same?

Thankyou so much for reply @DavidTurner

For 7.x, where discovery.seed\_hosts replaces unicast.hosts, is the behavior the same?

In 6.x, I have 3 master nodes with added unicast.hosts with 3 mastre ip in elasticsearch.yml and i have discovery-gce plugin.  
Now am trying to add 3 more masters with discovery-gce plugin to same cluster. but these 3 master nodes not automatically detecting old masternodes and joining cluster dynamically.

again, I have to add unicast.hosts line in elasticsearch.yml and need to restart elasticsearch service. then those nodes joining with cluster and now i have 6 master nodes.

but my requirement is if we have discovery-gce plugin enabled again don't want to include unicast.hosts line and restart the service. Once we create new nodes it should dynamically join with cluster by using discovery-gce plugin.

I have tested scenaio where we are using only discovery-gce plugin existing nodes and not added unicast.hosts line, so if we add new nodes with discovery-gce plugin enabled, new nodes automatically joining with cluster.

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [August 19, 2025, 10:58am UTC](https://discuss.elastic.co/t/interaction-between-discovery-zen-ping-unicast-hosts-and-discovery-gce-in-elasticsearch-6-5-3/381021/4 "2025-08-19T10:58:27Z")

</div>

> [@sisindri](#):
>
> For 7.x, where discovery.seed\_hosts replaces unicast.hosts, is the behavior the same?

7.x, 8.x and 9.x all behave the same as each other. I don’t remember how 6.x behaved, it’s been too long, but I wouldn’t be surprised if it was different from 7.x and later.

> [@sisindri](#):
>
> Once we create new nodes it should dynamically join with cluster by using discovery-gce plugin.

Sure, the solution to this as things stand is to first upgrade to a supported version.
