This repository has been archived by the owner on Nov 15, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
staking-miner
: Add handling of SIGTERM
, SIGKILL
, SIGQUIT
and SIGINT
#5780
Merged
Conversation
This file contains 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
chevdor
force-pushed
the
wk-220713-fix-5649-staking-miner-sigterm
branch
from
July 13, 2022 14:11
8d319ce
to
b4e4c27
Compare
chevdor
force-pushed
the
wk-220713-fix-5649-staking-miner-sigterm
branch
from
July 13, 2022 14:13
b4e4c27
to
da0a934
Compare
chevdor
added
A0-please_review
Pull request needs code review.
B0-silent
Changes should not be mentioned in any release notes
C1-low
PR touches the given topic and has a low impact on builders.
labels
Jul 13, 2022
chevdor
changed the title
Jul 13, 2022
staking-miner
: Add handling of SIGTERM
, SIGKILL
and SIGINT
staking-miner
: Add handling of SIGTERM
, SIGKILL
, SIGQUIT
and SIGINT
kianenigma
approved these changes
Jul 13, 2022
niklasad1
previously requested changes
Jul 16, 2022
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.
Nice attempt but this will not work.
You need to check whether the monitor command
or signal flag has been fired
.
As the monitor command can run "indefinitely" the future from signal may never be polled.
So it would be better to do select(monitor, signal)
or something similar.
Have a look at paritytech/polkadot-staking-miner#35
niklasad1
approved these changes
Jul 16, 2022
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.
nice, missed that you used controlled_exit
to cancel
Dropping the monitor futures and the tokio rt should close down everything.
ordian
added a commit
that referenced
this pull request
Jul 22, 2022
* master: westend xcm: collectives parachain is trusted teleporter (#5798) Cleanup light client leftovers (#5794) Fix benchmarking tests (#5791) allow re-use and avoid compiling kusama parachain code (#5792) Introduce async runtime calling trait for runtime-api subsystem (#5782) add `Extrinsic Ordering` check that runs against a local reference node (#5790) Co #11456: Expose `benchmark extrinsic` command (#5620) `staking-miner`: Add handling of `SIGTERM`, `SIGKILL`, `SIGQUIT` and `SIGINT` (#5780) Zombienet: paritydb test (#5310) Fix Typo (#5766) Fix Core Version display in the release notes (#5781) companion for new pools reward scheme (#5757) fix disable-runtime-api feature flag (#5773) split NetworkBridge into two subsystems (#5616) Implement prune only stagnant check mode (#5761)
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
A0-please_review
Pull request needs code review.
B0-silent
Changes should not be mentioned in any release notes
C1-low
PR touches the given topic and has a low impact on builders.
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.
This PR adds handling of:
SIGQUIT
|SIGINT
(keyboard signals)SIGTERM
|SIGKILL
to the staking miner.
The doc about those signals can be found here.
The keyboard signals require the user to confirm twice (ie CTRL+C then CTRL+C again) and a confirmation warning is shown after the first signal is received.
Other signals will exit immediately so Docker / K8S should issue
SIGTERM
orSIGKILL
.fix #5649