Skip to content

Using curl content downloader still relies on DeliveryOptimization DO-client for rootkey download #715

@AndreRicardo-Zoetis

Description

@AndreRicardo-Zoetis

We are trying to test OTA in Docker containers but noticed that even though there is an entry to use libcurl_content_downloader

create_content_downloader_registration 'libcurl_content_downloader'

The root key workflow, only seems to work with "DO", am I missing something?

ADUC_RootKeyPkgDownloaderInfo rootkey_downloader_info = {
.name = "DO", // DeliveryOptimization
.downloadFn = DownloadRootKeyPkg_DO,
.downloadBaseDir = workFolder,
};

Modified /var/lib/adu/extensions/content_downloader/extension.json to use libcurl_content_downloader.so

{
   "fileName":"/var/lib/adu/extensions/sources/libcurl_content_downloader.so",
   "sizeInBytes":0,
   "hashes": {
        "sha256":"4M06Q8dj1JNNtcSDnftZgwPeIvHycqYJphiGsjfKpwo="
   }
}

In the end because deliveryoptimization-agent is not running on the container, the OTA fails with:

2025-03-25T13:43:14.3848Z 38423[38423] [D] Attempting download of 'http://[redacted].microsoft.com/WestUS2/rootkeypackages/rootkeypackage-1.json' using 'DO' [ADUC_RootKeyPackageUtils_DownloadPackage:114]
2025-03-25T13:43:14.3848Z 38423[38423] [I] Downloading File 'http://[redacted].microsoft.com/WestUS2/rootkeypackages/rootkeypackage-1.json' to '/var/lib/adu/downloads/a8ab014a-82ac-49f7-b405-8f5ce2c9f2d0/rootkeypackage-1.json' [DownloadRootKeyPkg_DO:22]
2025-03-25T13:43:25.3935Z 38423[38423] [E] DO error, msg: unrecognized error, code: 0x80d01001, timeout? 0 [DownloadRootKeyPkg_DO:36]
2025-03-25T13:43:25.3937Z 38423[38423] [I] Download rc: 0, erc: 0xa0101001 [DownloadRootKeyPkg_DO:51]
2025-03-25T13:43:25.3937Z 38423[38423] [E] Unable to download root key pkg. [ADUC_RootKeyPackageUtils_DownloadPackage:120]
2025-03-25T13:43:25.3938Z 38423[38423] [E] Failed download of rootkey package, ERC: 0xa0101001 [RootKeyWorkflow_UpdateRootKeys:66]
2025-03-25T13:43:25.3938Z 38423[38423] [E] Fail update root keys, ERC 0xa0101001 [RootKeyWorkflow_UpdateRootKeys:178]
2025-03-25T13:43:25.3938Z 38423[38423] [E] Update Rootkey failed, 0xa0101001. Deployment cannot proceed. [OrchestratorUpdateCallback:398]

Do we need to write the equivalent of src/utils/rootkeypackage_utils/src/rootkeypackage_do_download.cpp but for curl?

Metadata

Metadata

Assignees

Labels

DesignImprovementAck of potential for future design improvement

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions