Skip to content
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

🌱 Surface more conditions about VirtualMachine pre-prequisites #3104

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion pkg/services/vmoperator/vmopmachine.go
Original file line number Diff line number Diff line change
Expand Up @@ -216,14 +216,19 @@ func (v *VmopMachineService) ReconcileNormal(ctx context.Context, machineCtx cap
// Update the VM's state to Pending
supervisorMachineCtx.VSphereMachine.Status.VMStatus = vmwarev1.VirtualMachineStatePending

// VM operator has four conditions which indicate pre-requirements for creation are done.
// VM operator has conditions which indicate pre-requirements for creation are done.
// If one of them is set to false then it hit an error case and the information bubbles up
// to the VMProvisionedCondition.
// NOTE: Following conditions do not get surfaced in any capacity unless they are relevant; if they show up at all, they become pre-reqs
// and must be true to proceed with VirtualMachine creation.
for _, condition := range []string{
vmoprv1.VirtualMachineConditionClassReady,
vmoprv1.VirtualMachineConditionImageReady,
vmoprv1.VirtualMachineConditionVMSetResourcePolicyReady,
vmoprv1.VirtualMachineConditionBootstrapReady,
vmoprv1.VirtualMachineConditionStorageReady,
vmoprv1.VirtualMachineConditionNetworkReady,
vmoprv1.VirtualMachineConditionPlacementReady,
} {
c := meta.FindStatusCondition(vmOperatorVM.Status.Conditions, condition)
// If the condition is not set to false then VM is still getting provisioned and the condition gets added at a later stage.
Expand Down
Loading