-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
[AzureRT] [Hot Fix] Fix the bug of New-AzureRmVM #1199
Conversation
…e resource group is different from that of VM.
Hi @hyonholee, I'm your friendly neighborhood Azure Pull Request Bot (You can call me AZPRBOT). Thanks for your contribution!
TTYL, AZPRBOT; |
} | ||
catch (Exception e) | ||
{ | ||
if (!e.Message.Contains("ResourceNotFound")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Exceptions are swallowed here. Need to throw it and/or output the error text.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The fix is to swallow every exception during getting storage account. If the exception is "ResourceNotFound", then the given storage account name is not in the same resource group, so no warning message is shown. If the exception is other than "ResourceNotFound", we show a warning message, but keeps going, because we can still use other storage account for boot diagnostics.
LGTM |
on demand run here:http://azuresdkci.cloudapp.net/view/1-AzurePowerShell/job/powershell-on-demand/282/ LGTM once the on-demand run passes |
still LGTM |
[AzureRT] [Hot Fix] Fix the bug of New-AzureRmVM
This update fixes the following bugs: