Actions
Bug #7473
closedncf copy is always repaired on server due to an non-convergent hash function
Pull Request:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
Name check:
Fix check:
Regression:
Description
Currently, an update on the Rudder server causes this:
rudder verbose: File '/var/rudder/ncf/local' copy_from '/var/rudder/configuration-repository/ncf' rudder verbose: Destination purging enabled rudder verbose: Entering directory '/var/rudder/configuration-repository/ncf' rudder verbose: Destination file '/var/rudder/ncf/local/ncf_hash_file' already exists rudder verbose: Image file '/var/rudder/ncf/local/ncf_hash_file' has a wrong digest/checksum, should be copy of '/var/rudder/configuration-repository/ncf/ncf_hash_file' rudder verbose: Copy of regular file succeeded '/var/rudder/configuration-repository/ncf/ncf_hash_file' to '/var/rudder/ncf/local/ncf_hash_file.cfnew' rudder info: Updated '/var/rudder/ncf/local/ncf_hash_file' from source '/var/rudder/configuration-repository/ncf/ncf_hash_file' on 'localhost' rudder verbose: rudder info: Automatically promoting context scope for 'rudder_ncf_local_updated' to namespace visibility, due to persistence rudder verbose: C: + persistent outcome class 'rudder_ncf_local_updated' rudder verbose: Updating persistent class 'rudder_ncf_local_updated' rudder verbose: rudder verbose: Cancelling class 'rudder_ncf_local_update_error' rudder info: Object '/var/rudder/ncf/local/ncf_hash_file' had permission 0600, changed it to 0644 rudder verbose: rudder info: Automatically promoting context scope for 'rudder_ncf_local_updated' to namespace visibility, due to persistence rudder verbose: C: + persistent outcome class 'rudder_ncf_local_updated'
The command to build the hash in that file includes the hash file itself:
"ncf_local_sha_sum" string => execresult("${paths.path[find]} ${g.rudder_ncf_origin_local} -type f -print0 | ${paths.path[sort]} -z | /usr/bin/xargs -0 /usr/bin/sha1sum | /usr/bin/sha1sum", "useshell");
Of course, since the hash gets updated, the hash on the next run is different...
Actions