net: Fix rollback
Starting with commit 0d28f9e63e, values that have been applied
were stored instead of the original values, which broke rollback. Fix it
by storing the actual original values.
Fixes #135
Signed-off-by: Ondřej Lysoněk <olysonek@redhat.com>
This commit is contained in:
parent
2317e28654
commit
59c1282c0e
1 changed files with 5 additions and 1 deletions
|
|
@ -385,9 +385,13 @@ class NetTuningPlugin(base.Plugin):
|
|||
# failed
|
||||
if len(params_set) == 0:
|
||||
return False
|
||||
relevant_params_current = [(param, value) for param, value
|
||||
in params_current.items()
|
||||
if param in params_set]
|
||||
relevant_params_current = dict(relevant_params_current)
|
||||
# saved are only those parameters which passed checks
|
||||
self._storage.set(storage_key, " ".join(
|
||||
self._cmd.dict2list(params_set)))
|
||||
self._cmd.dict2list(relevant_params_current)))
|
||||
else:
|
||||
original_value = self._storage.get(storage_key)
|
||||
# in storage are only those parameters which were already tested
|
||||
|
|
|
|||
Loading…
Reference in a new issue