Project

General

Profile

Bug #9807

When in changes only mode, with no heartbeat, 'rudder agent run' outputs 'error: Rudder agent was interrupted during execution by a fatal error.'

Added by Alexis MOUSSET 11 months ago. Updated 2 months ago.

Status:
Released
Priority:
N/A
Category:
Agent
Target version:
Target version (plugin):
Severity:
Minor - inconvenience | misleading | easy workaround
User visibility:
Operational - other Techniques | Technique editor | Rudder settings
Effort required:
Very Small
Priority:
65
Tags: Sponsored

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.'


Subtasks

Bug #11088: Backport "rudder.json" system variable files to 3.1ReleasedVincent MEMBRÉ

Bug #11316: syntax error in lib common.shReleasedNicolas CHARLES


Related issues

Related to Rudder - Bug #10751: incorrect reporting with partial runs New
Related to Rudder - Architecture #11085: Adapt CLI to accept new end run format Released
Blocked by Rudder - Bug #10649: 'rudder agent info' should report compliance mode (full-compliance / changes-only / reports-disabled) Released
Blocks Rudder - Bug #11285: When running "rudder agent inventory", all other reports are missing on the server Released

Associated revisions

Revision fed7991d
Added by Alexis MOUSSET 3 months ago

Fixes #9807: When in changes only mode, with no heartbeat, 'rudder agent run' outputs 'error: Rudder agent was interrupted during execution by a fatal error.'

History

#1 Updated by Vincent MEMBRÉ 9 months ago

  • Target version changed from 3.1.18 to 3.1.19

#2 Updated by Benoît PECCATTE 8 months ago

  • Severity set to Minor - inconvenience | misleading | easy workaround
  • User visibility set to Operational - other Techniques | Technique editor | Rudder settings
  • Priority set to 16

#3 Updated by Nicolas CHARLES 7 months 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

#4 Updated by Nicolas CHARLES 7 months 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

#5 Updated by Vincent MEMBRÉ 7 months ago

  • Target version changed from 3.1.19 to 3.1.20

#6 Updated by Jonathan CLARKE 7 months 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.

#7 Updated by Jonathan CLARKE 7 months 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.

#8 Updated by Jonathan CLARKE 7 months ago

  • Blocked by Bug #10649: 'rudder agent info' should report compliance mode (full-compliance / changes-only / reports-disabled) added

#9 Updated by Vincent MEMBRÉ 6 months ago

  • Target version changed from 3.1.20 to 3.1.21

#10 Updated by François ARMAND 6 months ago

  • Related to Bug #10751: incorrect reporting with partial runs added

#11 Updated by Vincent MEMBRÉ 5 months ago

  • Target version changed from 3.1.21 to 3.1.22
  • Priority changed from 33 to 32

#12 Updated by Benoît PECCATTE 5 months ago

  • Priority changed from 32 to 45

#13 Updated by François ARMAND 5 months ago

  • Tags set to Sponsored
  • Priority changed from 45 to 68

#14 Updated by François ARMAND 5 months ago

#15 Updated by François ARMAND 5 months ago

  • Assignee set to Alexis MOUSSET

#16 Updated by Benoît PECCATTE 4 months 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.

#17 Updated by Vincent MEMBRÉ 3 months ago

  • Target version changed from 3.1.22 to 3.1.23
  • Priority changed from 68 to 67

#18 Updated by Alexis MOUSSET 3 months ago

  • Blocks Bug #11285: When running "rudder agent inventory", all other reports are missing on the server added

#19 Updated by Alexis MOUSSET 3 months ago

  • Status changed from New to In progress
  • Priority changed from 67 to 66

#20 Updated by Alexis MOUSSET 3 months 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

#21 Updated by Alexis MOUSSET 3 months ago

  • Status changed from Pending technical review to Pending release

#22 Updated by Vincent MEMBRÉ 2 months ago

  • Priority changed from 66 to 65

This bug has been fixed in Rudder 3.1.23, 4.1.7 and 4.2.0~rc1 which were released today.

#23 Updated by Vincent MEMBRÉ 2 months ago

  • Status changed from Pending release to Released

Also available in: Atom PDF