Bug 2070629 - Since implementation of uplink_status_propagation, default behavior changed for VF link propagation from auto to disabled
Summary: Since implementation of uplink_status_propagation, default behavior changed f...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-neutron
Version: 16.1 (Train)
Hardware: x86_64
OS: Linux
urgent
high
Target Milestone: z9
: 16.1 (Train on RHEL 8.2)
Assignee: Rodolfo Alonso
QA Contact: Bharath M V
URL:
Whiteboard:
Depends On:
Blocks: 2072460 2072461
TreeView+ depends on / blocked
 
Reported: 2022-03-31 15:27 UTC by Rafael Urena
Modified: 2022-12-07 20:29 UTC (History)
12 users (show)

Fixed In Version: openstack-neutron-15.2.1-1.20220406134004.40d217c.el8ost
Doc Type: Enhancement
Doc Text:
With this update, if the uplink_status_propagation extension is enabled, all single root I/O virtualization (SR-IOV) ports created before the extension enablement set the virtual function (VF) link state to 'auto'. Before this update, an SR-IOV port set the link state to enabled or disabled.
Clone Of:
: 2072460 (view as bug list)
Environment:
Last Closed: 2022-12-07 20:28:59 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Launchpad 1967881 0 None None None 2022-04-05 13:43:45 UTC
OpenStack gerrit 836656 0 None MERGED [SR-IOV] Default "propagate_uplink_status" flag to True 2022-04-06 17:09:07 UTC
Red Hat Issue Tracker OSP-14419 0 None None None 2022-03-31 15:33:05 UTC
Red Hat Knowledge Base (Solution) 6903321 0 None None None 2022-04-11 14:59:56 UTC
Red Hat Product Errata RHSA-2022:8870 0 None None None 2022-12-07 20:29:44 UTC

Description Rafael Urena 2022-03-31 15:27:04 UTC
This bug was initially created as a copy of Bug #1852604

I am copying this bug because: 
Our customer would like this fix to also work on existing ports. From my understanding this is applied only to newly created ports. 


Description of problem:
Since implementation of uplink_status_propgation, default behavior changed for VF link propgation from auto to disabled

So basically, before we were not setting the propagate_uplink_state and now we are:
~~~
def set_device_state(self, pci_slot, state):
        """Set device state.

        @param pci_slot: Virtual Function address
        @param state: link state
        """
        vf_index = self._get_vf_index(pci_slot)
        return self.pci_dev_wrapper.set_vf_state(vf_index, state)

~~~
to
~~~
def set_device_state(self, pci_slot, state, propagate_uplink_state):
        """Set device state.

        @param pci_slot: Virtual Function address
        @param state: link state
        """
        vf_index = self._get_vf_index(pci_slot)
        return self.pci_dev_wrapper.set_vf_state(vf_index, state,
                                                 auto=propagate_uplink_state)

~~~

And set_vf_state went from:
~~~
    def set_vf_state(self, vf_index, state):
        """sets vf state.

        @param vf_index: vf index
        @param state: required state {True/False}
        """
        status_str = self.LinkState.ENABLE if state else \
            self.LinkState.DISABLE
        self._set_feature(vf_index, "state", status_str)
~~~

to:
~~~
    def set_vf_state(self, vf_index, state, auto=False):
        """sets vf state.

        @param vf_index: vf index
        @param state: required state {True: enable (1)
                                      False: disable (2)}
        @param auto: set link_state to auto (0)
        """
        ip = self.device(self.dev_name)
        if auto:
            link_state = 0
        else:
            link_state = 1 if state else 2
        vf_config = {'vf': vf_index, 'link_state': link_state}
        ip.link.set_vf_feature(vf_config)
~~~

Can we make this either configurable through configuration files or revert to the default behavior of "auto" ?

Comment 1 Rodolfo Alonso 2022-04-05 11:51:56 UTC
Hello Rafael:

As commented via mail, the OSP13 behaviour was a workaround for existing customers that needed this feature. The original U/S stable/queens branch didn't set the VF state to "auto" but to "enable/disable". Now we have the consequences of this workaround: the customers migrating to OSP16 now will have VF ports with state "enable/disable" instead of "auto".

By default, any existing port won't have the "uplink_status_propagation" flag. This is a DB port child register created when the Neutron port resource is created and the extension enabled. It wasn't considered, when the extension was implemented, that this could apply to existing ports. In this case, this BZ should be considered as a RFE.

Regards.

Comment 12 Tommy Doucet 2022-04-15 11:37:06 UTC
KCS has been updated with these changes.

Comment 32 errata-xmlrpc 2022-12-07 20:28:59 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: Red Hat OpenStack Platform 16.1.9 (openstack-neutron) security update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2022:8870


Note You need to log in before you can comment on or make changes to this bug.