Page MenuHomeVyOS Platform

When configuring QoS, the setting procedure of port mirroring is wrong
Closed, ResolvedPublicBUG

Description

This is essentially an unexpected problem. In some cases, set the following code:

set traffic-policy shaper FQ-SHAPER default bandwidth 100%
set traffic-policy shaper MY-SHAPER class 30 match HTTP
set traffic-policy shaper MY-SHAPER class 30 match HTTPs
set interfaces ethernet eth4 traffic-policy

Will cause the command sudo tc -j qdisc show to output unparsed json, resulting in parsing errors

The best solution is to delete the json parsing process

outputs:

[ interfaces ethernet eth4 ]
VyOS had an issue completing a command.

We are sorry that you encountered a problem while using VyOS.
There are a few things you can do to help us (and yourself):
- Make sure you are running the latest version of the code available at
  https://downloads.vyos.io/rolling/current/amd64/vyos-rolling-latest.iso
- Consult the forum to see how to handle this issue
  https://forum.vyos.io
- Join our community on slack where our users exchange help and advice
  https://vyos.slack.com

When reporting problems, please include as much information as possible:
- do not obfuscate any data (feel free to contact us privately if your 
  business policy requires it)
- and include all the information presented below

Report Time:      2020-12-24 10:57:52
Image Version:    VyOS 1.3-rolling-202012231522
Release Train:    equuleus

Built by:         autobuild@vyos.net
Built on:         Wed 23 Dec 2020 15:22 UTC
Build UUID:       e7e37331-73ea-42b2-aad9-fcb0c9e22422
Build Commit ID:  cbfee8c5b59238

Architecture:     x86_64
Boot via:         installed image
System type:      bare metal

Hardware vendor:  To Be Filled By O.E.M.
Hardware model:   To Be Filled By O.E.M.
Hardware S/N:     To Be Filled By O.E.M.
Hardware UUID:    03000200-0400-0500-0006-000700080009

Traceback (most recent call last):
  File "/usr/libexec/vyos/conf_mode/interfaces-ethernet.py", line 102, in <module>
    apply(c)
  File "/usr/libexec/vyos/conf_mode/interfaces-ethernet.py", line 94, in apply
    e.update(ethernet)
  File "/usr/lib/python3/dist-packages/vyos/ifconfig/ethernet.py", line 298, in update
    super().update(config)
  File "/usr/lib/python3/dist-packages/vyos/ifconfig/interface.py", line 1349, in update
    self.apply_mirror()
  File "/usr/lib/python3/dist-packages/vyos/ifconfig/interface.py", line 1041, in apply_mirror
    self.del_tc_qdisc(ifname,'ingress','ffff:')
  File "/usr/lib/python3/dist-packages/vyos/ifconfig/interface.py", line 1022, in del_tc_qdisc
    tc_qdisc = self.get_tc_config('qdisc')
  File "/usr/lib/python3/dist-packages/vyos/ifconfig/interface.py", line 1019, in get_tc_config
    return json.loads(tmp)
  File "/usr/lib/python3.7/json/__init__.py", line 348, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python3.7/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python3.7/json/decoder.py", line 353, in raw_decode
    obj, end = self.scan_once(s, idx)
json.decoder.JSONDecodeError: Expecting property name enclosed in double quotes: line 1 column 932 (char 931)

Details

Difficulty level
Easy (less than an hour)
Version
-
Why the issue appeared?
Implementation mistake
Is it a breaking change?
Perfectly compatible

Event Timeline

jack9603301 changed the task status from Open to In progress.Dec 24 2020, 3:42 AM
jack9603301 claimed this task.
jack9603301 triaged this task as High priority.
jack9603301 created this task.
jack9603301 changed Why the issue appeared? from Will be filled on close to Implementation mistake.
jack9603301 moved this task from Need Triage to In Progress on the VyOS 1.3 Equuleus board.
jack9603301 renamed this task from When configuring QOS, the setting procedure of port mirroring is wrong to When configuring QoS, the setting procedure of port mirroring is wrong.Dec 25 2020, 5:06 AM
jack9603301 moved this task from In Progress to Finished on the VyOS 1.3 Equuleus board.