Bug 2051461 - nmstate interprets interface names as float64 and subsequently crashes on state update
Summary: nmstate interprets interface names as float64 and subsequently crashes on sta...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Container Native Virtualization (CNV)
Classification: Red Hat
Component: Networking
Version: 4.8.4
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: ---
: 4.11.0
Assignee: Petr Horáček
QA Contact: Ruth Netser
URL:
Whiteboard:
Depends On:
Blocks: 2053491 2055304 2055786
TreeView+ depends on / blocked
 
Reported: 2022-02-07 10:09 UTC by Petr Horáček
Modified: 2022-04-14 12:43 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 2053491 2055304 2055786 (view as bug list)
Environment:
Last Closed: 2022-04-14 12:43:27 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github nmstate kubernetes-nmstate pull 987 0 None Merged Fix issue with Route next-hop-interface being interpreted as float64 2022-02-16 16:05:06 UTC
Red Hat Bugzilla 1926986 1 unspecified CLOSED nmstate interprets interface names as float64 and subsequently crashes on state update 2024-06-14 00:20:28 UTC

Description Petr Horáček 2022-02-07 10:09:10 UTC
Description of problem:

When name one of the interfaces on the host matches the scientific notation (e.g. 5e10), it causes a panic in knmstate.

This was supposed to be solved by https://bugzilla.redhat.com/show_bug.cgi?id=1926986, but seems to be still happening. Reported in https://bugzilla.redhat.com/show_bug.cgi?id=1926986#c15.

"""
device name was 94475496822e234 and we had to kill the associated pod (sandboxid) and after restarting the nmstate-handler, we do not have anymore the error : 

created by sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func1
	/remote-source/app/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:212 +0x45e
panic: interface conversion: interface {} is float64, not string [recovered]
	panic: interface conversion: interface {} is float64, not string
"""


Version-Release number of selected component (if applicable):
OCP 4.8.27


How reproducible:
Sometimes. This only reproduces when the veth interface matches the notation.

Steps to reproduce without relying on the number name:
1. Create a veth pair where the host-side interface's name matches the scientific notation

Actual results:
knmstate's pod panics

Expected results:
knmstate reports the interface with its name and does not crash.


Additional info:

Comment 3 Petr Horáček 2022-04-14 12:43:27 UTC
This was fixed on the standalone operator. knmstate is not shipped with CNV in 4.11. Closing.


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