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