Project

General

Profile

Actions

Bug #11417

closed

Command "rudder remote run -a" does not warn about missing token

Added by Janos Mattyasovszky over 6 years ago. Updated over 5 years ago.

Status:
Released
Priority:
N/A
Category:
Agent
Target version:
Severity:
Minor - inconvenience | misleading | easy workaround
UX impact:
User visibility:
Operational - other Techniques | Technique editor | Rudder settings
Effort required:
Very Small
Priority:
0
Name check:
Fix check:
Regression:

Description

When running rudder remote run -a, it does not show the error message if missing a token.

(review noteE: the correct command is: rudder remote run -at token
Any other combinaison (notably -a -t ) fails, at least on centos 7)

bash -x revealed:

+ full_api_call /api/nodes '' '' ''
[cut]
++ _get_conf '' token
++ conf=
++ name=token
++ conffile=/root/.rudder
++ '[' -f /root/.rudder ']'
++ return
+ token=
+ '[' -z '' ']'
+ echo 'A token is mandatory to query the server'
+ exit 1
parse error: Invalid numeric literal at line 1, column 2
error    Rudder agent was interrupted during execution by a fatal error
         Run with -i to see log messages.

## Summary #####################################################################
0 components verified in 0 directives
execution time: 0.01s
################################################################################

Recommending that the error message echo "A token is mandatory to query the server" is shown on stderr and that a sanity-check is run before full_api_call is actually used as input for a pipe, so that a valid pre-execution error message can be displayed to the user instead of guessing what "parse error: Invalid numeric literal at line 1, column 2" actually hides.

ver 4.1.7-2 sles11


Related issues 1 (0 open1 closed)

Related to Rudder - Bug #13897: Command "rudder remote run" must accept "-a -t" RejectedActions
Actions #1

Updated by François ARMAND over 6 years ago

  • Target version set to 3.1.24
  • Severity set to Minor - inconvenience | misleading | easy workaround
  • User visibility changed from First impressions of Rudder to Operational - other Techniques | Technique editor | Rudder settings
  • Effort required set to Very Small
  • Priority changed from 0 to 49
Actions #2

Updated by Vincent MEMBRÉ over 6 years ago

  • Target version changed from 3.1.24 to 3.1.25
Actions #3

Updated by Benoît PECCATTE over 6 years ago

  • Priority changed from 49 to 61
Actions #4

Updated by Benoît PECCATTE over 6 years ago

  • Target version changed from 3.1.25 to 4.1.9
Actions #5

Updated by Vincent MEMBRÉ over 6 years ago

  • Target version changed from 4.1.9 to 4.1.10
  • Priority changed from 61 to 60
Actions #6

Updated by Vincent MEMBRÉ about 6 years ago

  • Target version changed from 4.1.10 to 4.1.11
  • Priority changed from 60 to 57
Actions #7

Updated by Vincent MEMBRÉ about 6 years ago

  • Target version changed from 4.1.11 to 4.1.12
  • Priority changed from 57 to 56
Actions #8

Updated by Vincent MEMBRÉ almost 6 years ago

  • Target version changed from 4.1.12 to 4.1.13
  • Priority changed from 56 to 55
Actions #9

Updated by Benoît PECCATTE almost 6 years ago

  • Target version changed from 4.1.13 to 411
Actions #10

Updated by Benoît PECCATTE almost 6 years ago

  • Target version changed from 411 to 4.1.13
Actions #11

Updated by Vincent MEMBRÉ almost 6 years ago

  • Target version changed from 4.1.13 to 4.1.14
  • Priority changed from 55 to 53
Actions #12

Updated by Benoît PECCATTE over 5 years ago

  • Target version changed from 4.1.14 to 4.1.15
  • Priority changed from 53 to 52
Actions #13

Updated by Vincent MEMBRÉ over 5 years ago

  • Target version changed from 4.1.15 to 4.1.16
  • Priority changed from 52 to 51
Actions #14

Updated by Vincent MEMBRÉ over 5 years ago

  • Target version changed from 4.1.16 to 4.1.17
Actions #15

Updated by Félix DALLIDET over 5 years ago

  • Status changed from New to In progress
  • Assignee set to Félix DALLIDET
  • Priority changed from 51 to 0
Actions #16

Updated by Félix DALLIDET over 5 years ago

  • Status changed from In progress to Pending technical review
  • Assignee changed from Félix DALLIDET to Benoît PECCATTE
  • Pull Request set to https://github.com/Normation/rudder-agent/pull/196
Actions #17

Updated by Félix DALLIDET over 5 years ago

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

Updated by Nicolas CHARLES over 5 years ago

I struggled to check that it work. On a centos7 (at least), the proper command to run remote is
rudder remote run -at token
any other combinaison (notably -a -t ) fails on centos7

Actions #19

Updated by François ARMAND over 5 years ago

  • Subject changed from rudder remote run -a does not show error message for missing token to Command "rudder remote run -a" does not warn about missing token
  • Description updated (diff)
Actions #20

Updated by François ARMAND over 5 years ago

  • Related to Bug #13897: Command "rudder remote run" must accept "-a -t" added
Actions #21

Updated by Vincent MEMBRÉ over 5 years ago

  • Status changed from Pending release to Released
This bug has been fixed in Rudder 4.1.17, 4.3.7 and 5.0.3 which were released today.
Changelog
Changelog
Changelog
Actions

Also available in: Atom PDF