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

[bug] show ip route bgp json has redudant leading colon which is invalid json data #3687

Open
w1nda opened this issue Dec 18, 2024 · 0 comments

Comments

@w1nda
Copy link
Member

w1nda commented Dec 18, 2024

Description

when using command show ip route bgp json I will get an invalid json data.
However, it I execute the command in vtysh, I can get the valid json data.
So, I think it's the show command has bug.

admin@xxxxx:~$ docker exec bgp vtysh -c 'show ip route bgp json' | head
{
  "0.0.0.0/0":[
    {
      "prefix":"0.0.0.0/0",
      "prefixLen":0,
      "protocol":"bgp",
      "vrfId":0,
      "vrfName":"default",
      "selected":true,
      "destSelected":true,
admin@xxxxx:~$ show ip route bgp json | head
:
{
  "0.0.0.0/0":[
    {
      "prefix":"0.0.0.0/0",
      "prefixLen":0,
      "protocol":"bgp",
      "vrfId":0,
      "vrfName":"default",
      "selected":true,
admin@xxxxx:~$ 

Steps to reproduce the issue

Use command show ip route bgp json or show ipv6 route bgp json

Describe the results you received

:
{
  "0.0.0.0/0":[
    {
      "prefix":"0.0.0.0/0",
      "prefixLen":0,
      "protocol":"bgp",
      "vrfId":0,
      "vrfName":"default",
      "selected":true,

Describe the results you expected

{
  "0.0.0.0/0":[
    {
      "prefix":"0.0.0.0/0",
      "prefixLen":0,
      "protocol":"bgp",
      "vrfId":0,
      "vrfName":"default",
      "selected":true,

Additional information you deem important (e.g. issue happens only occasionally)

Output of show version

admin@xxxxxxx:~$ show version

SONiC Software Version: SONiC.20240510.18
SONiC OS Version: 12
Distribution: Debian 12.6
Kernel: 6.1.0-22-2-amd64
Build commit: a29e50aa51
Build date: Sat Dec 14 03:12:35 UTC 2024
Built by: azureuser@5c74dcafc000000

Platform: x86_64-arista_720dt_48s
HwSKU: Arista-720DT-G48S4
ASIC: broadcom
ASIC Count: 1
Serial Number: WTW23380751
Model Number: CCS-720DT-48S-2F
Hardware Revision: 03.00
Uptime: 11:39:02 up 14:47,  1 user,  load average: 0.81, 0.90, 0.81
Date: Wed 18 Dec 2024 11:39:02

Docker images:
REPOSITORY                 TAG           IMAGE ID       SIZE
docker-mux                 20240510.18   2200e4fed9e2   366MB
docker-mux                 latest        2200e4fed9e2   366MB
docker-sonic-telemetry     20240510.18   ae791d1735de   380MB
docker-sonic-telemetry     latest        ae791d1735de   380MB
docker-dhcp-server         latest        a1daad24d1da   338MB
docker-macsec              latest        d82ed22d7ce9   345MB
docker-eventd              20240510.18   0538ed3383ad   314MB
docker-eventd              latest        0538ed3383ad   314MB
docker-sonic-gnmi          20240510.18   2f4f75b7daf5   380MB
docker-sonic-gnmi          latest        2f4f75b7daf5   380MB
docker-gbsyncd-broncos     20240510.18   929679e962c4   352MB
docker-gbsyncd-broncos     latest        929679e962c4   352MB
docker-gbsyncd-credo       20240510.18   e481420a023a   326MB
docker-gbsyncd-credo       latest        e481420a023a   326MB
docker-orchagent           20240510.18   a433b9332419   356MB
docker-orchagent           latest        a433b9332419   356MB
docker-teamd               20240510.18   01e8fef50250   343MB
docker-teamd               latest        01e8fef50250   343MB
docker-fpm-frr             20240510.18   6f69fe113aa4   368MB
docker-fpm-frr             latest        6f69fe113aa4   368MB
docker-dhcp-relay          latest        d23e91390d63   326MB
docker-platform-monitor    20240510.18   adb8a8554a63   434MB
docker-platform-monitor    latest        adb8a8554a63   434MB
docker-snmp                20240510.18   c2d3f0ca3d4c   354MB
docker-snmp                latest        c2d3f0ca3d4c   354MB
docker-lldp                20240510.18   ae4caa548cf8   360MB
docker-lldp                latest        ae4caa548cf8   360MB
docker-database            20240510.18   0e1b52511adc   323MB
docker-database            latest        0e1b52511adc   323MB
docker-acms                20240510.18   f9d894bd99b8   365MB
docker-acms                latest        f9d894bd99b8   365MB
docker-router-advertiser   20240510.18   f0bcc1cd89e2   315MB
docker-router-advertiser   latest        f0bcc1cd89e2   315MB
docker-sonic-restapi       20240510.18   0df48b512c09   333MB
docker-sonic-restapi       latest        0df48b512c09   333MB
docker-syncd-brcm          20240510.18   7e2a83355b40   742MB
docker-syncd-brcm          latest        7e2a83355b40   742MB
k8s.gcr.io/pause           3.5           ed210e3e4a5b   683kB
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

No branches or pull requests

1 participant