stianeikeland / node-etcd

:satellite: Etcd client for nodejs
BSD 3-Clause "New" or "Revised" License
259 stars 85 forks source link

.machines() not working - bad URL #52

Open KiNgMaR opened 8 years ago

KiNgMaR commented 8 years ago

Using node-etcd "4.2.1" and etcd "2.2.3":

etcd.machines(console.log);

{ [Error: Key not found]
  errorCode: 100,
  error:
   { errorCode: 100,
     message: 'Key not found',
     cause: '/_etcd',
     index: 14 } } '' { 'content-type': 'application/json',
  'x-etcd-cluster-id': 'xxx',
  'x-etcd-index': '14',
  date: 'Tue, 12 Jan 2016 14:54:07 GMT',
  'content-length': '72' }

After changing the URL to "machines" instead of "keys/_etcd/machines" it's working - although I don't know whether the response format still is the same. Judging from this: https://github.com/coreos/etcd/issues/1279 it changed around etcd v0.5.0.

Thanks for looking into it.