Infra DevOps

インフラ構築のナレッジや、運用の自動簡易化に関する記事を書いていこうと思います

redis 3系インストール時にmake test実施でエラー

他のサイトにもいろいろ記載があるが

!!! WARNING The following tests failed:
*** [err]: Detect write load to master in tests/integration/replication-psync.tcl
Can't detect write load from background clients.
*** [err]: Detect write load to master in tests/integration/replication-psync.tcl
Can't detect write load from background clients.
*** [err]: Detect write load to master in tests/integration/replication-psync.tcl
Can't detect write load from background clients.

 


*** [err]: Test replication partial resync: no backlog (diskless: no, reconnect: 1) in tests/integration/replication-psync.tcl
Expected condition '[s -1 sync_partial_err] > 0' to be true ([s -1 sync_partial_err] > 0)
*** [err]: Detect write load to master in tests/integration/replication-psync.tcl
Can't detect write load from background clients.
*** [err]: Detect write load to master in tests/integration/replication-psync.tcl
Can't detect write load from background clients.
*** [err]: Detect write load to master in tests/integration/replication-psync.tcl
Can't detect write load from background clients.
*** [err]: Detect write load to master in tests/integration/replication-psync.tcl
Can't detect write load from background clients.
*** [err]: Detect write load to master in tests/integration/replication-psync.tcl
Can't detect write load from background clients.
*** [err]: Test replication partial resync: no backlog (diskless: yes, reconnect: 1) in tests/integration/replication-psync.tcl
Expected condition '[s -1 sync_partial_err] > 0' to be true ([s -1 sync_partial_err] > 0)
*** [err]: Detect write load to master in tests/integration/replication-psync.tcl
Can't detect write load from background clients.
*** [err]: Detect write load to master in tests/integration/replication-psync.tcl
Can't detect write load from background clients.
Cleanup: may take some time... OK

というエラーがmake testで出た。環境はVirtualBoxのしょぼい環境。

そもそもこのエラーって他のサイトでも取り上げられているけど明確に説明しているものが無いように見えた。

で調べてわかったのだが、マルチCPU割り当てにすることで現象が回避できた。
他サイトだとタイミング依存とあったり、https://redislabs.com/redis-enterprise-documentation/installing-and-upgrading/hardware-software-requirements
みるとCPU周りでなんかいろいろ記載があったのでCPU関連かもと思いマルチCPUに
したところうまくいった。

make test中にtopでCPU利用率みるとかなり高い状況もあったし内部でCPU利用率や現状の負荷などを見てエラーを返したりしているのかもしれない。