Bug #11316
closedBug #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
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É about 7 years ago
- Status changed from New to In progress
- Assignee set to Vincent MEMBRÉ
Updated by Vincent MEMBRÉ about 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
Updated by Vincent MEMBRÉ about 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 !
Updated by Vincent MEMBRÉ about 7 years ago
- Status changed from Pending technical review to Pending release
Applied in changeset rudder-agent|c9ddb20ccc38f315e29f511c95a1860c45ba3261.
Updated by I C about 7 years ago
Hello,
Problem also present in Rudder agent version: 4.1.7~rc1~git201708290157-stretch0
Updated by Vincent MEMBRÉ about 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
Updated by Vincent MEMBRÉ about 7 years ago
- Status changed from Pending release to Released