Bug #14421
openSSH keys technique pre-hook need to be done just before the first directive of that technique
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.
Updated by François ARMAND almost 6 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 !
Updated by Nicolas CHARLES almost 6 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 ?
Updated by Vincent MEMBRÉ over 5 years ago
- Target version changed from 4.3.11 to 4.3.12
Updated by Vincent MEMBRÉ over 5 years ago
- Target version changed from 4.3.12 to 4.3.13
- Priority changed from 50 to 49
Updated by Vincent MEMBRÉ over 5 years ago
- Target version changed from 4.3.13 to 4.3.14
Updated by Vincent MEMBRÉ over 5 years ago
- Target version changed from 4.3.14 to 587
- Priority changed from 49 to 48
Updated by Alexis Mousset over 5 years ago
- Category changed from Agent to Web - Config management
Updated by Vincent MEMBRÉ over 5 years ago
- Target version changed from 587 to 4.3.14
Updated by Alexis Mousset over 5 years ago
- Target version changed from 4.3.14 to 5.0.13
Updated by Vincent MEMBRÉ over 5 years ago
- Target version changed from 5.0.13 to 5.0.14
- Priority changed from 48 to 47
Updated by Vincent MEMBRÉ about 5 years ago
- Target version changed from 5.0.14 to 5.0.15
- Priority changed from 47 to 46
Updated by François ARMAND about 5 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.
Updated by Vincent MEMBRÉ about 5 years ago
- Target version changed from 5.0.15 to 5.0.16
- Priority changed from 45 to 44
Updated by Alexis Mousset almost 5 years ago
- Target version changed from 5.0.16 to 5.0.17
- Priority changed from 44 to 42
Updated by Vincent MEMBRÉ over 4 years ago
- Target version changed from 5.0.17 to 5.0.18
Updated by Vincent MEMBRÉ over 4 years ago
- Target version changed from 5.0.18 to 5.0.19
Updated by Vincent MEMBRÉ over 4 years ago
- Target version changed from 5.0.19 to 5.0.20
Updated by Vincent MEMBRÉ about 4 years ago
- Target version changed from 5.0.20 to 797
Updated by Benoît PECCATTE over 3 years ago
- Target version changed from 797 to 6.1.14
Updated by Vincent MEMBRÉ over 3 years ago
- Target version changed from 6.1.14 to 6.1.15
Updated by Vincent MEMBRÉ over 3 years ago
- Target version changed from 6.1.15 to 6.1.16
Updated by Vincent MEMBRÉ over 3 years ago
- Target version changed from 6.1.16 to 6.1.17
Updated by Vincent MEMBRÉ about 3 years ago
- Target version changed from 6.1.17 to 6.1.18
Updated by Vincent MEMBRÉ about 3 years ago
- Target version changed from 6.1.18 to 6.1.19
Updated by Vincent MEMBRÉ over 2 years ago
- Target version changed from 6.1.19 to 6.1.20
- Priority changed from 42 to 43
Updated by Vincent MEMBRÉ over 2 years ago
- Target version changed from 6.1.20 to 6.1.21
Updated by Vincent MEMBRÉ over 2 years ago
- Target version changed from 6.1.21 to old 6.1 issues to relocate
Updated by Alexis Mousset 8 months ago
- Target version changed from old 6.1 issues to relocate to 7.3.15
- Priority changed from 43 to 0
Updated by Vincent MEMBRÉ 7 months ago
- Target version changed from 7.3.15 to 7.3.16
Updated by Vincent MEMBRÉ 6 months ago
- Target version changed from 7.3.16 to 7.3.17