| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
| |
There were a few cases where a service action was reported because the
watchdog service was not present. It was because of a race condition where
the power down operation is trigerred and the watchdog service is shutdown
but if was followed by a watchdog reset. Since the watchdog service is absent
it resulted in an error log which calls for serviceable action. The IPMI error
response code will report the failure to the host platform software.
Change-Id: Iaf0a860b53fbd85dc451fc4d4a337406ba74e0d6
Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The SetWatchdog function currently sets the intervals and then the time
remaining on the watchdog. It uses the user provided interval for both
values. Recently, the watchdog was extended to allow for the interval to
be capped above a certain value to prevent the user from setting
watchdogs that are known to be too short. In order to keep the
timeRemaining in sync with the value in the watchdog, just use the
resetTimeRemaining() function which reads the current interval to set
the timeRemaining.
Change-Id: I3f15030a85c625fcb1ed8040add03496618a5ece
Signed-off-by: William A. Kennington III <wak@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The expiration flags should be retain their state
across system resets and power cycles.
Tested:
Set “BIOS FRB2” and start
ipmitool raw 0x06 0x24 0x01 0x00 0x00 0x00 0x30 0x00
ipmitool mc watchdog reset
after stopped:
Timer Expiration Flags should be : (0x02)
* BIOS FRB2
Then Set “BIOS/POST” and start,
ipmitool raw 0x06 0x24 0x02 0x00 0x00 0x00 0x30 0x00
ipmitool mc watchdog reset
after stopped:
Timer Expiration Flags should be : (0x06)
* BIOS FRB2
* BIOS/POST
“impitool mc watchdog get” displays the correct Timer Expiration Flags
when the timer is running;
Signed-off-by: Yong Li <yong.b.li@linux.intel.com>
Change-Id: Ic0c27c6c1e8bed2db8ce30fc0eec2a6538bb1992
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
data length check for timeout action and byte 1 reserved field check
are missing, causing not to throw the error;
Log flags is on bit 7, also needs to right-shift this flag;
This commit fixes these issues;
Tested:
Set different timer use/actions:
ipmitool raw 0x06 0x24 0x85 0x0 0x0 0x0 0x64 0x00
ipmitool raw 0x06 0x24 0x84 0x1 0x0 0x0 0x64 0x00
Check the settings are correct:
ipmitool raw 0x06 0x25
Signed-off-by: Yong Li <yong.b.li@linux.intel.com>
Change-Id: Ia4226bb4597d2c670f93522aa763e43d15eb6cf1
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Rewrite "get and set watchdog" command to use the newly
introduced ipmi api.
Tested:
Verified using ipmitool "get and set watchdog",
timer behavior is same before and after the changes.
Testing Procedure:
default watchdog timer is 11.2 seconds.
ipmitool raw 0x06 0x25 ---> Get
Output: 00 00 00 00 70 17 70 17
Note: Here 70 count(hex value)->112 count(decimal value)->112*100=11200ms
[100ms per count]->11.2sec (watchdog timer)
watchdog timer set to 20 seconds.
ipmitool raw 0x06 0x24 0x44 0x01 0x00 0x10 0xc8 0x00 ----> Set
output:
ipmitool raw 0x06 0x25 ---> Get
output: 04 01 00 00 c8 00 c8 00
Note: Here 20sec->20000ms->200count->c8 (hex value)
Signed-off-by: Deepak Kumar Sahu <deepakx.sahu@intel.com>
Change-Id: Id8c096bc1635d1900ee842a9726c49fb690fa8bc
|
|
|
|
|
|
|
|
|
|
|
|
| |
If the input data length exceeds the expected, return len_invalid too
Tested:
ipmitool raw 0x06 0x24 0x01 0x13 0x0 0x2 0xa 0x00 0xff
Will return error
Signed-off-by: Yu Ren <yux.ren@intel.com>
Change-Id: I12168f4aed51c499fd06067ca4475917b68e819e
|
|
|
|
|
|
|
|
|
|
|
|
| |
Modify to use the new provider API. One by one, change calls to
remove any legacy API constructs.
Tested-by: ipmitool mc watchdog get
ipmitool mc watchdog off
ipmitool mc watchdog reset
Change-Id: If6cd1d921908dc7f5462e99b0098b4897e743ebb
Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
After some feedback from users of the new IPMI API, they wanted to see
two things:
1) don't require ipmid/api.hpp and ipmid/registration.hpp to be able to
write new handlers
2) only require including ipmid/api.hpp (instead of ipmid/api.h)
So now, by simply including ipmid/api.hpp instead of ipmid/api.h
(deprecated), handlers incorporating the new IPMI API can be written.
Change-Id: I446dcce70cff03d4ecc28c658292d052485f77fc
Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
|
|
|
|
|
|
|
| |
These two files have now been replaced with newer APIs and can be removed.
Change-Id: If60227b24188c6796211ca43379169f9a95c9cb3
Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
The timeRemaining property in watchdog service will return 0
if the watchdog is not started.
Tested By:
ipmitool raw 0x6 0x24 0x0 0x0 0x0 0x0 0xa 0xb
ipmitool mc watchdog get
Change-Id: I27992f25a0e2c75df398ec5e2702b467365e9a32
Signed-off-by: Yong Li <yong.b.li@linux.intel.com>
|
|
|
|
|
|
|
|
|
| |
Tested:
ipmitool raw 0x06 0x24 1 0 0 0 0 0
ipmitool mc watchdog get
Change-Id: Iaffd6622821d33183a52f54a4e2e52a36aa17dde
Signed-off-by: Yong Li <yong.b.li@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This starts a transition to common ipmid libraries that providers can
link against. It will allow for a cleaner separation between common
ipmid functionality and daemon type specific code. This is needed so we
can resolve all of the symbols in the providers at link time instead of
discovering bad linkage by building and running a full ipmi daemon.
In future commits libraries will be packaged for libipmid and libipmid-host
which provide all of the symbols used by the current set of ipmid
providers.
This is the first step, it just separates and renames the headers.
Legacy symlinks are still kept around for compatability. It also adds
stub libraries so that external users can start linking as intended.
Change-Id: I6bbd7a146362012d26812a7b039d1c4075862cbd
Signed-off-by: William A. Kennington III <wak@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Moving headers from ".h" to ".hpp"
Reworked the header inclusion a bit so that host-ipmid is treated as a
library, and local headers aren't.
renamed apphandler.h => apphandler.hpp
renamed chassishandler.h => chassishandler.hpp
renamed globalhandler.h => globalhandler.hpp
renamed sensorhandler.h => sensorhandler.hpp
renamed storageaddsel.h => storageaddsel.hpp
renamed storagehandler.h => storagehandler.hpp
renamed systemintfcmds.h => systemintfcmds.hpp
Change-Id: I9d4ce3dd57e2e996800f9020a10cc10cdf2c3914
Signed-off-by: Patrick Venture <venture@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Logging internal failures to the phosphor-logger is a slow process that
can take up to 5 seconds. If we do this for each watchdog reset for a
relatively fast watchdog we will clog up the channel and fill the ESEL
log with errors. We probably don't want that kind of information to
build up. Instead, only report errors to the ESEL when the state of the
internal watchdog transitions from HEALTHY -> UNHEALTHY.
Tested:
Works on zaius when booting and terminating the watchdog daemon
while it is ticking. Produces the expected single error in the log
and only delays the IPMI channel once.
Change-Id: I8110ba66c4a85e188666a34cb6d055bdbec30622
Signed-off-by: William A. Kennington III <wak@google.com>
|
|
|
|
|
| |
Change-Id: I7c2a527b4751a560703a61fcbe9638b150546af5
Signed-off-by: Patrick Venture <venture@google.com>
|
|
|
|
|
|
|
|
|
|
| |
Since we switched to resetting the watchdog with a built-in method, we
are only using a single property from the watchdog. Instead of fetching
all the properties and reading just the initialized one, only request
the initialized property from the watchdog.
Change-Id: I5e29b5100629e1ce23f352b0b749a434cd1ab793
Signed-off-by: William A. Kennington III <wak@google.com>
|
|
|
|
|
|
|
|
| |
Using this helper method reduces the number of dbus calls made during
each watchdog reset.
Change-Id: I373db3babe03e05fca33eb4dbbbc7c07f95a39ea
Signed-off-by: William A. Kennington III <wak@google.com>
|
|
|
|
|
|
|
|
|
| |
An upcoming change will introduce InternalFailures instead of using
runtime exceptions for error handling in the watchdog service. We need
to handle these exceptions appropriately.
Change-Id: Icfc02d98821f307a37a4cf59911913c820e88744
Signed-off-by: William A. Kennington III <wak@google.com>
|
|
|
|
|
| |
Change-Id: I2ba9fd0eeba4e828cafd1bcf6fe30e2322eaf99e
Signed-off-by: William A. Kennington III <wak@google.com>
|
|
|
|
|
|
|
|
| |
We now respect the action set during the SetTimeout command. This maps
to one of the actions defined by the dbus Watchdog interface
Change-Id: I4d13d2539a2d955a4340bf5f915ca6f3b694550a
Signed-off-by: William A. Kennington III <wak@google.com>
|
|
|
|
|
|
|
|
|
| |
This makes it possible for the phosphor-host-ipmi or any other watchdog
managing daemon to report to the caller that the watchdog was not configured
if the phosphor-watchdog daemon restarts for any reason.
Change-Id: Iae3a8554c2f5d1cb89368f3ce14b3d44922599c0
Signed-off-by: William A. Kennington III <wak@google.com>
|
|
|
|
|
| |
Change-Id: I730317954819859d23fdaca7336f19f5c5b0c107
Signed-off-by: William A. Kennington III <wak@google.com>
|
|
|
|
|
|
|
|
| |
This is a refactoring of names + header cleanup and has no functional
change.
Change-Id: Ie90fded80b6a26927f56bb342993193530b8b8ef
Signed-off-by: William A. Kennington III <wak@google.com>
|
|
|
|
|
|
|
|
|
| |
This adds return codes for all of the dbus failures which inform the
host that it should retry the IPMI command as dbus related errors should
be ephemeral.
Change-Id: I090f488535625a996347677a0c8addbdff0996c0
Signed-off-by: William A. Kennington III <wak@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When deserializing a bool with sd_bus_message_read, it expects the
storage of the passed in container to be 4 bytes. A bool is not
guaranteed to be this large and will cause sd_bus_message_read to
scribble on the stack. Change enabled to int to guarantee enough
space to deserialize the result.
For reference libsystemd is doing:
*(int*) p = !!*(uint8_t*) q;
Change-Id: Ic299e303fcb70941757c453a7b4f643337220afb
Signed-off-by: William A. Kennington III <wak@google.com>
|
|
|
|
|
|
|
|
|
| |
This enables the host to recover when the BMC resets or the daemon loses
state for some reason. A well formed host will resend the SetTimeout
command if it encounters this error code.
Change-Id: Ib5fd50ac3ad83ef820f0209354aa8f084a563995
Signed-off-by: William A. Kennington III <wak@google.com>
|
|
|
|
|
|
|
| |
Some style cleanup.
Change-Id: I4f8ce595294797cc015a55cc6c9477aee7b6938a
Signed-off-by: Patrick Venture <venture@google.com>
|
|
I split out the watchdog command handlers into their own
subordinate file from the apphandler. This reduces the
size of the contents of the apphandler file, and logically
cuts out code into its own files.
Change-Id: Idc70acad6c93c12456cc7092786715643c9c1ffb
Signed-off-by: Patrick Venture <venture@google.com>
|