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 7 years ago. Updated over 7 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 #1

Updated by Vincent MEMBRÉ over 7 years ago

  • Status changed from New to In progress
  • Assignee set to Vincent MEMBRÉ
Actions #2

Updated by Vincent MEMBRÉ over 7 years ago

  • Status changed from In progress to Pending technical review
  • Assignee changed from Vincent MEMBRÉ to Nicolas CHARLES
  • Pull Request set to https://github.com/Normation/rudder-agent/pull/131
Actions #3

Updated by Vincent MEMBRÉ over 7 years ago

  • Subject changed from When in changes only mode, with no heartbeat, 'rudder agent run' outputs 'error: Rudder agent was interrupted during execution by a fatal error.' to syntax error in lib common.sh

elif, withthout then !

Actions #4

Updated by Vincent MEMBRÉ over 7 years ago

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

Updated by I C over 7 years ago

Hello,

Problem also present in Rudder agent version: 4.1.7~rc1~git201708290157-stretch0

Actions #6

Updated by Vincent MEMBRÉ over 7 years ago

Hello Ilan,

Unfortunately, the agent version available is an agent from the 29th of august which does not contain the fix, a new package is available in nightly repository which should be ok rudder-agent_4.1.7~rc1~git201708310931-stretch0_amd64.deb

Actions #7

Updated by I C over 7 years ago

Ok thanks Vincent

Actions #8

Updated by Vincent MEMBRÉ over 7 years ago

  • Status changed from Pending release to Released

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

Actions

Also available in: Atom PDF