k8snetworkplumbingwg / sriov-network-operator

Operator for provisioning and configuring SR-IOV CNI plugin and device plugin
Apache License 2.0
80 stars 109 forks source link

error parsing the pci address #772

Open ianb-mp opened 1 week ago

ianb-mp commented 1 week ago

I'm seeing error error parsing the pci address "10001:80:05.0" in sriov-network-config-daemon log output.

This is due to a bug in jaypipes/ghw which is fixed in latest release - see: https://github.com/jaypipes/ghw/pull/373

I would send a PR to bump the version, however encountered errors when running make all after the change:

pkg/host/internal/lib/ghw/ghw.go:1: : # github.com/k8snetworkplumbingwg/sriov-network-operator/pkg/host/internal/lib/ghw
pkg/host/internal/lib/ghw/ghw.go:28:9: cannot use ghw.PCI() (value of type *pci.Info) as Info value in return statement: *pci.Info does not implement Info (missing method ListDevices) (typecheck)
package ghw
pkg/host/manager.go:9:2: could not import github.com/k8snetworkplumbingwg/sriov-network-operator/pkg/host/internal/lib/ghw (-: # github.com/k8snetworkplumbingwg/sriov-network-operator/pkg/host/internal/lib/ghw
pkg/host/internal/lib/ghw/ghw.go:28:9: cannot use ghw.PCI() (value of type *pci.Info) as Info value in return statement: *pci.Info does not implement Info (missing method ListDevices)) (typecheck)
        "github.com/k8snetworkplumbingwg/sriov-network-operator/pkg/host/internal/lib/ghw"

I believe the issue is due to deprecated ListDevices() method in latest ghw version -see: https://github.com/jaypipes/ghw/pull/348 . I'm not sure how to resolve that as I'm not familiar with the mock library being used.

fyi @ykulazhenkov

adrianchiris commented 1 week ago

we should version bump this lib here and in sriov-network-device-plugin.