Skip to content

Commit ae23c92

Browse files
authored
Merge pull request #292 from microsoft/user/matthewchen/vhd-error
Add PathNotFound error code
2 parents 617945a + ef5839c commit ae23c92

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

api/v1beta1/conditions_consts.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ const (
3636
OutOfCapacityReason = "OutOfCapacity"
3737
// OutOfNodeCapacityReason used when the AzureStackHCI node is out of capacity.
3838
OutOfNodeCapacityReason = "OutOfNodeCapacity"
39+
// PathNotFoundReason used when the AzureStackHCI GalleryImage is not found.
40+
PathNotFoundReason = "PathNotFound"
3941
)
4042

4143
// Conditions and condition Reasons for the AzureStackHCICluster object

controllers/azurestackhcivirtualmachine_controller.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,8 @@ func (r *AzureStackHCIVirtualMachineReconciler) getOrCreate(virtualMachineScope
210210
conditions.MarkFalse(virtualMachineScope.AzureStackHCIVirtualMachine, infrav1.VMRunningCondition, infrav1.OutOfCapacityReason, clusterv1.ConditionSeverityError, err.Error())
211211
case mocerrors.OutOfNodeCapacity.Error():
212212
conditions.MarkFalse(virtualMachineScope.AzureStackHCIVirtualMachine, infrav1.VMRunningCondition, infrav1.OutOfNodeCapacityReason, clusterv1.ConditionSeverityWarning, err.Error())
213+
case mocerrors.PathNotFound.Error():
214+
conditions.MarkFalse(virtualMachineScope.AzureStackHCIVirtualMachine, infrav1.VMRunningCondition, infrav1.PathNotFoundReason, clusterv1.ConditionSeverityWarning, err.Error())
213215
default:
214216
conditions.MarkFalse(virtualMachineScope.AzureStackHCIVirtualMachine, infrav1.VMRunningCondition, infrav1.VMProvisionFailedReason, clusterv1.ConditionSeverityError, err.Error())
215217
}

0 commit comments

Comments
 (0)