Bug #4398
closedPost-hook command for "file content" should be an error if command returned an error
Added by Dennis Cabooter almost 11 years ago. Updated about 6 years ago.
Description
The title says it all!
Update: from comments, it seems that the problem is more linked to commands that return non 0 values and Rudder does not notice.
Updated by Nicolas CHARLES almost 11 years ago
Dennis,
To help us fix this issue, could you provide a bit more details ? Is it consistent for all Directives based on this technique, or only for specific cases (like for a specific command name, or a specific file name, or special combinaison ?)
thank you
Updated by Dennis Cabooter almost 11 years ago
I did a test and that one worked. The test was to create a file /tmp/test1 with content test1, and the post-modification hook was "/usr/bin/touch /tmp/test2". That actually did work. However, if I use the technique to modify fstab, and then have a post-modification hook which does "/bin/mount -a". And that doesn't work.
Updated by Nicolas CHARLES over 10 years ago
- Status changed from New to Discussion
- Assignee set to Dennis Cabooter
Dennis,
did the problem occured again ?
Updated by Dennis Cabooter over 10 years ago
There was another problem.
The fstab technique doesn't have the option to mount created file systems. I understand that that's on purpose. However it would be really really really nice if the option was available, or maybe with a post-hook. See http://www.rudder-project.org/redmine/issues/4211
So I used multiple techniques to mimic the fstab technique with a mount post-hook. For that I used the "Package management for Debian / Ubuntu / APT systems" technique to install cifs-utils and nfs-common, together with the "Enforce File Content" technique with a post-hook to mount the file systems. However, the post-hook "/bin/mount -a" was ecexuted before cifs-utils and nfs-common were installed. Since the command executed in the post-hook doesn't give anything back to rudder and rudder executed the command, rudder reported succes.
Updated by Jonathan CLARKE over 10 years ago
- Category set to Techniques
- Status changed from Discussion to 8
- Assignee deleted (
Dennis Cabooter) - Target version set to 2.6.18
We should check that a post-hook command that doesn't return 0 does indeed set an "error" class and return the corresponding error report to Rudder.
Updated by Matthieu CERDA about 10 years ago
- Target version changed from 2.6.18 to 2.6.19
Updated by Vincent MEMBRÉ about 10 years ago
- Target version changed from 2.6.19 to 2.6.20
Updated by François ARMAND almost 10 years ago
- Description updated (diff)
- Assignee set to Benoît PECCATTE
- Target version changed from 2.6.20 to 2.10.10
Benoit, could you take a look to that one ?
Updated by Vincent MEMBRÉ almost 10 years ago
- Target version changed from 2.10.10 to 2.10.11
Updated by Vincent MEMBRÉ over 9 years ago
- Target version changed from 2.10.11 to 2.10.12
Updated by Vincent MEMBRÉ over 9 years ago
- Target version changed from 2.10.12 to 2.10.13
Updated by Vincent MEMBRÉ over 9 years ago
- Target version changed from 2.10.13 to 2.10.14
Updated by Vincent MEMBRÉ over 9 years ago
- Target version changed from 2.10.14 to 2.10.15
Updated by Vincent MEMBRÉ over 9 years ago
- Target version changed from 2.10.15 to 2.10.16
Updated by Vincent MEMBRÉ over 9 years ago
- Target version changed from 2.10.16 to 2.10.17
Updated by Vincent MEMBRÉ about 9 years ago
- Target version changed from 2.10.17 to 2.10.18
Updated by Vincent MEMBRÉ about 9 years ago
- Target version changed from 2.10.18 to 2.10.19
Updated by Vincent MEMBRÉ about 9 years ago
- Target version changed from 2.10.19 to 2.10.20
Updated by Vincent MEMBRÉ almost 9 years ago
- Target version changed from 2.10.20 to 2.11.18
Updated by Vincent MEMBRÉ almost 9 years ago
- Target version changed from 2.11.18 to 2.11.19
Updated by Vincent MEMBRÉ over 8 years ago
- Target version changed from 2.11.19 to 2.11.20
Updated by Vincent MEMBRÉ over 8 years ago
- Target version changed from 2.11.20 to 2.11.21
Updated by Vincent MEMBRÉ over 8 years ago
- Target version changed from 2.11.21 to 2.11.22
Updated by Vincent MEMBRÉ over 8 years ago
- Target version changed from 2.11.22 to 2.11.23
Updated by Vincent MEMBRÉ over 8 years ago
- Target version changed from 2.11.23 to 2.11.24
Updated by Vincent MEMBRÉ about 8 years ago
- Target version changed from 2.11.24 to 308
Updated by Vincent MEMBRÉ about 8 years ago
- Target version changed from 308 to 3.1.14
Updated by Vincent MEMBRÉ about 8 years ago
- Target version changed from 3.1.14 to 3.1.15
Updated by Vincent MEMBRÉ about 8 years ago
- Target version changed from 3.1.15 to 3.1.16
Updated by Vincent MEMBRÉ about 8 years ago
- Target version changed from 3.1.16 to 3.1.17
Updated by Vincent MEMBRÉ almost 8 years ago
- Target version changed from 3.1.17 to 3.1.18
Updated by Vincent MEMBRÉ almost 8 years ago
- Target version changed from 3.1.18 to 3.1.19
Updated by Alexis Mousset over 7 years ago
- Subject changed from Technique "Enforce a file content", version 3.2 doesn't execute post-modification hooks to Post-hook command report should be an error if command returned an error
Updated by François ARMAND over 7 years ago
- Severity set to Minor - inconvenience | misleading | easy workaround
- User visibility set to Getting started - demo | first install | level 1 Techniques
- Effort required set to Medium
- Priority set to 0
Updated by Vincent MEMBRÉ over 7 years ago
- Target version changed from 3.1.19 to 3.1.20
Updated by Vincent MEMBRÉ over 7 years ago
- Target version changed from 3.1.20 to 3.1.21
Updated by François ARMAND over 7 years ago
- Severity changed from Minor - inconvenience | misleading | easy workaround to Major - prevents use of part of Rudder | no simple workaround
- Priority changed from 0 to 46
Updated by Vincent MEMBRÉ over 7 years ago
- Target version changed from 3.1.21 to 3.1.22
Updated by Vincent MEMBRÉ over 7 years ago
- Target version changed from 3.1.22 to 3.1.23
- Priority changed from 46 to 47
Updated by Vincent MEMBRÉ about 7 years ago
- Target version changed from 3.1.23 to 3.1.24
Updated by Vincent MEMBRÉ about 7 years ago
- Target version changed from 3.1.24 to 3.1.25
- Priority changed from 47 to 48
Updated by Benoît PECCATTE about 7 years ago
- Assignee deleted (
Benoît PECCATTE)
Updated by Vincent MEMBRÉ almost 7 years ago
- Target version changed from 3.1.25 to 387
Updated by Vincent MEMBRÉ almost 7 years ago
- Target version changed from 387 to 4.1.10
Updated by Vincent MEMBRÉ almost 7 years ago
- Target version changed from 4.1.10 to 4.1.11
- Priority changed from 48 to 49
Updated by Vincent MEMBRÉ over 6 years ago
- Target version changed from 4.1.11 to 4.1.12
- Priority changed from 49 to 50
Updated by Vincent MEMBRÉ over 6 years ago
- Target version changed from 4.1.12 to 4.1.13
Updated by Vincent MEMBRÉ over 6 years ago
- Target version changed from 4.1.13 to 4.1.14
- Priority changed from 50 to 51
Updated by Benoît PECCATTE over 6 years ago
- Target version changed from 4.1.14 to 4.1.15
Updated by Vincent MEMBRÉ about 6 years ago
- Target version changed from 4.1.15 to 4.1.16
- Priority changed from 51 to 52
Updated by Vincent MEMBRÉ about 6 years ago
- Target version changed from 4.1.16 to 4.1.17
Updated by François ARMAND about 6 years ago
- Subject changed from Post-hook command report should be an error if command returned an error to Post-hook command for "file content" should be an error if command returned an error
- Status changed from New to Rejected
- Priority changed from 52 to 0
This is now working as expected!