launch a vm with macvtap port is not working with kernel < 3.13

Bug #1523083 reported by Moshe Levi
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Undecided
Ihar Hrachyshka

Bug Description

the sriov agent check if vf is assigned to macvtap by the exists of upper_macvtap symbolic

https://github.com/openstack/neutron/blob/master/neutron/plugins/ml2/drivers/mech_sriov/agent/eswitch_manager.py#L85-L86

The upper_macvtap symbolic exists only in kernel 3.13 and above
see http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/drivers/net/macvlan.c?id=5831d66e8097aedfa3bc35941cf265ada2352317
"net: create sysfs symlinks for neighbour devices".

This is a problem when using rhel 7.1 which comes with kernel 3.10

Moshe Levi (moshele)
Changed in neutron:
assignee: nobody → Moshe Levi (moshele)
status: New → Confirmed
description: updated
Brent Eagles (beagles)
summary: - launch a vm with macvtap port is not working with krenel < 3.13
+ launch a vm with macvtap port is not working with kernel < 3.13
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (master)

Fix proposed to branch: master
Review: https://review.openstack.org/255916

Changed in neutron:
status: Confirmed → In Progress
Changed in neutron:
assignee: Moshe Levi (moshele) → Ihar Hrachyshka (ihar-hrachyshka)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

Reviewed: https://review.openstack.org/255916
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=d7604169988726d121cdc9727accfeb6e29f4aed
Submitter: Jenkins
Branch: master

commit d7604169988726d121cdc9727accfeb6e29f4aed
Author: Moshe Levi <email address hidden>
Date: Tue Dec 8 13:11:33 2015 +0200

    SR-IOV: Fix macvtap assigned vf check when kernel < 3.13

    when creating macvtap passthrough to SR-IOV VF in Kernel >= 3.13 an
    upper_macvtap symbolic link is created. For Kernel < 3.13 the only
    way to know it is by parsing the ip link show output and look for
    macvtap[0-9]+@<vf ifname>.

    This patch used the ip link show command to detects
    macvtap assigned vf so that detection of macvtap assigned vf
    will work on all kernels

    Closes-Bug: #1523083
    Change-Id: Icbc8d6af5c00d1453095e04dd779210dc7244c7f

Changed in neutron:
status: In Progress → Fix Released
Revision history for this message
Thierry Carrez (ttx) wrote : Fix included in openstack/neutron 8.0.0.0b2

This issue was fixed in the openstack/neutron 8.0.0.0b2 development milestone.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (stable/liberty)

Fix proposed to branch: stable/liberty
Review: https://review.openstack.org/270275

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (stable/liberty)

Reviewed: https://review.openstack.org/270275
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=6435b7498f6c7342c468a83c07d45ce776a4eb2b
Submitter: Jenkins
Branch: stable/liberty

commit 6435b7498f6c7342c468a83c07d45ce776a4eb2b
Author: Moshe Levi <email address hidden>
Date: Tue Dec 8 13:11:33 2015 +0200

    SR-IOV: Fix macvtap assigned vf check when kernel < 3.13

    when creating macvtap passthrough to SR-IOV VF in Kernel >= 3.13 an
    upper_macvtap symbolic link is created. For Kernel < 3.13 the only
    way to know it is by parsing the ip link show output and look for
    macvtap[0-9]+@<vf ifname>.

    This patch used the ip link show command to detects
    macvtap assigned vf so that detection of macvtap assigned vf
    will work on all kernels

    Closes-Bug: #1523083
    Change-Id: Icbc8d6af5c00d1453095e04dd779210dc7244c7f
    (cherry picked from commit d7604169988726d121cdc9727accfeb6e29f4aed)

tags: added: in-stable-liberty
Revision history for this message
Doug Hellmann (doug-hellmann) wrote : Fix included in openstack/neutron 7.0.3

This issue was fixed in the openstack/neutron 7.0.3 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to neutron (master)

Reviewed: https://review.opendev.org/677095
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=76de8a715d0f48b24fccc06459e9413b96a0449c
Submitter: Zuul
Branch: master

commit 76de8a715d0f48b24fccc06459e9413b96a0449c
Author: Adrian Chiris <email address hidden>
Date: Sun Aug 18 14:58:14 2019 +0300

    SR-IOV: macvtap assigned vf check using sysfs

    This reverts commits:
     9a022e7d7b85b7c21cf26698fe59c818c4577194
     d7604169988726d121cdc9727accfeb6e29f4aed

    As the issue is relevant only for old kernels and almost 4 years
    have passed since this fix was introduced, it is safe to undo the
    workaround to use ip link show command for determining whether or not
    a VF is assigned with macvtap(and followup patch that fixed excessive
    use of ip link show commans).

    reverting this commit will benefit the agent by reducing the amount of
    ip link calls.

    While it is possible to perform a revert-per-commit, this change should
    really go in as one commit for clarity and avoid introducing a
    performance degradation in case one is merged without the other.

     Conflicts:
     neutron/plugins/ml2/drivers/mech_sriov/agent/eswitch_manager.py
     neutron/plugins/ml2/drivers/mech_sriov/agent/pci_lib.py
     neutron/tests/unit/plugins/ml2/drivers/mech_sriov/agent/test_eswitch_manager.py
     neutron/tests/unit/plugins/ml2/drivers/mech_sriov/agent/test_pci_lib.py

     Conflicts details:
       In eswitch_manager: merge tool was unable to properly revert
                           is_assigned_vf() due to changes in later patches.
       In pci_lib: conflicts with later changes to is_macvtap_assigned()
                   and link_show() that are no longer required and revert
                   of IPCommandDeviceError definition.
       In unit tests: conflicts due to newly added tests and reverting the
                      IPCommandDeviceError exception definition.
                      Sorting out mocks as link_show() method was removed

    Related-bug: #1523083

    Change-Id: I04ea8eb63de07a6e1e51c2790c5920b086b8542c

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to neutron (stable/train)

Related fix proposed to branch: stable/train
Review: https://review.opendev.org/727826

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to neutron (stable/train)

Reviewed: https://review.opendev.org/727826
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=fa3e1c629fb6847d5fd11494436cfd922c3cc10c
Submitter: Zuul
Branch: stable/train

commit fa3e1c629fb6847d5fd11494436cfd922c3cc10c
Author: Adrian Chiris <email address hidden>
Date: Sun Aug 18 14:58:14 2019 +0300

    SR-IOV: macvtap assigned vf check using sysfs

    This reverts commits:
     9a022e7d7b85b7c21cf26698fe59c818c4577194
     d7604169988726d121cdc9727accfeb6e29f4aed

    As the issue is relevant only for old kernels and almost 4 years
    have passed since this fix was introduced, it is safe to undo the
    workaround to use ip link show command for determining whether or not
    a VF is assigned with macvtap(and followup patch that fixed excessive
    use of ip link show commans).

    reverting this commit will benefit the agent by reducing the amount of
    ip link calls.

    While it is possible to perform a revert-per-commit, this change should
    really go in as one commit for clarity and avoid introducing a
    performance degradation in case one is merged without the other.

     Conflicts:
            neutron/plugins/ml2/drivers/mech_sriov/agent/eswitch_manager.py
            neutron/plugins/ml2/drivers/mech_sriov/agent/pci_lib.py
            neutron/tests/unit/plugins/ml2/drivers/mech_sriov/agent/test_eswitch_manager.py
            neutron/tests/unit/plugins/ml2/drivers/mech_sriov/agent/test_pci_lib.py

     Conflicts details:
       In eswitch_manager: merge tool was unable to properly revert
                           is_assigned_vf() due to changes in later patches.
       In pci_lib: conflicts with later changes to is_macvtap_assigned()
                   and link_show() that are no longer required and revert
                   of IPCommandDeviceError definition.
       In unit tests: conflicts due to newly added tests and reverting the
                      IPCommandDeviceError exception definition.
                      Sorting out mocks as link_show() method was removed

    Related-bug: #1523083

    Change-Id: I04ea8eb63de07a6e1e51c2790c5920b086b8542c
    (cherry picked from commit 76de8a715d0f48b24fccc06459e9413b96a0449c)

tags: added: in-stable-train
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.