-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Make VMI non-migratable when incompatible CPU #2982
Conversation
3660090
to
142e6e1
Compare
/retest |
Hi @MarSik would you please have time to take a look at this PR as it is related to the part you have been working on? I understand you have you workload, so once you are OK with it. Thank you. |
/retest |
1 similar comment
/retest |
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.
A few minor comments with some personal suggestions... feel free to change them or not...
pkg/virt-handler/vm.go
Outdated
// checkCPUForMigration is a hotfix for bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1760028 | ||
// to disable migration when host-model od cpu-pass-through is used. | ||
// The check here relies on the fact the first defaulting is done in mutating webhook | ||
// where the default is set based od cluster-wide config, which still can be empty. |
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.
s/od/on
pkg/virt-handler/vm.go
Outdated
// to disable migration when host-model od cpu-pass-through is used. | ||
// The check here relies on the fact the first defaulting is done in mutating webhook | ||
// where the default is set based od cluster-wide config, which still can be empty. | ||
// If no CPU is setup in VMI and the empty CPU gets here it is passed over to virt-launcher. |
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.
s/setup in/set on
@@ -233,6 +233,8 @@ const ( | |||
VirtualMachineInstanceReasonDisksNotMigratable = "DisksNotLiveMigratable" | |||
// Reason means that VMI is not live migratioable because of it's network interfaces collection | |||
VirtualMachineInstanceReasonInterfaceNotMigratable = "InterfaceNotLiveMigratable" | |||
// Reason means that VMI is not live migratioable because of it's network interfaces collection |
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 that the comment here is wrong...
142e6e1
to
dfbc9df
Compare
/lgtm |
/lgtm |
dfbc9df
to
3c86ac0
Compare
/retest |
1 similar comment
/retest |
Hi @danielBelenky and @ksimon1 would you have time to do recheck for this PR? I see the tests are failing for following issues, which are unrelated.
|
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
/lgtm |
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.
Looking good already. The only thing I'm missing here is unit tests for the new method checkCPUForMigration
. While you're at it, could you please add unit tests for checkNetworkInterfacesForMigration
also?
/assign |
High level comment: host-passthrough is also migratable, but under much stricter constraints. But because this is required for certain workloads we should allow this, but make it harder to use (speak: featuregated) |
During migration compatible CPU model have to be used. This is hard when cpu-passthrough or host-model is used as a choice for CPU. This issue can be ovecomed in a short term by blocking migration for host-model or cpu-passthrough. This commit hotfixes https://bugzilla.redhat.com/show_bug.cgi?id=1760028 Signed-off-by: Petr Kotas <petr.kotas@gmail.com>
Signed-off-by: Petr Kotas <petr.kotas@gmail.com>
Signed-off-by: Petr Kotas <petr.kotas@gmail.com>
Signed-off-by: Petr Kotas <petr.kotas@gmail.com>
Signed-off-by: Petr Kotas <petr.kotas@gmail.com>
99b76c7
to
a46b75c
Compare
ddce86f
to
371a092
Compare
/hold fixing merge issues |
371a092
to
05a52fa
Compare
/hold cancel |
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.
Please modify the PR text (and summary?) to mention that migration is STILL possible if the feature gates are enabled.
Also, please confirm that the feature gate can be requested via HCO.
pkg/virt-config/feature-gates.go
Outdated
@@ -34,6 +34,11 @@ const ( | |||
SnapshotGate = "Snapshot" | |||
HostDiskGate = "HostDisk" | |||
VirtIOFSGate = "ExperimentalVirtiofsSupport" | |||
// CPUMigrationGate allows users to block migrations for virtual machines with host-model | |||
CPUMigrationGate = "MigrationCPU" |
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.
this name is too opaque for me - I cannot tell what it means. How about MigratableHostModel
?
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.
@dankenigsberg Completely agree. I haven't started the re-factoring. It was only the rebase. Now I will update the PR code itself according to the discussion
0191cce
to
f724c39
Compare
Signed-off-by: L. Pivarc <lpivarc@redhat.com>
f724c39
to
d2b65f8
Compare
@petrkotas: The following tests failed, say
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
Due to many changes I would like to close this PR and relate to #4323 |
/hold |
/close |
@enp0s3: Closed this PR. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
What this PR does / why we need it:
During migration compatible CPU model have to be used.
This is hard when cpu-passthrough or host-model is used
as a choice for CPU.
This issue can be ovecomed in a short term by blocking
migration for host-model or cpu-passthrough.
Signed-off-by: Petr Kotas petr.kotas@gmail.com
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Fixes # https://bugzilla.redhat.com/show_bug.cgi?id=1760028
Release note: