Repository navigation
wip: Support 'reload' action for supervise-daemon #1091
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
Open
meoovv
wants to merge
6
commits into
OpenRC:master
Choose a base branch
from
meoovv:s-d-reload
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+17
−1
Open
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
5429717
Support 'reload' action for services with supervisor=supervise-daemon
a8b883a
Document 'reload' action for s6 and supervise-daemon services
44c5983
Document 'reload' action for s6 and supervise-daemon services [2]
5430474
Remove useless code from supervise-daemon's reload function
c30a1d6
Support reloadsig= option for supervise-daemon
874e8de
Support reloadsig= option for supervise-daemon [2]
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -10,7 +10,7 @@ | |
| # This file may not be copied, modified, propagated, or distributed | ||
| # except according to the terms contained in the LICENSE file. | ||
|
|
||
| extra_commands="healthcheck unhealthy ${extra_commands}" | ||
| extra_commands="healthcheck unhealthy reload ${extra_commands}" | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. if it's becoming a default, might as well add to openrc-run directly like start and stop |
||
|
|
||
| supervise_start() | ||
| { | ||
|
|
@@ -83,6 +83,18 @@ supervise_stop() | |
| eend $? "Failed to stop ${name:-$RC_SVCNAME}" | ||
| } | ||
|
|
||
| supervise_reload() | ||
| { | ||
| case "${reloadsig}" in | ||
| "") eerror "Reloading is disabled for ${name:-$RC_SVCNAME}" ;; | ||
| *) | ||
| ebegin "Reloading ${name:-$RC_SVCNAME}" | ||
| supervise-daemon "${RC_SVCNAME}" --signal "${reloadsig:-"HUP"}" | ||
| eend $? "Failed to reload ${name:-$RC_SVCNAME}" | ||
| ;; | ||
| esac | ||
| } | ||
|
|
||
| _check_supervised() | ||
| { | ||
| local child_pid start_time | ||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
start-stop-daemon also has --signal, so there's no reason it couldn't also implement reload()
while we do want to move towards defaulting to supervise-daemon, plenty of services ship a reload function for s-s-d, so having a way for those services to drop their custom functions would help with that goal
this leaves only runit, which does support sending a signal but honestly i have no idea how is our state of support for runit at this point that maybe we leave it missing for now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
well, theres some activity around adding
reloadsupport to s-s-d in #1032, but author doesnt seem to be addressing concerns. i could create a similar pr for s-s-d, then we could wait for author of #1052 and once everything has been merged, list reload in openrc-run.shThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
f_ is very much active on the openrc irc channel and ska is also around there. i mostly asked both of them to wait with this features until 0.64 was out (plus some time on top to chase regressions), there were too many features stacked on master
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so, its probably time to call them back now 🧐
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@meoovv I appreciate you're enthusiastic, but you're being rather pushy. Please try to dial it back.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@meoovv Yes, but projects don't generally need someone to come in and start delegating tasks. People work on FOSS projects when they feel like it. You don't need to tell navi to ping them, she can do that herself if or when she wants to.
But also, 0.64 and 0.64.1 only just came out. It's not like it's been ages.
It's not the same as running a meeting in a company.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
disagree, but i can clarify things more gently if people do feel uncomfortable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm asking you to not try direct people.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FWIW my PR does both s-s-d and s-d. I am pretty sure I addressed everything, what are you thinking of in particular that needs addressing?
There is no need for a boolean here, IMO. If reloadsig is not set, then service is not reloadable. There shouldn't be a need to manually set reloadsig="" in service scripts for that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And between the time I opened the PR and now I also took a break from userspace work for reasons. Go easy on me