Page MenuHomeVyOS Platform

Syslog - Improve error handling
Open, Requires assessmentPublic

Description

In syslog configuration, it is mandatory to define facility after writing host: "set system syslog host 192.168.122.1 facility all"
If facility parameter is omitted, error shown in 1.2 is not clear (in 1.3 is much more clear).
Also, as it it mandatory to define the facility, it would be helpful for users to display "REQUIRED" on facility when pressing tab after defining host, something like this:

vyos@vyos# set system syslog host 192.168.122.1 (pressing tab to see options)
Possible completions:
+> facility     Facility for logging [REQUIRED]
port         Destination port

Above, error shown in both versions.

Error in version 1.2.X:

vyos@r12-lts# set system syslog host 192.168.122.1
[edit]
vyos@r12-lts# commit
[ system syslog ]
Traceback (most recent call last):
File "/usr/libexec/vyos/conf_mode/syslog.py", line 325, in <module>
c = get_config()
File "/usr/libexec/vyos/conf_mode/syslog.py", line 200, in get_config
'proto': proto
UnboundLocalError: local variable 'proto' referenced before assignment

[[system syslog]] failed
Commit failed

Error in version 1.3rc6

vyos@vyos# set system syslog host 192.168.122.1
[edit]
vyos@vyos# commit

Invalid facility  set in hosts 192.168.122.1

[[system syslog]] failed
Commit failed

Details

Difficulty level
Unknown (require assessment)
Version
1.2
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Unspecified (possibly destroys the router)
Issue type
Unspecified (please specify)

Event Timeline

n.fort created this object in space S1 VyOS Public.
n.fort updated the task description. (Show Details)
n.fort updated the task description. (Show Details)