-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Create Block devices during configuration instead of boot-time #1736
Conversation
18a9d45
to
4d4e2be
Compare
Will this help in being able to attach block devices to a running Firecracker? |
It is a step in that direction yes, but we're far from it since the biggest missing piece there is PCI + Hotplug |
This PR is a prerequisite for #1713 |
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.
LGTM
Signed-off-by: Adrian Catangiu <acatan@amazon.com>
Following the more decoupled design we can now create block devices on their configuration path, rather than saving a config and delaying creation to boot-time. This model allows user-errors (like invalid resources or permissions) to be reported as part of the configuration step rather than later at attempted boot. It also removes the time window between configuration and boot where changes to the host system (deleting files, changing permissions, etc) could cause microVM boot failures. This commit decreases code complexity and should provide better efficiency to the process of configuring and starting a microVM. Signed-off-by: Adrian Catangiu <acatan@amazon.com>
Validating the Display value of errors against the static strings used in the Display implementation is redundant. This is typically a bad engineering practice referred to as WET. You can read more about it here: https://en.wikipedia.org/wiki/Don%27t_repeat_yourself Signed-off-by: Adrian Catangiu <acatan@amazon.com>
@ioanachirca @aghecenco I've rebased, please take a look. |
Reason for This PR
Fixes #1702
Prerequisite for #1713
Description of Changes
Following the more decoupled design we can now create
block
devices on their configuration path, rather than saving a config and delaying creation to boot-time.Such a model allows user-errors (like invalid resources or permissions) to be reported as part of the configuration step rather than later at attempted boot.
It would also remove the time window between configuration and boot where changes to the host system (deleting backing files, changing permissions, etc) would cause microVM boot failures (race condition between validation and commitment of resources).
Such a model should also decrease code complexity and should provide better efficiency to the process of configuring and starting a microVM (no more moving configurations around in memory and validating resources both at config time and boot-time).
License Acceptance
By submitting this pull request, I confirm that my contribution is made under
the terms of the Apache 2.0 license.
PR Checklist
[Author TODO: Meet these criteria.]
[Reviewer TODO: Verify that these criteria are met. Request changes if not]
git commit -s
).unsafe
code is properly documented.firecracker/swagger.yaml
.CHANGELOG.md
.