Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Be more conservative with service restarts #210

Open
barrettj12 opened this issue Apr 3, 2023 · 3 comments
Open

Be more conservative with service restarts #210

barrettj12 opened this issue Apr 3, 2023 · 3 comments
Labels
Feature A feature request Low Priority The opposite of "Priority"

Comments

@barrettj12
Copy link
Contributor

To avoid service disruption, Pebble should restart services only when absolutely required. Currently, any change to the service definition will trigger a service restart. However, IMO there are a few fields which shouldn't require restarting the services:

  • Metadata such as Summary, Description, Override
  • LogTargets, as log forwarding is managed externally from the service by the log manager.
  • Dependencies and service actions - ideally the service manager should be able to internally change the config here without having to restart the running process.
@aliamerj
Copy link

aliamerj commented Sep 3, 2023

could you please provide some extra information

for example

Specific Fields:

You've mentioned Metadata, LogTargets, Dependencies, and service actions as fields that shouldn't trigger a restart. Are there any other fields you think should be included in this list?

Real-world Issues:

Can you share some examples where the current restarts have been a problem?

Fallback:

Would you still want a manual restart option?

Config:

Should be there a setting to toggle this feature ?

@barrettj12
Copy link
Contributor Author

You've mentioned Metadata, LogTargets, Dependencies, and service actions as fields that shouldn't trigger a restart. Are there any other fields you think should be included in this list?

My opinion is basically: we should restart a service if and only if we make a change that requires a new Linux process. If we can just modify the existing process - let's do that, no need to restart. If we're just changing metadata or configuration which is external to the actual process, then we can just make that change without restarting the process.

Can you share some examples where the current restarts have been a problem?

I don't have a "real-world" example, but this caused surprising behaviour while I was writing tests for log forwarding. Service restarts trigger changes down the line (e.g. in the log manager).

I can imagine it would be an issue if we're using Pebble to run a service where availability is important - the current behaviour causes unnecessary downtime.

Would you still want a manual restart option?

We already have the pebble restart command, so no changes needed here.

Should be there a setting to toggle this feature ?

No, because you can manually restart a service if you really want.

Note that because this is a breaking change to Pebble behaviour, we'd probably need approval from top brass before implementing this.

@barrettj12
Copy link
Contributor Author

For reference, here is the original thread where we discussed this.

@benhoyt benhoyt added Feature A feature request Needs Design Needs a design or spec labels Mar 13, 2024
@benhoyt benhoyt added Low Priority The opposite of "Priority" and removed Needs Design Needs a design or spec labels May 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature A feature request Low Priority The opposite of "Priority"
Projects
None yet
Development

No branches or pull requests

3 participants