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

Why systemd Restart=on-success rule ? #35

Closed
sberthier opened this issue Jul 17, 2019 · 3 comments
Closed

Why systemd Restart=on-success rule ? #35

sberthier opened this issue Jul 17, 2019 · 3 comments

Comments

@sberthier
Copy link
Contributor

I wonder why the restart rule on systemd service is set to 'on-success'.
I would expect a policy like 'always'.

I am starting to use minio cluster and during tests, some nodes crashed, either because of out of memory, or with 'Write failed. Insufficient number of disks online' errors when I shutdown some nodes (2 over 4, which is enough to read, but not to write)
Not sure if the last is expected, but I would expect the cluster to be up even read only.

The comment above this rule in minio.service.j2 does not explain why.

# Let systemd restart this service only if it has ended with the clean exit code or signal.
Restart=on-success
@atosatto
Copy link
Owner

Hi @sberthier, this is a fair point.

Originally this was meant to avoid systemd to restart the service in case of crash.
However I do also see that the systemd unit definition available at https://github.com/minio/minio-service/blob/master/linux-systemd/minio.service is setting Restart=always.

It would probably make sense to align our systemd unit template to the one maintained upstream.

@SuperQ thoughts?

@SuperQ
Copy link
Collaborator

SuperQ commented Jul 18, 2019

Yea, "always" seems reasonable to me. We should make sure there's a sleep/backoff setting in there to avoid noisy crashloops.

@atosatto
Copy link
Owner

Closed with #36

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

No branches or pull requests

3 participants