ibm-openbmc / openpower-hw-isolation

Apache License 2.0
0 stars 10 forks source link

Process multiple guard file updates together #71

Closed deepakala-k closed 1 year ago

deepakala-k commented 1 year ago

The inotify of the guard file watch is processed after 5 seconds to handle atomicity in the file operations. Within this time window, if there are multiple updates to the guard file, process all of them together instead of waiting for another 5.In every iteration we process all the guard records. So we will not be missing out any information. This will optimize the time consumed when there are multiple guard records created.

Tested: It did not report internal error (timeout) on redfish query while ipling. Returned all the Hardware Isolation entries when requested. Before : There is around 1 min and 30 seconds delay in host going to quiesced state vs hw isolation getting the signal. The dbus object was busy during that time, causing internal error. Aug 11 09:54:20 rain104bmc phosphor-host-state-manager[1000]: Change to Host State: xyz.openbmc_project.State.Host.HostState.Quiesced ..... ..... Aug 11 09:55:37 rain104bmc dropbear[8476]: PAM password auth succeeded for 'service' from ::ffff:9.43.116.21:53678 Aug 11 09:55:38 rain104bmc systemd[1]: Started SSH Per-Connection Server (9.43.116.21:53680). Aug 11 09:55:38 rain104bmc dropbear[8480]: Child connection from ::ffff:9.43.116.21:53680 Aug 11 09:55:38 rain104bmc sudo[8485]: service : TTY=pts/2 ; PWD=/home/root ; USER=root ; COMMAND=/bin/sh Aug 11 09:55:42 rain104bmc dropbear[8480]: pam_ibmacf(dropbear:auth): acfv2-authenticate-0 Aug 11 09:55:42 rain104bmc dropbear[8480]: PAM password auth succeeded for 'service' from ::ffff:9.43.116.21:53680 Aug 11 09:55:53 rain104bmc openpower-hw-isolation[1683]: HostState is xyz.openbmc_project.State.Host.HostState.Quiesced, pull the deconfig reason from the cec device tree.

After: There is no delay between host and hw-isolation receiving the quiesced state Sep 07 05:33:27 rain100bmc phosphor-host-state-manager[658]: Auto reboot disabled. Sep 07 05:33:27 rain100bmc phosphor-host-state-manager[658]: Maintaining quiesce Sep 07 05:33:27 rain100bmc phosphor-host-state-manager[658]: Change to Host State: xyz.openbmc_project.State.Host.HostState.Quiesced Sep 07 05:33:27 rain100bmc openpower-hw-isolation[12394]: HostState is xyz.openbmc_project.State.Host.HostState.Quiesced, pull the deconfig reason from the cec device tree.

Signed-Off by: Deepa Karthikeyan (deepakala.karthikeyan@ibm.com)

deepakala-k commented 1 year ago

jenkins run tests please