Bug #7901
closedBackup and restore policy_server.dat like we do with uuid.hive file
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!
Updated by Vincent MEMBRÉ almost 9 years ago
- Description updated (diff)
- Assignee changed from Vincent MEMBRÉ to Jonathan CLARKE
Updated by Jonathan CLARKE almost 9 years ago
- Status changed from New to In progress
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
Updated by Jonathan CLARKE almost 9 years ago
- Status changed from Pending technical review to Pending release
- % Done changed from 0 to 100
Applied in changeset rudder-packages|5f61f00c027304f42bd0a21aa7d90251720b4b5b.
Updated by Vincent MEMBRÉ over 8 years ago
- Status changed from Pending release to Released
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
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