Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support "show ntp" with mgmt vrf based on linux os version #858

Merged
merged 2 commits into from
Mar 25, 2020

Conversation

bsun-sudo
Copy link
Contributor

@bsun-sudo bsun-sudo commented Mar 25, 2020

- What I did
When mgmt vrf is configured, "show ntp" checks Linux version to determine if to use

- cgexec -g l3mdev:mgmt ntpq -p -n --> for 4.9.0
- ip vrf exec mgmt ntpq -p -n  ---> for 4.9.0+

- How I did it
changes in show/main.py to get linux version from os.uname() and then compare with 4.9.0

- How to verify it

on 4.19.0
//////////////////////
root@sonic:/usr/lib/python2.7/dist-packages/show# show ntp
     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
*10.11.0.1       10.14.2.1        3 u    -   64    1    0.220  484.401   0.074
 10.11.0.2       10.14.2.1        3 u    1   64    1    0.258  481.733   0.206
root@sonic:/usr/lib/python2.7/dist-packages/show# uname -r
4.19.0-6-amd64
root@sonic:/usr/lib/python2.7/dist-packages/show#

on 4.9.0
////////////
root@sonic:/usr/lib/python2.7/dist-packages/show# show ntp
     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
 10.11.0.1       10.14.2.1        3 u    1   64    1    0.213   -0.423   0.069
 10.11.0.2       10.14.2.1        3 u    2   64    1    0.331   -3.644   0.433
root@sonic:/usr/lib/python2.7/dist-packages/show#
root@sonic:/usr/lib/python2.7/dist-packages/show#
root@sonic:/usr/lib/python2.7/dist-packages/show# uname -r
4.9.0-11-2-amd64

- Previous command output (if the output of a command-line utility has changed)

- New command output (if the output of a command-line utility has changed)

@lguohan lguohan merged commit 51d26ce into sonic-net:master Mar 25, 2020
abdosi pushed a commit to abdosi/sonic-utilities that referenced this pull request Aug 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants