freeipmi-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Freeipmi-devel] Another FreeIPMI beta w/ BMC watchdog workaround for Su


From: Albert Chu
Subject: [Freeipmi-devel] Another FreeIPMI beta w/ BMC watchdog workaround for Sun machines
Date: Mon, 28 Jun 2010 13:24:41 -0700

Hey Dave, Frank,

As discussed in the previous thread, there was a corner case in the
bmc-watchdog workaround I previously did.  I then discovered another
corner case w/ the workaround.

There is a new beta here.

http://ftp.gluster.com/pub/freeipmi/qa-release/freeipmi-0.8.8.beta1.tar.gz

If you could try it out to make sure I didn't screw anything up, I'd
appreciate it.  The core of the new patch is:

diff -p -u -r1.131 bmc-watchdog.c
--- bmc-watchdog/src/bmc-watchdog.c     16 Jun 2010 17:52:38 -0000      1.131
+++ bmc-watchdog/src/bmc-watchdog.c     28 Jun 2010 18:30:58 -0000
@@ -1920,6 +1920,21 @@ _daemon_cmd (void)
            && reset_period < (retry_wait_time * retry_attempt))
     retry_attempt = reset_period/retry_wait_time;
 
+  /* IPMI Workaround
+   *
+   * Discovered on Sun x4100M2 and x4200M2
+   *
+   * If implementing the IGNORE_STATE_FLAG workaround flag below, we
+   * need to sleep a little bit to make sure the BMC timer has really
+   * started.
+   *
+   * From 27.7 "Internal delays in the BMC may require software to
+   * delay up to 100 ms before seeing the countdown value change and
+   * be reflected in teh Get Watchdog Timer command".
+   */
+  if (cmd_args.common.tool_specific_workaround_flags & 
IPMI_TOOL_SPECIFIC_WORKAROUND_FLAGS_IGNORE_STATE_FLAG)
+    _sleep (1);
+
   while (shutdown_flag)
     {
       struct timeval start_tv, end_tv;
@@ -1984,6 +1999,45 @@ _daemon_cmd (void)
           goto sleep_now;
         }
 
+      /* IPMI Workaround
+       *
+       * Discovered on Sun x4100M2 and x4200M2
+       *
+       * If implementing the IGNORE_STATE_FLAG workaround flag above,
+       * we need to reset the previous_present_countdown_seconds to
+       * what it is after the timer reset.
+       *
+       * From 27.7 "Internal delays in the BMC may require software to
+       * delay up to 100 ms before seeing the countdown value change and
+       * be reflected in teh Get Watchdog Timer command".
+       */
+      if (cmd_args.common.tool_specific_workaround_flags & 
IPMI_TOOL_SPECIFIC_WORKAROUND_FLAGS_IGNORE_STATE_FLAG)
+        {
+          _sleep (1);
+
+          if ((ret = _get_watchdog_timer_cmd (retry_wait_time,
+                                              retry_attempt,
+                                              NULL,
+                                              NULL,
+                                              NULL,
+                                              NULL,
+                                              NULL,
+                                              NULL,
+                                              NULL,
+                                              NULL,
+                                              NULL,
+                                              NULL,
+                                              NULL,
+                                              NULL,
+                                              &present_countdown_seconds)))
+            {
+              _daemon_cmd_error_noexit ("Get Watchdog Timer", ret);
+              goto sleep_now;
+            }
+          
+          previous_present_countdown_seconds = present_countdown_seconds;
+        }
+
     sleep_now:
       if (gettimeofday (&end_tv, NULL) < 0)
         {


Al

-- 
Albert Chu
address@hidden
Computer Scientist
High Performance Systems Division
Lawrence Livermore National Laboratory




reply via email to

[Prev in Thread] Current Thread [Next in Thread]