You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We recently upgraded our Teletraan setup to the latest commit from master and ran into issues where hosts stopped getting cleaned up when they where terminated. We were able to revert to the commit just before #831 was merged to restore this functionality. I'm no expert here, here is what I found out by digging into the PR.
The previous version of the cleanup code was split into two parts:
Cleaning up hosts that are part of groups, those groups are assigned to environments
This was previously handled by a loop calling the processEachGroup function on each group (https://github.com/pinterest/teletraan/pull/831/files#diff-d325e9aa7284f0411829cb75934a0ddae12c7281fda3b09da7779c406e8bad3cL124)
This functionality was removed by PR 831. I guess it was assumed that the processAllHosts function would handle these hosts, however it only handles hosts that are directly attached to environments - not hosts that are part of groups.
@ankilosaurus apologies for pinging you directly, but you were the author of PR831, which introduced the problem. Would it be possible to reintroduce the functionality that was mistakenly taken out?
We recently upgraded our Teletraan setup to the latest commit from
master
and ran into issues where hosts stopped getting cleaned up when they where terminated. We were able to revert to the commit just before #831 was merged to restore this functionality. I'm no expert here, here is what I found out by digging into the PR.The previous version of the cleanup code was split into two parts:
Cleaning up hosts that are individually assigned to environments
Previously handled by a function named
processIndividualHosts
, this function was renamed toprocessAllHosts
. (https://github.com/pinterest/teletraan/pull/831/files#diff-d325e9aa7284f0411829cb75934a0ddae12c7281fda3b09da7779c406e8bad3cR96)The query backing this function has not changed much. It involved joining
hosts
tohosts_and_envs
- it now involveshosts_and_agents
joined tohosts_and_envs
.Cleaning up hosts that are part of groups, those groups are assigned to environments
This was previously handled by a loop calling the
processEachGroup
function on each group (https://github.com/pinterest/teletraan/pull/831/files#diff-d325e9aa7284f0411829cb75934a0ddae12c7281fda3b09da7779c406e8bad3cL124)This functionality was removed by PR 831. I guess it was assumed that the
processAllHosts
function would handle these hosts, however it only handles hosts that are directly attached to environments - not hosts that are part of groups.Would it be possible to reintroduce the "cleanup stale hosts that are part of groups" functionality?
(Roughly these lines https://github.com/pinterest/teletraan/pull/831/files#diff-d325e9aa7284f0411829cb75934a0ddae12c7281fda3b09da7779c406e8bad3cL124-L173)
Thanks!
The text was updated successfully, but these errors were encountered: