Page MenuHomePhabricator

show | commands . in conf mode fails when commands are in commit queue
Closed, ResolvedPublicBUG

Description

When running show | commands in config mode it fails when config changes are in commit queue.

when showing multiple levels it fails with ´´´
Traceback (most recent call last):

File "/usr/libexec/vyos/commands-pipe.py", line 25, in <module>
  config = ConfigTree(config_string)
File "/usr/lib/python3/dist-packages/vyos/configtree.py", line 153, in __init__
  raise ValueError("Parse error")

ValueError: Parse error
[edit]´´´

when showing one level it fails like this:
´´´vyos@runar-gw# show int tun tun5 | commands
set >local-ip '1.1.1.2'
set description 'kake'
set encapsulation 'gre'
[edit]´´´

it seems like it fails to parse the diff completely.
the script needs to check for diff's and fail with a message when the user has changed configuration or to try to follow the diff.

Details

Difficulty level
Easy (less than an hour)
Version
1.2.0
Why the issue appeared?
Implementation mistake
runar created this task.Sep 1 2018, 8:35 PM
dmbaturin claimed this task.Sep 2 2018, 9:44 PM
dmbaturin closed this task as Resolved.
dmbaturin triaged this task as High priority.
dmbaturin edited projects, added VyOS 1.2.x (VyOS 1.2.0-rc1); removed VyOS 1.2.x.
dmbaturin changed Difficulty level from Unknown (require assessment) to Easy (less than an hour).
dmbaturin changed Why the issue appeared? from Will be filled on close to Implementation mistake.