rancher / elemental-operator

The Elemental operator is responsible for managing the OS versions and maintaining a machine inventory to assist with edge or baremetal installations.
Apache License 2.0
41 stars 17 forks source link

[ v1.6.x][BACKPORT] register: don't send new Disks and Controllers data #742

Closed fgiudici closed 3 months ago

fgiudici commented 3 months ago

The newer versions of jaypipes/ghw include a new type of Disk and Controller in the Blocks section.

We use the library json serialization functionality: the deserialization function of the older version of the library (0.9.0) would error out when trying to decode serialized data of newer versions if they include the new "virtual" drive or the new "loop" controller. For now, just remove those devices. Proper fix will be to better deal with this kind of errors avoiding tearing down the registration process.

Signed-off-by: Francesco Giudici francesco.giudici@suse.com (cherry picked from commit 3379c85c4076e2c334e7a3692d5334c1321720de)

codecov[bot] commented 3 months ago

Codecov Report

Attention: Patch coverage is 0% with 10 lines in your changes are missing coverage. Please review.

Please upload report for BASE (v1.6.x@d34433f). Learn more about missing BASE report.

Files Patch % Lines
pkg/hostinfo/hostinfo.go 0.00% 9 Missing :warning:
pkg/register/register.go 0.00% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## v1.6.x #742 +/- ## ========================================= Coverage ? 57.42% ========================================= Files ? 41 Lines ? 5064 Branches ? 0 ========================================= Hits ? 2908 Misses ? 1846 Partials ? 310 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.