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

multipath.aug: quotation marks in key-value parameters #583

Closed
martinhoyer opened this issue Sep 12, 2018 · 3 comments · Fixed by #584
Closed

multipath.aug: quotation marks in key-value parameters #583

martinhoyer opened this issue Sep 12, 2018 · 3 comments · Fixed by #584

Comments

@martinhoyer
Copy link

multipath lens presumes that values that have key-value format will not contain quotation marks.

Our use case:
we have a multipath.conf generated for each array by Red Hat Multipath Helper Tool - access.redhat.com/labs/multipathhelper . eg:
device {
vendor "COMPELNT"
product "Compellent Vol"
path_grouping_policy "multibus"
path_checker "tur"
features "0"
hardware_handler "0"
prio "const"
failback "immediate"
rr_weight "uniform"
no_path_retry "queue"

As you can see, all values are in string quotes. Which is completely fine as confirmed by multipath developer.

Snip from multipath.aug:
|kv "prio" /const|emc|alua|ontap|rdac|hp_sw|hds|random|weightedpath/
|qstr "prio_args"
|kv "failback" (Rx.integer | /immediate|manual|followover/)
|kv "rr_weight" /priorities|uniform/

If we than try to edit the /etc/multipath.conf file using augeas, it will fail.

@lutter
Copy link
Member

lutter commented Sep 24, 2018

Hi,

sorry for not replying sooner; would you expect Augeas to strip out the quotes or would it be fine for your use to have "immediate" as the value of a tree node ? The former is a bit more involved to do ...

lutter added a commit to lutter/augeas that referenced this issue Sep 24, 2018
Multipath is happy with values enclosed in quotes, like 'path_checker
"tur"' in addition to the unquoted values. This change accepts such values
and strips the enclosing quotes.

Fixes hercules-team#583
@lutter
Copy link
Member

lutter commented Sep 24, 2018

Actually, this turned out to be easier than I thought, even with stripping the quotes. Have a look and let me know if that change works for you.

@martinhoyer
Copy link
Author

Hi,
awesome, thank You so much!
Just tested it with our reproducer, everything seems to be working well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants