Project

General

Profile

Actions

Bug #14421

open

SSH keys technique pre-hook need to be done just before the first directive of that technique

Added by Guillaume Tredez about 5 years ago. Updated about 12 hours ago.

Status:
New
Priority:
N/A
Assignee:
-
Category:
Web - Config management
Target version:
Severity:
Minor - inconvenience | misleading | easy workaround
UX impact:
User visibility:
Getting started - demo | first install | Technique editor and level 1 Techniques
Effort required:
Priority:
0
Name check:
Fix check:
Regression:

Description

When ssh keys is deployed after new user creation, the ssh key task result in error.

I've created 2 directives in a Rule, "01 Create users" and "02 Deploy SSH keys". The "02 Deploy Ssh keys" directive fail with error 'user not exist' (previously created with Directive 01) but work when rudder launch again the Rule.

User is correctly created before ssh key deployment.

Output of rules:

2019-03-06 16:28:18    result_error    01. Test  common rules    02. Deploy common SSH keys    Flush SSH file    user3    The user user3 does not exists on this system
2019-03-06 16:28:17    result_error    01. Test  common rules    02. Deploy common SSH keys    SSH key    user3    The user user3 does NOT exist on this machine, not adding SSH key
2019-03-06 16:28:17    result_na    01. Test  common rules    01. Create common users    Home directory    user3    The user user3 doesn't need to have its home directory checked
2019-03-06 16:28:17    result_repaired    01. Test  common rules    01. Create common users    Password    user3    The user user3 ( Without any defined full name ) password was repaired
2019-03-06 16:28:17    result_repaired    01. Test  common rules    01. Create common users    Users    user3    The user user3 ( Without any defined full name ) has been added to the system

I've created 2 differents rules with 1 directive on each. User creation in first rule, ssh key in second rule and behaviour is same.

Actions #1

Updated by François ARMAND about 5 years ago

  • Subject changed from SSH key deploy error after user creation to SSH key deploy error after user creation on the same agent run
  • Severity set to Minor - inconvenience | misleading | easy workaround
  • User visibility set to Getting started - demo | first install | Technique editor and level 1 Techniques
  • Priority changed from 0 to 50

Thanks for reporting.
I'm setting severity as minor as, AFAIU, it's self healing. Please let me know if I undersetimated it.

Would you mind telling us the version of Rudder (server, agent on node) and the technique version used? It will be easier to reproduce and correct. Thanks !

Actions #2

Updated by Nicolas CHARLES about 5 years ago

  • Target version set to 4.3.11

Hi,

This is because the management of SSH keys has a pre-hook run at the start of the agent, to get relevant information about users and paths - and so the user doesn't exist yet.
Happens in 4.3 and later, with separated techniques.

A possible solutino would be to be less eager in the eecution of pre-hook, running it only right before the first instance of the technique rather than at the very start of the agent run (and same for posthook, being after the last instance of the technique rather at the very end)

What do you think of it Francois ?

Actions #3

Updated by Vincent MEMBRÉ about 5 years ago

  • Target version changed from 4.3.11 to 4.3.12
Actions #4

Updated by Vincent MEMBRÉ almost 5 years ago

  • Target version changed from 4.3.12 to 4.3.13
  • Priority changed from 50 to 49
Actions #5

Updated by Vincent MEMBRÉ almost 5 years ago

  • Target version changed from 4.3.13 to 4.3.14
Actions #6

Updated by Vincent MEMBRÉ almost 5 years ago

  • Target version changed from 4.3.14 to 587
  • Priority changed from 49 to 48
Actions #7

Updated by Alexis Mousset almost 5 years ago

  • Category changed from Agent to Web - Config management
Actions #8

Updated by Vincent MEMBRÉ almost 5 years ago

  • Target version changed from 587 to 4.3.14
Actions #9

Updated by Alexis Mousset almost 5 years ago

  • Target version changed from 4.3.14 to 5.0.13
Actions #10

Updated by Vincent MEMBRÉ over 4 years ago

  • Target version changed from 5.0.13 to 5.0.14
  • Priority changed from 48 to 47
Actions #11

Updated by Vincent MEMBRÉ over 4 years ago

  • Target version changed from 5.0.14 to 5.0.15
  • Priority changed from 47 to 46
Actions #12

Updated by François ARMAND over 4 years ago

  • Subject changed from SSH key deploy error after user creation on the same agent run to SSH keys technique pre-hook need to be done just before the first directive of that technique
  • Priority changed from 46 to 45

Nicolas: I think it's a good and what need to be done, but it seems non trivial.

Actions #13

Updated by Vincent MEMBRÉ over 4 years ago

  • Target version changed from 5.0.15 to 5.0.16
  • Priority changed from 45 to 44
Actions #14

Updated by Alexis Mousset about 4 years ago

  • Target version changed from 5.0.16 to 5.0.17
  • Priority changed from 44 to 42
Actions #15

Updated by Vincent MEMBRÉ about 4 years ago

  • Target version changed from 5.0.17 to 5.0.18
Actions #16

Updated by Vincent MEMBRÉ almost 4 years ago

  • Target version changed from 5.0.18 to 5.0.19
Actions #17

Updated by Vincent MEMBRÉ over 3 years ago

  • Target version changed from 5.0.19 to 5.0.20
Actions #18

Updated by Vincent MEMBRÉ over 3 years ago

  • Target version changed from 5.0.20 to 797
Actions #19

Updated by Benoît PECCATTE almost 3 years ago

  • Target version changed from 797 to 6.1.14
Actions #20

Updated by Vincent MEMBRÉ almost 3 years ago

  • Target version changed from 6.1.14 to 6.1.15
Actions #21

Updated by Vincent MEMBRÉ almost 3 years ago

  • Target version changed from 6.1.15 to 6.1.16
Actions #22

Updated by Vincent MEMBRÉ over 2 years ago

  • Target version changed from 6.1.16 to 6.1.17
Actions #23

Updated by Vincent MEMBRÉ over 2 years ago

  • Target version changed from 6.1.17 to 6.1.18
Actions #24

Updated by Vincent MEMBRÉ over 2 years ago

  • Target version changed from 6.1.18 to 6.1.19
Actions #25

Updated by Vincent MEMBRÉ about 2 years ago

  • Target version changed from 6.1.19 to 6.1.20
  • Priority changed from 42 to 43
Actions #26

Updated by Vincent MEMBRÉ almost 2 years ago

  • Target version changed from 6.1.20 to 6.1.21
Actions #27

Updated by Vincent MEMBRÉ almost 2 years ago

  • Target version changed from 6.1.21 to old 6.1 issues to relocate
Actions #28

Updated by Alexis Mousset about 12 hours ago

  • Target version changed from old 6.1 issues to relocate to 7.3.15
  • Priority changed from 43 to 0
Actions

Also available in: Atom PDF