#3: NetTestCommandSystemConfig: multiple values for one option ------------------------+------------------------- Reporter: olichtne | Owner: olichtne@… Type: task | Status: new Priority: major | Milestone: Component: component1 | Version: Keywords: | Blocked By: Blocking: | ------------------------+------------------------- System config options can have multiple values. This happens when the same option is specified multiple times in the recipe. Currently running the system config command uses only the first value that was specified.
Is this behavior expected? Shouldn't this be the other way around- use the last value, as in everytime you specify a value for the same option you overwrite the previous one? Or use all of them if there are any options that require multiple values?
#3: NetTestCommandSystemConfig: multiple values for one option -------------------------+------------------------ Reporter: olichtne | Owner: olichtne@… Type: task | Status: new Priority: major | Milestone: Component: component1 | Version: Resolution: | Keywords: Blocked By: | Blocking: -------------------------+------------------------ Changes (by jirka):
* cc: lnst-developers@… (removed)
#3: NetTestCommandSystemConfig: multiple values for one option -------------------------+---------------------- Reporter: olichtne | Owner: rpazdera Type: task | Status: new Priority: major | Milestone: Component: component1 | Version: Resolution: | Keywords: Blocked By: | Blocking: -------------------------+---------------------- Changes (by rpazdera):
* owner: olichtne@… => rpazdera
#3: NetTestCommandSystemConfig: multiple values for one option -------------------------+---------------------- Reporter: olichtne | Owner: rpazdera Type: defect | Status: assigned Priority: major | Milestone: Component: component1 | Version: Resolution: | Keywords: Blocked By: | Blocking: -------------------------+---------------------- Changes (by rpazdera):
* type: task => defect * status: new => assigned
Comment:
I looked and this problem and it's valid in the following cases:
{{{ <command machine="1" type="system_config"> <options> <option name="/sys/class/net/em1/ifindex" value="5" /> <option name="/sys/class/net/em1/ifindex" value="6" /> <option name="/sys/class/net/em1/ifindex" value="7" /> </options> </command> }}}
When a single option is assigned multiple values at once. I don't think this makes much sense though.
In the current implementation, the first value is used without any warning, which is very misleading as Ondra points out. Better solution would be to use the last one and warn the user, that the previous values were optimized out.
We could be particularly restrictive and disallow this completely. LNST would simply die with error, that setting a single value multiple times at once isn't supported (because they won't be used anyway).
#3: NetTestCommandSystemConfig: multiple values for one option -------------------------+---------------------- Reporter: olichtne | Owner: rpazdera Type: defect | Status: assigned Priority: major | Milestone: Component: component1 | Version: Resolution: | Keywords: Blocked By: | Blocking: -------------------------+----------------------
Comment (by rpazdera):
On the other hand, introducing such a weird prohibiting rules is probably not the best way to go. We could also do what would probably anyone expect from the above posted command: set the option sequentially three times and then keep the final value.
Maybe there are some proc files with some side effects that happen each time the value is set ...
I'm going to make the patch tomorrow ...
#3: NetTestCommandSystemConfig: multiple values for one option -------------------------+---------------------- Reporter: olichtne | Owner: rpazdera Type: defect | Status: assigned Priority: major | Milestone: Component: component1 | Version: Resolution: | Keywords: Blocked By: | Blocking: -------------------------+----------------------
Comment (by rpazdera):
Patch sent https://lists.fedorahosted.org/pipermail/lnst- developers/2012-August/000365.html
#3: NetTestCommandSystemConfig: multiple values for one option -------------------------+---------------------- Reporter: olichtne | Owner: rpazdera Type: defect | Status: closed Priority: major | Milestone: Component: component1 | Version: Resolution: fixed | Keywords: Blocked By: | Blocking: -------------------------+---------------------- Changes (by rpazdera):
* status: assigned => closed * resolution: => fixed
Comment:
Fixed by https://lists.fedorahosted.org/pipermail/lnst- developers/2012-August/000384.html
lnst-developers@lists.fedorahosted.org