Merge lp:~bladernr/checkbox/1629417-fix-power-ipmitest into lp:checkbox

Proposed by Jeff Lane 
Status: Merged
Approved by: Jeff Lane 
Approved revision: 4514
Merged at revision: 4514
Proposed branch: lp:~bladernr/checkbox/1629417-fix-power-ipmitest
Merge into: lp:checkbox
Diff against target: 43 lines (+12/-8)
1 file modified
providers/plainbox-provider-checkbox/bin/ipmi_test (+12/-8)
To merge this branch: bzr merge lp:~bladernr/checkbox/1629417-fix-power-ipmitest
Reviewer Review Type Date Requested Status
Paul Larson Approve
Review via email: mp+307356@code.launchpad.net

Description of the change

Modifies the ipmi_test script so it no longer fails if a module fails to load. This is because some arches don't use the same modules. Thus on Power, the script was failing because ipmi_si was failing, but power uses ipmi_devintf and ipmi_ssif instead.

So now the script will just warn on module failure, and move on to attempting comms with the BMC. If THAT fails the script will still return a fail code.

This has been tested on a failing OpenPower system as well as an x86 system (to ensure it doesn't break there).

To post a comment you must log in.
Revision history for this message
Paul Larson (pwlars) wrote :

This seems reasonable to me, but I don't have a good way to test it myself. As you say you've tested it on the affected system though I'm +1. At the very least, module loading failures shouldn't prevent any currently-working systems from continuing to run, even given the new modules that you load.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'providers/plainbox-provider-checkbox/bin/ipmi_test'
--- providers/plainbox-provider-checkbox/bin/ipmi_test 2015-07-07 22:13:42 +0000
+++ providers/plainbox-provider-checkbox/bin/ipmi_test 2016-09-30 19:43:17 +0000
@@ -1,27 +1,31 @@
1#!/bin/bash1#!/bin/bash
22
3# Now make sure the modules are loaded3# Now make sure the modules are loaded
4for module in ipmi_si ipmi_devintf ipmi_msghandler; do4for module in ipmi_si ipmi_devintf ipmi_powernv ipmi_ssif ipmi_msghandler; do
5 if lsmod |grep -q $module; then5 if lsmod |grep -q $module; then
6 echo "$module already loaded"6 echo "$module already loaded"
7 else7 else
8 echo "Loading $module..."8 echo "Attempting to load $module..."
9 modprobe $module9 modprobe $module > /dev/null
10 result=$?10 result=$?
11 # If the IPMI drivers don't load, it could be the system has no BMC, or11 # If the IPMI drivers don't load, it could be the system has no BMC, or
12 # the IPMI driver is bad. We should error and Fail here.12 # the IPMI driver is bad or not applicable to this SUT.
13 if [ $result -eq 1 ]; then13 if [ $result -eq 1 ]; then
14 echo "ERROR: Unable to load module $module" >&214 echo
15 echo "Aborting IPMI test run." >&215 echo "*******************************************"
16 exit 116 echo "WARNING: Unable to load module $module"
17 echo "Continuing run, but in-band IPMI may fail"
18 echo "*******************************************"
19 echo
17 else20 else
18 echo "Successfully loaded module $module"21 echo "Successfully loaded module $module\n\n"
19 fi22 fi
20 fi23 fi
21done24done
2225
23# Now get our info from ipmitool to make sure communication works26# Now get our info from ipmitool to make sure communication works
24# First lest check chassis status27# First lest check chassis status
28echo
25echo "Checking for chassis status"29echo "Checking for chassis status"
26ipmitool chassis status && echo "Successfully got chassis status" && chassis=0 || chassis=130ipmitool chassis status && echo "Successfully got chassis status" && chassis=0 || chassis=1
27echo "Checking to see if we can get sensor data"31echo "Checking to see if we can get sensor data"

Subscribers

People subscribed via source and target branches