Skip to content
This repository was archived by the owner on Jan 11, 2023. It is now read-only.

Scale windows VM bug: catch error for len(vms) < 1 #2059

Merged
merged 4 commits into from
Jan 16, 2018
Merged

Scale windows VM bug: catch error for len(vms) < 1 #2059

merged 4 commits into from
Jan 16, 2018

Conversation

CecileRobertMichon
Copy link
Contributor

What this PR does / why we need it: This is a temporary fix which catches the error where ListVirtualMachines returns 0 for a resource group. This causes scale operations to fail for clusters with windows nodes as reported by #1972.

Which issue this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close that issue when PR gets merged): fixes #

Special notes for your reviewer:

Release note:

cmd/scale.go Outdated
@@ -188,6 +188,9 @@ func (sc *scaleCmd) run(cmd *cobra.Command, args []string) error {
vms, err := sc.client.ListVirtualMachines(sc.resourceGroupName)
if err != nil {
log.Fatalln("failed to get vms in the resource group. Error: %s", err.Error())
} else if len(*vms.Value) < 1 {
// TODO fix bug: clusters with windows vms always fail here
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's remove this TODO line. I think checking for the length of the response is general, and any existing bugs that expose this symptom are coincidental.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants