Request: Drain mode schedule

Would like a feature added to put hosts into drain mode on a schedule and take out of drain mode once the host turns off.

Very similar result to a scale in aggressiveness of high but less disruptive to the users during ramp down.
The situation we have is a company that works 2 shifts, day and night, where one is significantly more users. What we are looking to do is have 1 host always on and 3 hosts at start of day.
Pre-stage takes care of the hosts turning on, but the issue is at about 4 pm the 2nd shift starts trickling in and will get spread across the hosts. Now a scale in aggressiveness of high should work but what I would like to have happen is to put all but 1 host into drain mode at about 4 pm so most of the 2nd shift gets put onto the same host to minimize the users who have to reconnect during autoscale. This would leave the hosts in drain mode so the logic would be once all users are disconnected and host shuts down to re-activate the host.


I do believe I could accomplish some of this with scheduled scripts but have not started trying yet.

4

Comments (4 comments)

Avatar
DStephenson

Great idea, Tomas!

While you're waiting for that feature, there is a Nerdio Azure Runbook (Delay host availability in AVD for 10 minutes) that may be able to do what you want. It's not ideal, especially since the Allow multiple schedules for host pool scripted actions โ€“ Nerdio Help Center feature request isn't in production, yet, however it is better than nothing. ๐Ÿ™‚

0
Avatar
Tomas

Yeah i was going to base some of the script off of this. The lazy way i suppose would be to put in drain mode for like 4 hours and another to take it out of drain on shutdown but I was thinking it would force me to choose which one stays online which could work in the short term id rather it work with any so more logic is needed.

0
Avatar
DStephenson

Yep. That's always the struggle. Being able to add logic for it to determine which hosts to put into drain mode.
I think the hardest part is being able to do a recurring scripted action for a specific host.
We can do it from the Host Pool-level, but if you have other scripted actions you want to run on a different schedule, you're kind of out of luck. ๐Ÿ˜Ÿ

ย In theory, if you can get the logic figured out, you can use a scripted action to put the host in drain mode before scale-in and then put a scripted action in the Run Scripted actions when host VM is STOPPED to take it out of drain mode as the host is shutdown. ๐Ÿคž

0
Avatar
Marcos Artiaga

Tomas, this is a heavily requested feature by our partners, and we should have a feature coming in a future release to address this. Stay tuned!

2

Please sign in to leave a comment.