Project

General

Profile

Actions

Bug #7901

closed

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

Added by Vincent MEMBRÉ about 8 years ago. Updated about 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

Also available in: Atom PDF