dbus-sensors: RedfishSensor: Network error fix
Wrapped all Boost Beast objects in an optional, so that it could be
torn down and easily created anew. Made all early returns call this
consistently. Now, the Boost Beast state will not remain corrupt after
an error, it will be created again from scratch.
Tested: I rebooted the NVidia HMC, and RedfishSensor correctly handled
the reboot, setting sensors to NaN when down, and recovering to normal
values when it came back up. This is an excellent test, because as the
NVidia HMC goes down and comes back up, while still undergoing regular
sensor reading cycles, these sensor readings fail in a variety of
interesting ways, all over the various levels within the software
stack, as the software is torn down during shutdown and then later all
restarted during NVidia HMC reboot.
https://paste.googleplex.com/6633691118829568
Patch Tracking Bug: b/269230817
Upstream info / review: https://gerrit.openbmc.org/c/openbmc/dbus-sensors/+/60917
Upstream-Status: Submitted
Justification: Upstreaming for symmetry with local patches
Google-Bug-Id: 268667169
Google-Bug-Id: 269230817
Signed-off-by: Josh Lehan <krellan@google.com>
Change-Id: Id04d197cde876c4853369dec68dc8f374e7b4a38
(cherry picked from commit cc3b0af5fb4e1b1a8520e2ae2d08ac9ca649835b)
Signed-off-by: Josh Lehan <krellan@google.com>
2 files changed