sauryadas / Azure-CLI-VMSS

Azure CLI VM Scale Sets (VMSS) Samples
1 stars 1 forks source link

Restart command with instance id restarts all instances #44

Open sepiroth887 opened 8 years ago

sepiroth887 commented 8 years ago

We hit this last night when attempting to restart a single VM it restarted the whole cluster after issuing: azure vmss restart {rg} {set} {instanceID}

sauryadas commented 8 years ago

@huangpf - please take a look at this customer issue .

gbowerman commented 8 years ago

Example call showing null body being sent to management endpoint..: root@PONDLIFE:~# azure vmss restart -vv ah1 ah1 50 info: Executing command vmss restart verbose: resourceGroupName = ah1 verbose: vMScaleSetName = ah1 verbose: instanceIds = 50 verbose: instanceIds : 50 verbose: instanceIdsObj = ["50"] silly: requestOptions silly: { silly: rawResponse: false, silly: queryString: {}, silly: method: 'POST', silly: headers: { silly: accept-language: 'en-US', silly: x-ms-client-request-id: '075ea4a4-8f7b-482e-b532-3dd8507fbb8e', silly: Content-Type: 'application/json; charset=utf-8', silly: user-agent: 'WindowsAzureXplatCLI/0.9.19' silly: }, silly: url: 'https://management.azure.com/subscriptions/subscriptionid/resourceGroups/ah1/providers/Microsoft.Compute/virtualMachineScaleSets/ah1/restart?api-version=2016-03-30', silly: body: 'null' silly: }

huangpf commented 8 years ago

It's a bug because the client library API seems to be changed. Need to fix this. The current workaround is to use the vmssvm restart command.