SRIOV VFs defined in netplan do not persist reboots

Bug #1890838 reported by Tim Epkes
22
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Netplan
Fix Released
High
Łukasz Zemczak

Bug Description

I am defining a number of SRIOV VF's in netplan and then apply. The applied VFs appear and can be used. If I reboot the system, the VF's are no longer showing in ip link show

After being applied
==============================================================================
# ip link show enp59s0f0
5: enp59s0f0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT group default qlen 1000
    link/ether 3c:fd:fe:cd:10:30 brd ff:ff:ff:ff:ff:ff
    vf 0 MAC 00:00:00:00:00:00, spoof checking on, link-state auto, trust off
    vf 1 MAC 00:00:00:00:00:00, spoof checking on, link-state auto, trust off
    vf 2 MAC 00:00:00:00:00:00, spoof checking on, link-state auto, trust off
    vf 3 MAC 00:00:00:00:00:00, spoof checking on, link-state auto, trust off
    vf 4 MAC 00:00:00:00:00:00, spoof checking on, link-state auto, trust off
    vf 5 MAC 00:00:00:00:00:00, spoof checking on, link-state auto, trust off
    vf 6 MAC 00:00:00:00:00:00, spoof checking on, link-state auto, trust off
    vf 7 MAC 00:00:00:00:00:00, spoof checking on, link-state auto, trust off
    vf 8 MAC 00:00:00:00:00:00, spoof checking on, link-state auto, trust off
    vf 9 MAC 00:00:00:00:00:00, spoof checking on, link-state auto, trust off
# ip link show enp59s0f1
7: enp59s0f1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN mode DEFAULT group default qlen 1000
    link/ether 3c:fd:fe:cd:10:31 brd ff:ff:ff:ff:ff:ff
    vf 0 MAC 00:00:00:00:00:00, spoof checking on, link-state auto, trust off
    vf 1 MAC 00:00:00:00:00:00, spoof checking on, link-state auto, trust off
    vf 2 MAC 00:00:00:00:00:00, spoof checking on, link-state auto, trust off
    vf 3 MAC 00:00:00:00:00:00, spoof checking on, link-state auto, trust off
    vf 4 MAC 00:00:00:00:00:00, spoof checking on, link-state auto, trust off
    vf 5 MAC 00:00:00:00:00:00, spoof checking on, link-state auto, trust off
    vf 6 MAC 00:00:00:00:00:00, spoof checking on, link-state auto, trust off
    vf 7 MAC 00:00:00:00:00:00, spoof checking on, link-state auto, trust off
    vf 8 MAC 00:00:00:00:00:00, spoof checking on, link-state auto, trust off
    vf 9 MAC 00:00:00:00:00:00, spoof checking on, link-state auto, trust off

After reboot
==============================================================================
# ip link show enp59s0f0
5: enp59s0f0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT group default qlen 1000
    link/ether 3c:fd:fe:cd:10:30 brd ff:ff:ff:ff:ff:ff
# ip link show enp59s0f1
7: enp59s0f1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN mode DEFAULT group default qlen 1000
    link/ether 3c:fd:fe:cd:10:31 brd ff:ff:ff:ff:ff:ff

Reapply netplan
==============================================================================
# ip link show enp59s0f0
5: enp59s0f0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT group default qlen 1000
    link/ether 3c:fd:fe:cd:10:30 brd ff:ff:ff:ff:ff:ff
    vf 0 MAC 00:00:00:00:00:00, spoof checking on, link-state auto, trust off
    vf 1 MAC 00:00:00:00:00:00, spoof checking on, link-state auto, trust off
    vf 2 MAC 00:00:00:00:00:00, spoof checking on, link-state auto, trust off
    vf 3 MAC 00:00:00:00:00:00, spoof checking on, link-state auto, trust off
    vf 4 MAC 00:00:00:00:00:00, spoof checking on, link-state auto, trust off
    vf 5 MAC 00:00:00:00:00:00, spoof checking on, link-state auto, trust off
    vf 6 MAC 00:00:00:00:00:00, spoof checking on, link-state auto, trust off
    vf 7 MAC 00:00:00:00:00:00, spoof checking on, link-state auto, trust off
    vf 8 MAC 00:00:00:00:00:00, spoof checking on, link-state auto, trust off
    vf 9 MAC 00:00:00:00:00:00, spoof checking on, link-state auto, trust off
# ip link show enp59s0f1
7: enp59s0f1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN mode DEFAULT group default qlen 1000
    link/ether 3c:fd:fe:cd:10:31 brd ff:ff:ff:ff:ff:ff
    vf 0 MAC 00:00:00:00:00:00, spoof checking on, link-state auto, trust off
    vf 1 MAC 00:00:00:00:00:00, spoof checking on, link-state auto, trust off
    vf 2 MAC 00:00:00:00:00:00, spoof checking on, link-state auto, trust off
    vf 3 MAC 00:00:00:00:00:00, spoof checking on, link-state auto, trust off
    vf 4 MAC 00:00:00:00:00:00, spoof checking on, link-state auto, trust off
    vf 5 MAC 00:00:00:00:00:00, spoof checking on, link-state auto, trust off
    vf 6 MAC 00:00:00:00:00:00, spoof checking on, link-state auto, trust off
    vf 7 MAC 00:00:00:00:00:00, spoof checking on, link-state auto, trust off
    vf 8 MAC 00:00:00:00:00:00, spoof checking on, link-state auto, trust off
    vf 9 MAC 00:00:00:00:00:00, spoof checking on, link-state auto, trust off

CONFIG
==============================================================================
network:
    ethernets:
        eno3:
            addresses:
            - x.x.x.x/xx
            gateway4: x.x.x.x
            nameservers:
                addresses:
                - x.x.x.x
                - x.x.x.x
        enp59s0f0:
            virtual-function-count: 10 <-----
            addresses:
            - x.x.x.x/xx
            routes:
                - to: x.x.x.x/xx
                  via: x.x.x.x
        enp59s0f1:
            virtual-function-count: 10 <-----

Revision history for this message
Andrey Grebennikov (agrebennikov) wrote :

This has been observed on 18.04, 20.04 is yet to be tested.

Revision history for this message
Tim Epkes (havok4u) wrote :

some missing info
OS version
$ cat /etc/os-release
NAME="Ubuntu"
VERSION="18.04.5 LTS (Bionic Beaver)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 18.04.5 LTS"
VERSION_ID="18.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=bionic
UBUNTU_CODENAME=bionic

Netplan version
ii netplan.io 0.99-0ubuntu3~18.04.3 amd64 YAML network configuration abstraction for various backends

netplan.io:
  features:
  - auth-phase2
  - dhcp-use-domains
  - ipv6-mtu
  - generated-supplicant

Revision history for this message
Łukasz Zemczak (sil2100) wrote :

Hey! Thank you for reporting this bug. So we noticed that after the release of 0.99 and this should be fixed in netplan master already. It should be available once the new netplan version is released (hopefully real soon!).

Changed in netplan:
status: New → Confirmed
importance: Undecided → High
assignee: nobody → Łukasz Zemczak (sil2100)
status: Confirmed → Fix Committed
Revision history for this message
Tim Epkes (havok4u) wrote :

Will the fix then be conveyed to 18.04? Assuming as it is changed in the netplan version it will.

Revision history for this message
Łukasz Zemczak (sil2100) wrote :

Yes, we currently plan to backport the new version to both focal and bionic.

Revision history for this message
Tim Epkes (havok4u) wrote : Re: [Bug 1890838] Re: SRIOV VFs defined in netplan do not persist reboots
Download full text (6.2 KiB)

Thanks

On Tue, Aug 11, 2020 at 10:10 AM Łukasz Zemczak <email address hidden>
wrote:

> Yes, we currently plan to backport the new version to both focal and
> bionic.
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1890838
>
> Title:
> SRIOV VFs defined in netplan do not persist reboots
>
> Status in netplan:
> Fix Committed
>
> Bug description:
> I am defining a number of SRIOV VF's in netplan and then apply. The
> applied VFs appear and can be used. If I reboot the system, the VF's
> are no longer showing in ip link show
>
> After being applied
>
> ==============================================================================
> # ip link show enp59s0f0
> 5: enp59s0f0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state
> UP mode DEFAULT group default qlen 1000
> link/ether 3c:fd:fe:cd:10:30 brd ff:ff:ff:ff:ff:ff
> vf 0 MAC 00:00:00:00:00:00, spoof checking on, link-state auto,
> trust off
> vf 1 MAC 00:00:00:00:00:00, spoof checking on, link-state auto,
> trust off
> vf 2 MAC 00:00:00:00:00:00, spoof checking on, link-state auto,
> trust off
> vf 3 MAC 00:00:00:00:00:00, spoof checking on, link-state auto,
> trust off
> vf 4 MAC 00:00:00:00:00:00, spoof checking on, link-state auto,
> trust off
> vf 5 MAC 00:00:00:00:00:00, spoof checking on, link-state auto,
> trust off
> vf 6 MAC 00:00:00:00:00:00, spoof checking on, link-state auto,
> trust off
> vf 7 MAC 00:00:00:00:00:00, spoof checking on, link-state auto,
> trust off
> vf 8 MAC 00:00:00:00:00:00, spoof checking on, link-state auto,
> trust off
> vf 9 MAC 00:00:00:00:00:00, spoof checking on, link-state auto,
> trust off
> # ip link show enp59s0f1
> 7: enp59s0f1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq
> state DOWN mode DEFAULT group default qlen 1000
> link/ether 3c:fd:fe:cd:10:31 brd ff:ff:ff:ff:ff:ff
> vf 0 MAC 00:00:00:00:00:00, spoof checking on, link-state auto,
> trust off
> vf 1 MAC 00:00:00:00:00:00, spoof checking on, link-state auto,
> trust off
> vf 2 MAC 00:00:00:00:00:00, spoof checking on, link-state auto,
> trust off
> vf 3 MAC 00:00:00:00:00:00, spoof checking on, link-state auto,
> trust off
> vf 4 MAC 00:00:00:00:00:00, spoof checking on, link-state auto,
> trust off
> vf 5 MAC 00:00:00:00:00:00, spoof checking on, link-state auto,
> trust off
> vf 6 MAC 00:00:00:00:00:00, spoof checking on, link-state auto,
> trust off
> vf 7 MAC 00:00:00:00:00:00, spoof checking on, link-state auto,
> trust off
> vf 8 MAC 00:00:00:00:00:00, spoof checking on, link-state auto,
> trust off
> vf 9 MAC 00:00:00:00:00:00, spoof checking on, link-state auto,
> trust off
>
> After reboot
>
> ==============================================================================
> # ip link show enp59s0f0
> 5: enp59s0f0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state
> UP mode DEFAULT group default qlen 1000
> link/ether 3c:fd:fe:cd:10:30 brd ff:ff:ff:ff:ff:ff
> # ip link show enp59s0f1
> 7: enp59s0f1: <NO-CARRIER,BR...

Read more...

Revision history for this message
Charlie Young (charlie-young) wrote :

Is there still a plan to backport this fix to Bionic? It looks like it's still at version 0.99: https://packages.ubuntu.com/search?keywords=netplan

Revision history for this message
Drew Balliet (balliet75) wrote :

When is this fix going to be available?

After every reboot, we have to manually run "netplan apply" to get SR-IOV Virtual functions running for VMs again.

-----------------------------------------------------

# apt show netplan.io
Package: netplan.io
Version: 0.103-0ubuntu5~21.04.4
Priority: important
Section: net
Origin: Ubuntu
Maintainer: Ubuntu Developers <email address hidden>
Original-Maintainer: Debian netplan Maintainers <email address hidden>
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Installed-Size: 408 kB
Provides: nplan
Depends: libc6 (>= 2.33), libglib2.0-0 (>= 2.39.4), libnetplan0 (>= 0.103-0ubuntu5~21.04.4), libsystemd0 (>= 243), libuuid1 (>= 2.16), libyaml-0-2, iproute2, python3, python3-yaml, python3-netifaces, systemd (>= 247.3-3ubuntu3.2)
Suggests: network-manager | wpasupplicant, openvswitch-switch
Conflicts: netplan
Breaks: network-manager (<< 1.2.2-1), nplan (<< 0.34~)
Replaces: nplan (<< 0.34~)
Homepage: https://netplan.io/
Task: minimal
Download-Size: 100 kB
APT-Manual-Installed: no
APT-Sources: http://us.archive.ubuntu.com/ubuntu hirsute-updates/main amd64 Packages
Description: YAML network configuration abstraction for various backends
 netplan reads YAML network configuration files which are written
 by administrators, installers, cloud image instantiations, or other OS
 deployments. During early boot it then generates backend specific
 configuration files in /run to hand off control of devices to a particular
 networking daemon.
 .
 Currently supported backends are networkd and NetworkManager.

N: There is 1 additional record. Please use the '-a' switch to see it
# cat /etc/os-release
NAME="Ubuntu"
VERSION="21.04 (Hirsute Hippo)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 21.04"
VERSION_ID="21.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=hirsute
UBUNTU_CODENAME=hirsute

# lspci | grep -i ethernet

12:00.0 Ethernet controller: Broadcom Inc. and subsidiaries BCM57414 NetXtreme-E 10Gb/25Gb RDMA Ethernet Controller (rev 01)
12:00.1 Ethernet controller: Broadcom Inc. and subsidiaries BCM57414 NetXtreme-E 10Gb/25Gb RDMA Ethernet Controller (rev 01)

# cat /etc/netplan/00-installer-config.yaml
   ens1f0np0:
      dhcp4: false
      dhcp6: false
      virtual-function-count: 32

Revision history for this message
Lukas Märdian (slyon) wrote :

There have been plenty of improvements in SRIOV handling in Netplan v1.0+ which should resolve those issues.

Please re-open if this is still a problem in recent versions of Netplan.

Changed in netplan:
status: Fix Committed → 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.