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
1=== modified file 'providers/plainbox-provider-checkbox/bin/ipmi_test'
2--- providers/plainbox-provider-checkbox/bin/ipmi_test 2015-07-07 22:13:42 +0000
3+++ providers/plainbox-provider-checkbox/bin/ipmi_test 2016-09-30 19:43:17 +0000
4@@ -1,27 +1,31 @@
5 #!/bin/bash
6
7 # Now make sure the modules are loaded
8-for module in ipmi_si ipmi_devintf ipmi_msghandler; do
9+for module in ipmi_si ipmi_devintf ipmi_powernv ipmi_ssif ipmi_msghandler; do
10 if lsmod |grep -q $module; then
11 echo "$module already loaded"
12 else
13- echo "Loading $module..."
14- modprobe $module
15+ echo "Attempting to load $module..."
16+ modprobe $module > /dev/null
17 result=$?
18 # If the IPMI drivers don't load, it could be the system has no BMC, or
19- # the IPMI driver is bad. We should error and Fail here.
20+ # the IPMI driver is bad or not applicable to this SUT.
21 if [ $result -eq 1 ]; then
22- echo "ERROR: Unable to load module $module" >&2
23- echo "Aborting IPMI test run." >&2
24- exit 1
25+ echo
26+ echo "*******************************************"
27+ echo "WARNING: Unable to load module $module"
28+ echo "Continuing run, but in-band IPMI may fail"
29+ echo "*******************************************"
30+ echo
31 else
32- echo "Successfully loaded module $module"
33+ echo "Successfully loaded module $module\n\n"
34 fi
35 fi
36 done
37
38 # Now get our info from ipmitool to make sure communication works
39 # First lest check chassis status
40+echo
41 echo "Checking for chassis status"
42 ipmitool chassis status && echo "Successfully got chassis status" && chassis=0 || chassis=1
43 echo "Checking to see if we can get sensor data"

Subscribers

People subscribed via source and target branches