Code Monkey home page Code Monkey logo

Comments (9)

shawnh2 avatar shawnh2 commented on June 12, 2024 1

Found the reason that causing this problem, and it does not seems like a bug to me, so closing this one now.

from gateway.

shawnh2 avatar shawnh2 commented on June 12, 2024 1

It is also happening when applying resources, I have seen this in the past, is this only happening with merged gateways @shawnh2?

This behaviour seems similar to what was fixed before #2395

Since we changed the watchable interface to a map, which is unordered, wonder what is causing these unnecessary updates.

yes, it only happens with merge gateways. it's mainly caused by the step 2 which I described above.

from gateway.

shawnh2 avatar shawnh2 commented on June 12, 2024

This problem will not exist if the Gateways and HTTPRoutes got deleted first, then delete the rest GatewayClass and EP.

If the GatewayClass and EP got deleted first, the merge gateways feature fails, so all 3 gateways will be created separately.

So by applying k delete -f mg.yaml, the GatewayClass and EP will be deleted first, causing all 3 gateways to be created separately and then got deleted immediately.

from gateway.

arkodg avatar arkodg commented on June 12, 2024

hey @shawnh2 if the GWC gets deleted first, why will the GWs get created again ?

from gateway.

arkodg avatar arkodg commented on June 12, 2024

maybe related to #2659

from gateway.

shawnh2 avatar shawnh2 commented on June 12, 2024

hey @shawnh2 if the GWC gets deleted first, why will the GWs get created again ?

by answering this question, i toke a closer look at EG reconcile method, and here is what i found.

  1. if the GWC got deleted first, it will still appears in acceptedGCs list, because it won't pass the finializer check:

    if !gwClass.DeletionTimestamp.IsZero() &&
    !slice.ContainsString(gwClass.Finalizers, gatewayClassFinalizer) {

  2. then EG will take the deleted GWC name as index to list the GTWs that associated with, we can still get all the GTWs here since they are not be deleted

    if err := r.client.List(ctx, gatewayList, &client.ListOptions{
    FieldSelector: fields.OneTermEqualSelector(classGatewayIndex, acceptedGC.Name),

    so all the GTWs will be recreated like I described above

  3. we cannot fall into this logic to remove the finializer for GWC, so the GWC will never pass the finializer check in step 1, remain accepted

    if len(resourcesMap[acceptedGC.Name].Gateways) == 0 {

from gateway.

shawnh2 avatar shawnh2 commented on June 12, 2024

I'm not sure what expected behavior of this should be?

IMO, at least all the GTWs should be in NOT ACCEPT status and all the related resources like Service, Deployements etc should not be recreated.

from gateway.

cnvergence avatar cnvergence commented on June 12, 2024

It is also happening when applying resources, I have seen this in the past, is this only happening with merged gateways @shawnh2?
This behaviour seems similar to what was fixed before #2395
Since we changed the watchable interface to a map, which is unordered, wonder it is causing these unnecessary updates.

from gateway.

cnvergence avatar cnvergence commented on June 12, 2024

I see, this is matching the deletion issue

from gateway.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.