Skip to content

Updating a Route does not Propagate to Diego for Running Applications #4286

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
maxmoehl opened this issue Apr 1, 2025 · 2 comments · Fixed by #4298
Closed

Updating a Route does not Propagate to Diego for Running Applications #4286

maxmoehl opened this issue Apr 1, 2025 · 2 comments · Fixed by #4298

Comments

@maxmoehl
Copy link
Member

maxmoehl commented Apr 1, 2025

When updating a route via PATCH /v3/routes/:guid changes to the options do not propagate to diego and therefore do not update the route which is emitted by route-emitter for any currently running app which is bound to that route.

From @philippthun via Slack:

Looking at the implementation of the controller and the underlying action, it seems as if only the database is updated.
There is an update_routes method in VCAP::CloudController::Diego::Runner, but it does not seem to be used at all.
In a different action the method update_metric_tags is called; maybe this could be used as a blueprint in case the bahviour should be changed.

Thanks to @ameowlia for reporting this.

maxmoehl added a commit to sap-contributions/cloud_controller_ng that referenced this issue Apr 10, 2025
After updating a route via the new update route endpoint, it was only
stored in the database. Since routes can be changed without restarting
the application this commit adds logic to also push the update to diego.

Resolves: cloudfoundry#4286
@maxmoehl
Copy link
Member Author

This also needs a fix in gorouter: cloudfoundry/gorouter#472

hoffmaen added a commit to sap-contributions/cloud_controller_ng that referenced this issue Apr 10, 2025
After updating a route via the new update route endpoint, it was only
stored in the database. Since routes can be changed without restarting
the application this commit adds logic to also push the update to diego.

Resolves: cloudfoundry#4286
Co-Authored-By: Clemens Hoffmann <[email protected]>
@maxmoehl
Copy link
Member Author

Turns out the fix in gorouter is more cosmetic. The CC PR is now ready for review.

philippthun pushed a commit that referenced this issue Apr 16, 2025
* feat: notify diego of route updates

After updating a route via the new update route endpoint, it was only
stored in the database. Since routes can be changed without restarting
the application this commit adds logic to also push the update to diego.

Resolves: #4286
Co-Authored-By: Clemens Hoffmann <[email protected]>

* Verify call to notify_backend_of_route_update in route.update

* Address review comments

* Notify diego outside of transaction

---------

Co-authored-by: Clemens Hoffmann <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant