Project

General

Profile

Actions

Bug #17268

closed

Agent run exit code should be 0 when agent runs properly (no breaking/fatal errors)

Added by Victor Héry over 4 years ago. Updated over 4 years ago.

Status:
Released
Priority:
N/A
Category:
Agent
Target version:
Severity:
Minor - inconvenience | misleading | easy workaround
UX impact:
User visibility:
Effort required:
Priority:
0
Name check:
To do
Fix check:
Checked
Regression:

Description

Hello,

I have noticed a strong behaviour of the rudder agent, present on v6.0.5 but not on v5.0.17.

When running rudder agent run, and everything works, it returns an exit code 1 :

# rudder agent run
Rudder agent 6.0.5-debian9
## Summary #####################################################################
58 components verified in 8 directives
   => 47 components in Enforce mode
      -> 43 compliant
      -> 2 repaired
      -> 2 not-applicable
   => 11 components in Audit mode
      -> 3 compliant
      -> 6 not-applicable
      -> 2 non-compliant
Execution time: 34.18s
################################################################################
# echo $?
1

There is no error, only repaired components, so I do not understand why this return 1.

A tedious impact is any autmating system (ansible, or rudder itself) used to deploy and run the agent, think it fails where it is not :-/
I found no information about return code in the man page

Is this behaviour normal, and if yes, do you know why?

Thanks!


Subtasks 1 (0 open1 closed)

Bug #17283: Only errors preventing the agent from properly running should set an error return codeReleasedBenoît PECCATTEActions
Actions

Also available in: Atom PDF