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

[enh] reload-or-restart instead of reload #681

Merged
merged 1 commit into from Mar 14, 2019

Conversation

Projects
None yet
4 participants
@maniackcrudelis
Copy link
Contributor

commented Mar 13, 2019

The problem

YunoHost-Apps/wordpress_ynh#57
For unknown reasons, php7 can be sometime stopped, the reload fails then because the service is not active.

Solution

Use reload-or-restart instead of reload, so it would try to reload, and if the service isn't running, it will restart instead.

PR Status

Not tested, is it really needed ?

How to test

...

Validation

  • Principle agreement 0/2 :
  • Quick review 0/1 :
  • Simple test 0/1 :
  • Deep review 0/1 :

@YunoHost/apps

@alexAubin
Copy link
Member

left a comment

LGTM

@alexAubin alexAubin added this to the 3.5.x milestone Mar 13, 2019

@JimboJoe
Copy link
Member

left a comment

LGTM

@alexAubin alexAubin merged commit 0a51dcc into stretch-unstable Mar 14, 2019

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@alexAubin alexAubin deleted the reload-or-restart branch Mar 14, 2019

@kay0u

This comment has been minimized.

Copy link
Contributor

commented Mar 14, 2019

The log expected by the argument --line_match could be differents if is it's a reload or a restart. What about a reload-or-restart? That could introduce an bug I think.

@maniackcrudelis

This comment has been minimized.

Copy link
Contributor Author

commented Mar 14, 2019

What do you mean ? That the line to match would be different if you restart or reload the service?
And so that it could be a problem if you ask for a reload and finally you have a restart ?

Well, first I don't think you would use --line_match with reload, reload isn't a long process.
Except in case you expect the reload to fail.
Anyway, in case that would happen, it will simply reach the time out. No big deal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.