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

Use id instead of name, add id of vmset to updateVMSetCount function #199

Merged
merged 1 commit into from
Jul 11, 2024
Merged
Show file tree
Hide file tree
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
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
Loading