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

Revert "Fetch unnumbered Director root once as a workaround." #1661

Merged
merged 1 commit into from
Apr 30, 2020
Merged
Show file tree
Hide file tree
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
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ Our versioning scheme is `YEAR.N` where `N` is incremented whenever a new releas

- Improved garage-deploy object fetching performance by reusing the curl handle: [PR](https://github.com/advancedtelematic/aktualizr/pull/1643)

### Removed

- No longer fetch unnumbered Root metadata from the Director: [PR](https://github.com/advancedtelematic/aktualizr/pull/1661)


## [2020.5] - 2020-04-01

Expand Down
6 changes: 1 addition & 5 deletions src/libaktualizr/uptane/uptane_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1203,11 +1203,7 @@ class HttpFakeUnstable : public HttpFake {
if (unstable_valid_count >= unstable_valid_num) {
return HttpResponse({}, 503, CURLE_OK, "");
} else {
// This if is a hack only required as long as we have to explicitly fetch
// this to make the Director recognize new devices as "online".
if (url.find("director/root.json") == std::string::npos) {
++unstable_valid_count;
}
++unstable_valid_count;
return HttpFake::get(url, maxsize);
}
}
Expand Down
7 changes: 0 additions & 7 deletions src/libaktualizr/uptane/uptanerepository.cc
Original file line number Diff line number Diff line change
Expand Up @@ -65,14 +65,7 @@ void RepositoryCommon::updateRoot(INvStorage& storage, const IMetadataFetcher& f
if (storage.loadLatestRoot(&root_raw, repo_type)) {
initRoot(repo_type, root_raw);
} else {
// This block is a hack only required as long as we have to explicitly
// fetch this to make the Director recognize new devices as "online".
if (repo_type == RepositoryType::Director()) {
fetcher.fetchLatestRole(&root_raw, kMaxRootSize, repo_type, Role::Root());
}

fetcher.fetchRole(&root_raw, kMaxRootSize, repo_type, Role::Root(), Version(1));

initRoot(repo_type, root_raw);
storage.storeRoot(root_raw, repo_type, Version(1));
}
Expand Down