From ff4befc6739228551f8177263ddcf6bf20751bda Mon Sep 17 00:00:00 2001 From: Jim Date: Mon, 15 Mar 2021 19:23:53 -0500 Subject: [PATCH] fix crash (#1371) --- crm-platforms/vcd/vcd-vm.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/crm-platforms/vcd/vcd-vm.go b/crm-platforms/vcd/vcd-vm.go index b63d6b042..a4251685a 100644 --- a/crm-platforms/vcd/vcd-vm.go +++ b/crm-platforms/vcd/vcd-vm.go @@ -519,6 +519,9 @@ func (v *VcdPlatform) updateVM(ctx context.Context, vm *govcd.VM, vmparams vmlay flavorName := vmparams.FlavorName flavor, err := v.GetFlavor(ctx, flavorName) + if err != nil { + return fmt.Errorf("Error getting flavor: %s - %v", flavorName, err) + } vmSpecSec := vm.VM.VmSpecSection vmSpecSec.NumCpus = TakeIntPointer(int(flavor.Vcpus)) vmSpecSec.MemoryResourceMb.Configured = int64(flavor.Ram)