Project

General

Profile

Bug #10623

Hooks content/permissions are changed during Rudder upgrade (for ex /opt/rudder/etc/hooks.d/policy-generation-node-ready/10-cf-promise-check is replaced)

Added by Nicolas CHARLES over 2 years ago. Updated 2 months ago.

Status:
Released
Priority:
N/A
Category:
Packaging
Target version:
Severity:
Major - prevents use of part of Rudder | no simple workaround
User visibility:
Operational - other Techniques | Rudder settings | Plugins
Effort required:
Priority:
43

Description

I upgraded Rudder from 4.1.0 to 4.1.1 and I had a custom /opt/rudder/etc/hooks.d/policy-generation-node-ready/10-cf-promise-check file
after upgrading, file was restored to default content, which was super surprising

it should at least be documented so that I know it might punch me.

In fact, we should distinguish between several hooks provided by Rudder:

- 1/ the one absolutly needed to make Rudder works, like `policy-generation-node-ready/90-change-perm`. These one need to be updated by rudder at each upgrade and made executable. And we should make it clear in them that an user should not change them,
- 2/ the one that a user can enable/disable. We still don't want the content to be modifiable by an user (to allow update and bug correction), but an user should be allowed to change its perm, like in the example in that ticket. In fact, Rudder should even provide an UI setting to allow the user to change the hook perms.
- 3/ the one that we allow the user to modify.

For case 3/, in fact, we don't want any like that, because by allowing it, we forbid forever bug correction. So for that case, we should advice the user to provide his own hook and fill a bug upstream. If we want the user to be able to parametrize a hook, the parameter must be in a non executable file "XX-hook-name.properties" (which should be sourced by the hook).

Case 1/ is the current behavior (modulo the warning in hook content about the fact that the hook will be reseted on next upgrade).

Case 2/ need to be handled.


Subtasks

Bug #15687: check if hook-upgrades path existsReleasedAlexis MOUSSETActions

Related issues

Related to Rudder - Bug #14331: Trigger agent update and run after policy server has finished policy generationReleasedActions

Associated revisions

Revision e1fed5fb (diff)
Added by Benoît PECCATTE 2 months ago

Fixes #10623: Hooks content/permissions are changed during Rudder upgrade (for ex /opt/rudder/etc/hooks.d/policy-generation-node-ready/10-cf-promise-check is replaced)

History

#1

Updated by François ARMAND over 2 years ago

  • Priority changed from 0 to 17
#2

Updated by Vincent MEMBRÉ over 2 years ago

  • Target version changed from 4.1.2 to 4.1.3
#3

Updated by Vincent MEMBRÉ over 2 years ago

  • Target version changed from 4.1.3 to 4.1.4
#4

Updated by Vincent MEMBRÉ over 2 years ago

  • Target version changed from 4.1.4 to 4.1.5
#5

Updated by Alexis MOUSSET over 2 years ago

  • Target version changed from 4.1.5 to 4.1.6
#6

Updated by Benoît PECCATTE over 2 years ago

  • Priority changed from 17 to 16
#7

Updated by Benoît PECCATTE over 2 years ago

  • Priority changed from 16 to 32
#8

Updated by Vincent MEMBRÉ over 2 years ago

  • Target version changed from 4.1.6 to 4.1.7
  • Priority changed from 32 to 31
#9

Updated by Vincent MEMBRÉ about 2 years ago

  • Target version changed from 4.1.7 to 4.1.8
#10

Updated by Vincent MEMBRÉ about 2 years ago

  • Target version changed from 4.1.8 to 4.1.9
  • Priority changed from 31 to 30
#11

Updated by Vincent MEMBRÉ almost 2 years ago

  • Target version changed from 4.1.9 to 4.1.10
  • Priority changed from 30 to 29
#12

Updated by Vincent MEMBRÉ almost 2 years ago

  • Target version changed from 4.1.10 to 4.1.11
  • Priority changed from 29 to 28
#13

Updated by Vincent MEMBRÉ over 1 year ago

  • Target version changed from 4.1.11 to 4.1.12
  • Priority changed from 28 to 27
#14

Updated by Vincent MEMBRÉ over 1 year ago

  • Target version changed from 4.1.12 to 4.1.13
#15

Updated by Vincent MEMBRÉ over 1 year ago

  • Target version changed from 4.1.13 to 4.1.14
#16

Updated by Benoît PECCATTE over 1 year ago

  • Target version changed from 4.1.14 to 4.1.15
#17

Updated by Vincent MEMBRÉ about 1 year ago

  • Target version changed from 4.1.15 to 4.1.16
#18

Updated by Vincent MEMBRÉ about 1 year ago

  • Target version changed from 4.1.16 to 4.1.17
#19

Updated by Vincent MEMBRÉ 12 months ago

  • Target version changed from 4.1.17 to 4.1.18
  • Priority changed from 27 to 0
#20

Updated by Vincent MEMBRÉ 11 months ago

  • Target version changed from 4.1.18 to 4.1.19
#21

Updated by Alexis MOUSSET 10 months ago

  • Target version changed from 4.1.19 to 4.1.20
#22

Updated by François ARMAND 9 months ago

  • Subject changed from When upgrading Rudder from 4.1.0 to 4.1.1, file /opt/rudder/etc/hooks.d/policy-generation-node-ready/10-cf-promise-check is replaced to Hooks content/permissions are changed during Rudder upgrade (for ex /opt/rudder/etc/hooks.d/policy-generation-node-ready/10-cf-promise-check is replaced)
  • Description updated (diff)
  • Target version changed from 4.1.20 to 4.3.10
  • Severity changed from Minor - inconvenience | misleading | easy workaround to Major - prevents use of part of Rudder | no simple workaround

Idea to handle the case 2 (user allow to enable/disable hook):

- register in pre-install hook exsitance and current perm,
- restore perm in post-install

#23

Updated by François ARMAND 9 months ago

  • Related to Bug #14331: Trigger agent update and run after policy server has finished policy generation added
#24

Updated by François ARMAND 9 months ago

  • Target version changed from 4.3.10 to 4.3.11
#25

Updated by Vincent MEMBRÉ 8 months ago

  • Target version changed from 4.3.11 to 4.3.12
#26

Updated by Benoît PECCATTE 7 months ago

  • User visibility changed from Operational - other Techniques | Technique editor | Rudder settings to Getting started - demo | first install | Technique editor and level 1 Techniques
  • Priority changed from 0 to 58
#27

Updated by Benoît PECCATTE 7 months ago

  • User visibility changed from Getting started - demo | first install | Technique editor and level 1 Techniques to Operational - other Techniques | Rudder settings | Plugins
  • Priority changed from 58 to 43
#28

Updated by Vincent MEMBRÉ 6 months ago

  • Target version changed from 4.3.12 to 4.3.13
#29

Updated by Vincent MEMBRÉ 6 months ago

  • Target version changed from 4.3.13 to 4.3.14
#30

Updated by Vincent MEMBRÉ 5 months ago

  • Target version changed from 4.3.14 to 587
#31

Updated by Vincent MEMBRÉ 5 months ago

  • Target version changed from 587 to 4.3.14
#32

Updated by Vincent MEMBRÉ 5 months ago

  • Target version changed from 4.3.14 to 5.0.13
#33

Updated by Vincent MEMBRÉ 3 months ago

  • Target version changed from 5.0.13 to 5.0.14
#34

Updated by Benoît PECCATTE 2 months ago

  • Status changed from New to In progress
  • Assignee set to Benoît PECCATTE
#35

Updated by Benoît PECCATTE 2 months ago

  • Status changed from In progress to Pending technical review
  • Assignee changed from Benoît PECCATTE to Alexis MOUSSET
  • Pull Request set to https://github.com/Normation/rudder-packages/pull/2063
#36

Updated by Benoît PECCATTE 2 months ago

  • Status changed from Pending technical review to Pending release
#37

Updated by Vincent MEMBRÉ 2 months ago

  • Target version changed from 5.0.14 to 5.0.13
#39

Updated by Vincent MEMBRÉ 2 months ago

  • Status changed from Pending release to Released

This bug has been fixed in Rudder 5.0.13 which was released today.

Also available in: Atom PDF