User story #9351
closedUser story #1808: Add an Audit mode to Rudder: only check properties, no modification on nodes
User story #7219: Add dry-run support to system techniques
Create a dedicated abort report when enforce is used in place of audit
Description
We must take into account the case where for an unknown reason (read: bug), the agent start to do "enforce" action where it should do "audit" one.
In that case, the agent must abort the remaining of the run (fails early and prevent further potential unwanted modification).
In that case, a report message must be produce and then special cased in the compliance calcul to explain to the user the problem.
So, we need to choose the message type.
I mainly see two possibilities:
- an error message (type = reulst_error) for a new component on common, with a dedicated message
- a log_info message, like startRun / endRun
In fact, what we would want to have is a "run_info" type (or "meta", or "protocol", or "control" which would be user in place of "log_info" for meta reporting about the run itself, and not the policies. So in that regard, "log_info" seem better than error.
Or perhaps we could have log_info, but on a dedicated component like "runinfo" ?
For information, this is start run / end run ex
rudder=> select * from ruddersysevents where executiontimestamp = '2016-10-13 10:35:59+02' and keyvalue in ('StartRun', 'EndRun'); id | executiondate | nodeid | directiveid | ruleid | serial | component | keyvalue | executiontimestamp | eventtype | policy | msg ----------+-------------------------------+--------+-------------+----------------------+--------+-----------+----------+------------------------+-----------+--------+----------------------------------------- 25278594 | 2016-10-13 10:36:52.457596+02 | root | common-root | hasPolicyServer-root | 254 | common | EndRun | 2016-10-13 10:35:59+02 | log_info | common | End execution with config [747884874] 25278478 | 2016-10-13 10:36:03.659206+02 | root | common-root | hasPolicyServer-root | 254 | common | StartRun | 2016-10-13 10:35:59+02 | log_info | common | Start execution with config [747884874] (2 lignes)
Files