Project

General

Profile

Actions

Bug #4398

closed

Post-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.

Status:
Rejected
Priority:
N/A
Assignee:
-
Category:
Techniques
Target version:
Severity:
Major - prevents use of part of Rudder | no simple workaround
UX impact:
User visibility:
Getting started - demo | first install | level 1 Techniques
Effort required:
Medium
Priority:
0
Name check:
Fix check:
Regression:

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.

Actions #1

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

Actions #2

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.

Actions #3

Updated by Dennis Cabooter almost 11 years ago

I can't reproduce it for now.

Actions #4

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 ?

Actions #5

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.

Actions #6

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.

Actions #7

Updated by Matthieu CERDA about 10 years ago

  • Target version changed from 2.6.18 to 2.6.19
Actions #8

Updated by Vincent MEMBRÉ about 10 years ago

  • Target version changed from 2.6.19 to 2.6.20
Actions #9

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 ?

Actions #10

Updated by Vincent MEMBRÉ almost 10 years ago

  • Target version changed from 2.10.10 to 2.10.11
Actions #11

Updated by Vincent MEMBRÉ over 9 years ago

  • Target version changed from 2.10.11 to 2.10.12
Actions #12

Updated by Vincent MEMBRÉ over 9 years ago

  • Target version changed from 2.10.12 to 2.10.13
Actions #13

Updated by Benoît PECCATTE over 9 years ago

  • Status changed from 8 to New
Actions #14

Updated by Vincent MEMBRÉ over 9 years ago

  • Target version changed from 2.10.13 to 2.10.14
Actions #15

Updated by Vincent MEMBRÉ over 9 years ago

  • Target version changed from 2.10.14 to 2.10.15
Actions #16

Updated by Vincent MEMBRÉ over 9 years ago

  • Target version changed from 2.10.15 to 2.10.16
Actions #17

Updated by Vincent MEMBRÉ over 9 years ago

  • Target version changed from 2.10.16 to 2.10.17
Actions #18

Updated by Vincent MEMBRÉ about 9 years ago

  • Target version changed from 2.10.17 to 2.10.18
Actions #19

Updated by Vincent MEMBRÉ about 9 years ago

  • Target version changed from 2.10.18 to 2.10.19
Actions #20

Updated by Vincent MEMBRÉ about 9 years ago

  • Target version changed from 2.10.19 to 2.10.20
Actions #21

Updated by Vincent MEMBRÉ almost 9 years ago

  • Target version changed from 2.10.20 to 2.11.18
Actions #22

Updated by Vincent MEMBRÉ almost 9 years ago

  • Target version changed from 2.11.18 to 2.11.19
Actions #23

Updated by Vincent MEMBRÉ over 8 years ago

  • Target version changed from 2.11.19 to 2.11.20
Actions #24

Updated by Vincent MEMBRÉ over 8 years ago

  • Target version changed from 2.11.20 to 2.11.21
Actions #25

Updated by Vincent MEMBRÉ over 8 years ago

  • Target version changed from 2.11.21 to 2.11.22
Actions #26

Updated by Vincent MEMBRÉ over 8 years ago

  • Target version changed from 2.11.22 to 2.11.23
Actions #27

Updated by Vincent MEMBRÉ over 8 years ago

  • Target version changed from 2.11.23 to 2.11.24
Actions #28

Updated by Vincent MEMBRÉ about 8 years ago

  • Target version changed from 2.11.24 to 308
Actions #29

Updated by Vincent MEMBRÉ about 8 years ago

  • Target version changed from 308 to 3.1.14
Actions #30

Updated by Vincent MEMBRÉ about 8 years ago

  • Target version changed from 3.1.14 to 3.1.15
Actions #31

Updated by Vincent MEMBRÉ about 8 years ago

  • Target version changed from 3.1.15 to 3.1.16
Actions #32

Updated by Vincent MEMBRÉ about 8 years ago

  • Target version changed from 3.1.16 to 3.1.17
Actions #33

Updated by Vincent MEMBRÉ almost 8 years ago

  • Target version changed from 3.1.17 to 3.1.18
Actions #34

Updated by Vincent MEMBRÉ almost 8 years ago

  • Target version changed from 3.1.18 to 3.1.19
Actions #35

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
Actions #36

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
Actions #37

Updated by Vincent MEMBRÉ over 7 years ago

  • Target version changed from 3.1.19 to 3.1.20
Actions #38

Updated by Vincent MEMBRÉ over 7 years ago

  • Target version changed from 3.1.20 to 3.1.21
Actions #39

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
Actions #40

Updated by Vincent MEMBRÉ over 7 years ago

  • Target version changed from 3.1.21 to 3.1.22
Actions #41

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
Actions #42

Updated by Vincent MEMBRÉ about 7 years ago

  • Target version changed from 3.1.23 to 3.1.24
Actions #43

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
Actions #44

Updated by Benoît PECCATTE about 7 years ago

  • Assignee deleted (Benoît PECCATTE)
Actions #45

Updated by Vincent MEMBRÉ almost 7 years ago

  • Target version changed from 3.1.25 to 387
Actions #46

Updated by Vincent MEMBRÉ almost 7 years ago

  • Target version changed from 387 to 4.1.10
Actions #47

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
Actions #48

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
Actions #49

Updated by Vincent MEMBRÉ over 6 years ago

  • Target version changed from 4.1.12 to 4.1.13
Actions #50

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
Actions #51

Updated by Benoît PECCATTE over 6 years ago

  • Target version changed from 4.1.14 to 4.1.15
Actions #52

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
Actions #53

Updated by Vincent MEMBRÉ about 6 years ago

  • Target version changed from 4.1.16 to 4.1.17
Actions #54

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!

Actions

Also available in: Atom PDF