-
Notifications
You must be signed in to change notification settings - Fork 372
chore: Consume config directly without untarring (Host) #8235
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Config files are passed from the HostOS into the GuestOS using a config media (aka virtual USB stick) which the GuestOS sees as a block device (usually under `/dev/sda`) containing a vfat filesystem. Previously config files were not directly stored in the filesystem, but they were tarred into a single ic-bootstrap.tar file which was then written to the config media. The tarring step is unnecessary and makes accessing the config files more difficult since the files have to be untarred first. Furthermore, tars can contain unwanted entries, such as symlinks, devices etc. which can be misused by a malicious host (these are not supported by vfat). The migration consists of 3 steps: 1) Prepare GuestOS to read files directly from the config media and fall back to `ic-bootstrap.tar` when it exists for backwards compatibility. (#8234) 2) (this PR) Once 1) has been rolled out to all nodes, stop tarring in HostOS. 3) Once 2) has been rolled out to all nodes, remove fallback from GuestOS.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we also update the documentation here: db75b95057e/ic-os/docs/Configuration.adoc#hostos--guestos
It doesn’t need to be detailed—just want to keep it accurate
| .arg("--sort=name") | ||
| .arg("--owner=root:0") | ||
| .arg("--group=root:0") | ||
| .arg("--mtime=UTC 1970-01-01 00:00:00") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's fine to drop the mtime. This doesn't impact reproducibility because this code only runs at runtime.
Config files are passed from the HostOS into the GuestOS using a config media (aka virtual USB stick) which the GuestOS sees as a block device (usually under `/dev/sda`) containing a vfat filesystem. Previously config files were not directly stored in the filesystem, but they were tarred into a single ic-bootstrap.tar file which was then written to the config media. The tarring step is unnecessary and makes accessing the config files more difficult since the files have to be untarred first. Furthermore, tars can contain unwanted entries, such as symlinks, devices etc. which can be misused by a malicious host (these are not supported by vfat). The migration consists of 3 steps: 1) (this PR) Prepare GuestOS to read files directly from the config media and fall back to `ic-bootstrap.tar` when it exists for backwards compatibility. 2) Once 1) has been rolled out to all nodes, stop tarring in HostOS (#8235) 3) Once 2) has been rolled out to all nodes, remove fallback from GuestOS.
…o-tar-host # Conflicts: # rs/ic_os/config/tool/src/hostos/guestos_bootstrap_image.rs
… tar This is a temporary solution before #8235 lands so config files necessary during early-boot are available without having to run untar. The HostOS will now include config.json and nns_public_key_override.pem directly on the config media passed to the GuestOS.
🚨🚨 WARNING: DO NOT SUBMIT UNTIL #8234 HAS ROLLED OUT TO ALL NODES 🚨🚨
Config files are passed from the HostOS into the GuestOS using a config media (aka virtual USB stick) which the GuestOS sees as a block device (usually under
/dev/sda) containing a vfat filesystem. Previously config files were not directly stored in the filesystem, but they were tarred into a single ic-bootstrap.tar file which was then written to the config media.The tarring step is unnecessary and makes accessing the config files more difficult since the files have to be untarred first. Furthermore, tars can contain unwanted entries, such as symlinks, devices etc. which can be misused by a malicious host (these are not supported by vfat).
The migration consists of 3 steps:
Prepare GuestOS to read files directly from the config media and fall back to
ic-bootstrap.tarwhen it exists for backwards compatibility. (chore: Consume config directly without untarring (Guest) #8234)(this PR) Once 1) has been rolled out to all nodes, stop tarring in HostOS.
Once 2) has been rolled out to all nodes, remove fallback from GuestOS.