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

Implement forest-cli daemon stop command. #2402

Closed
5 tasks done
elmattic opened this issue Jan 10, 2023 · 0 comments · Fixed by #2538
Closed
5 tasks done

Implement forest-cli daemon stop command. #2402

elmattic opened this issue Jan 10, 2023 · 0 comments · Fixed by #2538

Comments

@elmattic
Copy link
Contributor

elmattic commented Jan 10, 2023

Issue summary

Forest is capable of shut-downing itself because it installed a handler that catches SIGINT and SIGTERM signals.
So if forest is running in the foreground, hitting Ctrl+C will stop the node.

We would like an equivalent of the Shutdown endpoint in common api of Lotus, as an alternative of resorting only on ctrl+c or kill commands.

Task summary

  • Expose a Shutdown RPC endpoint with admin rights
  • Expose some internal signal to gracefully shutdown forest
  • Bind ctrc+c and RPC inbound message to it

Acceptance Criteria

  • Calling forest-cli shutdown shutdowns the node
  • Using signals (ie ctrl+c) still works

Other information and links

https://lotus.filecoin.io/lotus/manage/lotus-cli/#lotus-daemon-stop
https://github.com/filecoin-project/lotus/blob/master/api/api_common.go#L51

Note that this command will require that the RPC server be running.

@elmattic elmattic added this to the Forest 🌲 Infrastructure milestone Jan 17, 2023
@elmattic elmattic self-assigned this Feb 13, 2023
@elmattic elmattic mentioned this issue Feb 13, 2023
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

Successfully merging a pull request may close this issue.

1 participant