Closed chrisdoherty4 closed 1 year ago
Thanks for the efforts here! Could we also include a check for Goroutine leaks in TestOpenConnectionFromInterfaces
so its covered for now and any changes going ahead.
I was almost ready to open a PR.
Nice, I did this quite late so haven't verified everything. Lets compare the approaches and see what we prefer.
Patch coverage: 95.00
% and project coverage change: +0.28
:tada:
Comparison is base (
8712352
) 43.23% compared to head (be7fed9
) 43.52%.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.
Thanks for the efforts here! Could we also include a check for Goroutine leaks in TestOpenConnectionFromInterfaces so its covered for now and any changes going ahead.
Overlooked this comment, will add it in.
@joelrebel The goleak tests are in place. I ran the tests repeatedly to tease our any concurrency problems but they consistently passed.
Summary
In the Tinkerbell project where we leverage bmclib in Cluster API contexts we've had reports of BMC interactions taking too long resulting in CAPI components rolling nodes it thinks are faulty. As part of the investigation we dived into the timeout capabilities available in bmclib when connections/interfaces are initial established/probed and found a user can either (1) specify a static timeout that's shared among all providers (IPMI, Redfish etc) or (2) specify a per provider timeout that will linearly grow the total timeout applied with the total providers attempted.
This change alters the algorithm to open connections to operate concurrently. By operating concurrently we stand a better chance of giving each provider the maximal timeout period to establish its connection and avoid the linear growth with per provider timeouts.
We haven't benchmarked this change and acknowledge systems that don't offload network IO or are single CPU won't necessarily benefit but given modern consumer hardware is generally multicore we anticipate it will bring a general improvement.