Checking to see if anyone else has this problem with bldeploy job reboots on Windows. As a preface, this is a problem we have had for the past 2+ years that occurs randomly and is not reproducible. It occurs with any bldeploy that has an item with Reboot='After Item Deployment'. We have seen this error with agent versions 8.0sp7patch4 and 8.1sp3patch1. It occurs (again, randomly) on Windows 2003x86, Windows 2003x64, Windows 2008x86, Windows 2008x64, and Windows 2008R2. My experience is somewhat limited, but I have yet to see it occur on Windows 2012 (where we use an unsupported configuration of 8.2sp2 agents with an 8.1sp3 application server). The only information I could find was a KB article that indicated the problem could be with early 8.0 agents on Windows 2008 servers - however, we see this issue with all of the OSes we typically build and with agents that are from 8.1.
Our jobs run primarily using User Principal mapping with the bladelogicrscd user mapped to the local administrator. However, the problem also occurs with seemingly the same frequency with the subset of jobs we run as domain users with an automation principal (all of which are members of the local administrators group). Again, this problem is not reproducible - a second attempt of the job with no changes will almost always succeed. Our standard 'fix' for users has always been 'just re-run the job using execute against failed target' and this almost invariably works. Nothing needs to be changed for the second attempt to work; the job just has to be re-run.
The error message is always the same:
Error Jun 7, 2013 6:47:03 PM Auto-reboot unable to initiate reboot, please reboot manually. Error code:5 Access is denied.
Error Jun 7, 2013 6:47:04 PM Could not reboot as required
Error Jun 7, 2013 6:47:04 PM Failed to reboot for item EXTERNALCMD
The transaction log looks like:
06/07/13 18:47:03.975 DEBUG bldeploy - Successfully paused the agent before shutting down the system
06/07/13 18:47:03.991 INFO bldeploy - Attempting shutdown REBOOT=true TIMEOUT=0 MSG=System is rebooting
06/07/13 18:47:03.991 ERROR bldeploy - Auto-reboot unable to initiate reboot, please reboot manually. Error code:5 Access is denied.
06/07/13 18:47:03.991 DEBUG bldeploy - Reset process token privleges
06/07/13 18:47:04.022 ERROR bldeploy - [Run Install] Could not reboot as required
06/07/13 18:47:04.037 DEBUG bldeploy - Metabase initialization skipped because it was not needed
06/07/13 18:47:04.037 ERROR bldeploy - [Run Install] Failed to reboot for item EXTERNALCMD
This problem does not occur with great frequency but given the number of reboots we have in our build process it can be annoying when building large numbers of servers.