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.

[email protected]:~$ 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
[email protected]:~$ force vrf mgmt
[email protected]: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

Difficulty level
Unknown (require assessment)
Version
-
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Unspecified (possibly destroys the router)
Issue type
Improvement (missing useful functionality)

Related Objects

StatusSubtypeAssignedTask
OpenFEATURE REQUESTNone
ResolvedFEATURE REQUESTViacheslav

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.Thu, Aug 22, 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:~$