From c8e3232dff2f92d6b40e92b89dfc92941a41e45e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Soko=C5=82owski?= Date: Wed, 12 Oct 2022 09:30:46 +0200 Subject: [PATCH] nimbus-era-files: use --network flag to fix errors MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Changes to default runtime config have caused errors like this: ``` FAT Could not load head state, database corrupt? tid=3639597 file=blockchain_dag.nim:920 head=e7d4f3b7:4636671 tail=4d611d5b:0 genesis=4d611d5b:0 ``` Signed-off-by: Jakub SokoĊ‚owski --- ansible/group_vars/nimbus.mainnet.yml | 1 + ansible/mainnet.yml | 2 +- ansible/roles/nimbus-era-files/README.md | 1 + ansible/roles/nimbus-era-files/defaults/main.yml | 1 + ansible/roles/nimbus-era-files/tasks/main.yml | 3 ++- 5 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ansible/group_vars/nimbus.mainnet.yml b/ansible/group_vars/nimbus.mainnet.yml index 4bd6880..7a498ab 100644 --- a/ansible/group_vars/nimbus.mainnet.yml +++ b/ansible/group_vars/nimbus.mainnet.yml @@ -90,6 +90,7 @@ nimbus_db_purge_trusted_node_sync_enabled: '{{ node.get("db_sync", false) }}' # ERA files geneartion. nimbus_era_files_timer_enabled: '{{ (nodes_layout[hostname]|length) > 1 }}' nimbus_era_files_timer_path: '/data/era' +nimbus_era_files_network: '{{ beacon_node_network }}' # FIXME: Not pretty, since hardcoded, but the simplest way to do it right now. nimbus_era_files_node_service_path: '/data/beacon-node-{{ beacon_node_network }}-stable-01' nimbus_era_files_nclidb_path: '{{ nimbus_era_files_node_service_path }}/repo/build/ncli_db' diff --git a/ansible/mainnet.yml b/ansible/mainnet.yml index 519a9c0..eb70924 100644 --- a/ansible/mainnet.yml +++ b/ansible/mainnet.yml @@ -38,7 +38,7 @@ - { role: infra-role-geth, tags: [ infra-role-geth ] } - { role: infra-role-geth-exporter, tags: [ infra-role-geth-exporter ] } - { role: get-geth-api-urls, tags: [ get-geth-api-urls ] } - - { role: nimbus-era-files, tags: [ nimbus-era-file ] } + - { role: nimbus-era-files, tags: [ nimbus-era-files ] } tasks: - include_role: name=infra-role-beacon-node-linux tags: [ beacon-node, infra-role-beacon-node-linux ] diff --git a/ansible/roles/nimbus-era-files/README.md b/ansible/roles/nimbus-era-files/README.md index f7cefa2..f233e59 100644 --- a/ansible/roles/nimbus-era-files/README.md +++ b/ansible/roles/nimbus-era-files/README.md @@ -13,6 +13,7 @@ nimbus_era_files_timer_name: 'nimbus-era-files-update' 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' +#nimbus_era_files_network: 'prater' ``` # Management diff --git a/ansible/roles/nimbus-era-files/defaults/main.yml b/ansible/roles/nimbus-era-files/defaults/main.yml index 472acd1..791d0e7 100644 --- a/ansible/roles/nimbus-era-files/defaults/main.yml +++ b/ansible/roles/nimbus-era-files/defaults/main.yml @@ -13,3 +13,4 @@ nimbus_era_files_timer_script: '{{ nimbus_era_files_timer_path }}/update.sh' # Mandatory #nimbus_era_files_nclidb_path: ~ #nimbus_era_files_db_path: ~ +#nimbus_era_files_network: ~ diff --git a/ansible/roles/nimbus-era-files/tasks/main.yml b/ansible/roles/nimbus-era-files/tasks/main.yml index d4850a3..8f29cc4 100644 --- a/ansible/roles/nimbus-era-files/tasks/main.yml +++ b/ansible/roles/nimbus-era-files/tasks/main.yml @@ -21,4 +21,5 @@ systemd_timer_ionice_class: '{{ nimbus_era_files_timer_ionice_class }}' systemd_timer_work_dir: '{{ nimbus_era_files_timer_path }}' systemd_timer_script_path: '{{ nimbus_era_files_nclidb_path }}' - systemd_timer_script_args: 'exportEra --db={{ nimbus_era_files_db_path }}' + systemd_timer_script_args: > + --network={{ nimbus_era_files_network }} exportEra --db={{ nimbus_era_files_db_path }}