-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
disable 'ipfs name publish' while /ipns is mounted #964
Comments
👍 SGTM. pls make sure error msg to user explains why |
What will the alternative be? What do I do if I have an ipfs hash that I want to publish to ipns? |
@noffle is this done? |
Now we get "Error: cannot manually publish while IPNS is mounted" (which does not show up much on google) |
Can we get an update on this? |
@schomatis has been working on MFS and @djdv has been working on FUSE (in a different branch). Those efforts won't fix this but they should bring us closer. |
Does this mean there currently exists no way to publish an IPFS directory to IPNS? I'm a complete newb here, reading articles like The definitive guide to publishing content on the decentralized web, so I do not know where to look for work around solutions. |
You can publish a directory. You need to:
|
But (2) fails with "Error: cannot manually publish while IPNS is mounted" if you're running with /ipns mounted. So, I guess we need to stop the daemon and restart it unmounted, publish the name, and stop/restart the daemon with mounted? |
Yes. |
That is hardly a solution to any problem. There are two issues right now, one is that having to stop the daemon or unmount a filesystem to publish a record is not a viable solution, so please allow us to do that, we're fairly capable of taking care of our file handles, it's okay to warn, but there ultimately must be an override. Secondly you've raised the issue of what could possibly happen if we were to screw up, however for that we need some more in-depth information. |
Agreed, that is genuinely a ridiculous state of affairs. |
Agreed, a file system that can't practically be mounted in the first place, combined with forcing the user to offline the mount to do basic tasks - is bad. I've previously had branches which do what @benaryorg is describing. Both locking in a reference at the time it's opened (resolve ipns->ipfs and retain this hash) as well as a later implementation which resolve as late as possible instead (during Locking is done now, but in a simple all-or-nothing style. If the mount is active, all keys can no longer be published, whether they're being accessed or not. I've mentioned in discussion that we can most likely come up with some kind of resource locking API that resides on the node and allows node services (like name or mount) to acquire finer grained resource locks.(e.g. That said, there are some more fundamental problems to fix first. I don't think it's even worth enabling people to use the IPNS mount feature with the performance being in the state its in. As always, anyone is free to reach out to me about this. I can keep you posted as progress is made on it, and hear criticisms etc. |
For what it's worth I hacked together a workaround in this (very unstable) branch: https://www.youtube.com/watch?v=24N-qNplHk0 If you only mount IPFS but wish to publish, you could use this branch to mount IPFS alone, and have no conflicts with I think it's doable, but depends on decoupling the existing fuse interface implementation (more). |
I noticed I can just |
That's effectively what's happening in that patch. I think we could automate the re-mount (with a prompt) in The interface I'm trying to replace has IPFS and IPNS as independent interfaces, which should make remounting the instance simpler. For what it's worth, I'm going to keep working on this when I can since it's something I'd like to see improve. I think these interfaces are kind of important for something with "FS" in its name. |
first, then, later, |
We know. That's the problem. 😐 |
One current issue with the
/ipns
mount is that if you do anipfs name publish QmXyz
while its mounted, it wont know to update. I propose that while/ipns
is mounted, we disable the publish command. Not doing so causes a bunch of weird issues, such as "What do we do if the users current working directory is in/ipns
and we change the entry?"The text was updated successfully, but these errors were encountered: