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

cosmovisor: pass quit signals to subprocess #7776

Merged
merged 3 commits into from
Nov 13, 2020

Conversation

yihuang
Copy link
Collaborator

@yihuang yihuang commented Nov 2, 2020

Description

closes: #7740


Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.

  • Targeted PR against correct branch (see CONTRIBUTING.md)
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
  • Code follows the module structure standards.
  • Wrote unit and integration tests
  • Updated relevant documentation (docs/) or specification (x/<module>/spec/)
  • Added relevant godoc comments.
  • Added a relevant changelog entry to the Unreleased section in CHANGELOG.md
  • Re-reviewed Files changed in the Github PR explorer
  • Review Codecov Report in the comment section below once CI passes

@codecov
Copy link

codecov bot commented Nov 2, 2020

Codecov Report

Merging #7776 (e4f70ef) into master (0b1a3ee) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master    #7776   +/-   ##
=======================================
  Coverage   54.17%   54.17%           
=======================================
  Files         612      612           
  Lines       38999    38999           
=======================================
  Hits        21129    21129           
  Misses      15697    15697           
  Partials     2173     2173           

cosmovisor/process.go Outdated Show resolved Hide resolved
@yihuang
Copy link
Collaborator Author

yihuang commented Nov 2, 2020

there seems to be race conditions detected by go test, I'm not sure why.

Copy link
Contributor

@amaury1093 amaury1093 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK

@amaury1093 amaury1093 added the A:automerge Automatically merge PR once all prerequisites pass. label Nov 13, 2020
@@ -39,6 +43,15 @@ func LaunchProcess(cfg *Config, args []string, stdout, stderr io.Writer) (bool,
return false, fmt.Errorf("launching process %s %s: %w", bin, strings.Join(args, " "), err)
}

sigs := make(chan os.Signal, 1)
signal.Notify(sigs, syscall.SIGQUIT, syscall.SIGTERM)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We may need to handle SIGINT as well

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And we need to document this behaviour too

@mergify mergify bot merged commit 5f580a1 into cosmos:master Nov 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A:automerge Automatically merge PR once all prerequisites pass.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

cosmovisor don't pass SIGTERM to subprocess
3 participants