nimbus-era-files: add timer for validating files
For now it seems unstable so I'm making it just create warnings. Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
parent
ddfd5e7d9c
commit
d72cd696aa
|
@ -9,7 +9,9 @@ Read more about ERA files [here](https://github.com/status-im/nimbus-eth2/blob/u
|
|||
# Configuration
|
||||
|
||||
```yaml
|
||||
nimbus_era_files_timer_name: 'nimbus-era-files-update'
|
||||
nimbus_era_files_timer_name: 'nimbus-era-files'
|
||||
nimbus_era_files_timer_update_name: '{{ nimbus_era_files_timer_name }}-update'
|
||||
nimbus_era_files_timer_verify_name: '{{ nimbus_era_files_timer_name }}-verify'
|
||||
nimbus_era_files_timer_path: '/data/era'
|
||||
nimbus_era_files_nclidb_path: '/data/nimbus/repo/build/bin/ncli_db'
|
||||
nimbus_era_files_db_path: '/data/nimbus/data/db'
|
||||
|
@ -18,7 +20,7 @@ nimbus_era_files_db_path: '/data/nimbus/data/db'
|
|||
|
||||
# Management
|
||||
|
||||
The timer runs weekly with 12h random delay by default, but you can start it manually:
|
||||
The timers runs weekly with 12h random delay by default, but you can start it manually:
|
||||
```
|
||||
> systemctl -o cat status nimbus-era-files-update
|
||||
● nimbus-era-files-update.service - Update Nimbus beacon node ERA files
|
||||
|
@ -37,3 +39,6 @@ All time are ms
|
|||
nimbus-era-files-update.service: Succeeded.
|
||||
Finished Update Nimbus beacon node ERA files.
|
||||
```
|
||||
```
|
||||
TODO
|
||||
```
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
---
|
||||
nimbus_era_files_timer_name: 'nimbus-era-files-update'
|
||||
nimbus_era_files_timer_name: 'nimbus-era-files'
|
||||
nimbus_era_files_timer_update_name: '{{ nimbus_era_files_timer_name }}-update'
|
||||
nimbus_era_files_timer_verify_name: '{{ nimbus_era_files_timer_name }}-verify'
|
||||
nimbus_era_files_timer_enabled: true
|
||||
nimbus_era_files_timer_path: '/data/era'
|
||||
nimbus_era_files_timer_user: 'nimbus'
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
systemd_timer_description: 'Update Nimbus beacon node ERA files'
|
||||
systemd_timer_start_on_creation: false
|
||||
systemd_timer_enabled: '{{ nimbus_era_files_timer_enabled }}'
|
||||
systemd_timer_name: '{{ nimbus_era_files_timer_name }}'
|
||||
systemd_timer_name: '{{ nimbus_era_files_timer_update_name }}'
|
||||
systemd_timer_user: '{{ nimbus_era_files_timer_user }}'
|
||||
systemd_timer_group: '{{ nimbus_era_files_timer_group }}'
|
||||
systemd_timer_frequency: '{{ nimbus_era_files_timer_frequency }}'
|
||||
|
@ -24,3 +24,29 @@
|
|||
systemd_timer_script_path: '{{ nimbus_era_files_nclidb_path }}'
|
||||
systemd_timer_script_args: >
|
||||
--network={{ nimbus_era_files_network }} exportEra --db={{ nimbus_era_files_db_path }}
|
||||
|
||||
- name: Create timer for ERA file verification
|
||||
include_role: name=systemd-timer
|
||||
vars:
|
||||
systemd_timer_description: 'Verify Nimbus beacon node ERA files'
|
||||
systemd_timer_start_on_creation: false
|
||||
systemd_timer_consul_warning: true
|
||||
systemd_timer_enabled: '{{ nimbus_era_files_timer_enabled }}'
|
||||
systemd_timer_name: '{{ nimbus_era_files_timer_verify_name }}'
|
||||
systemd_timer_user: '{{ nimbus_era_files_timer_user }}'
|
||||
systemd_timer_group: '{{ nimbus_era_files_timer_group }}'
|
||||
systemd_timer_frequency: '{{ nimbus_era_files_timer_frequency }}'
|
||||
systemd_timer_random_delay_sec: '{{ nimbus_era_files_timer_random_delay_sec }}'
|
||||
systemd_timer_timeout_sec: '{{ nimbus_era_files_timer_timeout_sec }}'
|
||||
systemd_timer_ionice_class: '{{ nimbus_era_files_timer_ionice_class }}'
|
||||
systemd_timer_work_dir: '{{ nimbus_era_files_timer_path }}'
|
||||
systemd_timer_after_extra: '{{ nimbus_era_files_timer_update_name }}.service'
|
||||
systemd_timer_script_content: |
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
for ERA_FILE in {{ nimbus_era_files_timer_path }}/*; do
|
||||
echo "Checking: ${ERA_FILE}"
|
||||
{{ nimbus_era_files_nclidb_path }} \
|
||||
--network={{ nimbus_era_files_network }} \
|
||||
verifyEra --eraFile="${ERA_FILE}"
|
||||
done
|
||||
|
|
Loading…
Reference in New Issue