Skip to content

Conversation

@lukeiannucci
Copy link
Contributor

Closes #<ISSUE_NUMBER>

This PR:

This PR does not:

Key places to review:

Copy link
Contributor

@akonring akonring left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

After=network.target nitro.service
Requires=network-online.target
Wants=nitro.service
Requires=network-online.target nitro.service
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if the dependency to nitro has to be:

BindsTo=nitro.service

Timeboost should not run when nitro isn't and BindsTo is a stronger dependency mode than Requires.

Environment=RUST_LOG={{LOG_DIRECTIVES}}
Restart=always
RestartSec=5
TimeoutStartSec=infinity
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this needed? Startup should be more or less instant. I would not expect systemd to count the time a dependency requires for its own startup to count against the dependent's startup duration.

Copy link
Contributor Author

@lukeiannucci lukeiannucci Dec 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is really only needed in the case of no database on the machine and has to rebuild the whole chain data. i dont think this should ever be the case as an operator should ideally never start without a database. So we would notify immediately. Perhaps we should just remove the time

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What I had in mind is that systemd would not start Timeboost before Nitro has completed its own startup (regardless of how long that takes), so systemd should not have to wait for Timeboost to start.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry i do not quite follow. When we call:

systemctl start timeboost.service 

and timeboost.service depends on nitro, if nitro takes an excessive amount of time to sync up, timeboost will fail. that is why i added the timeout. but I guess since we restart as per config, this is fine? or am i not understanding something?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IIUC TimeoutStartSec is only relevant for services that signal startup completion. timeboost.service is of type simple, i.e. systemd considers timeboost started right after it forked it. Furthermore, systemd knows that timeboost depends on nitro, but it would not count nitro's startup time against timeboost's.

Environment=HOME=/home/ec2-user
Restart=always
RestartSec=5
TimeoutStartSec=infinity
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we should add this too:

BindsTo=timeboost.service

Both services depend on each other. If timeboost stops, so should nitro.

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.

4 participants