Page MenuHomeVyOS Platform

Syslog - Improve error handling
Closed, WontfixPublic

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)
Viacheslav closed this task as Wontfix.EditedJan 20 2024, 1:49 AM
Viacheslav claimed this task.
Viacheslav added a subscriber: Viacheslav.

Close it as wonftfix for 1.2.x and works for 1.3.5

vyos@r1# set system syslog host 192.168.122.1
[edit]
vyos@r1# commit
[ system syslog ]
Invalid facility  set in hosts 192.168.122.1

[[system syslog]] failed
Commit failed
[edit]
vyos@r1# run show ver

Version:          VyOS 1.3.5
Release train:    equuleus