Describe the bug
Health populating mechanism (redfish-core/lib/health.hpp) should not populate health statuses from objects just by looking at their beginning with boost::starts_with. Standard use case is collecting information from objects such as 'OBJECT_PATH/warning' and matching them with 'OBJECT_PATH' because the status object started with the same string. This leads to objects finished by their id number populating incorrectly, such as '.../dimm2' being counted as an another receiver of data from object '.../dimm21/warning' due to identical beginning therefore unwantedly inheriting its health statuses. Issue has its source at line 59 in redfish-core/lib/health.hpp where both are recognised as isSelf == true.
To Reproduce
I am not entirely sure if any object being numered in the way described above which would create a problem is currently managed by this health populating mechanism. It is bound to happen after progressing with e.g. redfish-core/lib/memory.hpp changes where health status is currently fixed to 'OK'. Therefore, to see the problem proceed with following steps:
Delete line 476 from redfish-core/lib/memory.hpp to enable actual health statuses from redfish-core/lib/health.hpp being showed
Describe the bug Health populating mechanism (redfish-core/lib/health.hpp) should not populate health statuses from objects just by looking at their beginning with boost::starts_with. Standard use case is collecting information from objects such as 'OBJECT_PATH/warning' and matching them with 'OBJECT_PATH' because the status object started with the same string. This leads to objects finished by their id number populating incorrectly, such as '.../dimm2' being counted as an another receiver of data from object '.../dimm21/warning' due to identical beginning therefore unwantedly inheriting its health statuses. Issue has its source at line 59 in redfish-core/lib/health.hpp where both are recognised as isSelf == true.
Environment BMCWeb commit 7e860f1550c8686eec42f7a75bc5f2ef51e756ad
To Reproduce I am not entirely sure if any object being numered in the way described above which would create a problem is currently managed by this health populating mechanism. It is bound to happen after progressing with e.g. redfish-core/lib/memory.hpp changes where health status is currently fixed to 'OK'. Therefore, to see the problem proceed with following steps:
Is this a regression No