Project

General

Profile

Actions

Bug #7473

closed

ncf copy is always repaired on server due to an non-convergent hash function

Added by Jonathan CLARKE over 8 years ago. Updated over 8 years ago.

Status:
Released
Priority:
N/A
Category:
System techniques
Target version:
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...


Related issues 1 (0 open1 closed)

Related to Rudder - Bug #7020: Copy ncf only if it is updatedReleasedBenoît PECCATTE2015-07-21Actions
Actions

Also available in: Atom PDF