Bug 2051461

Summary: nmstate interprets interface names as float64 and subsequently crashes on state update
Product: Container Native Virtualization (CNV) Reporter: Petr Horáček <phoracek>
Component: NetworkingAssignee: Petr Horáček <phoracek>
Status: CLOSED WONTFIX QA Contact: Ruth Netser <rnetser>
Severity: medium Docs Contact:
Priority: high    
Version: 4.8.4CC: bzvonar, cnv-qe-bugs, diflores, djuran, rhrazdil
Target Milestone: ---   
Target Release: 4.11.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 2053491 2055304 2055786 (view as bug list) Environment:
Last Closed: 2022-04-14 12:43:27 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: 2053491, 2055304, 2055786    

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.