dsccommunity / FailoverClusterDsc

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

ClusterPreferredOwner: The resource is moving cluster group in Set-TargetResource #64

Open johlju opened 7 years ago

johlju commented 7 years ago

When setting preferred owner on a cluster group or a cluster resource it moves the cluster group to the first node. In a production environment this could be a bad thing.

See line 98-99

        Write-Verbose -Message "Moving Cluster Group $ClusterGroup to node $($Nodes[0])"
        $null = (Get-ClusterGroup -cluster $ClusterName) | Where-Object {$_.name -like $ClusterGroup} | Move-ClusterGroup -Node $Nodes[0]

Why is it moving the cluster group? And if this is a must, then I think this should be handled differently.

johlju commented 7 years ago

Is it meant to move to the preferred owner, if that owner is not the preferred? But that should not be up to the resource, would it?

bgelens commented 7 years ago

I don't think you want a resource to fight with what the cluster service is doing. Just have it configure the setting and leave it alone would be best IMO.

johlju commented 7 years ago

I agree.