-
Notifications
You must be signed in to change notification settings - Fork 4k
Fix the Disable-AzureRmVmssDiskEncryption issue. #5036
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
Conversation
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.
@hyonholee Hey Hyonho, would you mind updating the Compute change log with a snippet about this change you are making? Also, are we able to add any test coverage for this? It looks like it should be easy to mock out if setup would be too difficult.
…orrectly throws an error when the disk encryption extension is not the first extension of the VMSS.
@cormacpayne I added a test and updated change log. |
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.
@hyonholee one quick comment
$vmssName = 'vmss' + $rgname; | ||
|
||
$result = Disable-AzureRmVmssDiskEncryption -ResourceGroupName $rgname -VMScaleSetName $vmssName -Force; | ||
$result_string = $result | Out-String; |
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.
@hyonholee are we checking anything with this resulting string, or are we just ensuring that an error is not thrown when the disk encryption extension is not the first extension?
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.
@cormacpayne the test runs successfully if the error is not thrown when the disk encryption is not the first extension. Without the fix, this test fails with an exception thrown.
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.
@hyonholee thanks for the clarification, LGTM
The issue is that Disable-AzureRmVmssDiskEncryption incorrectly throws an error when the disk encryption extension is not the first extension of the VMSS.
Description
This checklist is used to make sure that common guidelines for a pull request are followed. You can find a more complete discussion of PowerShell cmdlet best practices here.
General Guidelines
Testing Guidelines
Cmdlet Signature Guidelines
ShouldProcess
and haveSupportShouldProcess=true
specified in the cmdlet attribute. You can find more information onShouldProcess
here.OutputType
attribute if any output is produced - if the cmdlet produces no output, it should implement aPassThru
parameter.Cmdlet Parameter Guidelines