Skip to content

Commit

Permalink
Use id instead of name, add id of vmset to updateVMSetCount function
Browse files Browse the repository at this point in the history
  • Loading branch information
jggoebel committed Jul 11, 2024
1 parent 61f3784 commit 0352dc7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion v3/services/scheduledeventsvc/internal/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ func (sc *ScheduledEventController) provisionScheduledEvent(se *scheduledeventpb

if err != nil || len(existingVMSetsList.GetVmsets()) == 0 { // create new vmset if no existing one was found
vmsRand := fmt.Sprintf("%s-%08x", baseNameScheduledPrefix, rand.Uint32())
vmsId := strings.Join([]string{"se", se.Name, "vms", vmsRand}, "-")
vmsId := strings.Join([]string{"se", se.Id, "vms", vmsRand}, "-")
vmSets = append(vmSets, vmsId)
_, err = sc.vmSetClient.CreateVMSet(sc.Context, &vmsetpb.CreateVMSetRequest{
Id: vmsId,
Expand Down
1 change: 1 addition & 0 deletions v3/services/vmsetsvc/internal/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,7 @@ func (v *VMSetController) reconcileVirtualMachineSet(vmset *vmsetpb.VMSet) error

func (v *VMSetController) updateVMSetCount(vmSetName string, active int, prov int) error {
_, err := v.internalVmSetServer.UpdateVMSetStatus(v.Context, &vmsetpb.UpdateVMSetStatusRequest{
Id: vmSetName,
Available: wrapperspb.UInt32(uint32(active)),
Provisioned: wrapperspb.UInt32(uint32(prov)),
})
Expand Down

0 comments on commit 0352dc7

Please sign in to comment.