go-ipfs version: 0.4.11-
Repo version: 6
System version: amd64/darwin
Golang version: go1.9
Bug
Low
ipfs config interacts with the configuration file on disk, but not with the current configuration state of the daemon. This means that the operator cannot know for sure which configuration is currently applied, and which requires a daemon restart.
Below are a few possible ways to fix the issue.
Add an optional flag ipfs config [--live=false]. On --live=true, all config commands operate on the live config state of the running daemon, instead of the config file.
Add a new command ipfs config reload, to reload the live configuration from disk without requiring a daemon restart.
Add a new command ipfs config diff, to show the differences between the live configuration and the on-disk configuration. Optionally, this could be implemented as ipfs config reload --dry-run.
@kevina @massino is there any update on this, and if not, is there a better alternative to updating the configuration other than an ipfs shutdown + ipfs daemon? Thanks!
Unfortunately, there's no update for now. This would be a great feature to have but likely won't happen for a while.
@Stebalien thanks for the quick response!
We (RTradeLtd) are interested in implementing this - if you have any pointers for how we might go about it, it would be greatly appreciated!
There are (al teast) 2 ways to approach this:
ipfs shutdown + ipfs daemonFirst option should be fairly easy to implement, second would need to be implemented very carefully and require a lot of invasive changes in the codebase (I'm planning IpfsNode refactor, I'll try to take this into account)
Thanks @magik6k - I think we're interested in implementing the second one, since if we're going to do it, we might as well go all the way right?
A bit curious about your planned IpfsNode refactor, however - is this something that you'll be working on soon? We don't want to clash with your work, so should we wait, or work together with you on the refactor?
It depends on your definition of 'soon', but probably no. I'm just lining up ideas for how to make it better, but it will happen somewhere in 2019 when coreapi stabilizes.
If you really want to start working on it, I'd start with creating a meta issue documenting all config options, whether they are applied live (some already are), and what is required to make this happen. Then with some discussion you and maybe some other contributors should be able to jump in and make the changes in smaller chunks so PRs don't take months to review and are simpler in general.
cc @Stebalien
The second option shouldn't actually be that tricky. We'd probably want to:
ipfs config reload is issued, all subscribers would get a copy of the old config and the new config.Ideally, services would be able to subscribe to portions of the config but that's probably more trouble than it's worth.
Most helpful comment
It depends on your definition of 'soon', but probably no. I'm just lining up ideas for how to make it better, but it will happen somewhere in 2019 when coreapi stabilizes.
If you really want to start working on it, I'd start with creating a meta issue documenting all config options, whether they are applied live (some already are), and what is required to make this happen. Then with some discussion you and maybe some other contributors should be able to jump in and make the changes in smaller chunks so PRs don't take months to review and are simpler in general.
cc @Stebalien