Skip to content

Add optional pre/post update hooks#2464

Open
erl-100 wants to merge 4 commits intoethstaker:mainfrom
erl-100:postUpdateScript
Open

Add optional pre/post update hooks#2464
erl-100 wants to merge 4 commits intoethstaker:mainfrom
erl-100:postUpdateScript

Conversation

@erl-100
Copy link

@erl-100 erl-100 commented Feb 15, 2026

What I did

Added support for optional pre-ethd-update.sh and post-ethd-update.sh hook scripts that execute during ethd update and ethd config commands, allowing users to run custom automation before and after configuration/update operations.

Related issue
Closes #2459

Use Cases & Justification

These hooks enable users to automate workflows around Eth Docker operations without modifying the core ethd script, while keeping standard commands and workflow. By integrating the scripts into the repo, users can guarantee the scripts are run without having to remember or worry that other node maintainers follow an update policy.

The hooks are very powerful and customizable based on each user's use case. I think they empower those looking for the ability to rollback changes or have 100% reproducibility over time. I believe this is important because ethd update makes changes you may not expect or know about to your configuration file. ethd config was included because even advanced users can take advantage of this command for updates like changing clients, and this can give them more confidence knowing the exact changes.
Additionally, other ideas include:

  • Create snapshots or backups before making changes.
  • Ability to abort an update if your predefined criteria are not met.
  • Validate/Commit changes to config tracking repo.
  • Trigger configuration management tools (Ansible, Puppet, etc.).
  • Send completion notifications or metrics.
  • Run custom validation tests.
  • Maintain a log of changes made.

Behavior

  • Both scripts are optional.
  • Eth Docker functions normally without them.
  • Scripts must be executable (chmod +x) to run.
  • Pre-hook failures block the operation (by design—safety first).
  • Post-hook failures are reported but don’t block completion.
  • Clear console output indicates when hooks are running.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

New Feature Proposal – Post update script

1 participant