Bug #9807
closedWhen in changes only mode, with no heartbeat, 'rudder agent run' outputs 'error: Rudder agent was interrupted during execution by a fatal error.'
Description
In the case where an agent is in changes only mode, but does output some messages (repaired, errors, or just the heartbeat), the output from "rudder agent run" is fine.
However, is the agent isn't due to send a heartbeat, and there a re no repaired/error messages, there is exactly 0 lines of output from the agent run. In this case, 'rudder agent run' outputs an error saying "error: Rudder agent was interrupted during execution by a fatal error."
This is because the reports.awk script looks for the "end run" message, but never finds it.
We should detect the reporting mode and use this in the awk script to check if we're in changes only mode, and output an info message instead that says something like 'This agent is in changes only mode - no components caused repairs or errors, so no output statistics can be reported. Run with -i to see log messages.'
Updated by Vincent MEMBRÉ almost 8 years ago
- Target version changed from 3.1.18 to 3.1.19
Updated by Benoît PECCATTE over 7 years ago
- Severity set to Minor - inconvenience | misleading | easy workaround
- User visibility set to Operational - other Techniques | Technique editor | Rudder settings
- Priority set to 16
Updated by Nicolas CHARLES over 7 years ago
- Severity changed from Minor - inconvenience | misleading | easy workaround to Major - prevents use of part of Rudder | no simple workaround
- Priority changed from 16 to 0
I'm improving priority, as it wrongly says something is broken, when it is not
Updated by Nicolas CHARLES over 7 years ago
a possible way would be to have a simple end reports, saying that everything is ok (a small "ok" or something), not in the Rudder format so that it's not sent via syslog, and that would be catched by the rudder command
or patching the agent to get a meaningful exit code
Updated by Vincent MEMBRÉ over 7 years ago
- Target version changed from 3.1.19 to 3.1.20
Updated by Jonathan CLARKE over 7 years ago
- Severity changed from Major - prevents use of part of Rudder | no simple workaround to Minor - inconvenience | misleading | easy workaround
- Effort required set to Very Small
- Priority changed from 0 to 33
Nicolas CHARLES wrote:
I'm improving priority, as it wrongly says something is broken, when it is not
That is the exact definition of "misleading", so requalifying as a minor bug - our focus must remain with priority on bugs that break something. This remains important, and is quite confusing, but quick to fix, so I've set it to a "very small", which means we'll get to it faster.
Updated by Jonathan CLARKE over 7 years ago
- Subject changed from When in changes only mode, there is not start/end reports, and agent output returns a fatal error to When in changes only mode, with no heartbeat, 'rudder agent run' outputs 'error: Rudder agent was interrupted during execution by a fatal error.'
- Description updated (diff)
Updated description to match tests we did.
Updated by Jonathan CLARKE over 7 years ago
- Blocked by Bug #10649: 'rudder agent info' should report compliance mode (full-compliance / changes-only / reports-disabled) added
Updated by Vincent MEMBRÉ over 7 years ago
- Target version changed from 3.1.20 to 3.1.21
Updated by François ARMAND over 7 years ago
- Related to Bug #10751: Add a warn message when agent run is incomplete added
Updated by Vincent MEMBRÉ over 7 years ago
- Target version changed from 3.1.21 to 3.1.22
- Priority changed from 33 to 32
Updated by François ARMAND over 7 years ago
- Translation missing: en.field_tag_list set to Sponsored
- Priority changed from 45 to 68
Updated by François ARMAND over 7 years ago
- Related to Architecture #11085: Adapt CLI to accept new end run format added
Updated by Benoît PECCATTE over 7 years ago
For 3.1 we should be able to extract the information directly from the technique.
Since 3.1 is in maintenance mode, it shouldn't change a lot.
So extracting the value will solve the problem without too much work.
Solutions: grep on thye technique, or write to a file directly in the technique.
Updated by Vincent MEMBRÉ over 7 years ago
- Target version changed from 3.1.22 to 3.1.23
- Priority changed from 68 to 67
Updated by Alexis Mousset over 7 years ago
- Blocks Bug #11285: When running "rudder agent inventory", all other reports are missing on the server added
Updated by Alexis Mousset about 7 years ago
- Status changed from New to In progress
- Priority changed from 67 to 66
Updated by Alexis Mousset about 7 years ago
- Status changed from In progress to Pending technical review
- Assignee changed from Alexis Mousset to Nicolas CHARLES
- Pull Request set to https://github.com/Normation/rudder-agent/pull/129
Updated by Alexis Mousset about 7 years ago
- Status changed from Pending technical review to Pending release
Applied in changeset rudder-agent|fed7991ddedcac7ee35d189d5c4d63d18d9e8661.
Updated by Vincent MEMBRÉ about 7 years ago
- Priority changed from 66 to 65
Updated by Vincent MEMBRÉ about 7 years ago
- Status changed from Pending release to Released