Skip to content
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

Implement ipfs swarm limit [scope] --reset #8918

Closed
lidel opened this issue Apr 28, 2022 · 0 comments · Fixed by #9310 · May be fixed by #8950
Closed

Implement ipfs swarm limit [scope] --reset #8918

lidel opened this issue Apr 28, 2022 · 0 comments · Fixed by #9310 · May be fixed by #8950
Assignees
Labels
effort/hours Estimated to take one or several hours exp/intermediate Prior experience is likely helpful help wanted Seeking public contribution on this issue kind/enhancement A net-new feature or improvement to an existing feature P2 Medium: Good to have, but can wait until someone steps up

Comments

@lidel
Copy link
Member

lidel commented Apr 28, 2022

Part of #8761, follow-up after #8680 and #8901

Context

#8901 added ipfs swarm limit command for setting limits per scope and persisting them in config under Swarm.ResourceMgr.Limits

Problem

What we are missing, is a way for people to remove custom limits and reset them to the implicit defaults provided with go-ipfs/go-libp2p. Right now, our users need to manually edit $IPFS_PATH/config by hand and remove entries from Swarm.ResourceMgr.Limits, which is error-prone, and then reboot the node so the implicit default limits are restored.

We can do better!

Proposed solution

Implement optional parameter ipfs swarm limit [scope] --reset that will:

  • check if Swarm.ResourceMgr.Limits has any custom limits, and remove them
    • apply default limits in realtime, so node restart is not necessary
    • be idempotent, so if there is no limit to remove, just print the current (default) limit
  • return the updated limit (same as ipfs swarm limit [scope] without any parameter)
@lidel lidel added the kind/enhancement A net-new feature or improvement to an existing feature label Apr 28, 2022
@lidel lidel added this to the Best Effort Track milestone Apr 28, 2022
@lidel lidel added P2 Medium: Good to have, but can wait until someone steps up exp/intermediate Prior experience is likely helpful effort/hours Estimated to take one or several hours help wanted Seeking public contribution on this issue labels Apr 28, 2022
@lidel lidel mentioned this issue May 31, 2022
3 tasks
@BigLep BigLep linked a pull request Jun 3, 2022 that will close this issue
@ajnavarro ajnavarro self-assigned this Sep 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
effort/hours Estimated to take one or several hours exp/intermediate Prior experience is likely helpful help wanted Seeking public contribution on this issue kind/enhancement A net-new feature or improvement to an existing feature P2 Medium: Good to have, but can wait until someone steps up
Projects
Archived in project
2 participants