Project

General

Profile

Actions

Architecture #6101

closed

We should be able to call ncf generic methods more than once

Added by Benoît PECCATTE about 9 years ago. Updated almost 2 years ago.

Status:
Rejected
Priority:
N/A
Assignee:
-
Category:
Generic methods
Target version:
Effort required:
Name check:
Fix check:
Regression:

Description

Some ncf methods break their reporting if they are called more than once.

This is because we do not identify properly parameters that describe the object we are working on from parameters that describe its state.
For now, the first parameter is taken as a key for the object and the rest as a state.

But this doesn't work for everything. For example, file_ensure_lines_present takes 2 parameters : file and lines.
They both describe the object : those lines in this file; the state is described here in the function name : be present.
So we should be able to call this function twice with the same file but with different lines.

This impacts the way we do reporting, since we use the first parameter as the reporting key.
And we must consider the interaction between cfengine and ncf generic method signature since cfengine may decide to not call twice a generic method with the same parameters.


Related issues 4 (0 open4 closed)

Related to Rudder - Bug #5991: On a freshly installed node, rsyslog is dropping messagesReleasedBenoît PECCATTE2014-12-12Actions
Related to Rudder - User story #6099: We should be able to call actions as many times as we wantResolvedFélix DALLIDETActions
Related to Rudder - Architecture #7155: Stable class identifierRejectedActions
Is duplicate of Rudder - Bug #4797: When using multiple times the same generic method on the same object, the reporting will be broken for all of themRejectedActions
Actions

Also available in: Atom PDF