Azure / RDS-Templates

ARM Templates for Remote Desktop Services deployments
MIT License
466 stars 599 forks source link

All session hosts placed in drain mode #305

Closed TerminallyChilI closed 4 years ago

TerminallyChilI commented 4 years ago

Hi there,

We have 2 hosts in our host pool.

When the scaling script runs it sets both RD Hosts in the host pool into drain mode, and no-one can connect to either resource.

I have specified the minimumNumberOfRDSH as 1.

My understanding would be that at least one of the RD Hosts would have AllowNewSessions to be true while off peak, so that people could access at least one of the servers, then once on-peak the other server would start to allow new sessions.

Pleas see the below output from before and after running the scaling script:

BEFORE RUNNING SCALING SCRIPT: Get-RdsSessionHost -TenantName $WVDTenantName -HostPoolName $hostPoolName

SessionHostName : EGA-WVD-0.MLB-EGA-NET.AUS TenantName : EGA WVD TenantGroupName : Default Tenant Group HostPoolName : EGA-W10-HOSTS AllowNewSession : True Sessions : 4 LastHeartBeat : 12/01/2020 10:19:18 PM AgentVersion : 1.0.1632.1200 AssignedUser : OsVersion : 10.0.18362 SxSStackVersion : rdp-sxs191031003 Status : Available UpdateState : Succeeded LastUpdateTime : 27/12/2019 1:00:37 AM UpdateErrorMessage :

SessionHostName : EGA-WVD-1.MLB-EGA-NET.AUS TenantName : EGA WVD TenantGroupName : Default Tenant Group HostPoolName : EGA-W10-HOSTS AllowNewSession : True Sessions : 2 LastHeartBeat : 13/01/2020 11:30:39 PM AgentVersion : 1.0.1632.1200 AssignedUser : OsVersion : 10.0.18362 SxSStackVersion : rdp-sxs191031003 Status : Available UpdateState : Succeeded LastUpdateTime : 07/01/2020 1:55:04 AM UpdateErrorMessage :

OUTPUT AFTER RUNNING SCALING SCRIPT: PS C:_WVDScaling> C:_WVDScaling\basicScale.ps1

SessionHostName : EGA-WVD-0.MLB-EGA-NET.AUS TenantName : EGA WVD TenantGroupName : Default Tenant Group HostPoolName : EGA-W10-HOSTS AllowNewSession : False Sessions : 4 LastHeartBeat : 1/12/2020 10:19:18 PM AgentVersion : 1.0.1632.1200 AssignedUser : OsVersion : 10.0.18362 SxSStackVersion : rdp-sxs191031003 Status : Available UpdateState : Succeeded LastUpdateTime : 12/27/2019 1:00:37 AM UpdateErrorMessage :

SessionHostName : EGA-WVD-1.MLB-EGA-NET.AUS TenantName : EGA WVD TenantGroupName : Default Tenant Group HostPoolName : EGA-W10-HOSTS AllowNewSession : False Sessions : 2 LastHeartBeat : 1/14/2020 3:18:45 AM AgentVersion : 1.0.1632.1200 AssignedUser : OsVersion : 10.0.18362 SxSStackVersion : rdp-sxs191031003 Status : Available UpdateState : Succeeded LastUpdateTime : 1/7/2020 1:55:04 AM UpdateErrorMessage :

Please let me know which additional information you may require.

Also confirming that the VMs in the host pool are all the same VM Tier (D4sv3)

TerminallyChilI commented 4 years ago

plz

ChristianMontoya commented 4 years ago

@TerminallyChilI Hmmm...let me send around internal to see if we can get some traction on this. Can you confirm which template/PS script you used as well? You're correct that once it gets to Offpeak, all but minimumNumberOfRDSH should be set to drain mode..

TerminallyChilI commented 4 years ago

Thanks Christian.

I used the templates and scripts located here : https://github.com/Azure/RDS-Templates/tree/master/wvd-sh/WVD%20scaling%20script

I've confirmed the same behaviour accross 2 different customers too, all using the same scripts/templates.

Hopefully I've used the correct version.

For the time being I've just appended some dirty Powershell to the bottom of basicScale.PS1 to ensure that at least 1 host is left running off peak (prioritizing the host with current most active sessions). It's working well for now 😄

DirkHaex commented 4 years ago

Hi @TerminallyChilI , confirmed here also. Script ran fine for 2 weeks and now in the morning no one can login at our customer. I am going to implement the logicapps solution (that was posted below) as replacement for the older script. More news end of this week! https://github.com/Azure/RDS-Templates/tree/master/wvd-templates/wvd-scaling-script

TerminallyChilI commented 4 years ago

Hey @TriXje

Logicapps seem like a good option, please let me know how you go with this approach. I was only aware of the basicScale.ps1 method. Things change too quickly hahaha.

Does anyone know if the basicScale.ps1 script is deprecated/not recommended?

ChristianMontoya commented 4 years ago

@TerminallyChilI : Yes, it is deprecated and not recommended.

Please try the new script that uses logic apps and is fully described here in the public documentation: Set up scaling script.

Closing this out. Please create a new issue if scenario reproduces.