-
Notifications
You must be signed in to change notification settings - Fork 33
run-pktvisor.sh IFS fix for args with spaces #111
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this, I wish I would have realized we needed this for the arguments that require spaces. I hate to break backward compatibility here though. How about we do it differently without breaking existing installations: let's use a new variable that is semi colon delimited, call it PKTVISOR_ARGS (without the D). We can change the docs to make that the main variable people should use now, and say that PKTVISORD_ARGS is deprecated. But in the script we will still accept it as is (with a warning?). Does that work?
|
... and then when 3.3.x lands, we will instead recommend that config files be used instead of arguments. |
|
How about PKTVISORD_ARGS accepts both? We check for presence of |
If that won't results in a false positive then yeah that's a good idea. I guess I can't think of a situation were semi colon should appear otherwise. |
weyrick
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
great!
* run-pktvisor.sh IFS fix for args with spaces * Add check for presence of semi colon for conditional IFS * Update README.md for pktvisor-prom-write with semi colon example
When including a bpf filter with spaces in PKTVISORD_ARGS, the container fails to start. For example,
-b port 53 and port 53000will demonstrate this.The default internal field separator(IFS) is parsing the whitespace in the filter and passing the results as arguments to pktvisord.
One solution to address this problem is to change the field separator to a semicolon as shown in this PR.