Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

Add a restart method to allow config updates to be applied via api #2895

Closed
olizilla opened this issue Sep 17, 2018 · 10 comments
Closed

Add a restart method to allow config updates to be applied via api #2895

olizilla opened this issue Sep 17, 2018 · 10 comments
Assignees
Labels
exp/expert Having worked on the specific codebase is important help wanted Seeking public contribution on this issue kind/feature kind/wontfix

Comments

@olizilla
Copy link
Member

The api allows for the node config to be changed via config.set and config.replace and for stopping of the daemon process via stop but there is no way to start or reload the service. To get config changes applied you must have some mechanism to restart the node.

A restart method would allow the user to make config changes via webui and have them by applied by stopping and restarting the service.

For bonus points nginx provides a reload command that allows the user to apply the config without stopping the service.

@olizilla
Copy link
Member Author

olizilla commented Sep 17, 2018

As a workaround, we could suggest that users always deploy ipfs with a process manager like init or systemd so that ipfs is automatically restated after it is shutdown, but it feels like something we should support directly as it's required to apply config changes.

@olizilla
Copy link
Member Author

@diasdavid @Stebalien how about it? Right now the user experience of editing the node config via web UI is bad. You can edit it and save it, but you can't get it applied without going to the command line, killing an starting the process.

We want Web UI to be able to "save & apply". A really nice thing this would unlock is to offer up the experimental features as toggle switches on the settings page so we can promote them and get more people using them.

For the hyperlinkers this is in the same api quadrant as #1547 - API to reset config to defaults, as people may break their config and need a way back to the happy path.

@daviddias
Copy link
Member

daviddias commented Sep 27, 2018

Seems like a very easy win to me :) 👍🏽

@Stebalien
Copy link
Member

A restart command sounds reasonable. To make systemd users happy, we could also add a --restart-exit-code daemon flag. When set, restart would actually just exit with that exit code. The systemd unit would be configured to restart the daemon when it exits with the specified error code.

@richardschneider
Copy link
Contributor

@Stebalien good idea!

I think the daemon flag should be named --exit-code. Also, the stop command/http endpoint should also accept it. I also suggest that the default value is zero.

@Stebalien
Copy link
Member

I think the daemon flag should be named --exit-code

I think you may have misunderstood the issue we're discussing. --restart-exit-code would set the exit code used when the daemon wants to be restarted.

@richardschneider
Copy link
Contributor

I was thinking of two commands ipfs restart and ipfs stop that could also be used by HTTP-API.

@Stebalien
Copy link
Member

I guess allowing an arbitrary exit code for shutdown could be useful. But that really is a different issue. (note: we already have ipfs shutdown)

@achingbrain achingbrain transferred this issue from ipfs-inactive/interface-js-ipfs-core Mar 10, 2020
@achingbrain achingbrain added kind/feature exp/expert Having worked on the specific codebase is important help wanted Seeking public contribution on this issue labels Mar 10, 2020
@ThomasFreedman
Copy link

Apparently this feature is a very low priority.

@achingbrain
Copy link
Member

Closing as not planned.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
exp/expert Having worked on the specific codebase is important help wanted Seeking public contribution on this issue kind/feature kind/wontfix
Projects
No open projects
Status: Done
Development

No branches or pull requests

6 participants