Skip setting MTU on Windows when plugging devices.

Bug #1654616 reported by sean mooney
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
os-vif
Fix Committed
Medium
Alin Balutoiu
Ocata
Fix Committed
Medium
Alin Balutoiu

Bug Description

calling create_ovs_vif_port on windows has a bug internally where it indirectly calls _set_device_mtu
which executes the following code.

processutils.execute('ip', 'link', 'set', dev, 'mtu', mtu,
                         check_exit_code=[0, 2, 254])

if you install oslo_concurrency on windows and test what happens it exits with exit code 2, file not found.
from oslo_concurrency import processutils
>>> processutils.execute('ip',check_exit_code=[0, 2, 254])
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.7/site-packages/oslo.concurrency-3.16.0-py2.7.egg/oslo_concurrency/processutils.py", line 368, in execute
    env=env_variables)
  File "/usr/lib/python2.7/subprocess.py", line 711, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1343, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory
because errno 2 is allowed in the check_exit_code it does not fail and plugging succeeds.

Changed in os-vif:
importance: Undecided → Medium
Changed in os-vif:
assignee: nobody → Alin Balutoiu (abalutoiu)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to os-vif (master)

Reviewed: https://review.openstack.org/441855
Committed: https://git.openstack.org/cgit/openstack/os-vif/commit/?id=f7502923f271d1edfc5b6236478725124f66506c
Submitter: Jenkins
Branch: master

commit f7502923f271d1edfc5b6236478725124f66506c
Author: Alin Balutoiu <email address hidden>
Date: Mon Mar 6 11:53:02 2017 +0200

    vif_plug_ovs: Skip setting MTU on Windows when plugging devices

    Hyper-V with OVS does not support setting the MTU
    of a Virtual interface externally to the VM.

    This change disable the use of ip tool to set
    the MTU on the guest interface which will always
    fail on Windows.

    On Windows based compute nodes, MTU advertisement
    and configuration will be delegated to
    the guest os via the DHCP mechanism.

    Closes-Bug: #1654616

    Change-Id: I16b33fedd9773c37a0368264aecb5581153ba404

Changed in os-vif:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to os-vif (stable/ocata)

Fix proposed to branch: stable/ocata
Review: https://review.openstack.org/445540

Revision history for this message
sean mooney (sean-k-mooney) wrote :

this bug has been split in to with the remainder of the bug captured in
https://bugs.launchpad.net/os-vif/+bug/1672812

Changed in os-vif:
status: Fix Released → Fix Committed
description: updated
summary: - _plug_vif_windows uses linux net fuctions that do not work correctly on
- windows.
+ Skip setting MTU on Windows when plugging devices.
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to os-vif (stable/ocata)

Reviewed: https://review.openstack.org/445540
Committed: https://git.openstack.org/cgit/openstack/os-vif/commit/?id=619c5e920e63109ed551fe2304fe7c394aa62b85
Submitter: Jenkins
Branch: stable/ocata

commit 619c5e920e63109ed551fe2304fe7c394aa62b85
Author: Alin Balutoiu <email address hidden>
Date: Mon Mar 6 11:53:02 2017 +0200

    vif_plug_ovs: Skip setting MTU on Windows when plugging devices

    Hyper-V with OVS does not support setting the MTU
    of a Virtual interface externally to the VM.

    This change disable the use of ip tool to set
    the MTU on the guest interface which will always
    fail on Windows.

    On Windows based compute nodes, MTU advertisement
    and configuration will be delegated to
    the guest os via the DHCP mechanism.

    Closes-Bug: #1654616

    Change-Id: I16b33fedd9773c37a0368264aecb5581153ba404
    (cherry picked from commit f7502923f271d1edfc5b6236478725124f66506c)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/os-vif 1.4.1

This issue was fixed in the openstack/os-vif 1.4.1 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/os-vif 1.5.0

This issue was fixed in the openstack/os-vif 1.5.0 release.

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.