Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In v3.1.0 netutil unit test failed on ipv6only linux host #7219

Closed
Felixoid opened this issue Jan 23, 2017 · 8 comments
Closed

In v3.1.0 netutil unit test failed on ipv6only linux host #7219

Felixoid opened this issue Jan 23, 2017 · 8 comments
Assignees

Comments

@Felixoid
Copy link
Contributor

Felixoid commented Jan 23, 2017

Hello!

On last release github.com/coreos/etcd/pkg/netutil unit test was failed if ipv4 adress is missed on host.
Simple script to reproduce:

wget https://github.com/coreos/etcd/archive/v3.1.0.zip
wget https://storage.googleapis.com/golang/go1.7.4.linux-amd64.tar.gz
unzip v3.1.0.zip
tar xf go1.7.4.linux-amd64.tar.gz
GOROOT=$(pwd)/go
PATH=$GOROOT/bin:$PATH
cd etcd-3.1.0/
bash test
# all success
# then let's delete ipv4
sudo ip a delete dev enp0s31f6 $MY_IPV4
# device look like
ip a l dev enp0s31f6 
3: enp0s31f6: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 84:7b:eb:07:ed:92 brd ff:ff:ff:ff:ff:ff
    inet6 a:b:c:401:867b:ebff:fe07:ed92/64 scope global noprefixroute dynamic 
       valid_lft 115198sec preferred_lft 57598sec
    inet6 fe80::867b:ebff:fe07:ed92/64 scope link 
       valid_lft forever preferred_lft forever
# try test again
bash test

The output from the last command:

ok  	github.com/coreos/etcd/auth	2.423s	coverage: 46.8% of statements
ok  	github.com/coreos/etcd/client	1.622s	coverage: 43.6% of statements
ok  	github.com/coreos/etcd/clientv3	8.075s	coverage: 24.3% of statements
ok  	github.com/coreos/etcd/clientv3/naming	1.850s	coverage: 78.3% of statements
ok  	github.com/coreos/etcd/compactor	3.430s	coverage: 89.7% of statements
ok  	github.com/coreos/etcd/discovery	1.397s	coverage: 65.7% of statements
ok  	github.com/coreos/etcd/embed	1.042s	coverage: 16.6% of statements
ok  	github.com/coreos/etcd/error	1.025s	coverage: 84.6% of statements
ok  	github.com/coreos/etcd/etcdctl/ctlv2/command	1.051s	coverage: 0.7% of statements
ok  	github.com/coreos/etcd/etcdmain	1.140s	coverage: 28.2% of statements
ok  	github.com/coreos/etcd/etcdserver	4.671s	coverage: 28.2% of statements
ok  	github.com/coreos/etcd/etcdserver/api/v2http	1.105s	coverage: 72.9% of statements
ok  	github.com/coreos/etcd/etcdserver/api/v2http/httptypes	1.014s	coverage: 76.2% of statements
ok  	github.com/coreos/etcd/etcdserver/api/v3rpc/rpctypes	1.017s	coverage: 75.0% of statements
ok  	github.com/coreos/etcd/etcdserver/auth	4.344s	coverage: 75.1% of statements
ok  	github.com/coreos/etcd/etcdserver/membership	1.060s	coverage: 59.7% of statements
ok  	github.com/coreos/etcd/lease	7.360s	coverage: 77.2% of statements
ok  	github.com/coreos/etcd/lease/leasehttp	7.081s	coverage: 65.1% of statements
ok  	github.com/coreos/etcd/mvcc	9.911s	coverage: 78.0% of statements
ok  	github.com/coreos/etcd/mvcc/backend	3.012s	coverage: 82.1% of statements
ok  	github.com/coreos/etcd/pkg/adt	2.092s	coverage: 88.1% of statements
ok  	github.com/coreos/etcd/pkg/cors	1.012s	coverage: 92.9% of statements
ok  	github.com/coreos/etcd/pkg/crc	1.008s	coverage: 100.0% of statements
ok  	github.com/coreos/etcd/pkg/expect	1.021s	coverage: 93.9% of statements
ok  	github.com/coreos/etcd/pkg/fileutil	1.450s	coverage: 61.1% of statements
ok  	github.com/coreos/etcd/pkg/flags	1.011s	coverage: 57.5% of statements
ok  	github.com/coreos/etcd/pkg/idutil	1.009s	coverage: 100.0% of statements
ok  	github.com/coreos/etcd/pkg/ioutil	1.080s	coverage: 74.6% of statements
ok  	github.com/coreos/etcd/pkg/logutil	7.158s	coverage: 58.5% of statements
ok  	github.com/coreos/etcd/pkg/monotime	1.016s	coverage: 50.0% of statements
2017-01-23 16:20:41.591931 I | pkg/netutil: resolving infra0.example.com:4001 to 10.0.1.10:4001
2017-01-23 16:20:41.592117 I | pkg/netutil: resolving infra0.example.com:2379 to 10.0.1.10:2379
2017-01-23 16:20:41.592196 I | pkg/netutil: resolving infra0.example.com:7001 to 10.0.1.10:7001
2017-01-23 16:20:41.592235 I | pkg/netutil: resolving infra0.example.com:2380 to 10.0.1.10:2380
2017-01-23 16:20:41.592348 W | pkg/netutil: failed resolving host infra0.example.com:4001 (cannot resolve host.); retrying in 1s
2017-01-23 16:20:42.594086 I | pkg/netutil: resolving example.com:2379 to 10.0.10.1:2379
2017-01-23 16:20:42.594560 I | pkg/netutil: resolving example.com:2379 to 10.0.10.1:2379
2017-01-23 16:20:42.594749 I | pkg/netutil: resolving example.com:2379 to 10.0.10.1:2379
2017-01-23 16:20:42.595097 I | pkg/netutil: resolving example.com:2379 to 10.0.10.1:2379
2017-01-23 16:20:42.595424 I | pkg/netutil: resolving example.com:2380 to 10.0.10.1:2380
2017-01-23 16:20:42.595675 I | pkg/netutil: resolving example.com:2379 to 10.0.10.1:2379
2017-01-23 16:20:42.596032 I | pkg/netutil: resolving example.com:2379 to 10.0.10.1:2379
2017-01-23 16:20:42.596572 I | pkg/netutil: resolving example.com:2379 to 10.0.10.1:2379
2017-01-23 16:20:42.597018 I | pkg/netutil: resolving first.com:2379 to 10.0.11.1:2379
2017-01-23 16:20:42.597206 I | pkg/netutil: resolving second.com:2380 to 10.0.11.2:2380
2017-01-23 16:20:42.597535 I | pkg/netutil: resolving second.com:2380 to 10.0.11.2:2380
2017-01-23 16:20:42.597679 I | pkg/netutil: resolving first.com:2379 to 10.0.11.1:2379
--- FAIL: TestGetDefaultInterface (0.00s)
	routes_linux_test.go:24: could not find default interface
2017-01-23 16:20:42.601435 I | pkg/netutil: resolving infra0.example.com:4001 to 10.0.1.10:4001
2017-01-23 16:20:42.601596 I | pkg/netutil: resolving infra0.example.com:2379 to 10.0.1.10:2379
2017-01-23 16:20:42.601787 I | pkg/netutil: resolving infra0.example.com:7001 to 10.0.1.10:7001
2017-01-23 16:20:42.601913 I | pkg/netutil: resolving infra0.example.com:2380 to 10.0.1.10:2380
2017-01-23 16:20:42.602250 W | pkg/netutil: failed resolving host infra0.example.com:4001 (cannot resolve host.); retrying in 1s
2017-01-23 16:20:43.602734 E | pkg/netutil: could not resolve host infra0.example.com:4001
2017-01-23 16:20:43.603966 I | pkg/netutil: resolving example.com:2379 to 10.0.10.1:2379
2017-01-23 16:20:43.604516 I | pkg/netutil: resolving example.com:2379 to 10.0.10.1:2379
2017-01-23 16:20:43.604758 I | pkg/netutil: resolving example.com:2379 to 10.0.10.1:2379
2017-01-23 16:20:43.605147 I | pkg/netutil: resolving example.com:2379 to 10.0.10.1:2379
2017-01-23 16:20:43.605509 I | pkg/netutil: resolving example.com:2380 to 10.0.10.1:2380
2017-01-23 16:20:43.605818 I | pkg/netutil: resolving example.com:2379 to 10.0.10.1:2379
2017-01-23 16:20:43.606294 I | pkg/netutil: resolving example.com:2379 to 10.0.10.1:2379
2017-01-23 16:20:43.606807 I | pkg/netutil: resolving example.com:2379 to 10.0.10.1:2379
2017-01-23 16:20:43.607151 I | pkg/netutil: resolving first.com:2379 to 10.0.11.1:2379
2017-01-23 16:20:43.607313 I | pkg/netutil: resolving second.com:2380 to 10.0.11.2:2380
2017-01-23 16:20:43.607681 I | pkg/netutil: resolving second.com:2380 to 10.0.11.2:2380
2017-01-23 16:20:43.607847 I | pkg/netutil: resolving first.com:2379 to 10.0.11.1:2379
--- FAIL: TestGetDefaultInterface (0.00s)
	routes_linux_test.go:24: could not find default interface
2017-01-23 16:20:43.612154 I | pkg/netutil: resolving infra0.example.com:4001 to 10.0.1.10:4001
2017-01-23 16:20:43.612346 I | pkg/netutil: resolving infra0.example.com:2379 to 10.0.1.10:2379
2017-01-23 16:20:43.612604 I | pkg/netutil: resolving infra0.example.com:7001 to 10.0.1.10:7001
2017-01-23 16:20:43.612768 I | pkg/netutil: resolving infra0.example.com:2380 to 10.0.1.10:2380
2017-01-23 16:20:43.613214 W | pkg/netutil: failed resolving host infra0.example.com:4001 (cannot resolve host.); retrying in 1s
2017-01-23 16:20:44.613401 E | pkg/netutil: could not resolve host infra0.example.com:4001
2017-01-23 16:20:44.613976 I | pkg/netutil: resolving example.com:2379 to 10.0.10.1:2379
2017-01-23 16:20:44.614220 I | pkg/netutil: resolving example.com:2379 to 10.0.10.1:2379
2017-01-23 16:20:44.614317 I | pkg/netutil: resolving example.com:2379 to 10.0.10.1:2379
2017-01-23 16:20:44.614493 I | pkg/netutil: resolving example.com:2379 to 10.0.10.1:2379
2017-01-23 16:20:44.614673 I | pkg/netutil: resolving example.com:2380 to 10.0.10.1:2380
2017-01-23 16:20:44.614823 I | pkg/netutil: resolving example.com:2379 to 10.0.10.1:2379
2017-01-23 16:20:44.615031 I | pkg/netutil: resolving example.com:2379 to 10.0.10.1:2379
2017-01-23 16:20:44.615274 I | pkg/netutil: resolving example.com:2379 to 10.0.10.1:2379
2017-01-23 16:20:44.615442 I | pkg/netutil: resolving first.com:2379 to 10.0.11.1:2379
2017-01-23 16:20:44.615513 I | pkg/netutil: resolving second.com:2380 to 10.0.11.2:2380
2017-01-23 16:20:44.615684 I | pkg/netutil: resolving second.com:2380 to 10.0.11.2:2380
2017-01-23 16:20:44.615777 I | pkg/netutil: resolving first.com:2379 to 10.0.11.1:2379
--- FAIL: TestGetDefaultInterface (0.00s)
	routes_linux_test.go:24: could not find default interface
FAIL
coverage: 56.1% of statements
FAIL	github.com/coreos/etcd/pkg/netutil	3.033s
ok  	github.com/coreos/etcd/pkg/osutil	1.014s	coverage: 87.1% of statements
ok  	github.com/coreos/etcd/pkg/pathutil	1.007s	coverage: 100.0% of statements
ok  	github.com/coreos/etcd/pkg/pbutil	1.011s	coverage: 76.9% of statements
ok  	github.com/coreos/etcd/pkg/report	1.008s	coverage: 24.1% of statements
ok  	github.com/coreos/etcd/pkg/schedule	1.011s	coverage: 85.7% of statements
ok  	github.com/coreos/etcd/pkg/testutil	1.071s	coverage: 20.2% of statements
ok  	github.com/coreos/etcd/pkg/transport	1.554s	coverage: 66.8% of statements
ok  	github.com/coreos/etcd/pkg/types	1.027s	coverage: 90.8% of statements
ok  	github.com/coreos/etcd/pkg/wait	1.167s	coverage: 92.9% of statements
ok  	github.com/coreos/etcd/proxy/grpcproxy	1.566s	coverage: 5.9% of statements
ok  	github.com/coreos/etcd/proxy/httpproxy	1.020s	coverage: 75.8% of statements
ok  	github.com/coreos/etcd/proxy/tcpproxy	1.026s	coverage: 64.2% of statements
ok  	github.com/coreos/etcd/raft	5.833s	coverage: 86.8% of statements
ok  	github.com/coreos/etcd/rafthttp	2.444s	coverage: 75.8% of statements
ok  	github.com/coreos/etcd/snap	1.029s	coverage: 54.2% of statements
ok  	github.com/coreos/etcd/store	1.205s	coverage: 90.8% of statements
ok  	github.com/coreos/etcd/wal	4.844s	coverage: 80.5% of statements
@Felixoid Felixoid changed the title netutil unit test failed on ipv6only linux host In v3.1.0 netutil unit test failed on ipv6only linux host Jan 23, 2017
@xiang90
Copy link
Contributor

xiang90 commented Jan 25, 2017

@Felixoid Are you willing to help fix this problem?

@Felixoid
Copy link
Contributor Author

Hi,
@xiang90

Of course, yes

@xiang90
Copy link
Contributor

xiang90 commented Jan 27, 2017

@Felixoid Awesome! I assigned the issue to you.

@Felixoid
Copy link
Contributor Author

Hello!
How soon we can see this patch in release?

@gyuho
Copy link
Contributor

gyuho commented Feb 21, 2017

#7256 didn't make it to v3.1.1 which is our latest release.

@heyitsanthony @xiang90 should we backport #7256 for next v3.1.2 release?

@xiang90
Copy link
Contributor

xiang90 commented Feb 21, 2017

@gyuho yea. let's backport this.

@gyuho
Copy link
Contributor

gyuho commented Feb 21, 2017

@Felixoid Ok will include #7256 in our next v3.1.2 release.
Probably within a few weeks.

Thanks.

gyuho pushed a commit that referenced this issue Feb 22, 2017
in v3.1.0 netutil couldn't get default interface for ipv6only hosts

Fixes #7219
gyuho pushed a commit that referenced this issue Feb 22, 2017
in v3.1.0 netutil couldn't get default interface for ipv6only hosts

Fixes #7219
@Felixoid
Copy link
Contributor Author

Felixoid commented Mar 1, 2017

Thank you!
It's successful builded and all tests have been passed.
We'll deploy this release in testing soon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

4 participants