Set CF_HOME to a temp dir to a avoid bug in autopilot #24
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi,
We recently colocated both the deploy-notifications and deploy-notifications-ui errands on the same instance, which surfaced a bug in autopilot where
cf install-plugin autopilot -f
attempts to uninstall and reinstall autopilot. However, autopilot has not yet been updated to support this without panicking (see contraband/autopilot#47).As a short-term workaround, this PR changes the value of
CF_HOME
to a random directory so that the plugin is not already installed when the script runs. It also removes the directory at the end of the script so that running the errand repeatedly does not leave multiple copies of the directory lying around on the filesystem.Let us know if you have any questions.
@davewalter and @michelleheh