11818 IPMI topo plugin shouldn't return data from unavailable sensors

Review Request #2397 — Created Oct. 15, 2019 and submitted

mscheler
illumos-gate
11818
general

This change accomplishes two things:
- It add an "unusable" (that is its name, not its state) topo method to the IPMI provider. This method will mark unavailable sensor as unusable to indicate to consumers that they cannot use them.
- It will not return data read from an unavailable IPMI sensor.

1.) Recorded the output of "/usr/lib/fm/fmd/fmtopo -S" on a Supermicro X9 2U.
2.) Run full nightly, used "onu" to create new BE and booted into it.
3.) Recorded the new output of "/usr/lib/fm/fmd/fmtopo -S" on the same machine. The differences are as expected:

--- before.txt 2019-11-05 10:40:24.143900715 +0000
+++ after.txt 2019-11-05 11:24:05.281979308 +0000
@@ -1,5 +1,5 @@
TIME UUID
-Nov 05 10:40:23 591d6fa7-b2a0-ee13-ab35-a08b376cd8b2
+Nov 05 11:24:05 48db20e3-81b7-431c-d266-c3c20ecbf8fa

hc://:product-id=T3300-B1:server-id=zebi-46:chassis-id=TS1502-0076/chassis=0
Present: true
@@ -31,7 +31,7 @@

hc://:product-id=T3300-B1:server-id=zebi-46:chassis-id=TS1502-0076/chassis=0/fan=1
Present: true
- Unusable: false
+ Unusable: true

hc://:product-id=T3300-B1:server-id=zebi-46:chassis-id=TS1502-0076/chassis=0/fan=1?sensor=Fan2
Present: true
@@ -39,7 +39,7 @@

hc://:product-id=T3300-B1:server-id=zebi-46:chassis-id=TS1502-0076/chassis=0/fan=2
Present: true
- Unusable: false
+ Unusable: true

hc://:product-id=T3300-B1:server-id=zebi-46:chassis-id=TS1502-0076/chassis=0/fan=2?sensor=Fan3
Present: true
@@ -63,7 +63,7 @@

hc://:product-id=T3300-B1:server-id=zebi-46:chassis-id=TS1502-0076/chassis=0/fan=5
Present: true
- Unusable: false
+ Unusable: true

hc://:product-id=T3300-B1:server-id=zebi-46:chassis-id=TS1502-0076/chassis=0/fan=5?sensor=Fan6
Present: true

"ipmitool sensor" confirms that the correct sensors were marked as unusable:

Fan1 | 6256.000 | RPM | ok | 340.000 | 408.000 | 476.000 | 17204.000 | 17272.000 | 17340.000
Fan2 | na | RPM | na | 340.000 | 408.000 | 476.000 | 17204.000 | 17272.000 | 17340.000
Fan3 | na | RPM | na | 340.000 | 408.000 | 476.000 | 17204.000 | 17272.000 | 17340.000
Fan4 | 6324.000 | RPM | ok | 340.000 | 408.000 | 476.000 | 17204.000 | 17272.000 | 17340.000
Fan5 | 6188.000 | RPM | ok | 340.000 | 408.000 | 476.000 | 17204.000 | 17272.000 | 17340.000
Fan6 | na | RPM | na | 340.000 | 408.000 | 476.000 | 17204.000 | 17272.000 | 17340.000

  • 0
  • 0
  • 1
  • 0
  • 1
Description From Last Updated
mscheler
igork
  1. Ship It!
  2. 
      
mscheler
hans
  1. In general LGTM, but I kinda dislike the naming of the attribute "unusable" because of the double negative. But I guess that's just a matter of taste and I don't want to block this because of it.

    1. I didn't invent that name. It is an existing feature of the framework.

  2. 
      
pwinder
  1. 
      
  2. Should there be a call to topo_mod_strfree(mode, name) here?

    1. No, because "name" is never set to anything other than NULL if we found a node via topo_node_getspecific() and "ep" is non NULL.

      However that is non obvious and could change in the future. I'll put the call in.

    2. ok - change and ship it

  3. 
      
pwinder
  1. 
      
  2. 
      
mscheler
hans
  1. Ship It!
  2. 
      
pwinder
  1. Ship It!
  2. 
      
mscheler
Review request changed

Status: Closed (submitted)

Loading...