Project

General

Profile

Actions

Architecture #6101

closed

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

Added by Benoît PECCATTE over 7 years ago. Updated 4 months ago.

Status:
Rejected
Priority:
N/A
Assignee:
-
Category:
Generic methods
Target version:
Effort required:
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 (1 open3 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 identifierNewActions
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 #1

Updated by Alexis Mousset about 6 years ago

  • Is duplicate of Bug #4797: When using multiple times the same generic method on the same object, the reporting will be broken for all of them added
Actions #2

Updated by Alexis Mousset about 6 years ago

  • Category set to Generic methods
Actions #3

Updated by Alexis Mousset over 5 years ago

  • Target version changed from 0.x to master
Actions #4

Updated by Alexis Mousset over 5 years ago

Actions #5

Updated by Alexis Mousset over 5 years ago

  • Status changed from New to Rejected

It will be fixed by the new class prefix in #7155, closing.

Actions #6

Updated by Alexis Mousset 4 months ago

  • Target version changed from master to ncf-1.2
Actions #7

Updated by Alexis Mousset 4 months ago

  • Project changed from 41 to Rudder
  • Category changed from Generic methods to Generic methods
Actions

Also available in: Atom PDF