Bug 1712401

Summary: [OSP13] Python exception when passing vfid 0 to sriov_vf NIC
Product: Red Hat OpenStack Reporter: Vadim Khitrin <vkhitrin>
Component: os-net-configAssignee: Karthik Sundaravel <ksundara>
Status: CLOSED ERRATA QA Contact: nlevinki <nlevinki>
Severity: medium Docs Contact:
Priority: medium    
Version: 13.0 (Queens)CC: akaris, bfournie, cfontain, fbaudin, hbrock, jslagle, ksundara, mburns, skramaja, supadhya
Target Milestone: z8Keywords: Triaged, ZStream
Target Release: 13.0 (Queens)   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: os-net-config-8.4.4-5.el7ost Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of:
: 1723271 (view as bug list) Environment:
Last Closed: 2019-09-03 16:55:32 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1723271    

Description Vadim Khitrin 2019-05-21 12:21:28 UTC
Description of problem:
During overcloud deployment, when attempting to configure SR-IOV VF 0, a python exception will be raised.

Example NIC config passed during deployment:
- type: sriov_vf
  vlan_id:
    get_param: InternalApiNetworkVlanID
  device: p7p2
  vfid: 0
  addresses:
    - ip_netmask:
        get_param: InternalApiIpSubnet

os-net-config will fail to run with the following exception which will cause the deployment to fail:
    Traceback (most recent call last):
      File "/usr/bin/os-net-config", line 10, in <module>
        sys.exit(main())
      File "/usr/lib/python2.7/site-packages/os_net_config/cli.py", line 269, in main
        obj = objects.object_from_json(iface_json)
      File "/usr/lib/python2.7/site-packages/os_net_config/objects.py", line 87, in object_from_json
        return SriovVF.from_json(json)
      File "/usr/lib/python2.7/site-packages/os_net_config/objects.py", line 1253, in from_json
        vfid = _get_required_field(json, 'vfid', 'SriovVF')
      File "/usr/lib/python2.7/site-packages/os_net_config/objects.py", line 95, in _get_required_field
        raise InvalidConfigException(msg)
    os_net_config.objects.InvalidConfigException: SriovVF JSON objects require 'vfid' to be configured.

If a VF > 0 supplied, os-net-config will be executed successfully.

Version-Release number of selected component (if applicable):
Puddle: 2019-05-15.1
rpm -qa | grep os-net-config
os-net-config-8.4.4-1.el7ost.noarch

How reproducible:
Always

Steps to Reproduce:
1. Prepare NIC configuration containing SR-IOV VFs
2. Deploy Overcloud
3. Execute os-net-config

Actual results:
os-net-config fails to run causing the deployment to fail.

Expected results:
os-net-config executed successfully.

Additional info:

Comment 13 errata-xmlrpc 2019-09-03 16:55:32 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, 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/RHBA-2019:2624