please fix build tests

Bug #2023409 reported by Mark Esler
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
etcd (Ubuntu)
New
Undecided
Unassigned

Bug Description

hi o/

./debian/rules states:
```
# The ignored pkgs are aligned with upstream ./test file,
# see variables IGNORE_PKGS and INTEGRATION_PKGS in ./test
export TEST_EXCLUDES := cmd/ etcdserverpb rafttest gopath.proto v3lockpb v3electionpb \
                        integration e2e contrib functional
```

./test contains:
```
IGNORE_PKGS="(vendor/|etcdserverpb|rafttest|gopath.proto|v3lockpb|v3electionpb)"
INTEGRATION_PKGS="(integration|tests/e2e|contrib|functional)"
```
INTEGRATION_PKGS _are_ later used in ./test and IGNORE_PKGS are excluded from testing _by upstream_.

TEST_EXCLUDE does not align with the logic of upstream ./test.

INTEGRATION_PKGS should be tested in the Debian/Ubuntu packages. Testing etcd's e2e is critical for security of Kubernetes.

On Ubuntu Mantic, the package builds well with `integration` and `contrib` tests (i.e., when they are removed from TEST_EXCLUDES). `e2e` needs to be patched to put package binaries in the PATH of tests--other issues may also exist. `functional` tests also ftbfs.

Tags: sec-2215
Mark Esler (eslerm)
description: updated
description: updated
Mark Esler (eslerm)
tags: added: sec-2215
Revision history for this message
Shengjing Zhu (zhsj) wrote :
Revision history for this message
Shengjing Zhu (zhsj) wrote :

functional tests are also in autopkgtest

Revision history for this message
Shengjing Zhu (zhsj) wrote :
Revision history for this message
Mark Esler (eslerm) wrote :
Download full text (3.5 KiB)

Thank you Shengjing!

Security has autopkgtests for ESM, so that might work for patching. Build tests would be ideal.

From the autopkgtests, there's a consistent failure which might be an upstream issue:
```
go.etcd.io/etcd/clientv3/balancer/picker
# go.etcd.io/etcd/clientv3/balancer/picker
src/go.etcd.io/etcd/clientv3/balancer/picker/err.go:23:9: cannot use &errPicker{…} (value of type *errPicker) as type Picker in return statement:
        *errPicker does not implement Picker (wrong type for Pick method)
                have Pick(balancer.PickInfo) (balancer.PickResult, error)
                want Pick(ctx context.Context, info balancer.PickInfo) (conn balancer.SubConn, done func(balancer.DoneInfo), err error)
src/go.etcd.io/etcd/clientv3/balancer/picker/roundrobin_balanced.go:32:9: cannot use &rrBalanced{…} (value of type *rrBalanced) as type Picker in return statement:
        *rrBalanced does not implement Picker (wrong type for Pick method)
                have Pick(opts balancer.PickInfo) (balancer.PickResult, error)
                want Pick(ctx context.Context, info balancer.PickInfo) (conn balancer.SubConn, done func(balancer.DoneInfo), err error)
```
the above stanza is not in every log, but the below is:
```
=== RUN TestRoundRobinBalancedResolvableNoFailover/rrBalanced_1_unix_sockets
{"level":"debug","msg":"registered balancer","policy":"picker-roundrobin-balanced","name":"175BC073483F97E22"}
{"level":"info","msg":"built balancer","balancer-id":"cscz1v8kv8pc","policy":"picker-roundrobin-balanced","resolver-target":"endpoint://nofailover/*"}
{"level":"info","msg":"resolved","picker":"picker-error","balancer-id":"cscz1v8kv8pc","addresses":["unix:///tmp/etcd-unix-so-3384251395"]}
{"level":"info","msg":"created subconn","address":"unix:///tmp/etcd-unix-so-3384251395"}
{"level":"info","msg":"state changed","picker":"picker-error","balancer-id":"cscz1v8kv8pc","connected":false,"subconn":"0xc00017b0c0","subconn-size":1,"address":"unix:///tmp/etcd-unix-so-3384251395","old-state":"IDLE","new-state":"CONNECTING"}
{"level":"warn","msg":"connectivity recorder received unknown state","connectivity-state":"IDLE"}
{"level":"info","msg":"state changed","picker":"picker-error","balancer-id":"cscz1v8kv8pc","connected":false,"subconn":"0xc00017b0c0","subconn-size":1,"address":"unix:///tmp/etcd-unix-so-3384251395","old-state":"CONNECTING","new-state":"TRANSIENT_FAILURE"}
{"level":"info","msg":"updated picker to transient error picker","picker":"picker-error","balancer-id":"cscz1v8kv8pc","policy":"picker-roundrobin-balanced"}
    balancer_test.go:96: Unexpected failure rpc error: code = Unavailable desc = all SubConns are in TransientFailure
[...]
--- FAIL: TestRoundRobinBalancedResolvableNoFailover (0.02s)
    --- PASS: TestRoundRobinBalancedResolvableNoFailover/rrBalanced_1 (0.00s)
    --- FAIL: TestRoundRobinBalancedResolvableNoFailover/rrBalanced_1_unix_sockets (0.01s)
```

These are flakey tests which fail due to timeout and can likely be ignored:
```
--- FAIL: TestBalancerUnderNetworkPartitionWatchFollower (4.17s)
--- FAIL: TestBalancerUnderNetworkPartitionDelete (8.16s)
--- FAIL: TestCtlV3AuthCertCNWithWithConcurrentOperation (60.66s)
--- ...

Read more...

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.