dsccommunity / FailoverClusterDsc

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

ClusterQuorum: Fail if resource already exist #197

Open lbergeron01 opened 5 years ago

lbergeron01 commented 5 years ago

Running xClusterQuorum with NodeAndCloudMajority type fail if Cloud Witness already exists on the Cluster Group.

Validation/Test is required in the function.

Code used : xClusterQuorum SetQuorumToNodeAndCloudMajority { IsSingleInstance = 'Yes' Type = 'NodeAndCloudMajority' Resource = $Cluster.StorageAccountName StorageAccountAccessKey = $Cluster.StorageAccountKey }

Result : ` 2018-12-13T16:19:37.3595073Z [[xClusterQuorum]SetQuorumToNodeAndCloudMajority::[cCreateCluster]CreateCluster 2018-12-13T16:19:37.3595288Z ] at MS.Internal.ServerClusters.AzureWitnessQuorumSettings.Configure() 2018-12-13T16:19:37.3595384Z 2018-12-13T16:19:37.3595510Z at 2018-12-13T16:19:37.3595648Z Microsoft.FailoverClusters.PowerShell.SetClusterQuorumCommand.WrappedProcessRec 2018-12-13T16:19:37.3595806Z ord() 2018-12-13T16:19:37.3595879Z 2018-12-13T16:19:37.3596029Z at Microsoft.FailoverClusters.PowerShell.FCCmdlet.ProcessRecord() 2018-12-13T16:19:37.5807110Z ##[error]An error occurred while creating resource 'Cloud Witness (2)' for the clustered role 'Cluster Group'.

2018-12-13T16:19:37.5823966Z VERBOSE: [wswlcesbxvocd21]: LCM: [ End Set ]
2018-12-13T16:19:37.5824401Z [[xClusterQuorum]SetQuorumToNodeAndCloudMajority::[cCreateCluster]CreateCluster 2018-12-13T16:19:37.5824596Z ] in 0.4060 seconds. 2018-12-13T16:19:37.5981443Z ##[error]The PowerShell DSC resource '[xClusterQuorum]SetQuorumToNodeAndCloudMajority::[ cCreateCluster]CreateCluster' with SourceInfo 'C:\VSTSAgent_work\r1\a\Vertex-E nv-CI\Environment\dsc\Vertex-DSCScript-ConfigureCluster-VSTS.ps1::86::9::xClust erQuorum' threw one or more non-terminating errors while running the Set-TargetResource functionality. These errors are logged to the ETW channel called Microsoft-Windows-DSC/Operational. Refer to this channel for more details.

stale[bot] commented 5 years ago

This issue has been automatically marked as stale because it has not had activity from the community in the last 30 days. It will be closed if no further activity occurs within 10 days. If the issue is labelled with any of the work labels (e.g bug, enhancement, documentation, or tests) then the issue will not auto-close.

johlju commented 5 years ago

Labelling this as a bug.