feat(cmds): files: add new-root command to change the MFS root
Some minor fixes pending but it should get a review at this point.
(Sharness test also pending.)
- Connected to https://github.com/ipfs/go-ipfs/issues/7183.
- Closes https://github.com/ipfs/go-ipfs/issues/8100
- Closes #10762 (by allowing for fix)
- Closes #10769
- Closes #3934
- Closes #7183
- Closes #10769
Hello,
I don't have the necessary knowledge to analyse this PR but since I'm the author of #7183, my question is : will it be possible to use this command without the daemon running ?
In my case the root MFS corresponding file was missing in the blocks folder at startup and it prevented the daemon to start. Hence the need to have a replace-root working without daemon.
will it be possible to use this command without the daemon running ?
As written now, yes
Correct, thanks.
Right now the idea is for this command to be used when the MFS filesystem is corrupted and the daemon fails to start (either hangs or refuses) and you need to run this standalone to fix it. If you run it alongside the daemon it will fail as it will try to get a lock on the repo which is already in use. Will add some more documentation around that.
@schomatis : what are the next steps here?
@BigLep As noted in the OP: awaiting review.
@BigLep As noted in the OP: awaiting review.
Perhaps @hsanjuan is busy, @schomatis perhaps you could review in lieu?
No, I can't review my own PR.
No, I can't review my own PR.
Sorry I meant @BigLep!
@schomatis : ACK. I was confused because the PR was left as draft. I have marked it as ready for review.
@BigLep Ok, I see the confusion. The 'Ready for review' button is very misleading. It should actually be 'Ready for merge'. The draft state is a way to signal a WIP PR to make sure you won't accidentally merge it as is. If the IPFS team interprets drafts differently please let me know and I'll adjust my signalling.