Project

General

Profile

Actions

Bug #11047

closed

rudder agent update -q bad exit code

Added by Janos Mattyasovszky over 7 years ago. Updated over 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 #1

Updated by Janos Mattyasovszky over 7 years ago

  • Description updated (diff)
Actions #2

Updated by Benoît PECCATTE over 7 years ago

  • Target version set to 3.1.22
Actions #3

Updated by Benoît PECCATTE over 7 years ago

  • Status changed from New to In progress
  • Assignee set to Benoît PECCATTE
Actions #4

Updated by Benoît PECCATTE over 7 years ago

  • Target version changed from 3.1.22 to 357
Actions #5

Updated by Benoît PECCATTE over 7 years ago

  • Status changed from In progress to Pending technical review
  • Assignee changed from Benoît PECCATTE to Alexis Mousset
  • Pull Request set to https://github.com/Normation/rudder-agent/pull/119
Actions #6

Updated by Janos Mattyasovszky over 7 years ago

just wow.

Actions #7

Updated by Benoît PECCATTE over 7 years ago

Opening a sub task for the exit 0 since it's a cfengine problem, harder to fix.

Actions #8

Updated by Benoît PECCATTE over 7 years ago

just wow.

Pure luck!

Actions #9

Updated by Benoît PECCATTE over 7 years ago

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

Updated by Alexis Mousset over 7 years ago

  • Target version changed from 357 to 4.1.6
Actions #11

Updated by Vincent MEMBRÉ over 7 years ago

  • Status changed from Pending release to Released

This bug has been fixed in Rudder 4.1.6 and 4.2.0~beta3 which were released today.

Actions

Also available in: Atom PDF