nvmesensor: fix crash caused by passthruInterface during host reboot
During host power cycle or reboot, nvmesensor will crash due to the
exception `org.freedesktop.DBus.Error.FileExists: File exists` and
restart.
The original patch forgot to remove the passthruInterface in the
destructor function of NVMeControllerEnabled class. When device
warm-reboot, nvmesensor will delete and recreate NVMeControllerEnabled,
thus triggering this FileExists DBus error.
Tested:
Before the fix, nvmesensor will crash when `ipmitool chassis power cycle`
After the fix, nvmesensor doesn't crash when `ipmitool chassis power cycle`
Google-Bug-Id: 301320438
Change-Id: I970643b54a75d6160f9f873ca501bb69dc64d626
Signed-off-by: Jinliang Wang <jinliangw@google.com>
(cherry picked from commit f2dc87e4757bc78c6adbc52069340a8ae5325114)
1 file changed