Item_updater:Restructure the sequence of delete interface.
- We are seeing several instances where the ubi volumes
are deleted but not the persistence priority files.
- By moving the removal of persistence files at the start
of the delete function we can be sure that the files gets
delete before any ubi volume delete fails.
Resolves openbmc/openbmc#2160
Change-Id: Ic186e6060da542bc22160dcc2b97f13bfcd51a77
Signed-off-by: Saqib Khan <khansa@us.ibm.com>
diff --git a/item_updater.cpp b/item_updater.cpp
index 0f583ed..c6726d3 100755
--- a/item_updater.cpp
+++ b/item_updater.cpp
@@ -325,6 +325,9 @@
void ItemUpdater::erase(std::string entryId)
{
+ // Remove priority persistence file
+ removeFile(entryId);
+
// Removing partitions
removeReadWritePartition(entryId);
removeReadOnlyPartition(entryId);
@@ -350,7 +353,6 @@
return;
}
activations.erase(entryId);
- removeFile(entryId);
}
} // namespace updater