Skip to content

Commit

Permalink
Clean up packages folder at the end of the "bosh create-env".
Browse files Browse the repository at this point in the history
If we don't clean the packages and the paas-bootstrap project uses a different version we can get "idempotent" issues.

For example:

mkdir: cannot create directory '/root/.bosh/installations/44f01911-a47a-4a24-6ca3-a3109b33f058/packages/aws-cpi-ruby-3.1/bosh': File exists
  • Loading branch information
corlettb committed Aug 17, 2023
1 parent 0ef548b commit caab137
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 0 additions & 2 deletions bosh-cli-v2/bosh-cli-v2_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,5 @@

cpi_package = compiled_packages.find {|p| p["Key"]["PackageName"] == "bosh_aws_cpi" }
expect(cpi_package).to be

expect(file("#{installation_path}/packages/bosh_aws_cpi/bin/aws_cpi")).to be_executable
end
end
5 changes: 5 additions & 0 deletions bosh-cli-v2/bosh_init_cache/seed_bosh_init_cache.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,9 @@ set +e
bosh create-env minimal.yml
set -e

# We only care about the compiled_packages.json and blobs folder.
# Keeping this about can cause issues if the cpi has packages that
# are not idempotent.
rm -r /root/.bosh/installations/44f01911-a47a-4a24-6ca3-a3109b33f058/packages

echo "...done"

0 comments on commit caab137

Please sign in to comment.