Agnostic baker benefits from generic watchdog
Parent MR: !16426 (merged)
This MR aims to benefit from the introduction of the Lwt_process_watchdog introduced by !15485 (merged) to bring more resilience to the baker processes.
Because of this integration, it requires a quite important refactoring.
This MR is on top of !15485 (merged)
Manually testing the MR
Compile the uncompiled-by-default agnostic baker binary with something like rm -rf octez-agnostic-baker && dune build src/bin_agnostic_baker/main_agnostic_baker.exe && mv _build/default/src/bin_agnostic_baker/main_agnostic_baker.exe octez-agnostic-baker
Run a sandbox scenario with the agnostic baker that is actively baking. Kill the baker process (not the agnostic one) and enjoy the automatic restart.
Scenario:
- Start a sandboxed node:
./src/bin_node/octez-sandboxed-node.sh 1 --connections 0 - Start the agnostic baker on this node:
./octez-agnostic-baker --base-dir <client_dir> -- --endpoint http://localhost:18731 run with local node <node_dir> --liquidity-baking-toggle-vote pass --without-dal - Kill the baker process:
- Find the process pid (appears when starting the baker or with the following command)
ps aux | grep 'octez-baker-alpha' - Kill it
- Find the process pid (appears when starting the baker or with the following command)
- Enjoy
Shutting down the baker... Error: Lwt.Resolution_loop.Canceled Jan 28 11:05:58.761: baker ProtoALphaAL (pid 55882) terminated abnormally with exit code 127 Jan 28 11:05:58.762: baker ProtoALphaAL was started on pid 57105 Jan 28 11:05:59.002: read liquidity baking toggle vote = pass Jan 28 11:05:59.003: read adaptive issuance vote = pass
Checklist
-
Document the interface of any function added or modified (see the coding guidelines) -
Document any change to the user interface, including configuration parameters (see node configuration) -
Provide automatic testing (see the testing guide). -
For new features and bug fixes, add an item in the appropriate changelog ( docs/protocols/alpha.rstfor the protocol and the environment,CHANGES.rstat the root of the repository for everything else). -
Select suitable reviewers using the Reviewersfield below. -
Select as Assigneethe next person who should take action on that MR
Edited by Mattias