Skip to content

Research: Health Monitor for LB with OVN provider #268

Closed

Description

@garloff

As a k8s ingress user, I want to see real client IPs in the ingress.
To make this work without proxy-protocol workarounds, we must ensure

  • that we use externalTrafficPolicy: local (otherwise we see the kube-proxy forwarded source IPs)
  • have a health-monitor enabled (otherwise the nodes without the nginx will receive and drop traffic)
  • have a loadbalancer that does preserve the client IPs (by working on layer 3 or similar ways to steer the flows)

The octavia load balancer implemented by the OVN provider does preserve the client IPs nicely, see #251
It has a number of advantages (lightweight, quick to provision), but the documentation states that it does not support a healthmonitor. OVN itself has the notion of healthchecks, which should allow an efficient way to implement some health monitor functionality. It does not seem to be wired up yet, though.

Activity

  1. added
    question
    on Feb 8, 2023
  2. added
    IaaS
    on Feb 8, 2023
  3. garloff commented on Feb 9, 2023

    @garloff
    MemberAuthor

    It was merged on 2021-07-23 with commit b25bc5773486bdb6e67d30dede34fbabf81606ec (tag: 1.1.0)
    So we should have a working health monitor -- I need to check why it appeared not to do anything (never set a member to offline and the pool to degraded) in my testing.

  4. garloff commented on Feb 9, 2023

    @garloff
    MemberAuthor

    In gx-scs, the health monitor can be enabled with an ovn provided LB (and pool), yet it seems to be ineffective.

  5. garloff commented on Feb 12, 2023

    @garloff
    MemberAuthor

    In a Cloud-in-a-Box test setup, I can see the health monitor on OVN provider loadbalancer detect that members are unhealthy:

                    "pools": [                                                                                                              
                        {                                                                                                                   
                            "id": "a22a8bf8-1cf5-4185-8d17-81f48b4d353b",                                                                   
                            "name": "test-pool",                                                                                            
                            "provisioning_status": "ACTIVE",                                                                                
                            "operating_status": "DEGRADED",
                            "health_monitor": {
                                "id": "a3761d9a-a9b2-4d73-9086-129b7535dbdc",
                                "name": "",
                                "type": "TCP",
                                "provisioning_status": "ACTIVE",
                                "operating_status": "ONLINE"
                            },
                            "members": [
                                {
                                    "id": "90dd100e-ed9d-4c1b-8877-afc985bff5dd",
                                    "name": "test4",
                                    "operating_status": "ERROR",
                                    "provisioning_status": "ACTIVE",
                                    "address": "192.168.224.119",
                                    "protocol_port": 80
                                },
                                {
                                    "id": "a909f074-1953-4be5-85f3-06f3cf9000bf",
                                    "name": "test3",
                                    "operating_status": "ONLINE",
                                    "provisioning_status": "ACTIVE",
                                    "address": "192.168.224.196",
                                    "protocol_port": 80
                                },
                                {
                                    "id": "ab73eab8-15e4-4862-a82b-51fd4f61e7b8",
                                    "name": "test1",
                                    "operating_status": "ONLINE",
                                    "provisioning_status": "ACTIVE",
                                    "address": "192.168.224.84",
                                    "protocol_port": 80
                                },
                                {
                                    "id": "fb37ae21-cc4e-41fa-9696-f0e386f45e1f",
                                    "name": "test2",
                                    "operating_status": "ERROR",
                                    "provisioning_status": "ACTIVE",
                                    "address": "192.168.224.79",
                                    "protocol_port": 80
                                }
                            ]
                        }
                    ]

    which is exactly what I was hoping for.

    Two remaining problems:

    • In the openstack-health-monitor tests on gx-scs, this did not happen. This might be due to a different topology w.r.t. subnets used by LB VIP and members or due to differences in the cloud setup.
    • The ERROR operating status of the members did not cause the LB to no longer distribute requests to the ERROR'ed members -- oops! So in the above example, 50% of the requests fail due to 2/4 ERROR'ed members.
  6. garloff commented on Feb 14, 2023

    @garloff
    MemberAuthor

    On gxscs, the ERROR operating status is not only detected, but also working: The ERROR'ed members no longer get requests.

  7. garloff commented on Feb 14, 2023

    @garloff
    MemberAuthor

    Setting the subnet of the members correctly causes the loadbalancer's health-monitor on gx-scs to correctly detect the ERROR status of the members.

  8. garloff commented on Feb 14, 2023

    @garloff
    MemberAuthor

    When connecting to the LB's VIP address directly, all requests succeed, i.e. no requests are forwarded to the backend members with ERROR operating status.
    However, when connecting to the floating IP associated with the LB's VIP, this is not the case.

    This is very very confusing and probably caused by some magic in OVN.
    Speculation based on superficial OVN knowledge:

    • OVN does the floating IP attachment by adding flows directly for the floating IP
    • The ERROR'ed operating status causes OVN to disable the flows for the VIP, but not for the associated floating IP
  9. garloff commented on Feb 14, 2023

    @garloff
    MemberAuthor
  10. added
    bug
    upstream
    and removed
    question
    on Feb 14, 2023
  11. 10 remaining items

  12. fkr commented on May 17, 2023

    @fkr
    Member

    osism/issues#499 - @garloff is still able to reproduce this on gx-scs.

  13. added
    Sprint Copenhagen
    on May 17, 2023
  14. fkr commented on May 31, 2023

    @fkr
    Member

    To be finalized and checked until EOW

  15. matfechner commented on Jun 4, 2023

    @matfechner

    i can reproduce it, too. I've investigated the octavia container and the needed patch is included, i guess that the tcp -health monitor itself could have an issue or a bug, that should discuss upstream

  16. artificial-intelligence commented on Jun 14, 2023

    @artificial-intelligence

    why wasn't bug https://bugs.launchpad.net/neutron/+bug/1997418 reopened if it still can be reproduced? did anybody contact upstream maintainers over different channels about this problem?

  17. fkr commented on Jun 14, 2023

    @fkr
    Member

    @matfechner please re-open upstream and f'up.

  18. added
    Sprint Edmonton
    on Jun 14, 2023
  19. fkr commented on Jul 19, 2023

    @fkr
    Member

    @artificial-intelligence will do a backport for Zed so that we have a chance of getting that into 5.3.0

  20. added
    Sprint Gothenburg
    on Jul 19, 2023
  21. artificial-intelligence commented on Jul 20, 2023

    @artificial-intelligence

    all upstream patches mentioned above have been merged.

  22. berendt commented on Jul 26, 2023

    @berendt

    Will be part of OSISM 5.3.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

IaaSSprint CopenhagenSprint EdmontonSprint Gothenburgbugupstream

Type

No type

Projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions