Project

General

Profile

Actions

Bug #11316

closed

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

syntax error in lib common.sh

Added by Vincent MEMBRÉ over 6 years ago. Updated over 6 years ago.

Status:
Released
Priority:
N/A
Category:
Agent
Target version:
Severity:
UX impact:
User visibility:
Effort required:
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.'

Actions

Also available in: Atom PDF