-
Notifications
You must be signed in to change notification settings - Fork 52
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
Disk: Fix Partition MaxSize discrepency - Fixes #181 #213
Conversation
Codecov Report
@@ Coverage Diff @@
## dev #213 +/- ##
===================================
+ Coverage 95% 95% +<1%
===================================
Files 7 7
Lines 978 980 +2
===================================
+ Hits 937 939 +2
Misses 41 41 |
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.
Reviewed 7 of 7 files at r1.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @PlagueHO)
DSCResources/MSFTDSC_Disk/README.md, line 58 at r1 (raw file):
partition size_ is less than **1MB** then the partition will be considered to be in the correct state.
Is this a workaround for an issue that the size is ? Should we mention that this is a workaround and point to the issue #181 and/or the issue that @nyanhp submitted? https://windowsserver.uservoice.com/forums/301869-powershell/suggestions/36967870-get-partitionsupportedsize-and-msft-partition-clas
My thought is so the users know this is a workaround in case this in some circumstances does not work and can report it to the correct issue. Also, if we do get a fix for the reported issue it is more clear that we should revert the workaround.
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.
@johlju - changes done! Thank you!
Reviewable status: 6 of 7 files reviewed, 1 unresolved discussion (waiting on @johlju and @nyanhp)
DSCResources/MSFTDSC_Disk/README.md, line 58 at r1 (raw file):
Previously, johlju (Johan Ljunggren) wrote…
partition size_ is less than **1MB** then the partition will be considered to be in the correct state.
Is this a workaround for an issue that the size is ? Should we mention that this is a workaround and point to the issue #181 and/or the issue that @nyanhp submitted? https://windowsserver.uservoice.com/forums/301869-powershell/suggestions/36967870-get-partitionsupportedsize-and-msft-partition-clas
My thought is so the users know this is a workaround in case this in some circumstances does not work and can report it to the correct issue. Also, if we do get a fix for the reported issue it is more clear that we should revert the workaround.
Done.
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.
Reviewed 1 of 1 files at r2.
Reviewable status: complete! all files reviewed, all discussions resolved
Pull Request (PR) description
This PR introduces a workaround that fixes issue #181 where the reported maximum supported size of a partition would be approximately 1MB bigger than the actual size of the partition. As long as it is unclear why the New-Partition and Get-PartitionSupportedSize cmdlets report different data if neither Offset nor Alignment parameters are used, this workaround should remain in place.
If this is not the case, Test-TargetResource for a disk configured to use the remaining size will always return false and trigger an endless cycle of LCM runs.
This PR replaces #197.
This Pull Request (PR) fixes the following issues
Task list
Entry should say what was changed, and how that affects users (if applicable).
and comment-based help.
@johlju - would you mind reviewing when you have a moment?
This change is