Page MenuHomeVyOS Platform

show ntp is not vrf aware
Closed, ResolvedPublicFEATURE REQUEST

Description

When ntp is running in a VRF "show ntp" does not work. It does however work when doing "force vrf mgmt" first.

danhusan@f1.bdc:~$ show ntp
Traceback (most recent call last):
  File "/usr/libexec/vyos/op_mode/ntp.py", line 159, in <module>
    res = vyos.opmode.run(sys.modules[__name__])
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/vyos/opmode.py", line 263, in run
    res = func(**args)
          ^^^^^^^^^^^^
  File "/usr/libexec/vyos/op_mode/ntp.py", line 155, in show_sourcestats
    return cmd(command)
           ^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/vyos/utils/process.py", line 155, in cmd
    raise OSError(code, feedback)
PermissionError: [Errno 1] failed to run command: chronyc sourcestats -v
returned: 506 Cannot talk to daemon
exit code: 1
danhusan@f1.bdc:~$ force vrf mgmt
danhusan@f1.bdc:mgmt:~$ show ntp
.- Number of sample points in measurement set.
                            /    .- Number of residual runs with same sign.
                           |    /    .- Length of measurement set (time).
                           |   |    /      .- Est. clock freq error (ppm).
                           |   |   |      /           .- Est. error in freq.
                           |   |   |     |           /         .- Est. offset.
                           |   |   |     |          |          |   On the -.
                           |   |   |     |          |          |   samples. \
                           |   |   |     |          |          |             |
Name/IP Address            NP  NR  Span  Frequency  Freq Skew  Offset  Std Dev
==============================================================================
ec2-34-206-168-146.compu>  10   7   460     +0.764      2.663  +6414us   287us
ec2-18-193-41-138.eu-cen>  11   6   459     +0.000      0.332  +5412us    41us
ec2-122-248-201-177.ap-s>  10   6   461    +21.106     97.818    -26ms  9993us

Details

Version
-
Is it a breaking change?
Unspecified (possibly destroys the router)

Event Timeline

Viacheslav triaged this task as Normal priority.Jul 8 2024, 7:32 AM
Viacheslav changed the task status from Open to In progress.Aug 22 2024, 1:09 PM
Viacheslav claimed this task.

PR https://github.com/vyos/vyos-1x/pull/4003

vyos@r14:~$ show ntp
.- Number of sample points in measurement set.
                            /    .- Number of residual runs with same sign.
                           |    /    .- Length of measurement set (time).
                           |   |    /      .- Est. clock freq error (ppm).
                           |   |   |      /           .- Est. error in freq.
                           |   |   |     |           /         .- Est. offset.
                           |   |   |     |          |          |   On the -.
                           |   |   |     |          |          |   samples. \
                           |   |   |     |          |          |             |
Name/IP Address            NP  NR  Span  Frequency  Freq Skew  Offset  Std Dev
==============================================================================
ec2-34-206-168-146.compu>  31  15   70m     +0.225      0.056  +1295us   112us
ec2-18-193-41-138.eu-cen>  31  13   70m     -0.305      0.070   -968us   119us
ec2-122-248-201-177.ap-s>   6   3   52m     -2.587      0.901   +109us   252us
vyos@r14:~$
Viacheslav moved this task from Backlog to Finished on the VyOS 1.4 Sagitta (1.4.1) board.