mirror of
https://github.com/xcat2/xcat-core.git
synced 2026-10-21 07:08:12 +00:00
89a8fc78f4
set_config writes the osimage, linuximage and kit rows one by one. When a later write failed, the rows written before it stayed. An image could keep a new linuximage row, with a new rootimgdir, beside its previous osimage row. set_config now keeps the osimage and linuximage rows that it replaces, disabled rows included. When a write or its commit fails, or bundle data of an unexpected shape dies between the writes, it checks each row that it tried to write. It writes changed rows back and removes the rows that it added, with NULL values as NULL. It skips a row that another writer changed or filled, so that change stays. set_config reports the rows that did not go back, also to a caller that asks for their number. Kit rows stay as written, because other images can use them.