Project

General

Profile

Actions

Bug #4398

closed

Post-hook command for "file content" should be an error if command returned an error

Bug #4398: Post-hook command for "file content" should be an error if command returned an error

Added by Dennis Cabooter almost 12 years ago. Updated about 7 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.

Updated by Nicolas CHARLES almost 12 years ago Actions #1

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 12 years ago Actions #2

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 Dennis Cabooter almost 12 years ago Actions #3

I can't reproduce it for now.

Updated by Nicolas CHARLES almost 12 years ago Actions #4

  • Status changed from New to Discussion
  • Assignee set to Dennis Cabooter

Dennis,

did the problem occured again ?

Updated by Dennis Cabooter almost 12 years ago Actions #5

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 11 years ago Actions #6

  • 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 11 years ago Actions #7

  • Target version changed from 2.6.18 to 2.6.19

Updated by Vincent MEMBRÉ about 11 years ago Actions #8

  • Target version changed from 2.6.19 to 2.6.20

Updated by François ARMAND almost 11 years ago Actions #9

  • 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 11 years ago Actions #10

  • Target version changed from 2.10.10 to 2.10.11

Updated by Vincent MEMBRÉ almost 11 years ago Actions #11

  • Target version changed from 2.10.11 to 2.10.12

Updated by Vincent MEMBRÉ over 10 years ago Actions #12

  • Target version changed from 2.10.12 to 2.10.13

Updated by Benoît PECCATTE over 10 years ago Actions #13

  • Status changed from 8 to New

Updated by Vincent MEMBRÉ over 10 years ago Actions #14

  • Target version changed from 2.10.13 to 2.10.14

Updated by Vincent MEMBRÉ over 10 years ago Actions #15

  • Target version changed from 2.10.14 to 2.10.15

Updated by Vincent MEMBRÉ over 10 years ago Actions #16

  • Target version changed from 2.10.15 to 2.10.16

Updated by Vincent MEMBRÉ over 10 years ago Actions #17

  • Target version changed from 2.10.16 to 2.10.17

Updated by Vincent MEMBRÉ about 10 years ago Actions #18

  • Target version changed from 2.10.17 to 2.10.18

Updated by Vincent MEMBRÉ about 10 years ago Actions #19

  • Target version changed from 2.10.18 to 2.10.19

Updated by Vincent MEMBRÉ about 10 years ago Actions #20

  • Target version changed from 2.10.19 to 2.10.20

Updated by Vincent MEMBRÉ about 10 years ago Actions #21

  • Target version changed from 2.10.20 to 2.11.18

Updated by Vincent MEMBRÉ almost 10 years ago Actions #22

  • Target version changed from 2.11.18 to 2.11.19

Updated by Vincent MEMBRÉ almost 10 years ago Actions #23

  • Target version changed from 2.11.19 to 2.11.20

Updated by Vincent MEMBRÉ over 9 years ago Actions #24

  • Target version changed from 2.11.20 to 2.11.21

Updated by Vincent MEMBRÉ over 9 years ago Actions #25

  • Target version changed from 2.11.21 to 2.11.22

Updated by Vincent MEMBRÉ over 9 years ago Actions #26

  • Target version changed from 2.11.22 to 2.11.23

Updated by Vincent MEMBRÉ over 9 years ago Actions #27

  • Target version changed from 2.11.23 to 2.11.24

Updated by Vincent MEMBRÉ over 9 years ago Actions #28

  • Target version changed from 2.11.24 to 308

Updated by Vincent MEMBRÉ over 9 years ago Actions #29

  • Target version changed from 308 to 3.1.14

Updated by Vincent MEMBRÉ about 9 years ago Actions #30

  • Target version changed from 3.1.14 to 3.1.15

Updated by Vincent MEMBRÉ about 9 years ago Actions #31

  • Target version changed from 3.1.15 to 3.1.16

Updated by Vincent MEMBRÉ about 9 years ago Actions #32

  • Target version changed from 3.1.16 to 3.1.17

Updated by Vincent MEMBRÉ about 9 years ago Actions #33

  • Target version changed from 3.1.17 to 3.1.18

Updated by Vincent MEMBRÉ almost 9 years ago Actions #34

  • Target version changed from 3.1.18 to 3.1.19

Updated by Alexis Mousset almost 9 years ago Actions #35

  • 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 8 years ago Actions #36

  • 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 8 years ago Actions #37

  • Target version changed from 3.1.19 to 3.1.20

Updated by Vincent MEMBRÉ over 8 years ago Actions #38

  • Target version changed from 3.1.20 to 3.1.21

Updated by François ARMAND over 8 years ago Actions #39

  • 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 8 years ago Actions #40

  • Target version changed from 3.1.21 to 3.1.22

Updated by Vincent MEMBRÉ over 8 years ago Actions #41

  • Target version changed from 3.1.22 to 3.1.23
  • Priority changed from 46 to 47

Updated by Vincent MEMBRÉ over 8 years ago Actions #42

  • Target version changed from 3.1.23 to 3.1.24

Updated by Vincent MEMBRÉ about 8 years ago Actions #43

  • Target version changed from 3.1.24 to 3.1.25
  • Priority changed from 47 to 48

Updated by Benoît PECCATTE about 8 years ago Actions #44

  • Assignee deleted (Benoît PECCATTE)

Updated by Vincent MEMBRÉ about 8 years ago Actions #45

  • Target version changed from 3.1.25 to 387

Updated by Vincent MEMBRÉ almost 8 years ago Actions #46

  • Target version changed from 387 to 4.1.10

Updated by Vincent MEMBRÉ almost 8 years ago Actions #47

  • Target version changed from 4.1.10 to 4.1.11
  • Priority changed from 48 to 49

Updated by Vincent MEMBRÉ over 7 years ago Actions #48

  • Target version changed from 4.1.11 to 4.1.12
  • Priority changed from 49 to 50

Updated by Vincent MEMBRÉ over 7 years ago Actions #49

  • Target version changed from 4.1.12 to 4.1.13

Updated by Vincent MEMBRÉ over 7 years ago Actions #50

  • Target version changed from 4.1.13 to 4.1.14
  • Priority changed from 50 to 51

Updated by Benoît PECCATTE over 7 years ago Actions #51

  • Target version changed from 4.1.14 to 4.1.15

Updated by Vincent MEMBRÉ about 7 years ago Actions #52

  • Target version changed from 4.1.15 to 4.1.16
  • Priority changed from 51 to 52

Updated by Vincent MEMBRÉ about 7 years ago Actions #53

  • Target version changed from 4.1.16 to 4.1.17

Updated by François ARMAND about 7 years ago Actions #54

  • 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: PDF Atom