| 3d079c6b | 26-Mar-2025 |
Matt Spinler <spinler@us.ibm.com> |
Change AdditionalData back to a vector in cereal
There is a case now where a system can create an event log with cereal version 6 which will save the AdditionalData property as a map, but then it ca
Change AdditionalData back to a vector in cereal
There is a case now where a system can create an event log with cereal version 6 which will save the AdditionalData property as a map, but then it can be backleveled to an image with version 5. That code has no knowledge of the map format, so cereal will throw an exception when it attempts to restore the entry.
This will cause the daemon to go into an infinite crash/restart loop, as it will always restart on failure.
A previous fix went in to catch any exceptions that cereal generates and then throw away the log, but that won't help systems without that code.
To fix this, go back to saving AdditionalData as a vector, and then on the load convert it to map after reading the file. It still knows that version 6 was saved as a map, so it can handle that appropriately.
With this fix, older code can load the cereal files created by the new code.
Tested: Created event log with version 7, copied the file to a system that only understands version 5 and it can be restored properly.
Tested that version 6 can still be understood with the new code.
Change-Id: Ia49d8d2ba52398c4df5a15aa89df047b15047ac1 Signed-off-by: Matt Spinler <spinler@us.ibm.com>
show more ...
|