Remove checks for AutoReboot in watchdog timeout
Dump collector component collects the dump depending on system dump
policy setting. If the dump policy setting is Enabled, it collects the
dump even when AutoReboot property is disabled. So, removing the check
for AutoReboot which was initially used as a workaround to determine
dump collection when watchdog times out.
Tested:
Disabled AutoReboot property using busctl command, and verified that
the hostboot dump was collected.
Signed-off-by: Shantappa Teekappanavar <sbteeks@yahoo.com>
Change-Id: Iddc67f19b70461424c696754c04e2d26434247b8
diff --git a/watchdog/watchdog_common.cpp b/watchdog/watchdog_common.cpp
index 9243300..d8e64b4 100644
--- a/watchdog/watchdog_common.cpp
+++ b/watchdog/watchdog_common.cpp
@@ -30,37 +30,5 @@
bus.call_noreply(method); // start the service
}
-bool isAutoRebootEnabled()
-{
- constexpr auto settingsService = "xyz.openbmc_project.Settings";
- constexpr auto settingsPath =
- "/xyz/openbmc_project/control/host0/auto_reboot";
- constexpr auto settingsIntf = "org.freedesktop.DBus.Properties";
- constexpr auto rebootPolicy =
- "xyz.openbmc_project.Control.Boot.RebootPolicy";
-
- auto bus = sdbusplus::bus::new_system();
- auto method =
- bus.new_method_call(settingsService, settingsPath, settingsIntf, "Get");
-
- method.append(rebootPolicy);
- method.append("AutoReboot");
-
- bool autoReboot = false;
- try
- {
- auto reply = bus.call(method);
- std::variant<bool> result;
- reply.read(result);
- autoReboot = std::get<bool>(result);
- }
- catch (const sdbusplus::exception::exception& e)
- {
- log<level::ERR>("Error in AutoReboot Get", entry("ERROR=%s", e.what()));
- }
-
- return autoReboot;
-}
-
} // namespace dump
} // namespace watchdog
diff --git a/watchdog/watchdog_common.hpp b/watchdog/watchdog_common.hpp
index a2b8ecc..316a6bf 100644
--- a/watchdog/watchdog_common.hpp
+++ b/watchdog/watchdog_common.hpp
@@ -14,8 +14,5 @@
*/
void transitionHost(const std::string& target);
-/** @brief Read state of autoreboot property via dbus */
-bool isAutoRebootEnabled();
-
} // namespace dump
} // namespace watchdog
diff --git a/watchdog/watchdog_logging.cpp b/watchdog/watchdog_logging.cpp
index 52ec7c7..47024f6 100644
--- a/watchdog/watchdog_logging.cpp
+++ b/watchdog/watchdog_logging.cpp
@@ -28,11 +28,8 @@
// Create PEL with additional data.
auto pelId = createPel(eventName, additional, emptyFfdc);
- // Collect Hostboot dump if auto reboot is enabled
- if (isAutoRebootEnabled())
- {
- requestDump(pelId, timeout); // will not return until dump is complete
- }
+ // will not return until dump is complete or times out
+ requestDump(pelId, timeout);
}
void eventWatchdogTimeout(const uint32_t timeout)