-
Notifications
You must be signed in to change notification settings - Fork 51
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
Unexpected Volume Size does not change InDesiredState value #75
Comments
Issue may that test-resource does not return false for a mismatch like the other tests. # Drive size
if ($Size)
{
if ($partition.Size -ne $Size)
{
# The partition size mismatches but can't be changed (yet)
Write-Verbose -Message ( @(
"$($MyInvocation.MyCommand): "
$($LocalizedData.DriveSizeMismatchMessage `
-f $DriveLetter,$Partition.Size,$Size)
) -join '' )
} # if
} # if |
Hi @VazquezTech - Thank you for reporting this. You are quite correct. This is a known limitation of the resource. This has been on my todo list but I haven't had time to look into it. This is actually a duplicate of issue #11. It requires the destructive switch (is discussed in #50) to be implemented to allow destructive changes to be made to a disk (in this case resizing the partition). We choose to return $true when a size mismatch occurs to prevent the Set-TargetResource firing when we can't actually do anything to resolve the size mismatch (yet). But as this is a duplicate of issue #11, can we close this issue and raise and further discussion in that one? |
Hi Daniel,
Thank you for the prompt response. Please close issue.
On Thu, Jan 12, 2017 at 6:21 AM Eduardo Vazquez <evazquez@vazqueztech.com>
wrote:
…
On Thu, Jan 12, 2017 at 12:56 AM Daniel Scott-Raynsford <
***@***.***> wrote:
Hi @VazquezTech <https://github.com/VazquezTech> - Thank you for
reporting this. You are quite correct. This is a known limitation of the
resource. This has been on my todo list but I haven't had time to look into
it.
This is actually a duplicate of issue #11
<#11>. It requires the
destructive switch (is discussed in #50
<#50>) to be implemented to
allow destructive changes to be made to a disk (in this case resizing the
partition).
We choose to return $true when a size mismatch occurs to prevent the
Set-TargetResource firing when we can't actually do anything to resolve the
size mismatch (yet).
But as this is a duplicate of issue #11
<#11>, can we close this
issue and raise and further discussion in that one?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#75 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABdc1o9iQ5nJWhHab1XKFGuy7YQ5pSrAks5rRcBwgaJpZM4LhFq6>
.
|
Thanks @VazquezTech - I'll try and get to the issue #11 when I get time (seem to be very short of it these days). |
Below are 2 config blocks.
Initial_DataDisk sets a volume on a disk to 200MB.
DifferentSizeVolume_DataDisk expects a volume size of 300MB.
Test-DscConfiguration inDesiredState = True although there is a mismatch in volume sizes.
The text was updated successfully, but these errors were encountered: