-
Notifications
You must be signed in to change notification settings - Fork 656
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes a bug where a VM ends up in a state where it does not have a "r…
…endered_templates_archive" in the spec json Steps to reproduce: - Deploy a VM - Redeploy the VM without making any changes (this updates the spec json in the instances table to no longer have the rendered_templates_archive data since no templates were rendered) - bosh restart vm/0 --no-converge The restart action won't cause templates to be re-rendered, but will cause an update of the VM. Since rendered_templates_archive is no longer part of the spec json, the agent thinks it should not be starting any jobs and "monit summary" will be empty. This fix makes two changes. - When sending rendered templates over the NATS bus to VMs, rather than through the blobstore, it will persist the entry into the "rendered_templates_archive" table. This seems a bit weird since the templates aren't actually in the blobstore, but this odd pattern is already in use. The spec json on the VM always has a "blobstore_id" even though the templates never went through the blobstore. So it's a bit odd, but it is consistent. - When constructing the instances in the deployment plan from existing instance models, it will check if the database has the existing rendered templates archive and will merge that into the instance plan model. During a normal deploy, this will simply get replaced after the templates are rendered as part of the deployment process. However, this makes the template archive details available for deploys that do not end up rendering templates.
- Loading branch information
Showing
4 changed files
with
41 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters