Project

General

Profile

Actions

Bug #7901

closed

Backup and restore policy_server.dat like we do with uuid.hive file

Added by Vincent MEMBRÉ almost 9 years ago. Updated over 8 years ago.

Status:
Released
Priority:
N/A
Category:
Packaging
Target version:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
Name check:
Fix check:
Regression:

Description

For some reasons, rudder-agent can be removed then reinstalled (update not working? whatever, it can happen)

When removing the package a backup of uuid.hive is made, and then on reinstall, this uuid is restored...

So it connects to the server get it's policy back (node is accepted and was applying policies without problems) and then nightmare can happen ...

  • policy_server.dat was not defined after reinstall ( missed that in process )
  • so it tries to download files from shared folder (defined via ncf techniques)
  • that method uses sys.policy_hub, which is only defined by policy_server.dat
  • method fails to apply due to that variable missing

In that case it breaks all those files because all templates were changed to mustache, so it tried to edit old config file that was not a mustache template but a 'cfengine' one, so broke the file, restarted services, broke services ...

Adding back policy_server.dat files fixes everything

I think backing up policy_server.dat file (and restoring it) would be a good idea to prevent this issue, what do you think of it ?

Thanks to coredumb for experiencing this issue!


Subtasks 1 (0 open1 closed)

Bug #7974: Merge error on 3.2 for #7901ReleasedVincent MEMBRÉ2016-02-24Actions

Related issues 2 (0 open2 closed)

Related to Rudder - Bug #6468: When we install rudder-agent after having removing it, the uuid is not restored on RPM-based systemsReleasedBenoît PECCATTE2015-04-07Actions
Related to Rudder - Bug #8202: check-rudder-agent complains about not existing policy-server.dat backup fileReleasedBenoît PECCATTE2016-04-22Actions
Actions #1

Updated by Vincent MEMBRÉ almost 9 years ago

  • Description updated (diff)
  • Assignee changed from Vincent MEMBRÉ to Jonathan CLARKE
Actions #2

Updated by Jonathan CLARKE almost 9 years ago

  • Target version set to 2.11.19
Actions #3

Updated by Jonathan CLARKE almost 9 years ago

  • Status changed from New to In progress
Actions #4

Updated by Jonathan CLARKE almost 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-packages/pull/883
Actions #5

Updated by Jonathan CLARKE almost 9 years ago

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

Updated by Vincent MEMBRÉ over 8 years ago

  • Status changed from Pending release to Released

This bug has been fixed in Rudder 2.11.19, 3.0.14, 3.1.8 and 3.2.1 which were released today.

Actions #7

Updated by Jonathan CLARKE over 8 years ago

  • Related to Bug #6468: When we install rudder-agent after having removing it, the uuid is not restored on RPM-based systems added
Actions #8

Updated by Jonathan CLARKE over 8 years ago

  • Related to Bug #8202: check-rudder-agent complains about not existing policy-server.dat backup file added
Actions

Also available in: Atom PDF