Bug #8606
closedCondition from command: false codes is actually "repaired"
Description
Hi,
there's a mismatch in "Condition from command", it behaves much like "command execution result"
The help says:
false_codes:
List of codes that produce a false status separated with commas (ex: 3,4,6)
(I entered "1")
But if you look at the agent output you'll find this:rudder info: Command related to promiser 'grep -qw /var/lib/one /proc/mounts' returned code defined as promise repaired 1
This looks like a bug.
Updated by Florian Heigl over 8 years ago
footnote, if i've run into a deprected method again (I remember I had something like it last year: please mark them as deprecated in NCF where it's visible. I just can't keep track it in my head only)
Updated by Alexis Mousset over 8 years ago
Hi Florian,
The command promise is repaired (we use the repaired and kept outcomes to create the right condition classes, as we want to keep error for unknown codes) but the ${condition_prefix}_false
class should be defined.
It made me see that the HTML doc is broken for this generic method (I just opened #8610 to fix this), and is not understandable currently, you can read the source for explanation before it gets fixed.
I will change the help to explain the repaired/ok outcomes, do you think it would enough to make things clear?
Updated by Alexis Mousset over 8 years ago
- Related to Bug #8610: Some usage docs are not correctly generated in html output added
Updated by Florian Heigl over 8 years ago
Hi,
the heading was the misleading part for me - i assumed false would relate to "error".
Fixing the html will definitely help, not sure if it figure out what the method does while looking at ncf.
if uncertain close this bug, the improved doc should help some.
Updated by Alexis Mousset over 8 years ago
- Status changed from New to Rejected
Fixed the doc build issue and the unclear doc, closing. I also opened #8612 to integrate the doc directly into the interface.
Updated by Alexis Mousset over 2 years ago
- Project changed from 41 to Rudder
- Category set to Generic methods
- Priority set to 0