-
Notifications
You must be signed in to change notification settings - Fork 3
feat(vm): Add firmware handler #874
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
Conversation
ef812f6 to
f4ad3ff
Compare
13bb65f to
52c2ae2
Compare
Signed-off-by: Yaroslav Borbat <[email protected]>
Signed-off-by: Yaroslav Borbat <[email protected]>
30f5abc to
f5b8c4b
Compare
Signed-off-by: Yaroslav Borbat <[email protected]>
Signed-off-by: Yaroslav Borbat <[email protected]>
Signed-off-by: Yaroslav Borbat <[email protected]>
| TypeFilesystemFrozen Type = "FilesystemFrozen" | ||
| TypeSizingPolicyMatched Type = "SizingPolicyMatched" | ||
| TypeSnapshotting Type = "Snapshotting" | ||
| TypeFirmwareNeedUpdate Type = "FirmwareNeedUpdate" |
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.
The reason violates the rules of the English language.
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 replaced it with FirmwareUpdateRequired. Is that okay?
I don’t like how FirmwareUpdateNeeded sounds.
| ReasonPodConditionMissing Reason = "PodConditionMissing" | ||
| ReasonGuestNotRunning Reason = "GuestNotRunning" | ||
|
|
||
| ReasonFirmwareNeedUpdate Reason = "FirmwareNeedUpdate" |
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.
Cover with doc comments
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.
FirmwareUpdateRequired
|
|
||
| if kvvmi == nil || kvvmi.Status.LauncherContainerImageVersion == f.firmwareImage { | ||
| // If kvvmi does not exist, update the firmware version, | ||
| // as any newly created kvvmi will use the currently available firmware version. |
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 guarantee this? What if the virt-controller has been updated, but the virt-operator hasn't yet? In that case, the virtual machine will start with the old firmware, but the version will already be the new one.
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.
You're right. Currently, we cannot guarantee that our controller and KubeVirt are using the same configuration. A possible solution could be to introduce a special wait for the readiness of KubeVirt components during startup.
images/virtualization-artifact/pkg/controller/vm/internal/firmware.go
Outdated
Show resolved
Hide resolved
| return edition | ||
| import "golang.org/x/mod/semver" | ||
|
|
||
| const MainVersion = "main" |
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.
It's not clear why we need this const. Is it for debugging? Maybe it should be taken from firmware.yaml as well?
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.
main is valid version for firmware. This const used in IsValid and IsMain methods in Version struct
| @@ -0,0 +1,3 @@ | |||
| # Don't touch! Generating in CI | |||
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.
There are two firmware.yaml files in the repo. Do we need both of them? If yes, add comments why
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.
There are two version_map.yml files in the repo, and both are needed:
The first one is should be generated in CI and copied during the build.
The second one is required for local builds and to prevent Go from complaining about a missing embedded file.
Isteb4k
left a comment
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.
It's necessary to sync the PR with ADR.
Signed-off-by: Yaroslav Borbat <[email protected]>
Signed-off-by: Yaroslav Borbat <[email protected]>
54fd922 to
dbe540a
Compare
Signed-off-by: Yaroslav Borbat <[email protected]>
|
design changed |
Description
Add firmware handler
Add 2 new metric
Why do we need it, and what problem does it solve?
What is the expected result?
Checklist
Changelog entries