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 about 9 years ago. Updated about 9 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 #1

Updated by Jonathan CLARKE about 9 years ago

  • Related to Bug #7020: Copy ncf only if it is updated added
Actions #2

Updated by Jonathan CLARKE about 9 years ago

  • Status changed from New to In progress
  • Assignee set to Jonathan CLARKE
Actions #3

Updated by Jonathan CLARKE about 9 years ago

  • Status changed from In progress to Pending technical review
  • Assignee changed from Jonathan CLARKE to Benoît PECCATTE
  • Pull Request set to https://github.com/Normation/rudder-techniques/pull/786
Actions #4

Updated by Jonathan CLARKE about 9 years ago

  • Status changed from Pending technical review to Pending release
  • % Done changed from 0 to 100
Actions #6

Updated by Vincent MEMBRÉ about 9 years ago

  • Status changed from Pending release to Released

This bug has been fixed in Rudder 3.1.5 which was released today.

Actions

Also available in: Atom PDF