-
Notifications
You must be signed in to change notification settings - Fork 226
GCP - Add exception for onHostMaintenance Migrate on confidential compute n2d instances #1406
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: main
Are you sure you want to change the base?
Conversation
…2d instances Signed-off-by: WTFKr0 <[email protected]>
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Hi @WTFKr0. Thanks for your PR. I'm waiting for a openshift member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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-sigs/prow repository. |
…e n2d instances Signed-off-by: WTFKr0 <[email protected]>
@miyadav checked with PR & confidentialCompute: Enabled for n2d
Both blocked by webhooks , without PR.
|
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'm also opening another discussion thread:
I can see in https://cloud.google.com/confidential-computing/confidential-vm/docs/troubleshoot-live-migration that live migration in AMD SEV machines is only supported with n2d machines with the AMD EPYC Milan CPU platform.
n2d machines run on EPYC Milan and EPYC Rome (deprecated according to GCP documentation). Do we need to check the CPU platform is properly set too?
We don't currently support CPU platform configuration in the GCP provider. IIUC, the closest we can get to this is by setting the Instance
MinCpuPlatform
field to EPYC Milan.
If we need to run this check too, we would need to add a new field in the openshift API to support it.
machineSeries := strings.Split(providerSpec.MachineType, "-")[0] | ||
// Check on host maintenance | ||
if providerSpec.OnHostMaintenance != machinev1beta1.TerminateHostMaintenanceType { | ||
if providerSpec.OnHostMaintenance != machinev1beta1.TerminateHostMaintenanceType && !slices.Contains(gcpConfidentialTypeMachineSeriesSupportingOnHostMaintenanceMigrate, machineSeries) { |
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 condition would let SEV-SNP n2d machines to be configured with OnHostMaintenance: Migrate
. However, that is not supported by GCP.
Could you rewrite the condition so this configuration is only accepted for AMD-SEV? (i.e. providerSpec.ConfidentialCompute == Enabled OR AMDEncryptedVirtualization
)
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.
OK i see
Need this test to fail
{
testCase: "with ConfidentialCompute AMDEncryptedVirtualizationNestedPaging and onHostMaintenance set to Migrate on n2d instances",
modifySpec: func(p *machinev1beta1.GCPMachineProviderSpec) {
p.ConfidentialCompute = machinev1beta1.ConfidentialComputePolicySEVSNP
p.OnHostMaintenance = machinev1beta1.MigrateHostMaintenanceType
p.MachineType = "n2d-standard-4"
p.GPUs = []machinev1beta1.GCPGPUConfig{}
},
expectedOk: true,
},
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.
OK with last commit i think
… set to Migrate Signed-off-by: WTFKr0 <[email protected]>
This PR closes #1405
Context
Provisionning Machines on GCP Provider
With confidential compute enabled
Try to set onHostMaintenance to Migrate
Current Issue
Today the webhook refused this case, as it is forbidden by default on GCP.
But an exception exists on n2d series
See this doc for information : https://cloud.google.com/confidential-computing/confidential-vm/docs/troubleshoot-live-migration
Resolution
Add an exception on the webhhook for the n2d series VM, and accept the Migrate onHostMaintenance
Environment
This issue is present on Openshift 4.16, 4.18 and 4.19 for sure