jplana / python-etcd

A python client for etcd
Other
522 stars 210 forks source link

fix DNS discovery configuration convention #256

Closed europelee closed 1 year ago

europelee commented 6 years ago

code in client.py: def _discover(self, domain): srv_name = "_etcd._tcp.{}".format(domain) ... ... please refer to https://coreos.com/etcd/docs/latest/v2/clustering.html#dns-discovery there exists two types of DNS discovery configuration convention: like _etcd-server._tcp.example.com, _etcd-client._tcp.example.com for etcd client, we need discovering the etcd cluster, so we use _etcd-client._tcp.example.com. It is better that use _etcd-client._tcp.{} instead of _etcd._tcp.{}, or "_etcd-client._tcp" can be used as optional input paramter of client(i.e default prefix dns srv record is "_etcd._tcp").

coveralls commented 6 years ago

Coverage Status

Coverage decreased (-0.3%) to 87.817% when pulling d136cf0494245780b5a9748433b687179c50c577 on europelee:fix_dns-srv into b227f496c038b2b856c4d76c9525b3547e5c8dc4 on jplana:master.

coveralls commented 6 years ago

Coverage Status

Coverage remained the same at 88.071% when pulling 553c5d0c4328d76c622107356951de6b07c3e7eb on europelee:fix_dns-srv into b227f496c038b2b856c4d76c9525b3547e5c8dc4 on jplana:master.

dohnto commented 5 years ago

Any update? This is crucial fix for us.

oblazek commented 5 years ago

I agree.. This would be very beneficial. Any update if and when is this going to be merged?

lavagetto commented 1 year ago

The "standard" was introduced well after python-etcd was created, so we had to go with what was suggested in etcd's documentation at the time.

Having said that, I'd prefer not to just break compatibility for everyone else. I'll try to make this change so that current code will keep working.