ip6gretap / erspan / ip6erspan in rtnetlink.sh from net of ubuntu_kernel_selftests failed on B-5.4-aws / B-5.4-gke / B-5.4-oracle / B-5.4-azure / B-5.4

Bug #1896448 reported by Po-Hsu Lin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ubuntu-kernel-tests
Fix Released
Undecided
Kleber Sacilotto de Souza
linux (Ubuntu)
Invalid
Undecided
Unassigned
Focal
Fix Released
Undecided
Kleber Sacilotto de Souza

Bug Description

[ Impact ]
When running the net/rtnetlink.sh selftest from v5.4 on older Ubuntu releases (e.g. Bionic 18.04), some of the iproute2 CLI options are not available causing the testcase to fail.

[ Fix ]
SAUCE patch to detect whether some options not present on older iproute2 versions are available, skipping or adapting the tests.

[ Test ]
Run net/rtnetlink.sh on 5.4 kernels with both Focal and Bionic userspace. The test should complete without introducing regressions on Focal and without breaking on Bionic.

[ Where problems could occur ]
If the checks for the available interfaces are not done correctly, we could end up having a smaller coverage on Focal or the tests would still break in Bionic.

[ Original bug description ]
Issue found on 5.4.0-1025.25~18.04.1, this issue was not spotted before fixing the false-negative return value of this rtnetlink.sh test (bug 1890136)

 # Usage: ... { ip6gre | ip6gretap | ip6erspan} [ remote ADDR ]
 # [ local ADDR ]
 # [ [i|o]seq ]
 # [ [i|o]key KEY ]
 # [ [i|o]csum ]
 # [ hoplimit TTL ]
 # [ encaplimit ELIM ]
 # [ tclass TCLASS ]
 # [ flowlabel FLOWLABEL ]
 # [ dscp inherit ]
 # [ fwmark MARK ]
 # [ dev PHYS_DEV ]
 # [ noencap ]
 # [ encap { fou | gue | none } ]
 # [ encap-sport PORT ]
 # [ encap-dport PORT ]
 # [ [no]encap-csum ]
 # [ [no]encap-csum6 ]
 # [ [no]encap-remcsum ]
 # [ erspan IDX ]
 #
 # Where: ADDR := IPV6_ADDRESS
 # TTL := { 0..255 } (default=64)
 # KEY := { DOTTED_QUAD | NUMBER }
 # ELIM := { none | 0..255 }(default=4)
 # TCLASS := { 0x0..0xff | inherit }
 # FLOWLABEL := { 0x0..0xfffff | inherit }
 # MARK := { 0x0..0xffffffff | inherit }
 # Cannot find device "ip6gretap00"
 # FAIL: ip6gretap

 # Usage: ... { gre | gretap | erspan } [ remote ADDR ]
 # [ local ADDR ]
 # [ [i|o]seq ]
 # [ [i|o]key KEY ]
 # [ [i|o]csum ]
 # [ ttl TTL ]
 # [ tos TOS ]
 # [ [no]pmtudisc ]
 # [ [no]ignore-df ]
 # [ dev PHYS_DEV ]
 # [ noencap ]
 # [ encap { fou | gue | none } ]
 # [ encap-sport PORT ]
 # [ encap-dport PORT ]
 # [ [no]encap-csum ]
 # [ [no]encap-csum6 ]
 # [ [no]encap-remcsum ]
 # [ external ]
 # [ fwmark MARK ]
 # [ erspan IDX ]
 #
 # Where: ADDR := { IP_ADDRESS | any }
 # TOS := { NUMBER | inherit }
 # TTL := { 1..255 | inherit }
 # KEY := { DOTTED_QUAD | NUMBER }
 # MARK := { 0x0..0xffffffff }
 # Cannot find device "erspan00"
 # Cannot find device "erspan00"
 # Cannot find device "erspan00"
 # Usage: ... { gre | gretap | erspan } [ remote ADDR ]
 # [ local ADDR ]
 # [ [i|o]seq ]
 # [ [i|o]key KEY ]
 # [ [i|o]csum ]
 # [ ttl TTL ]
 # [ tos TOS ]
 # [ [no]pmtudisc ]
 # [ [no]ignore-df ]
 # [ dev PHYS_DEV ]
 # [ noencap ]
 # [ encap { fou | gue | none } ]
 # [ encap-sport PORT ]
 # [ encap-dport PORT ]
 # [ [no]encap-csum ]
 # [ [no]encap-csum6 ]
 # [ [no]encap-remcsum ]
 # [ external ]
 # [ fwmark MARK ]
 # [ erspan IDX ]
 #
 # Where: ADDR := { IP_ADDRESS | any }
 # TOS := { NUMBER | inherit }
 # TTL := { 1..255 | inherit }
 # KEY := { DOTTED_QUAD | NUMBER }
 # MARK := { 0x0..0xffffffff }
 # Cannot find device "erspan00"
 # Cannot find device "erspan00"
 # Cannot find device "erspan00"
 # FAIL: erspan
 # Usage: ... { ip6gre | ip6gretap | ip6erspan} [ remote ADDR ]
 # [ local ADDR ]
 # [ [i|o]seq ]
 # [ [i|o]key KEY ]
 # [ [i|o]csum ]
 # [ hoplimit TTL ]
 # [ encaplimit ELIM ]
 # [ tclass TCLASS ]
 # [ flowlabel FLOWLABEL ]
 # [ dscp inherit ]
 # [ fwmark MARK ]
 # [ dev PHYS_DEV ]
 # [ noencap ]
 # [ encap { fou | gue | none } ]
 # [ encap-sport PORT ]
 # [ encap-dport PORT ]
 # [ [no]encap-csum ]
 # [ [no]encap-csum6 ]
 # [ [no]encap-remcsum ]
 # [ erspan IDX ]
 #
 # Where: ADDR := IPV6_ADDRESS
 # TTL := { 0..255 } (default=64)
 # KEY := { DOTTED_QUAD | NUMBER }
 # ELIM := { none | 0..255 }(default=4)
 # TCLASS := { 0x0..0xff | inherit }
 # FLOWLABEL := { 0x0..0xfffff | inherit }
 # MARK := { 0x0..0xffffffff | inherit }
 # Cannot find device "ip6erspan00"
 # Cannot find device "ip6erspan00"
 # Cannot find device "ip6erspan00"
 # Usage: ... { ip6gre | ip6gretap | ip6erspan} [ remote ADDR ]
 # [ local ADDR ]
 # [ [i|o]seq ]
 # [ [i|o]key KEY ]
 # [ [i|o]csum ]
 # [ hoplimit TTL ]
 # [ encaplimit ELIM ]
 # [ tclass TCLASS ]
 # [ flowlabel FLOWLABEL ]
 # [ dscp inherit ]
 # [ fwmark MARK ]
 # [ dev PHYS_DEV ]
 # [ noencap ]
 # [ encap { fou | gue | none } ]
 # [ encap-sport PORT ]
 # [ encap-dport PORT ]
 # [ [no]encap-csum ]
 # [ [no]encap-csum6 ]
 # [ [no]encap-remcsum ]
 # [ erspan IDX ]
 #
 # Where: ADDR := IPV6_ADDRESS
 # TTL := { 0..255 } (default=64)
 # KEY := { DOTTED_QUAD | NUMBER }
 # ELIM := { none | 0..255 }(default=4)
 # TCLASS := { 0x0..0xff | inherit }
 # FLOWLABEL := { 0x0..0xfffff | inherit }
 # MARK := { 0x0..0xffffffff | inherit }
 # Cannot find device "ip6erspan00"
 # Cannot find device "ip6erspan00"
 # Cannot find device "ip6erspan00"
 # Usage: ... { ip6gre | ip6gretap | ip6erspan} [ remote ADDR ]
 # [ local ADDR ]
 # [ [i|o]seq ]
 # [ [i|o]key KEY ]
 # [ [i|o]csum ]
 # [ hoplimit TTL ]
 # [ encaplimit ELIM ]
 # [ tclass TCLASS ]
 # [ flowlabel FLOWLABEL ]
 # [ dscp inherit ]
 # [ fwmark MARK ]
 # [ dev PHYS_DEV ]
 # [ noencap ]
 # [ encap { fou | gue | none } ]
 # [ encap-sport PORT ]
 # [ encap-dport PORT ]
 # [ [no]encap-csum ]
 # [ [no]encap-csum6 ]
 # [ [no]encap-remcsum ]
 # [ erspan IDX ]
 #
 # Where: ADDR := IPV6_ADDRESS
 # TTL := { 0..255 } (default=64)
 # KEY := { DOTTED_QUAD | NUMBER }
 # ELIM := { none | 0..255 }(default=4)
 # TCLASS := { 0x0..0xff | inherit }
 # FLOWLABEL := { 0x0..0xfffff | inherit }
 # MARK := { 0x0..0xffffffff | inherit }
 # Cannot find device "ip6erspan00"
 # FAIL: ip6erspan

Po-Hsu Lin (cypressyew)
summary: - ip6gretap in rtnetlink.sh from net of ubuntu_kernel_selftests failed on
- B-5.4-aws
+ ip6gretap / erspan / ip6erspan in rtnetlink.sh from net of
+ ubuntu_kernel_selftests failed on B-5.4-aws
summary: ip6gretap / erspan / ip6erspan in rtnetlink.sh from net of
- ubuntu_kernel_selftests failed on B-5.4-aws
+ ubuntu_kernel_selftests failed on B-5.4-aws / B-5.4-gke
description: updated
Po-Hsu Lin (cypressyew)
summary: ip6gretap / erspan / ip6erspan in rtnetlink.sh from net of
- ubuntu_kernel_selftests failed on B-5.4-aws / B-5.4-gke
+ ubuntu_kernel_selftests failed on B-5.4-aws / B-5.4-gke / B-5.4-oracle /
+ B-5.4-azure
summary: ip6gretap / erspan / ip6erspan in rtnetlink.sh from net of
ubuntu_kernel_selftests failed on B-5.4-aws / B-5.4-gke / B-5.4-oracle /
- B-5.4-azure
+ B-5.4-azure / B-5.4
Po-Hsu Lin (cypressyew)
tags: added: 5.4 amd64 bionic kqa-blocker oracle sru-20201109 ubuntu-kernel-selftests
Revision history for this message
Francis Ginther (fginther) wrote :

Seen with linux-gcp 5.4.0-1037.40~18.04.1.

tags: added: gcp sru-20210125
tags: added: hwe sru-20210315
Revision history for this message
Guilherme G. Piccoli (gpiccoli) wrote :

Observed in B-5.4/aws, cycle sru-20210531 .

tags: added: aws sru-20210531
Revision history for this message
Kleber Sacilotto de Souza (kleber-souza) wrote :

I have nominated this bug report against focal/linux as a fix would need to be applied there and propagated to all backports in bionic.

Changed in linux (Ubuntu):
status: New → Incomplete
status: Incomplete → Invalid
Changed in linux (Ubuntu Focal):
status: New → Confirmed
Revision history for this message
Kleber Sacilotto de Souza (kleber-souza) wrote :

Issue found with bionic/linux-hwe-5.4 5.4.0-79.88~18.04.1.

tags: added: hwe-5.4 sru-20210621
Po-Hsu Lin (cypressyew)
Changed in ubuntu-kernel-tests:
assignee: nobody → Po-Hsu Lin (cypressyew)
status: New → Incomplete
status: Incomplete → In Progress
Revision history for this message
Po-Hsu Lin (cypressyew) wrote :

This test uses the following code to determine if the iproute2 is too old:

ip link help ip6gretap 2>&1 | grep -q "Usage:"

It looks like this is not working for some reason.

Revision history for this message
Po-Hsu Lin (cypressyew) wrote :

I think it's the if statement after it.
Which should check for [ $? -eq 0 ] instead.

Revision history for this message
Po-Hsu Lin (cypressyew) wrote :

Oh I take this wrong, it's actually expecting to see the "Usage" message, so it's correct to check for -ne 0

Revision history for this message
Guilherme G. Piccoli (gpiccoli) wrote :

Observed this on B/oracle-5.4, cycle sru-20210621 .

tags: added: sru-20210927
Revision history for this message
Kleber Sacilotto de Souza (kleber-souza) wrote :

The test script fails at the following part:

        # test external mode
        ip -netns "$testns" link add dev "$DEV_NS" type ip6gretap external
        check_err $?

Which executes:

# ip -netns testns link add dev ip6gretap00 type ip6gretap external

Looking at ip-link(8) manpage, the ip6gretap type accepts the following options:

ip link add DEVICE type { ip6gre | ip6gretap } remote ADDR local ADDR [ [i|o]seq ]
              [ [i|o]key KEY ] [ [i|o]csum ] [ hoplimit TTL ] [ encaplimit ELIM ] [ tclass TCLASS
              ] [ flowlabel FLOWLABEL ] [ dscp inherit ] [ dev PHYS_DEV ]

So "external" is not supported yet in this iproute2 version (4.15.0-2ubuntu).

Changed in linux (Ubuntu Focal):
status: Confirmed → In Progress
assignee: nobody → Kleber Sacilotto de Souza (kleber-souza)
description: updated
Po-Hsu Lin (cypressyew)
Changed in ubuntu-kernel-tests:
assignee: Po-Hsu Lin (cypressyew) → nobody
assignee: nobody → Kleber Sacilotto de Souza (kleber-souza)
Revision history for this message
Kleber Sacilotto de Souza (kleber-souza) wrote :
Changed in linux (Ubuntu Focal):
status: In Progress → Fix Committed
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote :

This bug is awaiting verification that the linux/5.4.0-90.101 kernel in -proposed solves the problem. Please test the kernel and update this bug with the results. If the problem is solved, change the tag 'verification-needed-focal' to 'verification-done-focal'. If the problem still exists, change the tag 'verification-needed-focal' to 'verification-failed-focal'.

If verification is not done by 5 working days from today, this fix will be dropped from the source code, and this bug will be closed.

See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you!

tags: added: verification-needed-focal
Revision history for this message
Kleber Sacilotto de Souza (kleber-souza) wrote :

rtnetlink.sh from selftests/net is still failing on the 5.4 kernels in Bionic, however the issues covered by this bug report are now fixed.

08:26:14 DEBUG| [stdout] # selftests: net: rtnetlink.sh
08:26:14 DEBUG| [stdout] # PASS: policy routing
08:26:14 DEBUG| [stdout] # PASS: route get
08:26:20 DEBUG| [stdout] # PASS: preferred_lft addresses have expired
08:26:21 DEBUG| [stdout] # PASS: promote_secondaries complete
08:26:21 DEBUG| [stdout] # PASS: tc htb hierarchy
08:26:21 DEBUG| [stdout] # PASS: gre tunnel endpoint
08:26:21 DEBUG| [stdout] # PASS: gretap
08:26:21 DEBUG| [stdout] # SKIP: ip6gretap: external mode: iproute2 too old
08:26:21 DEBUG| [stdout] # PASS: ip6gretap
08:26:22 DEBUG| [stdout] # PASS: erspan
08:26:22 DEBUG| [stdout] # SKIP: ip6erspan: external mode: iproute2 too old
08:26:22 DEBUG| [stdout] # PASS: ip6erspan
08:26:22 DEBUG| [stdout] # PASS: bridge setup
08:26:25 DEBUG| [stdout] # PASS: ipv6 addrlabel
08:26:25 DEBUG| [stdout] # PASS: set ifalias bb405219-54ca-4a70-a0c0-586320bfa917 for test-dummy0
08:26:25 DEBUG| [stdout] # PASS: vrf
08:26:25 DEBUG| [stdout] # FAIL: vxlan
08:26:25 DEBUG| [stdout] # PASS: fou
08:26:25 DEBUG| [stdout] # PASS: macsec
08:26:25 DEBUG| [stdout] # PASS: ipsec
08:28:27 DEBUG| [stdout] # PASS: ipsec_offload
08:28:27 DEBUG| [stdout] # SKIP: fdb get tests: iproute2 too old
08:28:27 DEBUG| [stdout] # SKIP: fdb get tests: iproute2 too old
08:28:27 DEBUG| [stdout] not ok 11 selftests: net: rtnetlink.sh # exit=1

tags: added: verification-done-focal
removed: verification-needed-focal
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (32.6 KiB)

This bug was fixed in the package linux - 5.4.0-90.101

---------------
linux (5.4.0-90.101) focal; urgency=medium

  * focal/linux: 5.4.0-90.101 -proposed tracker (LP: #1947260)

  * Packaging resync (LP: #1786013)
    - debian/dkms-versions -- update from kernel-versions (main/2021.10.18)

  * Add final-checks to check certificates (LP: #1947174)
    - [Packaging] Add system trusted and revocation keys final check

  * No sound on Lenovo laptop models Legion 15IMHG05, Yoga 7 14ITL5, and 13s
    Gen2 (LP: #1939052)
    - ALSA: hda/realtek: Quirks to enable speaker output for Lenovo Legion 7i
      15IMHG05, Yoga 7i 14ITL5/15ITL5, and 13s Gen2 laptops.
    - ALSA: hda/realtek: Fix for quirk to enable speaker output on the Lenovo 13s
      Gen2

  * CVE-2020-36385
    - RDMA/cma: Add missing locking to rdma_accept()
    - RDMA/ucma: Fix the locking of ctx->file
    - RDMA/ucma: Rework ucma_migrate_id() to avoid races with destroy

  * Focal update: v5.4.148 upstream stable release (LP: #1946802)
    - rtc: tps65910: Correct driver module alias
    - btrfs: wake up async_delalloc_pages waiters after submit
    - btrfs: reset replace target device to allocation state on close
    - blk-zoned: allow zone management send operations without CAP_SYS_ADMIN
    - blk-zoned: allow BLKREPORTZONE without CAP_SYS_ADMIN
    - PCI/MSI: Skip masking MSI-X on Xen PV
    - powerpc/perf/hv-gpci: Fix counter value parsing
    - xen: fix setting of max_pfn in shared_info
    - include/linux/list.h: add a macro to test if entry is pointing to the head
    - 9p/xen: Fix end of loop tests for list_for_each_entry
    - tools/thermal/tmon: Add cross compiling support
    - pinctrl: stmfx: Fix hazardous u8[] to unsigned long cast
    - pinctrl: ingenic: Fix incorrect pull up/down info
    - soc: qcom: aoss: Fix the out of bound usage of cooling_devs
    - soc: aspeed: lpc-ctrl: Fix boundary check for mmap
    - soc: aspeed: p2a-ctrl: Fix boundary check for mmap
    - arm64: head: avoid over-mapping in map_memory
    - crypto: public_key: fix overflow during implicit conversion
    - block: bfq: fix bfq_set_next_ioprio_data()
    - power: supply: max17042: handle fails of reading status register
    - dm crypt: Avoid percpu_counter spinlock contention in crypt_page_alloc()
    - VMCI: fix NULL pointer dereference when unmapping queue pair
    - media: uvc: don't do DMA on stack
    - media: rc-loopback: return number of emitters rather than error
    - Revert "dmaengine: imx-sdma: refine to load context only once"
    - dmaengine: imx-sdma: remove duplicated sdma_load_context
    - libata: add ATA_HORKAGE_NO_NCQ_TRIM for Samsung 860 and 870 SSDs
    - ARM: 9105/1: atags_to_fdt: don't warn about stack size
    - PCI/portdrv: Enable Bandwidth Notification only if port supports it
    - PCI: Restrict ASMedia ASM1062 SATA Max Payload Size Supported
    - PCI: Return ~0 data on pciconfig_read() CAP_SYS_ADMIN failure
    - PCI: xilinx-nwl: Enable the clock through CCF
    - PCI: aardvark: Fix checking for PIO status
    - PCI: aardvark: Increase polling delay to 1.5s while waiting for PIO response
    - PCI: aardvark: Fix masking and unmasking legacy INTx interrupts
    - HID...

Changed in linux (Ubuntu Focal):
status: Fix Committed → Fix Released
Po-Hsu Lin (cypressyew)
Changed in ubuntu-kernel-tests:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.