User story #9092
closedDon't break agent that do not support dry-run
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
Updated by Alexis Mousset about 8 years ago
- Related to User story #9225: Add support for negative checks and agent version checks in agent_requirements added
Updated by Alexis Mousset about 8 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.
Updated by Alexis Mousset about 8 years ago
- Related to User story #9226: Define a standard abort class in ncf added
Updated by Alexis Mousset about 8 years ago
- Related to User story #9230: Define a dry-run lib when default bodies are not supported added
Updated by Alexis Mousset about 8 years ago
- Status changed from New to Rejected
Fixed in related issues, closing.