Failover Clustering Sets for Start Ordering

IStartOrderingn a private cloud there may be multi-tier applications which are deployed across a set of virtual machines. Such as a database running in one VM, and an application leveraging that database running in another VM. It may be desired to have start ordering of highly available virtual machines which have dependencies.

 

Sets:

Virtual machines and other clustered applications are controlled by cluster resources, and those resources are inside of a Cluster Group. A cluster group represents the smallest unit of failover within a cluster.

A new concept is being introduced in Windows Server 2016 called a “Set”. A set can contain one or more groups, and sets can have dependencies on each other. This enables creating dependencies between cluster groups for controlling start ordering. While Sets were primarily focused at virtual machines, it is generic cluster infrastructure which will work with any clustered role. Such as SQL Server, etc…

Sets

Here is some details on how to create and manage Sets.

Basic Set Creation:

To create a new Set and place app group in it

PS C:\> New-ClusterGroupSet -Name SetforApp -Group App

Name                : SetforApp
GroupNames          : {App}
ProviderNames       : {}
StartupDelayTrigger : Delay
StartupCount        : 4294967295
IsGlobal            : False
StartupDelay        : 20

Now create a Set and place the database group in it:

PS C:\> New-ClusterGroupSet -Name SetforDatabase -Group Database

Name                : SetforDatase
GroupNames          : {Database}
ProviderNames       : {}
StartupDelayTrigger : Delay
StartupCount        : 4294967295
IsGlobal            : False
StartupDelay        : 20

To view the newly created set’s

PS C:\> Get-ClusterGroupSet

Name                : SetforApp
GroupNames          : {App}
ProviderNames       : {}
StartupDelayTrigger : Delay
StartupCount        : 4294967295
IsGlobal            : False
StartupDelay        : 20

Name                : SetforDatabase
GroupNames          : {Database}
ProviderNames       : {}
StartupDelayTrigger : Delay
StartupCount        : 4294967295
IsGlobal            : False
StartupDelay        : 20

Now let’s add a dependency between the two newly created set’s, so that the App set will depend on the Database set.

PS C:\> Add-ClusterGroupSetDependency -Name SetforApp -Provider SetforDatabase

To view the newly created dependency between the set’s. You will see that the name of the set is “SetforApp” and that it contains a single group named “App” and the set is dependent based on the ProvidersNames property on the set named “SetforDatabase”

PS C:\> Get-ClusterGroupSetDependency


Name                : SetforApp
GroupNames          : {App}
ProviderNames       : {SetforDatabase}
StartupDelayTrigger : Delay
StartupCount        : 4294967295
IsGlobal            : False
StartupDelay        : 20

Name                : SetforDatabase
GroupNames          : {}
ProviderNames       : {}
StartupDelayTrigger : Delay
StartupCount        : 4294967295
IsGlobal            : False
StartupDelay        : 20

After completing these steps, the result is that the Database group will be brought online first and once complete there will be a delay of 20 seconds and then the App group will be brought online.

Set Configuration:

With the defaults, dependencies between sets will start the next set 20 seconds after all the groups come online. There are a few configuration settings to modify the start behavior of dependencies between sets:

  • StartupDelayTrigger – This defines what action should trigger the start and can have one of two values
    • Online – Waits until the group has reached an online state
    • Delay – Waits the number of seconds as defined by StartupDelay (default)
  • StartupDelay – This defines a delay time in seconds (default value of 20) which is used if StartupDelayTrigger is set to Delay
  • StartupCount – This defines the number of groups in the set which must have achieved StartupDelayTrigger before the Set is considered started.
    • -1 for all groups in the set (default)
    • 0 for majority of groups in the set
    • N (user defined) for the specific number of groups
      • Note: If N exceeds the number of groups in the set, it effectively results in All behavior.

You can view the configuration with the following syntax:

PS C:\> Get-ClusterGroupSetDependency -Name SetforApp

Name                : SetforApp
GroupNames          : {App}
ProviderNames       : {SetforDatabase}
StartupDelayTrigger : Delay
StartupCount        : 4294967295
IsGlobal            : False
StartupDelay        : 20

A set can be configured for Online with the following syntax:

PS C:\> Set-ClusterGroupSet -name SetforApp -StartupDelayTrigger Online

Infrastructure Groups

There may be some groups which you wish to start before all others, such as a utility VM for example. This might be a VM which runs a domain controller, or a DNS server, or maybe a storage appliance. These infrastructure groups may need to be running before attempting to start any other tenant VM which is running apps. It would be cumbersome to create a set, and make all other sets dependent on it. To simplify this configuration, a single property can be configured on a set.

A set can be marked to start before all others with the following setting:

  • IsGlobal – This defines if the set should start before all other sets

Example of configuring a set:

PS C:\> Set-ClusterGroupSet -name SetforInfra -IsGlobal 1

Now you can see the set is configured as True for IsGlobal.

PS C:\> Get-ClusterGroupSetDependency

Name                : SetforInfra
GroupNames          : {ApplianceVM}
ProviderNames       : {}
StartupDelayTrigger : Delay
StartupCount        : 4294967295
IsGlobal            : True
StartupDelay        : 20

PowerShell cmdlet’s Reference

The only UI for VM Start Ordering is through PowerShell, there is no Failover Cluster Manager support in Windows Server 2016. Here is a list of all the relevant Set cmdlet’s

  • New-ClusterGroupSet
  • Remove-ClusterGroupSet
  • Set-ClusterGroupSet
  • Get-ClusterGroupSet
  • Get-ClusterGroupSetDependency
  • Add-ClusterGroupToSet
  • Add-ClusterGroupSetDependency
  • Remove-ClusterGroupSetDependency
  • Remove-ClusterGroupFromSet

Thanks!
Elden Christensen
Principal PM Manager
High Availability & Storage