Bosh deploy --dry-run seems to update bosh link state
peterellisjones opened this issue · 2 comments
Describe the bug
Bosh deploy --dry-run seems to update bosh link state for IPs.
To Reproduce
This is how we observed the issue:
- Deploy Cloud Foundry with dynamic IPs for the routers
- Deploy HAProxy with the CF routers as the backend. Defined via bosh links
- consumes:
http_backend:
deployment: cf
from: gorouter
- Update Cloud Foundry manifest to use static IPs for the routers and deploy using
--dry-run
. Since this is a dry-run you would not expect this to update any internal state in BOSH - Redeploy haproxy
- See that haproxy now has the wrong IP addresses for the CF routers. It is using the IPs from the updated manifest that was applied with
--dry-run
.
Expected behavior
That the bosh links do not get updated by a --dry-run
deployment
Versions:
- Infrastructure: Openstack
- BOSH version 270.5.0
- BOSH CLI version 6.0.0-5240e8aa-2019-08-05T22:16:39Z
We have created an issue in Pivotal Tracker to manage this:
https://www.pivotaltracker.com/story/show/170204304
The labels on this github issue will be updated when the story is started.
bosh --dry-run
isn't truly a dry-run, and database edits are made. The dry-run will not create IaaS resources, however. This is an unfortunate name for the option, but is working as intended.
Bosh should be reusing resources created in the database during dry-run for the next deploy.
haproxy deployed after the dry-run
: while it makes sense it would use what's in the database, this is not a typical flow we've seen. That is, doing a dry-run, then deploying something that uses the deployment that was --dry-run
d.
I would recommend deploying the routers without dry-run, and then redeploying haproxy.
Closing as --dry-run
is working as intended.. though unfortunately not very 'dry' in terms of database edits.
Related: #1966 this issue however shows that we are working on it.. I would say this is not an active stream for us now. It was at one point as we were looking into refactoring the director such that dry-run was really dry (not 'moist', heh) and to have a clearer separation of 'plan' and 'execute'. This effort was dropped as it was seen as much too intensive for its value to users.
Not sure if the PM @mfine30 wants to weigh in more here.