dsccommunity / FailoverClusterDsc

This module contains DSC resources for deployment and configuration of Windows Server Failover Cluster.
MIT License
60 stars 54 forks source link

xClusterDisk: Set-TargetResource tries to remove disk even if it is already removed #90

Closed johlju closed 7 years ago

johlju commented 7 years ago

Details of the scenario you tried and the problem that is occurring: When writing test for this resource I found that Set-TargetResource doesn't check if the disk is actually present before trying to remove it from the cluster. This has not been a problem before since it called the Test-TargetResource method. But in a n effort to minimize code path that was removed and then this become apparent.

The DSC configuration that is using the resource (as detailed as possible):

xClusterDisk $resourceConfigName
{
    Number = 1
    Ensure = 'Absent'
    Label = 'SQL2016-SYSDATA'
}

Version of the Operating System and PowerShell the DSC Target Node is running: n/a

Version of the DSC module you're using, or 'dev' if you're using current dev branch: Dev