RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1758457 - bridge -j vlan show output invalid json
Summary: bridge -j vlan show output invalid json
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: iproute
Version: 8.0
Hardware: x86_64
OS: Linux
low
low
Target Milestone: rc
: 8.2
Assignee: Andrea Claudi
QA Contact: Jaroslav Aster
URL:
Whiteboard:
Depends On: 1752857
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-10-04 08:11 UTC by Quique Llorente
Modified: 2022-12-22 22:33 UTC (History)
2 users (show)

Fixed In Version: iproute-5.3.0-1.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-04-28 16:44:02 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
CentOS 16533 0 None None None 2019-10-04 08:22:44 UTC
Red Hat Issue Tracker RHELPLAN-29989 0 None None None 2022-12-22 22:33:44 UTC
Red Hat Product Errata RHBA-2020:1785 0 None None None 2020-04-28 16:44:29 UTC

Description Quique Llorente 2019-10-04 08:11:39 UTC
Description of problem:

Playing around with linux-bridges and vlan filtering functionality with iproute command 'bridge' we found that it outputs a invalid json and that's a problemn for our processing tools.





rpm version: iproute-4.18.0-11.el8.x86_64
os: Red Hat Enterprise Linux CoreOS release 4.1
[core@test-1-mfqwp-master-0 ~]$ rpm-ostree status 
State: idle
AutomaticUpdates: disabled
Deployments:
* pivot://quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:fb025ff2b405cf5902a451675cd27a9d702ced7c88b5a33280d42069524874c6
              CustomOrigin: Managed by pivot tool
                   Version: 410.8.20190904.0 (2019-09-04T20:31:27Z)

  pivot://quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:53389c9b4a00d7afebb98f7bd9d20348deb1d77ca4baf194f0ae1b582b7e965b
              CustomOrigin: Provisioned from oscontainer
                   Version: 410.8.20190520.0 (2019-05-20T22:55:04Z)

How reproducible:


[root@bed1c2009bd8 /]# ip link add br0 type bridge
[root@bed1c2009bd8 /]# ip link set br0 up
[root@bed1c2009bd8 /]# ip link set br0 type bridge vlan_filtering 1
[root@bed1c2009bd8 /]# bridge vlan show 
port	vlan ids
br0
	 1 PVID untagged


Actual results:

[root@bed1c2009bd8 /]# bridge -j vlan show 
["br0","vlan":[{"vlan":1,"pvid":null,"untagged":null}]]


Expected results:

The correct output format need structs to be with brackets:
["br0",{"vlan":[{"vlan":1,"pvid":null,"untagged":null}]}]


Additional info:

Also same thing at centos:7 has better output, since network interfaces are struct fields too:

```
[root@69aabb0f165e /]# bridge vlan show 
port	vlan ids
br0	 1 PVID Egress Untagged

[root@69aabb0f165e /]# bridge -j vlan show 
{
    "br0": [{
            "vlan": 1,
            "flags": ["PVID","Egress Untagged"
            ]
        }
    ]
}
```

Comment 1 Andrea Claudi 2019-10-04 14:53:08 UTC
This is fixed upstream with:

commit 0f36267485e30099a4f735c3aadfa58b5efa1918
Author: Stephen Hemminger <stephen>
Date:   Thu Sep 6 14:42:46 2018 +0100

    bridge: fix vlan show formatting

Comment 5 errata-xmlrpc 2020-04-28 16:44:02 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2020:1785


Note You need to log in before you can comment on or make changes to this bug.