Re: Package promise had no package_method attribute

Beto <[email protected]> Fri, 19 Jul 2024 11:46:48 -0700 (PDT)
Newsgroups gmane.comp.sysutils.cfengine.general
Message-ID <[email protected]>
Evidently the control_executor_mailfilter_exclude wasn't working because I 
used this example from the reference:

{
  "variables": {
    "default:def.control_executor_mailfilter_exclude": {
      "value": [ ".*ps output line.*", ".*regline.*" ]
    }
  }
}

I think this should be:

{
  "variables": {
    "def.control_executor_mailfilter_exclude": 
     [ ".*ps output line.*", ".*regline.*" ]
    }
  }
}

This is what I have now and it's working fine:

        "control_executor_mailfilter_exclude": [ ],
        "control_executor_mailfilter_include": [
          "\\s*(Unable to establish|R:).*",
          "\\s*error:\\s+.*installing.*",
          "\\s*error:\\s+.*readyaml.*",
          "\\s*info: Purging.*"
        ],

On Thursday, July 18, 2024 at 1:15:56 PM UTC-5 Beto wrote:

This is in def.json vars section:

        "control_executor_mailfilter_exclude": {
          "value": [ ".*no package_method attribute.*", ".*regline.*" ]
        }

Yeah, you're right about inform.  Before the upgrade I had mail filters in 
cf_execd.cf that suppressed all but error messages.

I've always used inform => true in cf_agent.cf.  This made it easy to 
deflect queries from coworkers when they break something, and the 
inevitable question arises: "did cfengine change...?".  I tell them to grep 
/var/cfengine/outputs lol.



On Wednesday, July 17, 2024 at 2:46:36 PM UTC-5 [email protected] 
wrote:

Hey Beto, 

You mentioned trying this … 
"control_executor_mailfilter_exclude": { "value": [ ".*no package_method 
attribute.*" ] 

That looks like Augments format to me. Specifically, it looks like the 
newer format of the variables key. Is this in def.json or is it in 
host_specific.json ? (ref 
https://docs.cfengine.com/docs/3.21/reference-language-concepts-augments.html#augments-files) 


If it's in host_specific.json then I think you will need to adjust it to 
specify the default namespace and the def bundle scope like this: 
"default:def.control_executor_mailfilter_exclude": { "value": [ ".*no 
package_method attribute.*" ] 

Another thing to be sure of is that cf-execd has been re-started since you 
changed that setting. 

We see these messages in email and /var/cfengine/outputs. 

If the mailfitler exclude is properly picked up you should not see them in 
email, just in /var/cfengine/outputs. 

We have inform => "true" in controls/cf_agent.cf 

Generally I discourage that for unattended periodic executions, especially 
combined with email it can create a lot of noise that mail admins might not 
love (but depends very much on your scale, and how many changes CFEngine is 
generally making). 

-- 
You received this message because you are subscribed to the Google Groups "help-cfengine" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/help-cfengine/0a369387-a155-4440-983f-a242e8f1566cn%40googlegroups.com.