https://github.com/etcd-io/etcd
Revision 331ecdf8c83632555c71907a46f2767600590c79 authored by Yicheng Qin on 05 August 2015, 05:21:54 UTC, committed by Yicheng Qin on 21 August 2015, 21:55:35 UTC
etcd always returns 500/503 response when it may have no leader.
So we should log the other 50x response in a normal way.

This helps to log correctly when discovery meets 504 error. Before this
PR, it logs like this:

```
18:31:58 etcd2 | 2015/08/4 18:31:58 discovery: error #0: client: etcd
member https://discovery.etcd.io has no leader
18:31:58 etcd2 | 2015/08/4 18:31:58 discovery: waiting for other nodes:
error connecting to https://discovery.etcd.io, retrying in 4s
```

After this PR:

```
22:20:25 etcd2 | 2015/08/4 22:20:25 discovery: error #0: client: etcd
member https://discovery.etcd.io returns server error [Gateway Timeout]
22:20:25 etcd2 | 2015/08/4 22:20:25 discovery: waiting for other nodes:
error connecting to https://discovery.etcd.io, retrying in 4s
```

Conflicts:
	client/client.go
1 parent 3a346ea
History
Tip revision: 331ecdf8c83632555c71907a46f2767600590c79 authored by Yicheng Qin on 05 August 2015, 05:21:54 UTC
client: return correct error for 50x response
Tip revision: 331ecdf
File Mode Size
Documentation
Godeps
client
discovery
error
etcdctl
etcdmain
etcdserver
hack
integration
logos
migrate
pkg
proxy
raft
rafthttp
scripts
snap
storage
store
tools
version
wal
.dockerignore -rw-r--r-- 5 bytes
.gitignore -rw-r--r-- 107 bytes
.godir -rw-r--r-- 23 bytes
.header -rw-r--r-- 589 bytes
.travis.yml -rw-r--r-- 119 bytes
CONTRIBUTING.md -rw-r--r-- 2.1 KB
DCO -rw-r--r-- 1.4 KB
Dockerfile -rw-r--r-- 47 bytes
LICENSE -rw-r--r-- 11.1 KB
MAINTAINERS -rw-r--r-- 157 bytes
NOTICE -rw-r--r-- 126 bytes
Procfile -rw-r--r-- 1.3 KB
README.md -rw-r--r-- 4.4 KB
ROADMAP.md -rw-r--r-- 1.2 KB
build -rwxr-xr-x 567 bytes
cover -rwxr-xr-x 626 bytes
main.go -rw-r--r-- 1.1 KB
test -rwxr-xr-x 2.1 KB

README.md

back to top