PaaS Cloud Service Role Restart Scenarios

There are several reasons why a PaaS cloud service role instance will restart or recycle.  This could be a recycle of just the role host processes (WaWorkerHost.exe / WaIISHost.exe) or a reboot of the VM itself.  For more information about what happens to the content on the disks inside the VM in these various scenarios see https://blogs.msdn.microsoft.com/kwill/2012/10/05/windows-azure-disk-partition-preservation/

 

 

These restarts will leave the VM running, but cause the role host processes within the VM to restart.  For more information about the role processes, see https://blogs.msdn.microsoft.com/kwill/2011/05/05/windows-azure-role-architecture/.

  • In place upgrade of the cloud service
  • Config change of the cloud service that changes the environment, such as adding a new certificate that the guest agent has to install
  • Calling RoleEnvironment.RequestRecycle from within the VM
  • Stop/Start management operation
  • Setting e.Cancel=true in the RoleEnvironment_Changing event
  • The role host process exiting the RoleEntryPoint_Run method
  • The role host process crashing

 

These restarts will cause the VM itself to either restart or be moved to a new server.

  • A new version of the Azure Guest Agent
  • Host or Guest OS Updates
  • Reboot or Reimage management operation
  • A hardware issue on the physical server causing service healing and node movement
  • A communication failure between the Guest Agent and the Host Agent that lasts longer than 10 minutes
  • Unexpected host reboots such as powercycles or bugchecks
  • Planned maintenance or hardware decommissioning which will cause Azure to proactively move VMs to new servers (you will receive advance notification emails)