Skip to content

Commit 92b89d7

Browse files
committed
Fix(ci): prevent delete-env failure due to busy persistent disk on teardown
Add bosh delete-deployment before bbl down in delete-bosh-lite.yml so that CF warden containers release their bind mounts on the director's persistent disk prior to bosh delete-env attempting to unmount it. Without this, umount fails with "target is busy" (exit status 32). Also align tool versions with repo variables (BBL_CLI_VERSION, BOSH_CLI_VERSION) instead of hardcoded values, and remove the redundant --gcp-service-account-key flag since BBL reads BBL_GCP_SERVICE_ACCOUNT_KEY from the environment automatically. Signed-off-by: Prem Kumar Kalle <prem.kalle@broadcom.com>
1 parent 31ccf08 commit 92b89d7

1 file changed

Lines changed: 13 additions & 9 deletions

File tree

.github/workflows/delete-bosh-lite.yml

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ env:
1919
BOSH_DEPLOYMENT: cf
2020
BOSH_NON_INTERACTIVE: true
2121
ENV_NAME: ${{ inputs.env-name }}
22+
BBL_CLI_VERSION: ${{ vars.BBL_CLI_VERSION }}
23+
BOSH_CLI_VERSION: ${{ vars.BOSH_CLI_VERSION }}
2224

2325
jobs:
2426
delete-env:
@@ -31,14 +33,12 @@ jobs:
3133
go version
3234
3335
install_location=/usr/local/bin
34-
bbl_version=v9.0.35
35-
bosh_cli_artifact=bosh-cli-7.7.2-linux-amd64
36-
37-
sudo curl https://github.com/cloudfoundry/bosh-bootloader/releases/download/${bbl_version}/bbl-${bbl_version}_linux_amd64 --silent --location --output $install_location/bbl
36+
37+
sudo curl https://github.com/cloudfoundry/bosh-bootloader/releases/download/v${BBL_CLI_VERSION}/bbl-v${BBL_CLI_VERSION}_linux_amd64 --silent --location --output $install_location/bbl
3838
sudo chmod +x $install_location/bbl
3939
bbl --version
40-
41-
sudo curl https://github.com/cloudfoundry/bosh-cli/releases/download/v7.7.2/$bosh_cli_artifact --silent --output $install_location/bosh --location
40+
41+
sudo curl https://github.com/cloudfoundry/bosh-cli/releases/download/v${BOSH_CLI_VERSION}/bosh-cli-${BOSH_CLI_VERSION}-linux-amd64 --silent --output $install_location/bosh --location
4242
sudo chmod +x $install_location/bosh
4343
bosh --version
4444
@@ -72,10 +72,14 @@ jobs:
7272
run: |
7373
cd ${ENV_NAME}/bbl-state
7474
eval "$(bbl print-env --shell-type posix)"
75-
75+
76+
# Delete the CF deployment first so warden containers release their
77+
# bind mounts on the director's persistent disk.
78+
echo "Deleting CF deployment ${BOSH_DEPLOYMENT}"
79+
bosh delete-deployment -d ${BOSH_DEPLOYMENT} --force --skip-drain || true
80+
7681
echo "Deleting env ${ENV_NAME}"
77-
echo ${BBL_GCP_SERVICE_ACCOUNT_KEY} > key.json
78-
bbl down --no-confirm --gcp-service-account-key=key.json
82+
bbl down --no-confirm
7983
8084
- name: delete gcs bucket
8185
run: |

0 commit comments

Comments
 (0)