RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 2084616 - cannot attach infiniband interface into bond without listing it under `interfaces` key
Summary: cannot attach infiniband interface into bond without listing it under `interf...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: nmstate
Version: 9.1
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: 9.2
Assignee: Gris Ge
QA Contact: Mingyu Shi
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-05-12 14:12 UTC by Mingyu Shi
Modified: 2023-05-09 08:20 UTC (History)
5 users (show)

Fixed In Version: nmstate-2.2.1-1.el9
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-05-09 07:30:59 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker NMT-525 0 None None None 2023-05-09 07:34:59 UTC
Red Hat Issue Tracker RHELPLAN-121885 0 None None None 2022-05-12 14:45:37 UTC
Red Hat Product Errata RHBA-2023:2190 0 None None None 2023-05-09 07:31:13 UTC

Description Mingyu Shi 2022-05-12 14:12:35 UTC
Description of problem:
Cannot attach infiniband interface into bond without listing it under `interfaces` key.

Version-Release number of selected component (if applicable):
nmstate-1.3.0-0.alpha.20220505.el8.x86_64
nispor-1.2.3-1.el8.x86_64
NetworkManager-1.39.3-1.el8.x86_64
RHEL-8.7.0-20220509.3

How reproducible:
100%

Steps to Reproduce:
(find a machine with infiniband card)
1. Create infiniband interface via nmstate
2. Create a bond interface with infiniband attached, but don't mention them under "interfaces" key

Here's an example:
cat << EOF > ib.yml
routes:
  config:
  - destination: 192.168.199.0/24
    metric: 199
    next-hop-address: 192.168.100.199
    next-hop-interface: ib0
    table-id: 199
  - destination: 192:168:199::/64
    metric: 199
    next-hop-address: 192:168:100::199
    next-hop-interface: ib0
    table-id: 199
interfaces:
- name: ib0
  type: infiniband
  state: up
  infiniband:
    base-iface: ''
    mode: datagram
    pkey: '65535'
  ipv4:
    enabled: true
    address:
    - ip: 192.168.100.10
      prefix-length: 24
  ipv6:
    enabled: true
    address:
    - ip: 192:168:100::10
      prefix-length: 64
  mtu: 2022
- name: ib1
  type: infiniband
  state: up
  infiniband:
    base-iface: ''
    mode: datagram
    pkey: '65535'
  mtu: 1999
EOF

cat << EOF > ib_bond.yml
interfaces:
- name: bond0
  type: bond
  state: up
  ipv4:
    enabled: true
    address:
    - ip: 192.168.100.1
      prefix-length: 24
  ipv6:
    enabled: true
    address:
    - ip: 192:168:100::1
      prefix-length: 64
  link-aggregation:
    mode: active-backup
    port:
    - ib0
    - ib1
EOF
nmstatectl apply ib.yml
nmstatectl apply ib_bond.yml # failed

Actual results:
Traceback (most recent call last):
  File "/usr/bin/nmstatectl", line 11, in <module>
    load_entry_point('nmstate==1.3.0', 'console_scripts', 'nmstatectl')()
  File "/usr/lib/python3.6/site-packages/nmstatectl/nmstatectl.py", line 74, in main
    return args.func(args)
  File "/usr/lib/python3.6/site-packages/nmstatectl/nmstatectl.py", line 338, in set
    return apply(args)
  File "/usr/lib/python3.6/site-packages/nmstatectl/nmstatectl.py", line 355, in apply
    args.save_to_disk,
  File "/usr/lib/python3.6/site-packages/nmstatectl/nmstatectl.py", line 419, in apply_state
    save_to_disk=save_to_disk,
  File "/usr/lib/python3.6/site-packages/libnmstate/netapplier.py", line 89, in apply
    _apply_ifaces_state(plugins, net_state, verify_change, save_to_disk)
  File "/usr/lib/python3.6/site-packages/libnmstate/netapplier.py", line 122, in _apply_ifaces_state
    plugin.apply_changes(net_state, save_to_disk)
  File "/usr/lib/python3.6/site-packages/libnmstate/nm/plugin.py", line 233, in apply_changes
    NmProfiles(self.context).apply_config(net_state, save_to_disk)
  File "/usr/lib/python3.6/site-packages/libnmstate/nm/profiles.py", line 78, in apply_config
    profile.prepare_config(save_to_disk, gen_conf_mode=False)
  File "/usr/lib/python3.6/site-packages/libnmstate/nm/profile.py", line 314, in prepare_config
    self._iface, self._nm_profile
  File "/usr/lib/python3.6/site-packages/libnmstate/nm/connection.py", line 191, in create_new_nm_simple_conn
    iface.original_desire_dict,
  File "/usr/lib/python3.6/site-packages/libnmstate/nm/infiniband.py", line 96, in create_setting
    ib_setting.props.p_key = ib_config[InfiniBand.PKEY]
TypeError: Must be number, not str

Expected results:
No failure

Additional info:
Simply appending 
- name: ib0
- name: ib1
to ib_bond.yml, then "nmstatectl apply ib_bond.yml" works.

Comment 1 Gris Ge 2022-09-06 14:25:19 UTC
Changing to RHEL 9 as there is a very simple workaround (mention the infiniband interface in the desire state when attaching it to any controller).

Comment 3 Gris Ge 2022-11-29 02:51:11 UTC
Problem already fixed by nmstate-2.2.1-1.el9

Comment 6 Mingyu Shi 2022-12-14 02:37:19 UTC
Verified with:
nmstate-2.2.2-0.alpha.20221201.el9.x86_64
NetworkManager-1.41.5-1.el9.x86_64
Linux dell-per740-80.rhts.eng.pek2.redhat.com 5.14.0-202.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Mon Nov 28 08:49:47 EST 2022 x86_64 x86_64 x86_64 GNU/Linux
DISTRO=RHEL-9.2.0-20221129.2

It also works on RHEL 8.8 nmstate-1.4.0-0.alpha.20221201.el8.x86_64

Comment 8 errata-xmlrpc 2023-05-09 07:30: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 (nmstate bug fix and enhancement 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/RHBA-2023:2190


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