Citrix XenApp Rolling Reboot Scripts, (XenApp 5, 6, and 6.5)
In zero-downtime 24/7 environments with shift employees, customers rarely want users to be notified of scheduled or mandatory XenApp server reboots. As a result, most of these environments have reboots disabled or this process is done manually. Unfortunately, this isn’t a good process since the XenApp servers are susceptible to memory leaks which can lead to failure and poor performance. By utilizing the included rolling reboot scripts, environments can take advantage of N+1 overallocation by processing a single server reboot while maintaining the user load on remaining systems. This has been done in such a way that users are not kicked off the system for scheduled reboots. Instead, the server is removed from load balancing until all sessions have been logged off. Once all sessions have been logged off, the server will go down for a reboot.
After the reboot has been processed, a procedure will validate that the server has returned from the reboot properly and the load has reevaluated under 5000. This way, if there are any servers that do not return from a reboot, the script will stop processing subsequent server reboots. The script will process through all servers in the farm until all servers have rebooted. Once completed, the script will loop infinitely, repeating this process as frequently the administrator desires (FARMLOOPINTERVAL). For example, if the administrator sets this variable to 72, the farm loop will not occur more than once every three days.
If the environment already has a Citrix Full Access service account, this account can be used to run the scripts as a scheduled task. Otherwise, an administrator will need to create a full access farm administrator account and assign local administrator rights to the XenApp servers. Domain admin privileges are not needed for this account. However, since the script assigns load evaluators to the servers in the farm, XenApp admin rights are needed. The scripts must be configured on a single server for each farm (Preferably the Zone Data Collector). This server will manage the reboot processes for all other servers in the farm, excluding the local server from which the script is run.