Skip to content

Fix logic bug in Get-AzureRmVMDiskEncryptionStatus #6431

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

Merged
merged 6 commits into from
Jun 12, 2018

Conversation

ejarvi
Copy link
Contributor

@ejarvi ejarvi commented Jun 9, 2018

Description

Fixes a logic bug in the case of VMs with only one encrypted volume type. In particular, VMs with an OS volume and no data disks that had been encrypted with no AAD parameters.

Checklist

@@ -514,7 +514,7 @@ public override void ExecuteCmdlet()

// retrieve encryption state using per-disk instance status and report if successful
AzureDiskEncryptionStatusContext encryptionStatus = GetStatusFromInstanceView();
if (encryptionStatus != null && !(encryptionStatus.OsVolumeEncrypted==EncryptionStatus.Unknown || encryptionStatus.DataVolumesEncrypted==EncryptionStatus.Unknown))
if (encryptionStatus != null && (encryptionStatus.OsVolumeEncrypted!=EncryptionStatus.Unknown || encryptionStatus.DataVolumesEncrypted!=EncryptionStatus.Unknown))
{
encryptionStatus.ProgressMessage = progressMessage;
WriteObject(encryptionStatus);
Copy link
Contributor

Choose a reason for hiding this comment

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

Please revert changes to the psm1 file below.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

reverted

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@maddieclayton all checks have passed with the reverted file

@praries880
Copy link
Contributor

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

Successfully merging this pull request may close these issues.

6 participants