Bug #8954
closedlibtopo cannot handle any array type other than string_array.
100%
Description
string_arrays appear to be the only array type that was tested.
There is a typo in the function xlate_common which prevents all other types being processed. The memory managment is also mismatched we need to use "topo_mod_free" not "free".
Using the test file included placed in
/usr/platform/i86pc/lib/fm/topo/maps/i86pc-hc-topology.xml
We get
TIME UUID
Jan 05 21:45:56 8e2425f2-3bbe-46bc-a3f6-c3090855916d
hc://:product-id=VMware-Virtual-Platform:server-id=openindiana:chassis-id=VMware-56-4d-82-82-e3-49-cf-1f-d8-36-9f-6b-9e-45-14-60/chassis=0
group: protocol version: 1 stability: Private/Private
resource fmri hc://:product-id=VMware-Virtual-Platform:server-id=openindiana:chassis-id=VMware-56-4d-82-82-e3-49-cf-1f-d8-36-9f-6b-9e-45-14-60/chassis=0
group: authority version: 1 stability: Private/Private
product-id string VMware-Virtual-Platform
chassis-id string VMware-56-4d-82-82-e3-49-cf-1f-d8-36-9f-6b-9e-45-14-60
server-id string openindiana
group: system version: 1 stability: Private/Private
isa string i386
machine string i86pc
Fixing up the issue we get
TIME UUID
Jan 05 21:47:15 0386f991-c6a8-6368-a067-e64c76c50433
hc://:product-id=VMware-Virtual-Platform:server-id=openindiana:chassis-id=VMware-56-4d-82-82-e3-49-cf-1f-d8-36-9f-6b-9e-45-14-60/chassis=0
group: protocol version: 1 stability: Private/Private
resource fmri hc://:product-id=VMware-Virtual-Platform:server-id=openindiana:chassis-id=VMware-56-4d-82-82-e3-49-cf-1f-d8-36-9f-6b-9e-45-14-60/chassis=0
stuff uint32[] [ 1 ]
group: authority version: 1 stability: Private/Private
product-id string VMware-Virtual-Platform
chassis-id string VMware-56-4d-82-82-e3-49-cf-1f-d8-36-9f-6b-9e-45-14-60
server-id string openindiana
group: system version: 1 stability: Private/Private
isa string i386
machine string i86pc
Files
Updated by Electric Monk almost 6 years ago
- Status changed from New to Closed
git commit 28e9047603953b20acb54306be7c48152a1b03e6
commit 28e9047603953b20acb54306be7c48152a1b03e6 Author: Ben Sims <bensims@gmail.com> Date: 2018-01-16T13:24:16.000Z 8954 libtopo cannot handle any array type other than string_array. Reviewed by: Andy Stormont <astormont@racktopsystems.com> Reviewed by: David Höppner <0xffea@gmail.com> Reviewed by: Rob Johnston <rob.johnston@joyent.com> Approved by: Hans Rosenfeld <rosenfeld@grumpf.hope-2000.org>