Page MenuHomeVyOS Platform

"show wan-load-balance" command is broken
Closed, ResolvedPublicBUG

Description

After the rewrite, run show wan-load-balance status and run show wan-load-balance connections do work, but the base command show wan-load-balance is completely broken due to a missing import.

vyos@vyos# run show wan-load-balance 
Traceback (most recent call last):
  File "/usr/libexec/vyos/op_mode/load-balancing_wan.py", line 112, in <module>
    res = vyos.opmode.run(sys.modules[__name__])
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/vyos/opmode.py", line 312, in run
    res = func(**args)
          ^^^^^^^^^^^^
  File "/usr/libexec/vyos/op_mode/load-balancing_wan.py", line 48, in _wrapper
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/libexec/vyos/op_mode/load-balancing_wan.py", line 84, in show_summary
    return _get_formatted_output(data)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/libexec/vyos/op_mode/load-balancing_wan.py", line 65, in _get_formatted_output
    now = datetime.fromtimestamp(time.time())
                                 ^^^^
NameError: name 'time' is not defined

Details

Version
2025-07-09-rolling
Is it a breaking change?
Perfectly compatible
Issue type
Bug (incorrect behavior)

Event Timeline

Unknown Object (User) triaged this task as High priority.Jul 10 2025, 10:25 AM

Seems fixed

<pre>vyos@r16# set load-balancing wan interface-health eth1 nexthop 192.0.2.1
[edit]
vyos@r16# commit
[edit]
vyos@r16# exit
Warning: configuration changes have not been saved.
exit
vyos@r16:~$ 
vyos@r16:~$ show wan-load-balance 
Interface: eth1
Status: active
Last Status Change: N/A
Last Interface Success: N/A
Last Interface Failure: N/A
Interface Failures: 0

vyos@r16:~$ show ver
Version:          VyOS 1.5-stream-2025-Q2
Release train:    circinus
Release flavor:   generic
</pre>
dmbaturin claimed this task.
dmbaturin moved this task from Open to Finished on the VyOS 1.5 Circinus (1.5-stream-2025-Q2) board.
dmbaturin moved this task from Need Triage to Completed on the VyOS Rolling board.