cloudfoundry / cf-k8s-networking

building a cloud foundry without gorouter....
Apache License 2.0
32 stars 17 forks source link

[BUG] route-CRs don't get deleted #45

Closed phil9909 closed 4 years ago

phil9909 commented 4 years ago

Summary

kubectl get route.networking.cloudfoundry.org -n cf-workloads shows routes which have long been deleted from cf (cf routes does not show them).

Deployment Configuration

Reproduction Steps

  1. create an org and space
  2. push an app
  3. delete app
  4. delete route

or

  1. create an org and space
  2. push an app
  3. delete org

Logs

I ran kubectl logs -n cf-system cfroutesync-76555f9659-p29tx cfroutesync

The only interesting thing I found in the log is this line

{"error":"route c74e8041-479a-403d-8a54-9e5d6fc7feb2 refers to missing space a7d509d2-cc7a-429e-88f1-68c6996b0ff4","level":"error","msg":"fetching","time":"2020-05-19T08:15:49Z"}

I still think it's unrelated, as the error appears only once, but I tried it multiple times.

Expected behavior

route.networking.cloudfoundry.org objects should be deleted once the cf-route is gone.

cf-gitbot commented 4 years ago

We have created an issue in Pivotal Tracker to manage this:

https://www.pivotaltracker.com/story/show/172911044

The labels on this github issue will be updated when the story is started.

jenspinney commented 4 years ago

Hi @phil9909,

First of all, thank you for the clear bug report and deployment configuration breakdown. That really helps us to understand the issue quickly!

We have some general information that be may not be obvious and may help to contextualize this bug.

With that said (and the understanding the Route CR stuff is very much still under development), the behavior you're seeing is not desired behavior. We weren't able to determine the commit of cloud controller that was deployed in the version of cf-for-k8s that you're using, but we have confirmed that cf-for-k8s master today does deploy a version of cloud controller that should implement the deletion of Route CRs (specifically, it includes this recently added line to implement Route CR deletion: https://github.com/cloudfoundry/cloud_controller_ng/blob/7bca62db869e213a07c2423f27decebfcdfe4c3c/app/models/runtime/route.rb#L251). Since this is such new functionality, it's possible that the story just wasn't done yet in the version of cf-for-k8s you're using.

If you upgrade to the latest cf-for-k8s, are you still seeing this behavior?

Thanks, Jen & @KauzClay

phil9909 commented 4 years ago

If you upgrade to the latest cf-for-k8s, are you still seeing this behavior?

No, I don't see this behavior anymore. Thank you.