Uploaded image for project: 'CFEngine Community'
  1. CFEngine Community
  2. CFE-3676

Should cf-execd call PolicyResolve()?

    XMLWordPrintable

    Details

    • Type: Knowledge acquisition
    • Status: Open
    • Priority: Higher
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: cf-execd
    • Labels:
      None
    • Story Points:
      3

      Description

      cf-execd does this when loading its configuration:

      *policy = LoadPolicy(ctx, config);                                                                                                                                                                         
      ExecConfigDestroy(*exec_config);                                                                                                                                                                           
      ExecdConfigDestroy(*execd_config);                                                                                                                                                                         
                                                                                                                                                                                                                         
      *exec_config = ExecConfigNew(!ONCE, ctx, *policy);                                                                                                                                                         
      *execd_config = ExecdConfigNew(ctx, *policy);                                                                                                                                                              
      

      while cf-serverd does this:

      Policy *policy = SelectAndLoadPolicy(config, ctx, false, false);                                                                                                                                               
      PolicyResolve(ctx, policy, config);                                                                                                                                                                            
      

      While working on ENT-7090 I noticed that variables in values of constraints from body control server were not expanded. Is the missing PolicyResolve() the reason? Is variable expansion working in body control executor constraints values or is it just working for some that explicitly use ExpandScalar() or something similar?

        Attachments

          Release management

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              vpodzime Vratislav Podzimek
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated: