canonical/lxd

`TestCluster_Bootstrap` and `TestCluster_RenameNode` are flaky

Opened this issue · 0 comments

Required information

  • Distribution: Debian
  • Distribution version: sid
  • Versions:
    • Kernel version: 6.11.5-1
    • LXC version: 6.0.2-1
    • LXD version: 5.0.2+git20231211.1364ae4-7
    • dqlite version: 1.18.0-1
    • golang-github-canonical-go-dqlite version: 2.0.0-1

Issue description

The tests TestCluster_Bootstrap and TestCluster_RenameNode have become flaky and fail with somewhat regular frequency. Nothing's changed in the LXD source, since Debian's packaging has been frozen on an older LTS snapshot. However, looking at git history for the tests, nothing has really changed in several years.

Failures are easiest to see in the reproducible build logs at https://tests.reproducible-builds.org/debian/rb-pkg/unstable/amd64/lxd.html.

The failures were also seen with older versions of dqlite/go-dqlite, for example in this build: https://people.debian.org/~sanvila/build-logs/ftbfs-future/lxd_5.0.2+git20231211.1364ae4-5_amd64-20240812T181239.605Z.

=== RUN   TestCluster_Bootstrap
    api_cluster_test.go:34: 
        	Error Trace:	/build/reproducible-path/lxd-5.0.2+git20231211.1364ae4/_build/src/github.com/canonical/lxd/lxd/api_cluster_test.go:34
        	Error:      	Received unexpected error:
        	            	Cluster database initialization failed: Failed to begin transaction: failed to create dqlite connection: no available dqlite leader server found
        	Test:       	TestCluster_Bootstrap
--- FAIL: TestCluster_Bootstrap (11.39s)
=== RUN   TestCluster_Get
--- PASS: TestCluster_Get (0.48s)
=== RUN   TestCluster_RenameNode
    api_cluster_test.go:71: 
        	Error Trace:	/build/reproducible-path/lxd-5.0.2+git20231211.1364ae4/_build/src/github.com/canonical/lxd/lxd/api_cluster_test.go:71
        	Error:      	Received unexpected error:
        	            	Cluster database initialization failed: Failed to begin transaction: failed to create dqlite connection: no available dqlite leader server found
        	Test:       	TestCluster_RenameNode
--- FAIL: TestCluster_RenameNode (11.50s)