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

Bodies should be able to inherit from a body of the same name in another namespace

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Higher
    • Resolution: Unresolved
    • Affects Version/s: 3.18.1, 3.19.0
    • Fix Version/s: None
    • Component/s: cf-agent
    • Labels:
      None

      Description

      I should be able to define a body of the same name as those in the standard library in a non default namespace and then inherit from the body of the same name in the default namespace.

      For example:

        bundle agent __main__
        {
          files:
              "/tmp/rxdirs/B/."
                depth_search => recurse_with_base( "inf" ),
                perms => my:m( "0500" );
        }
        
        body file control
        {
              namespace => "my";
        }
        body perms m( mode )
        # @brief Custom body with behavior of body perms m from standard library with rxdirs enabled
        {
                inherit_from => default:m( "$(mode) ");
                rxdirs => "true";
        }
        
        body file control
        {
                namespace => "default";
        }
      

      Standalone Example: rxdirs-inherit-from-same-name.cf

      However, doing so results in "error: EvalContextAppendBodyParentsAndArgs: self body inheritance in m->m, aborting".

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            a10042 Nick Anderson
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated: