Skip to content
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

Merged
merged 4 commits into from
Sep 26, 2019

Conversation

PlagueHO
Copy link
Member

@PlagueHO PlagueHO commented Sep 21, 2019

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

  • Added an entry under the Unreleased section of the change log in the CHANGELOG.md.
    Entry should say what was changed, and how that affects users (if applicable).
  • Resource documentation added/updated in README.md in the resource folder.
  • Resource parameter descriptions added/updated in schema.mof
    and comment-based help.
  • Comment-based help added/updated.
  • Localization strings added/updated in all localization files as appropriate.
  • Examples appropriately added/updated.
  • Unit tests added/updated. See DSC Resource Testing Guidelines.
  • Integration tests added/updated (where possible). See DSC Resource Testing Guidelines.
  • New/changed code adheres to DSC Resource Style Guidelines and Best Practices.

@johlju - would you mind reviewing when you have a moment?


This change is Reviewable

@PlagueHO PlagueHO added the needs review The pull request needs a code review. label Sep 21, 2019
@codecov-io
Copy link

Codecov Report

Merging #213 into dev will increase coverage by <1%.
The diff coverage is 100%.

Impacted file tree graph

@@         Coverage Diff         @@
##           dev   #213    +/-   ##
===================================
+ Coverage   95%    95%   +<1%     
===================================
  Files        7      7            
  Lines      978    980     +2     
===================================
+ Hits       937    939     +2     
  Misses      41     41

Copy link
Member

@johlju johlju left a 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.

Copy link
Member Author

@PlagueHO PlagueHO left a 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.

Copy link
Member

@johlju johlju left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewed 1 of 1 files at r2.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved

@PlagueHO PlagueHO merged commit ff1186a into dsccommunity:dev Sep 26, 2019
@PlagueHO PlagueHO deleted the Issue-181 branch September 26, 2019 07:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs review The pull request needs a code review.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Azure VM Data Disk Max Partition Size is Different to Actual Size
3 participants