flatcar-postinst: Control target filename of extracted OEM payload#36
Merged
pothos merged 1 commit intoflatcar-masterfrom Jan 18, 2024
Merged
flatcar-postinst: Control target filename of extracted OEM payload#36pothos merged 1 commit intoflatcar-masterfrom
pothos merged 1 commit intoflatcar-masterfrom
Conversation
Nebraska servers with self-hosted synced packages use Omaha entries with names like extrafile-amd64-3815.0.0-oem-ami.gz which can't be predicted. The ue-rs matching option is not enough and we also need to control the target filename because otherwise it would be extrafile-amd64-3815.0.0-oem-ami.raw which we can't know either and using shell globs is not the nicest solution. Make use of two new ue-rs parameters to control the target filename and make sure that we only use one match result.
pothos
added a commit
to flatcar/scripts
that referenced
this pull request
Jan 16, 2024
This pulls in flatcar/ue-rs#49 and flatcar/update_engine#36 to fix the handling of OEM update payloads in a Nebraska response with self-hosted packages. Before this fix the processing failed and had to rely on the fallback download from the release server.
2 tasks
dongsupark
approved these changes
Jan 17, 2024
pothos
added a commit
to flatcar/scripts
that referenced
this pull request
Jan 18, 2024
This pulls in flatcar/ue-rs#49 and flatcar/update_engine#36 to fix the handling of OEM update payloads in a Nebraska response with self-hosted packages. Before this fix the processing failed and had to rely on the fallback download from the release server.
pothos
added a commit
to flatcar/scripts
that referenced
this pull request
Jan 18, 2024
This pulls in flatcar/ue-rs#49 and flatcar/update_engine#36 to fix the handling of OEM update payloads in a Nebraska response with self-hosted packages. Before this fix the processing failed and had to rely on the fallback download from the release server.
jepio
added a commit
that referenced
this pull request
Feb 22, 2024
Right now the stable update from 3602.2.3 -> 3815.2.0 fails for airgapped environment with self-hosted nebraska instances that sync packages, because the parsing in flatcar-postinst can't handle the names of OEM sysexts in the nebraska response. These are called "extrafile-<BOARD>-<VERSION>-oem-<OEM>.gz". Fix this by matching against "*oem-<OEM>.gz" and extracting the remote filename from the response. In main this is fixed in #36, but that depends on switching to ue-rs. Here is an example response for testing: <response protocol="3.0" server="nebraska"> <daystart elapsed_seconds="0"/> <app appid="{e96281a6-d1af-4bde-9a0a-97b76e56dc57}" status="ok"> <ping status="ok"/> <updatecheck status="ok"> <urls> <url codebase="https://nebraska-example.org/flatcar/"/> </urls> <manifest version="3815.2.0"> <packages> <package name="flatcar-amd64-3815.2.0.gz" hash="JLT5o2wJzffAgHY5GesCWymJHng=" size="458309926" required="true"/> <package name="extrafile-amd64-3815.2.0-oem-vmware.gz" hash="llmt48kEE1pZxHbhE86zTczZMmY=" hash_sha256="7c4095f16579402d73ea42a63be63b2c92d98457303a080399d2a5bb33f46f88" size="1536465" required="false"/> </packages> </updatecheck> </app> </response> Signed-off-by: Jeremi Piotrowski <jpiotrowski@microsoft.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Nebraska servers with self-hosted synced packages use Omaha entries with names like extrafile-amd64-3815.0.0-oem-ami.gz which can't be predicted. The ue-rs matching option is not enough and we also need to control the target filename because otherwise it would be
extrafile-amd64-3815.0.0-oem-ami.raw which we can't know either and using shell globs is not the nicest solution.
Make use of two new ue-rs parameters to control the target filename and make sure that we only use one match result.
How to use
Depends on flatcar/ue-rs#49
Testing done
see scripts branch