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

Changed option is ignored #10231

Open
3 tasks done
gdkrmr opened this issue Nov 23, 2023 · 2 comments
Open
3 tasks done

Changed option is ignored #10231

gdkrmr opened this issue Nov 23, 2023 · 2 comments
Labels
effort/hours Estimated to take one or several hours exp/novice Someone with a little familiarity can pick up help wanted Seeking public contribution on this issue kind/bug A bug in existing code (including security flaws) 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

@gdkrmr
Copy link

gdkrmr commented Nov 23, 2023

Checklist

Installation method

ipfs-desktop

Version

This was on the docker version. 

Kubo version: 0.24.0-e70db65
Repo version: 15
System version: amd64/linux
Golang version: go1.21.4

Config

No response

Description

Changing the config

ipfs config --json Experimental.FilestoreEnabled true

and then running (without restarting, as in the documentation)

ipfs add --nocopy ...

will ignore the --nocopy and add everything as blocks. This should probably give an error.

@gdkrmr gdkrmr added kind/bug A bug in existing code (including security flaws) need/triage Needs initial labeling and prioritization labels Nov 23, 2023
@lidel
Copy link
Member

lidel commented Nov 24, 2023

Thank you for surfacing this UX problem @gdkrmr.
Yes, this looks like a bug – add --nocopy should error.

I think this is something not limited to FilestoreEnabled,
we have many flags that don't take effect without restarting, such as entire Routing, including Routing.AcceleratedDHTClient.

Fix proposal

This is a good opportunity to improve UX around config changes.

  • Create a global config Flag named RequiresRestart and setting it to true every time when config change is applied.
    • Have an ignore list of config fields that don't require restart.
      • Why? Because it is shorter, and we won't miss new cofing keys added in the future. Default is to require restart, unless your command does not require it.
      • 👉 From the top of my head (we can expand later), configs that work without restart are limited to:
        • Pinning.RemoteServices
        • ...is there anything else?
    • Reset the flag during ipfs daemon.
  • Then, check for flag in sensitive commands like ipfs add --nocopy
    • If the RequiresRestart is set to true, error asking user to restart first.
    • 👉 👉 From the top of my head (we can expand later), we should check the flag the beginning of all "mutable" and "publish" commands such as:
      • ipfs add, ipfs block put, ipfs dag put|import, ipfs files mkdir|write – we will add ability to adjust default CID parmeters in the future, so config impact won't be limited to add --nocopy
      • ipfs routing provide (impacted by AcceleratedDHTClient)
      • ipfs name publish (impacted by IPNS config params)`
  • There should also be a periodical check that also warns users who should restart, like we did in feat: warn users who are falling behind reprovides #9886

@lidel lidel added kind/enhancement A net-new feature or improvement to an existing feature help wanted Seeking public contribution on this issue exp/novice Someone with a little familiarity can pick up P2 Medium: Good to have, but can wait until someone steps up effort/hours Estimated to take one or several hours and removed need/triage Needs initial labeling and prioritization labels Nov 24, 2023
@Jonath-z
Copy link

@gdkrmr can look into this? First time contributing to open source ;-), I would love just more guidance to work on this

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/novice Someone with a little familiarity can pick up help wanted Seeking public contribution on this issue kind/bug A bug in existing code (including security flaws) 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
No open projects
Status: 🥞 Todo
Development

No branches or pull requests

3 participants