kubo icon indicating copy to clipboard operation
kubo copied to clipboard

feat(cmds): files: add new-root command to change the MFS root

Open schomatis opened this issue 3 years ago • 10 comments

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

schomatis avatar Jan 10 '22 14:01 schomatis

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.

nlko avatar Jan 10 '22 15:01 nlko

will it be possible to use this command without the daemon running ?

As written now, yes

bqv avatar Jan 10 '22 18:01 bqv

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 avatar Jan 11 '22 14:01 schomatis

@schomatis : what are the next steps here?

BigLep avatar Mar 03 '22 13:03 BigLep

@BigLep As noted in the OP: awaiting review.

schomatis avatar Mar 03 '22 15:03 schomatis

@BigLep As noted in the OP: awaiting review.

Perhaps @hsanjuan is busy, @schomatis perhaps you could review in lieu?

bqv avatar Mar 03 '22 15:03 bqv

No, I can't review my own PR.

schomatis avatar Mar 03 '22 15:03 schomatis

No, I can't review my own PR.

Sorry I meant @BigLep!

bqv avatar Mar 03 '22 16:03 bqv

@schomatis : ACK. I was confused because the PR was left as draft. I have marked it as ready for review.

BigLep avatar Mar 04 '22 01:03 BigLep

@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.

schomatis avatar Mar 04 '22 13:03 schomatis