Who cares about that promise?
Today, I want to highlight one of the lightweight knowledge management features in CFEngine. That is, Promisees, also known as Stakeholders. Promisees are references to things that might care about a specific promise. And they can be attached to any promise. Let’s take a look at a contrived example:
bundle agent __main__
{
methods:
"example_promisees" -> { "Feature Friday #21" };
}
bundle agent example_promisees
{
reports:
"Happy Friday!";
}
From the example above, we can see that the methods
promise - promising to run the example_promisees
bundle - has Feature Friday #21
defined as the only promisee. It provides us with a hint that Feature Friday #21 cares that the bundle will be run. Promisees have no effect on the execution of the policy. However, they provide breadcrumbs that can be useful when the policy is re-visited.
In CFEngine Enterprise, promisees are reported back to the hub. Hence, you can run queries against them. In practice, they often contain IDs for ticketing systems, for example:
"total" -> { "CFE-2797", "CFE-2803" }
string => execresult("/usr/bin/lparstat -i | awk '/Online Memory/ { print $4 }'", "useshell"),
meta => { "inventory", "attribute_name=Memory size (MB)" };
From this snippet from the Masterfiles Policy Framework, we can see the total
variable is defined with a reference to CFE-2797 and CFE-2803. This gives us a quick way to find further information regarding its presence. In this case, we seem to be working around an issue where cf-monitord
does not collect memory information used for inventory of Memory size (MB)
on AIX.
It’s a free-form field, you can put any information that might be necessary to look for further information about a promise including names, URLs, and phone numbers.
Happy Friday! 🎉