Project

General

Profile

Actions

Bug #18635

closed

Force reload of generic-method cache when app starts

Bug #18635: Force reload of generic-method cache when app starts

Added by François ARMAND almost 5 years ago. Updated almost 5 years ago.

Status:
Released
Priority:
1 (highest)
Category:
System integration
Target version:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
0
Name check:
To do
Fix check:
Checked
Regression:

Description

We now have a generic method cache /var/rudder/configuration-repository/ncf/generic_methods.json. For now, there is no built-in logic to auto-regenerate it when generic methods are updated.
Since there is tons of unforseen path on witch generic methods can be updated (from a plugin contributed them to a hack workaround to a bug), it would be very surprising for users to not see their changes, even after an app restart


Related issues 1 (1 open0 closed)

Related to Rudder - User story #18652: Reload generic-method cache when their definitions changeNewActions

Updated by François ARMAND almost 5 years ago Actions #1

Actually, we can check even during run time, when generic methods are requested: we have two files (/var/rudder/ncf/{common,local}/ncf_hash_file) that are updated at each agent run et that contain one hash for all methods. We just need to check if that content changed.

Updated by Vincent MEMBRÉ almost 5 years ago Actions #2

  • Status changed from New to In progress
  • Assignee changed from François ARMAND to Vincent MEMBRÉ

Updated by Vincent MEMBRÉ almost 5 years ago Actions #3

  • Assignee changed from Vincent MEMBRÉ to François ARMAND
  • Pull Request set to https://github.com/Normation/rudder/pull/3396

Updated by Vincent MEMBRÉ almost 5 years ago Actions #4

  • Status changed from In progress to Pending release

Updated by François ARMAND almost 5 years ago Actions #5

  • Priority changed from N/A to 1 (highest)

Updated by Nicolas CHARLES almost 5 years ago Actions #6

I have updated a file, yet it is not updated in the technique editor

[root@server 30_generic_methods]# stat /var/rudder/ncf/common/30_generic_methods/audit_from_osquery.cf 
  File: ‘/var/rudder/ncf/common/30_generic_methods/audit_from_osquery.cf’
  Size: 5449          Blocks: 16         IO Block: 4096   regular file
Device: fd00h/64768d    Inode: 68332575    Links: 1
Access: (0644/-rw-r--r--)  Uid: (    0/    root)   Gid: (    0/    root)
Context: unconfined_u:object_r:usr_t:s0
Access: 2020-11-20 08:57:26.913479259 +0000
Modify: 2020-11-20 08:57:26.519479172 +0000
Change: 2020-11-20 08:57:26.519479172 +0000
 Birth: -
[root@server 30_generic_methods]# stat /var/rudder/configuration-repository/ncf/generic_methods.json
  File: ‘/var/rudder/configuration-repository/ncf/generic_methods.json’
  Size: 352667        Blocks: 696        IO Block: 4096   regular file
Device: fd00h/64768d    Inode: 792298      Links: 1
Access: (0660/-rw-rw----)  Uid: (    0/    root)   Gid: (  992/  rudder)
Context: system_u:object_r:var_t:s0
Access: 2020-11-20 08:51:21.003649463 +0000
Modify: 2020-11-20 08:51:20.961649468 +0000
Change: 2020-11-20 08:51:20.970649467 +0000
 Birth: -
[root@server 30_generic_methods]# stat /usr/share/ncf/tree/30_generic_methods/audit_from_osquery.cf 
  File: ‘/usr/share/ncf/tree/30_generic_methods/audit_from_osquery.cf’
  Size: 5449          Blocks: 16         IO Block: 4096   regular file
Device: fd00h/64768d    Inode: 101248403   Links: 1
Access: (0644/-rw-r--r--)  Uid: (    0/    root)   Gid: (    0/    root)
Context: system_u:object_r:usr_t:s0
Access: 2020-11-20 08:57:26.519479172 +0000
Modify: 2020-11-20 08:57:21.089477978 +0000
Change: 2020-11-20 08:57:21.093477979 +0000
 Birth: -

Updated by Nicolas CHARLES almost 5 years ago Actions #7

restarting the webapp does reload it

Updated by Nicolas CHARLES almost 5 years ago Actions #8

  • Fix check changed from To do to Error - Next version

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

On which system did it happened ? Works on several platforms i tested (6.1 mostly ... )

Updated by Nicolas CHARLES almost 5 years ago Actions #10

Centos 7 - Rudder 6.2

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

  • Fix check changed from Error - Next version to Checked

So, we will mark that one as solved, it does what it is said to do: reload when app start.

We will manage a more reliable system in 7.0 with #18652.

Updated by François ARMAND almost 5 years ago Actions #12

  • Related to User story #18652: Reload generic-method cache when their definitions change added

Updated by Vincent MEMBRÉ almost 5 years ago Actions #13

  • Status changed from Pending release to Released

This bug has been fixed in Rudder 6.2.0~rc1 which was released today.

Actions

Also available in: PDF Atom