Testing Done: |
|
---|
11818 IPMI topo plugin shouldn't return data from unavailable sensors
Review Request #2397 — Created Oct. 15, 2019 and submitted
Information | |
---|---|
mscheler | |
illumos-gate | |
11818 | |
Reviewers | |
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-c3c20ecbf8fahc://: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: truehc://: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: truehc://: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: truehc://: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
Change Summary:
Completely reworked fix based on feedback on Illumos developer mailing list
Summary: |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Description: |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Testing Done: |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Diff: |
Revision 2 (+192 -65) |
-
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.
-
-
usr/src/lib/fm/topo/modules/common/ipmi/ipmi_enum.c (Diff revision 2) Should there be a call to topo_mod_strfree(mode, name) here?