Skip to content
This repository has been archived by the owner on May 21, 2024. It is now read-only.

Better "could not put manifest" error #1137

Merged
merged 1 commit into from
Mar 14, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/libaktualizr/primary/sotauptaneclient.cc
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,6 @@ void SotaUptaneClient::initialize() {
bool SotaUptaneClient::updateMeta() {
// Uptane step 1 (build the vehicle version manifest):
if (!putManifestSimple()) {
LOG_ERROR << "could not put manifest";
return false;
}
return uptaneIteration();
Expand Down Expand Up @@ -1227,6 +1226,8 @@ bool SotaUptaneClient::putManifestSimple() {
storage->clearInstallationResults();
return true;
}

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
At first glance it looks like the manifest assembling is redundant if there are pending updates, so I'd move line #1217 just after `if (hasPendingUpdates())` statement.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, but I'd need to double check. I have vague memories about this function having or used to having side-effects.

LOG_WARNING << "Put manifest request failed: " << response.getStatusStr();
return false;
}

Expand Down