-
Notifications
You must be signed in to change notification settings - Fork 65
Build worker reboot #204
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I cannot make it work. install:
- set TEST_VAR=Hello, world!
- echo before reboot
- ps: Restart-Computer -Force # here the server goes restarting
- echo Before sleep
- ps: |
Write-Host $env:TEST_VAR
Write-Host ([datetime]::Now)
Start-Sleep -s 10
Write-Host "After sleep"
Write-Host ([datetime]::Now)
build_script:
- echo Build
- ps: |
Write-Host ([datetime]::Now)
Write-Host after reboot
Write-Host $env:TEST_VAR
test: off
deploy: off According to log reboot happens in just 1 second. |
Why do you think it wasn't rebooted? ;) There is no "After sleep" in a build log and reboot happened in 1 minute, not second.
On Tue, Apr 7, 2015 at 7:39 PM, Sergei Vorobev [email protected]
|
Indeed, sorry was tired and didn't recognize it's minutes not seconds. |
@FeodorFitsner My build script already scheduled a restart, so I get this exception: https://ci.appveyor.com/project/dhoer/chef-selenium/build/master-75
When I only do a sleep, it hangs and eventually fails. I can't disable the reboot in the code either since it is required. Is there anyway that I can wait for the reboot to happen before running my tests given these constraints? https://github.com/dhoer/chef-selenium/blob/master/appveyor.yml |
What do you mean by build script already scheduled a restart? Is it some software that was installed and pending restart? |
Chef is installing software and schedules a reboot to occur 60 seconds after it completes provisioning. The server needs to reboot in order for paths set to be available and to run a script on startup. |
If you feel that you should not wait for Chef to restart, you can run |
@IlyaFinkelshteyn Thanks for the help. The later still threw an exception and the former hangs and there is no output of shutdown /a or Restart-Computer commands. I see you forked this and tested it. Any other suggestions? This works when running against vagrant box. This is doing an auto-login to user rdp_local on restart. Maybe this interferes with appveyor somehow. |
Hi Dennis,
It was set here https://ci.appveyor.com/project/IlyaFinkelshteyn/chef-selenium/build/master-10#L852 And when I go directly to host machine and connect to console 0 of VM, I see that reboot happened (event viewer messages) and the following picture: On VM I see command which starts RDP to itself and RDP session to itself (localhost), stuck forever with the following command Does it work if you run it on your machine locally? --ilya. |
Yes, it works on vagrant locally. We have used this cookbook in prod for the past few years. I do have 11% failure rate in production when spinning up 45 windows node servers - probably due to race condition when registering node to hub - but have never had a failure running locally. The RDP is a work around suggested by AWS to set different screen resolutions in the cloud. Selenium and its dependencies (drivers and browsers) change often and it would be nice to have integration tests verify all is good. |
@IlyaFinkelshteyn BTW, thanks for looking at this. I will dig deeper into why the node is hanging when I have some time. |
You are welcome! I think in Appveyor infrastructure you don’t need to do RDP tricks to adjust screen resolution. Please use this https://github.com/FeodorFitsner/selenium-tests/blob/screen-resolution/appveyor.yml approach. Than just use --ilya. |
Some Windows software requires server reboot. Build worker service should resume build run after server and build agent restarted. Build session environment variables should be preserved as well.
Test
appveyor.yml
:The text was updated successfully, but these errors were encountered: