Skip to content
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

Windows TeamCity images don't seem to stop correctly #37

Open
wtigotw opened this issue Aug 15, 2018 · 2 comments
Open

Windows TeamCity images don't seem to stop correctly #37

wtigotw opened this issue Aug 15, 2018 · 2 comments

Comments

@wtigotw
Copy link

wtigotw commented Aug 15, 2018

Using: TeamCity Server 2018.1.1 running on Windows 10 Enterprise 1803
Using: Docker Cloud plugin to launch agents
Docker image: jetbrains/teamcity-agent:2018.1.1-nanoserver-sac2016

When a build agent is commanded to shut down by TC, either because of manual request ("Stop" clicked from Agents->Cloud screen) or automatic shutdown via plugin configuration ("Terminate after first build" setting), the container is immediately shut down successfully, but TeamCity reports "Cloud image is not configured to stop agents gracefully. The agent that was not stopped gracefully might be assigned with the build."

I have set a shutdown timeout of two minutes on the container but that does not help. From everything I can tell, the container is gracefully shutting down but I believe the agent process within is not.

@dtretyakov
Copy link
Contributor

@wtigotw, did you tried to stop the same container on this machine via regular docker run ... / docker stop ... / docker rm ... commands? Does it stop build agents gracefully?

Note: since Docker Cloud plugin is 3rd party plugin we don't know how it terminates the docker container.

@wtigotw
Copy link
Author

wtigotw commented Aug 28, 2018

Ah, good point. Yes, I failed to recognize the shutdown mechanism of the plugin could should be considered.

Using docker run ... / docker stop ... / docker rm ..., I see the following in the TC logs:

[2018-08-28 15:41:03,285]   WARN -    jetbrains.buildServer.AGENT - Agent "ip_xx.xx.xx.xx" {id=158} is unauthorized on registration
[2018-08-28 15:45:23,322]   INFO -    jetbrains.buildServer.AGENT - Agent can't be pinged, last communication time: 2018-08-28 15:44:22.457, agent: "ip_xx.xx.xx.xx" {id=158, protocol=unidirectional, host=xx.xx.xx.xx:9090, agentTypeId=11, pool=Default, registered since 2018-08-28 15:41:03.175}
[2018-08-28 15:45:23,322]   INFO - ldServer.AGENT.PollingProtocol - Polling Agent session 'LRkyHfm...' was closed, agent: "ip_xx.xx.xx.xx" {id=158}
[2018-08-28 15:45:23,328]   INFO -    jetbrains.buildServer.AGENT - Agent "ip_xx.xx.xx.xx" {id=158} has been unregistered. Reason: Cannot access agent

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants