Bug #18635
closed
Force reload of generic-method cache when app starts
Added by François ARMAND about 4 years ago.
Updated almost 4 years ago.
Category:
System integration
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 open — 0 closed)
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.
- Status changed from New to In progress
- Assignee changed from François ARMAND to Vincent MEMBRÉ
- Assignee changed from Vincent MEMBRÉ to François ARMAND
- Pull Request set to https://github.com/Normation/rudder/pull/3396
- Status changed from In progress to Pending release
- Priority changed from N/A to 1 (highest)
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: -
restarting the webapp does reload it
- Fix check changed from To do to Error - Next version
On which system did it happened ? Works on several platforms i tested (6.1 mostly ... )
- 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.
- Related to User story #18652: Reload generic-method cache when their definitions change added
- Status changed from Pending release to Released
This bug has been fixed in Rudder 6.2.0~rc1 which was released today.
Also available in: Atom
PDF