cloudfoundry / cf-deployment-concourse-tasks

Apache License 2.0
23 stars 76 forks source link

Kill ssh connections for bbl --credhub manually #30

Closed rowanjacobs closed 7 years ago

rowanjacobs commented 7 years ago

The shared function setup_bosh_env_vars runs eval "$(bbl print-env)"; when the bbl environment has a jumpbox, this will create an SSH connection to the jumpbox. The SSH connection does not close on its own, which means that Concourse will keep containers alive for an undesired period of time (around 10 minutes) after the job has actually finished.

The previous approach to this, in PR #28, used trap pkill ssh || true in setup_bosh_env_vars. This conflicted with traps for committing var-stores, so instead in this PR, we are killing ssh connections manually at the end of each task which runs setup_bosh_env_vars.

We have confirmed that this works both with and without a jumpbox in the BBL pipeline.

cfdreddbot commented 7 years ago

Hey rowanjacobs!

Thanks for submitting this pull request! I'm here to inform the recipients of the pull request that you and the commit authors have already signed the CLA.

cf-gitbot commented 7 years ago

We have created an issue in Pivotal Tracker to manage this:

https://www.pivotaltracker.com/story/show/150658305

The labels on this github issue will be updated when the story is started.