Project

General

Profile

Actions

User story #9092

closed

Don't break agent that do not support dry-run

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

Status:
Rejected
Priority:
N/A
Category:
Web - Compliance & node report
Target version:
UX impact:
Suggestion strength:
User visibility:
Effort required:
Name check:
Fix check:
Regression:

Description

We must never run dry-run promises on an agent that do not support it.
We prefer breaking the agent than breaking the OS.

To do this we need:
- on the server to know the agent version
- on the server generate the dry-run code when the agent version is OK (>=4.0)
- on the server, generate an alternate call when the agent version is not OK: call no_dry_run_support() bundle
- in ncf (from the server) add a no_dry_run_support() bundle that warns the user and set an abort_class
- in ncf (from the server) add a condition to not load the dry_run lib if it is not supported (based on @agent_version and @rudder_version tag)

Then:
- if the dry-run is supported and detected as supported on the server > it will work with compliance OK
if the dry-run is supported and not detected as supported on the server > it will abort properly with compliance KO
if the dry-run is not supported and detected as supported on the server > it will break the agent with a "missing set_dry_run method" message with compliance KO
if the dry-run is not supported and not detected as supported on the server -> it will abort properly with compliance KO


Related issues 3 (0 open3 closed)

Related to Rudder - User story #9225: Add support for negative checks and agent version checks in agent_requirementsRejectedBenoît PECCATTEActions
Related to Rudder - User story #9226: Define a standard abort class in ncfReleasedBenoît PECCATTEActions
Related to Rudder - User story #9230: Define a dry-run lib when default bodies are not supportedReleasedJonathan CLARKEActions
Actions #1

Updated by Alexis Mousset over 7 years ago

  • Related to User story #9225: Add support for negative checks and agent version checks in agent_requirements added
Actions #2

Updated by Alexis Mousset over 7 years ago

  • Translation missing: en.field_tag_list set to Blocking 4.0

To provide better compatibility (for example for users not using Rudder, and wanting to use dry-run), we can provide the same interface, set_dry_run_mode(true|false), in the case default bodies are not supported.

  • When calling set_dry_run_mode("false") => do nothing, as it is supported on all agents
  • When calling set_dry_run_mode("true") => print an error, and define an abort class, as we DO NOT want to enforce policies that should be run in dry-run mode

Note: We do not manage the other dry-run classes this way, and we should add a warning about that in the dry-run lib.

Actions #3

Updated by Alexis Mousset over 7 years ago

Actions #4

Updated by Alexis Mousset over 7 years ago

  • Related to User story #9230: Define a dry-run lib when default bodies are not supported added
Actions #5

Updated by François ARMAND over 7 years ago

  • Assignee set to Alexis Mousset
Actions #6

Updated by Alexis Mousset over 7 years ago

  • Status changed from New to Rejected

Fixed in related issues, closing.

Actions

Also available in: Atom PDF