libtopo XML parser doesn't handle prop type double
The following integration (way back in the early days of Solaris 11) extended both libnvpair and libtopo to support properties of type double:
PSARC 2008/428 Extending libnvpair for type double PSARC 2008/463 Extending HC FMRI scheme to represent sensors/indicators 6579615 fmtopo -e has lots of memory leaks 6635159 libtopo: extend hc scheme to allow for representing sensors and indicators in the topology 6692392 fmtopo -x doesn't handle property methods properly 6718703 Need to extend libnvpair to support type double 6718712 libtopo: Need to implement facility provider module for IPMI 6722594 libtopo: the topo_prop_set_* interfaces need to learn to play well with propmethods 6727190 libtopo: add support for node properties of type double 6727459 libipmi: need interface to convert raw sensor readings to unit-based values 6727470 libipmi: need convenience routine to convert sensor unit defines to string 6729595 libtopo: add <set> case in fan and psu xml maps for SUN-FIRE-X4600-M2 6732318 fmd: small leak in sysevent modelling code
This was done to make it easier to represent analog sensor readings, which are often floating point values. However, libtopo's XML parser was apparently never extended to allow for statically defining properties that are of type double, as the following snippet from an XML topo map failed to parse:
<propmethod name='ipmi_sensor_reading' version='0' propname='reading' proptype='double' > </propmethod>
debug logs revealed:
libtopo DEBUG: Unrecognized type attribute value 'double'. libtopo DEBUG: error decoding proptype attribute
Libtopo's XML parser should be extended to support property values of type double.
Note - this work has already been integrated into illumos-joyent via the commit below:
commit 894bc9d4bf2c420c0979780058e5ada957871bc9 Author: Rob Johnston <email@example.com> Date: Mon Sep 10 21:39:13 2018 +0000 OS-7229 libtopo XML parser doesn't handle prop type double Reviewed by: Robert Mustacchi <firstname.lastname@example.org> Approved by: Jason King <email@example.com>
So this issue is really to track getting the above commit upstreamed to illumos-gate.
For details on how the change was tested, refer to the SmartOS bug report:
Updated by Electric Monk over 1 year ago
- % Done changed from 0 to 100
- Status changed from New to Closed
commit c184cb88c90fee3b48cddeae76fbb4f8065ce83a Author: Rob Johnston <firstname.lastname@example.org> Date: 2019-01-28T22:45:26.000Z 10290 libtopo XML parser doesn't handle prop type double Reviewed by: Robert Mustacchi <email@example.com> Reviewed by: Toomas Soome <firstname.lastname@example.org> Approved by: Dan McDonald <email@example.com>