-
Notifications
You must be signed in to change notification settings - Fork 5.9k
-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
[Feat]: Overhaul handling of options for installer code in the kickstart script. #12630
Comments
Are there supposed to be multiple options? If so, what delimiter do we use? |
Also. Can we require these options ( --local-build-options & --static-install-options) to follow --build-only & -static-only options correspondingly? |
My expectation here is to grab the next argument after the IOW, the following should both work, and be equivalent:
I would prefer not to, as we generally do not enforce option ordering right now even for cases where it might make sense. Based on personal experience, while it does make coding the option parsing code easier, it also make life more difficult for users. I’ve already got an idea of how to do this without strict ordering and without making the code look too complicated, and was actually kind of planning to pick this up myself today, so we can discuss it on the PR once I’ve got that up later today. |
The problem is that while you're parsing the command line parameters you don't know if you should handle those |
In this case it’s not really all that much more complicated. We’re just storing values for these options, ergo we simply need to store them in a way that we can check after all the options are parsed if they were valid or not. We already do this in a couple of cases as is (for example, handling of install prefixes), and in this case it’s just a couple of extra conditionals after the parsing loop. |
Problem
Currently, the kickstart script blindly saves all unrecognized options to pass them to either
netdata-installer.sh
or the static installer code. This has a number of issues:netdata-installer.sh
and the static installer code do not support the same set of options, and on many systems neither is ever even invoked. This means that any given option may do nothing on some systems, break the install on others, and work correctly on yet others.Description
To remedy this, I would like to add two new options,
--local-build-options
and--static-install-options
, to be used for explicitly passing options tonetdata-installer.sh
and the static build code respectively, and change the current behavior from warning about unrecognized options to explicitly failing on unrecognized options.Importance
must have
Value proposition
Proposed implementation
--local-build-options
should only be accepted if the--build-only
option was specified.--static-install-options
should only be accepted if the--static-only
option was specified.NETDATA_INSTALLER_OPTIONS
variable.The text was updated successfully, but these errors were encountered: