`buildAgent.properties` does not get updated in case of server URL change
zirkov opened this issue · comments
This only_if
block —
chef-teamcity/recipes/default.rb
Line 105 in e6df61c
buildAgent.properties
updated to point to the new server.This has caused a massive outage when the TC was migrated, but the agents were not even using the latest policyfiles override
Open to discussing options. There's 2 highly likely scenarios:
1.) TC master server migration
2.) agent migration between masters
The first was recently experienced, thus the authorizationToken
in https://github.com/Roblox/chef-teamcity/blob/master/templates/default/buildAgent.properties.erb#L35 wouldn't change.
However, if an agent migrated between masters, then that token needs to be regenerated with the master anyway.
Agree with the scenarios.
The first one seems more likely to happen suddenly; and it should be "auto-healing"
The second one would still require a manual intervention (or an API call, at least a separate step) to deauthorize and remove the agent from the first master — which should remove the auth token anyway and the new master would require to do manual (or API call, but still an outside intervention with regards to Chef) authorization