Project

General

Profile

Actions

Bug #11047

closed

rudder agent update -q bad exit code

Added by Janos Mattyasovszky over 6 years ago. Updated about 6 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:
Fix check:
Regression:

Description

If you run rudder agent run -q, it exits 1, so you cannot use it to check silently if it succeeded or not.

Additionally, it also reports OK with exit code 0if you run it without -q but it is not able to update the policies:

# rudder agent update
R: *********************************************************************************
* rudder-agent could not get an updated configuration from the policy server.   *
* This can be caused by:                                                        *
*   * a networking issue                                                        *
*   * an unavailable server                                                     *
*   * if the node's IP in not if the allowed networks of its policy server.     *
* Any existing configuration policy will continue to be applied without change. *
*********************************************************************************
ok: Rudder agent promises were updated.
# echo $?
0

This is unusable in this way for anything other than human interpretation or grepping for the error report in the output.

It would be nice if the return code would represent the success of the update.

found on rudder-agent-4.1.5.release-1.SLES.11


Subtasks 1 (0 open1 closed)

Bug #11048: Rudder agent update returns 0 even if update failsReleasedAlexis MoussetActions
Actions

Also available in: Atom PDF