diff options
author | Andrew Geissler <andrewg@us.ibm.com> | 2017-05-31 19:34:41 -0500 |
---|---|---|
committer | Patrick Williams <patrick@stwcx.xyz> | 2017-06-06 19:59:09 +0000 |
commit | 5f4fe3c3165ae4266f8a50ecb7f8488cb6ca7035 (patch) | |
tree | 5331dc1828d2c0a30f3cef38d78cd93368f60f3e /softoff | |
parent | a6e3a3080d532536e02e304c819c1e17214e038a (diff) | |
download | phosphor-host-ipmid-5f4fe3c3165ae4266f8a50ecb7f8488cb6ca7035.tar.gz phosphor-host-ipmid-5f4fe3c3165ae4266f8a50ecb7f8488cb6ca7035.zip |
Don't return error on SMS error
The state of the host is unknown when a host shutdown
is requested. The defined behavior after asserting the SMS
attention is to give the host a few seconds to respond. If
there is no response then just continue with the shutdown.
Change-Id: I7b25ddb572bd8dea9f6a3422997f53e5f38c7fc5
Signed-off-by: Andrew Geissler <andrewg@us.ibm.com>
Diffstat (limited to 'softoff')
-rw-r--r-- | softoff/elog-gen-softoff.hpp | 61 | ||||
-rw-r--r-- | softoff/softoff.cpp | 7 |
2 files changed, 4 insertions, 64 deletions
diff --git a/softoff/elog-gen-softoff.hpp b/softoff/elog-gen-softoff.hpp deleted file mode 100644 index e863633..0000000 --- a/softoff/elog-gen-softoff.hpp +++ /dev/null @@ -1,61 +0,0 @@ -// This file was autogenerated. Do not edit! -// See elog-gen.py for more details -#pragma once - -#include <string> -#include <tuple> -#include <type_traits> -#include <sdbusplus/exception.hpp> -#include <phosphor-logging/log.hpp> -#include <phosphor-logging/elog.hpp> - - -namespace phosphor -{ - -namespace logging -{ - -namespace xyz -{ -namespace openbmc_project -{ -namespace SoftPowerOff -{ -namespace Internal -{ -namespace _SoftOffFailed -{ - -} // namespace _SoftOffFailed - -struct SoftOffFailed : public sdbusplus::exception_t -{ - static constexpr auto errName = "xyz.openbmc_project.SoftPowerOff.Internal.SoftOffFailed"; - static constexpr auto errDesc = "The SoftOff command to the host control object returned an error"; - static constexpr auto L = level::ERR; - using metadata_types = std::tuple<>; - - const char* name() const noexcept - { - return errName; - } - - const char* description() const noexcept - { - return errDesc; - } - - const char* what() const noexcept - { - return errName; - } -}; - -} // namespace Internal -} // namespace SoftPowerOff -} // namespace openbmc_project -} // namespace xyz - -} // namespace logging -} // namespace phosphor diff --git a/softoff/softoff.cpp b/softoff/softoff.cpp index 3511814..767eb90 100644 --- a/softoff/softoff.cpp +++ b/softoff/softoff.cpp @@ -15,11 +15,9 @@ */ #include <chrono> #include <phosphor-logging/log.hpp> -#include <phosphor-logging/elog.hpp> #include <xyz/openbmc_project/Control/Host/server.hpp> #include <utils.hpp> #include "softoff.hpp" -#include "elog-gen-softoff.hpp" #include "config.h" namespace phosphor { @@ -95,7 +93,10 @@ void SoftPowerOff::hostControlEvent(sdbusplus::message::message& msg) } else { - elog<xyz::openbmc_project::SoftPowerOff::Internal::SoftOffFailed>(); + // An error on the initial attention is not considered an error, just + // exit normally and allow remaining shutdown targets to run + log<level::INFO>("Timeout on host attention, continue with power down"); + completed = true; } return; } |