Project

General

Profile

Actions

Bug #18635

closed

Force reload of generic-method cache when app starts

Added by François ARMAND over 3 years ago. Updated over 3 years ago.

Status:
Released
Priority:
1
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
Actions #1

Updated by François ARMAND over 3 years ago

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.

Actions #2

Updated by Vincent MEMBRÉ over 3 years ago

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

Updated by Vincent MEMBRÉ over 3 years ago

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

Updated by Vincent MEMBRÉ over 3 years ago

  • Status changed from In progress to Pending release
Actions #5

Updated by François ARMAND over 3 years ago

  • Priority changed from N/A to 1
Actions #6

Updated by Nicolas CHARLES over 3 years ago

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: -

Actions #7

Updated by Nicolas CHARLES over 3 years ago

restarting the webapp does reload it

Actions #8

Updated by Nicolas CHARLES over 3 years ago

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

Updated by Vincent MEMBRÉ over 3 years ago

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

Actions #10

Updated by Nicolas CHARLES over 3 years ago

Centos 7 - Rudder 6.2

Actions #11

Updated by François ARMAND over 3 years ago

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

Actions #12

Updated by François ARMAND over 3 years ago

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

Updated by Vincent MEMBRÉ over 3 years ago

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