Project

General

Profile

Actions

Bug #9807

closed

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 over 7 years ago. Updated almost 2 years ago.

Status:
Released
Priority:
N/A
Category:
Agent
Target version:
Severity:
Minor - inconvenience | misleading | easy workaround
UX impact:
User visibility:
Operational - other Techniques | Technique editor | Rudder settings
Effort required:
Very Small
Priority:
0
Name check:
Fix check:
Regression:

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 2 (0 open2 closed)

Bug #11088: Backport "rudder.json" system variable files to 3.1ReleasedVincent MEMBRÉActions
Bug #11316: syntax error in lib common.shReleasedNicolas CHARLESActions

Related issues 4 (0 open4 closed)

Related to Rudder - Bug #10751: Add a warn message when agent run is incompleteReleasedBenoît PECCATTEActions
Related to Rudder - Architecture #11085: Adapt CLI to accept new end run formatReleasedNicolas CHARLESActions
Blocked by Rudder - Bug #10649: 'rudder agent info' should report compliance mode (full-compliance / changes-only / reports-disabled)ReleasedNicolas CHARLESActions
Blocks Rudder - Bug #11285: When running "rudder agent inventory", all other reports are missing on the serverReleasedNicolas CHARLESActions
Actions #1

Updated by Vincent MEMBRÉ about 7 years ago

  • Target version changed from 3.1.18 to 3.1.19
Actions #2

Updated by Benoît PECCATTE about 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
Actions #3

Updated by Nicolas CHARLES about 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

Actions #4

Updated by Nicolas CHARLES about 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

Actions #5

Updated by Vincent MEMBRÉ about 7 years ago

  • Target version changed from 3.1.19 to 3.1.20
Actions #6

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

Actions #7

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

Actions #8

Updated by Jonathan CLARKE about 7 years ago

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

Updated by Vincent MEMBRÉ almost 7 years ago

  • Target version changed from 3.1.20 to 3.1.21
Actions #10

Updated by François ARMAND almost 7 years ago

  • Related to Bug #10751: Add a warn message when agent run is incomplete added
Actions #11

Updated by Vincent MEMBRÉ almost 7 years ago

  • Target version changed from 3.1.21 to 3.1.22
  • Priority changed from 33 to 32
Actions #12

Updated by Benoît PECCATTE almost 7 years ago

  • Priority changed from 32 to 45
Actions #13

Updated by François ARMAND almost 7 years ago

  • Translation missing: en.field_tag_list set to Sponsored
  • Priority changed from 45 to 68
Actions #14

Updated by François ARMAND almost 7 years ago

Actions #15

Updated by François ARMAND almost 7 years ago

  • Assignee set to Alexis Mousset
Actions #16

Updated by Benoît PECCATTE almost 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.

Actions #17

Updated by Vincent MEMBRÉ over 6 years ago

  • Target version changed from 3.1.22 to 3.1.23
  • Priority changed from 68 to 67
Actions #18

Updated by Alexis Mousset over 6 years ago

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

Updated by Alexis Mousset over 6 years ago

  • Status changed from New to In progress
  • Priority changed from 67 to 66
Actions #20

Updated by Alexis Mousset over 6 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
Actions #21

Updated by Alexis Mousset over 6 years ago

  • Status changed from Pending technical review to Pending release
Actions #22

Updated by Vincent MEMBRÉ over 6 years 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.

Actions #23

Updated by Vincent MEMBRÉ over 6 years ago

  • Status changed from Pending release to Released
Actions #24

Updated by Alexis Mousset almost 2 years ago

  • Priority changed from 65 to 0
Actions

Also available in: Atom PDF