summaryrefslogtreecommitdiffstats
path: root/serialize.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Enable clang code formatAdriana Kobylak2018-03-021-14/+10
| | | | | Change-Id: I4490e930459a7eab6f6dd15198418c5314755d3f Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
* Host updater: Back up version priority in environment variablesMichael Tritz2018-01-231-0/+57
| | | | | | | | | | | | | | | | | | This enhancement to the host updater adds an extra location for storing redundancy priority values for host software versions. Priority values are stored as environment variables in the format pnor-[versionId]=[priority]. This addresses any scenario in which the Cereal files storing these priority values are deleted, including (but not limited to) a BMC factory reset. Additionally, priority files are no longer removed during a host factory reset. Removing these files makes restoration of the priority on reboot impossible. Resolves openbmc/openbmc#2666 Change-Id: I6b528e75785d48bbb5c8782e879b061934ad9432 Signed-off-by: Michael Tritz <mtritz@us.ibm.com>
* Style changes in serialize.cppGunnar Mills2017-09-291-4/+4
| | | | | | | Style only changes Change-Id: I5b414d154d55cf2553fc79c28d94c0aa08dbe48b Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
* PNOR Serialize: Change create_directory to create_directoriesMichael Tritz2017-09-181-1/+1
| | | | | | | | | | | Core dumps were observed when serialize attempts to create the directory /var/lib/obmc/openpower-pnor-code-mgmt because the parent directory /var/lib/obmc did not exist. This commit changes the create_directory call to create_directories so that any missing parent directories will be created. Change-Id: I051fb854b4bf770abec8e0f03f74c194339cc227 Signed-off-by: Michael Tritz <mtritz@us.ibm.com>
* PNOR: Store a redundant copy of the priority persistence fileMichael Tritz2017-08-181-10/+36
| | | | | | | | | | | | | | In this commit, the priority persistence functionality is extended by storing a second copy of each persistence file in the RW volume for its version. Upon a reboot, the corresponding restoration from file checks the second location if necessary. Resolves openbmc/openbmc#2133 Change-Id: Ie1926ad8500d49e7ec7cf71bd703664ac23c6a7a Signed-off-by: Michael Tritz <mtritz@us.ibm.com>
* Fix for restoreFromFile cereal exceptionMichael Tritz2017-08-181-3/+12
| | | | | | | | | | | This commit provides a fix for an issue in which the cereal restoreFromFile() would crash the host software updater in the event that a priority persistence file is empty. Resolves openbmc/openbmc#2091 Change-Id: Icca5d68ef250e2662cd02075c6ba731e4ab768b0 Signed-off-by: Michael Tritz <mtritz@us.ibm.com>
* Change persistence file format from binary to JSONMichael Tritz2017-08-021-7/+7
| | | | | | | | | This commit changes the storage format for the PNOR activation persistence file from binary to JSON so that it is human-readable and parseable. Change-Id: I7ad6bd9c34284cccd281707052b962c069f50676 Signed-off-by: Michael Tritz <mtritz@us.ibm.com>
* PNOR: Restore RedundancyPriority on resetMichael Tritz2017-07-301-0/+51
This commit extends the functionality of the PNOR software updater by preserving RedundancyPriority values through any kind of reset. This is accomplished by storing priority values in serial files in /var/lib/obmc/openpower-pnor-code-mgmt/ using the Cereal library. Each time a priority value is modified, the value in the corresponding version file is adjusted. When the item updater resets, it reads back the priority values from these files. Resolves openbmc/openbmc#2040 Change-Id: I908431801e541a1e5b39bcf49ae057f7e340eecc Signed-off-by: Michael Tritz <mtritz@us.ibm.com>
OpenPOWER on IntegriCloud