Uploaded image for project: 'Fast Datapath Product'
  1. Fast Datapath Product
  2. FDP-607

Uninstantiated load balancer templates (lflow/LB) should not be parsed

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Normal Normal
    • FDP-25.A
    • None
    • ovn24.03
    • 2
    • False
    • Hide

      None

      Show
      None
    • False
    • Hide

      Given a load balancer or logical flow contains templates that may reference Chassis_Template_Var values and the `lexer_parse_template_string()` function is used to parse these templates, 

      When the `lexer_parse_template_string()` function encounters a template that cannot be instantiated due to missing Chassis_Template_Var values, 

      Then, the function should return a failure indication and any LB or lflow containing templates that cannot be expanded should not be further parsed.

      Show
      Given a load balancer or logical flow contains templates that may reference Chassis_Template_Var values and the `lexer_parse_template_string()` function is used to parse these templates,  When the `lexer_parse_template_string()` function encounters a template that cannot be instantiated due to missing Chassis_Template_Var values,  Then, the function should return a failure indication and any LB or lflow containing templates that cannot be expanded should not be further parsed.
    • rhel-sst-network-fastdatapath
    • ssg_networking
    • FDP 24.G, FDP 24.H, FDP 25.A
    • Moderate

      Originally reported at:

      https://github.com/ovn-org/ovn-kubernetes/issues/4301

      The lexer_parse_template_string() function is used to parse all templates in a LB VIP/backend or lflow.  However, if templates can't be instantiated on a given chassis (e.g., missing Chassis_Template_Var value) it's left untouched, e.g., (^NODEIP_IPv4_2) and further parsing is still attempted:

      if (lexer.token.type == LEX_T_TEMPLATE) {
                  ds_put_cstr(&expanded, smap_get_def(template_vars, lexer.token.s,                                                lexer.token.s));  <<< failure to expand leaves the token as is
                  if (template_vars_ref) {
                      sset_add(template_vars_ref, lexer.token.s);
                  } 

      This generates warnings when trying to parse the lflow or the IP address.

      Ideally, lexer_parse_template_string() should return a value to indicate whether templates have been successfully expanded.  The LBs/lflows that contain templates that cannot be expanded not should be further parsed.

              amusil@redhat.com Ales Musil
              dceara@redhat.com Dumitru Ceara
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: