Bug #8045
closedUsing Rudder server 3.x + rudder agent 2.11.x, a node doesn't properly detect its change of relay server
Description
in #2443 we introduced a change for storing policy server uuid (was in /var/rudder/tmp/uuid.txt in 2.11, changed in 3.0)
The Fusion Inventory in Rudder 2.11 still uses this path however, even if promises are 3.0 (so not updated)
If a 2.11 node, which had a 2.11 Rudde server, now has a 3.0 server, the file /var/rudder/tmp/uuid.txt will never be updated
So even if the promises set the correct uuid in the rudder extension, the fusion inventory one prevails and will never be updated
Erasing the /var/rudder/tmp/uuid.txt solves the issue
So, in Rudder 3.0 tehcnique, we should purge this file if it exists
Updated by Nicolas CHARLES over 8 years ago
- Related to Bug #2443: Policy Server UUID in /var/rudder/tmp added
Updated by Janos Mattyasovszky over 8 years ago
Additional information:
- In Agent 2.11.X (X<13) the Rudder.pm adds the Field POLICY_SERVER_UUID populated from tmp/uuid.txt.
- In the promises for 3.0.X FusionAgent.cf contains logic to add a POLICY_SERVER field via edit_line bundle, populated from ${sys.workdir}/rudder-server-uuid.txt
This results in an inventory like for example:
<POLICY_SERVER_UUID>78169036-10f9-11e5-b8f7-afb7081228de</POLICY_SERVER_UUID> <POLICY_SERVER>238ea28e-629c-11e5-acae-6a81cf67da3d</POLICY_SERVER>
From which apparently the POLICY_SERVER_UUID takes precedece over POLICY_SERVER (if that is set).
A solution is to remove the tmp/uuid.txt, which will result in a perl error, since the file being opened does not exist:
Q: "...-inventory --lo": [error] Can't open file /var/rudder/tmp/uuid.txt: No such file or directory Q: "...-inventory --lo": Use of uninitialized value $serverUuid in scalar chomp at /opt/rudder/share/fusioninventory/lib/FusionInventory/Agent/Task/Inventory/Linux/Rudder.pm line 71. Q: "...-inventory --lo": [info] Inventory saved in /var/rudder/tmp/inventory/linux-03ce7386-0c2d-11e5-a06b-25e1081228de.ocs Q: "...-inventory --lo": [info] task WakeOnLan execution not requested Q: "...-inventory --lo": [info] task NetDiscovery execution not requested Q: "...-inventory --lo": [info] task NetInventory execution not requested
But the resulting inventory would reflect the change of PolicyServer in the WebUI.
However, this change is not reflected by starting a regeneration of policies for the node, see for that #8046
Updated by Jonathan CLARKE over 8 years ago
- Translation missing: en.field_tag_list set to Quick and important
Updated by Vincent MEMBRÉ over 8 years ago
- Target version changed from 3.0.15 to 3.0.16
Updated by Nicolas CHARLES over 8 years ago
- Status changed from New to In progress
- Assignee set to Nicolas CHARLES
Updated by Nicolas CHARLES over 8 years ago
- Status changed from In progress to Pending technical review
- Assignee changed from Nicolas CHARLES to Benoît PECCATTE
- Pull Request set to https://github.com/Normation/rudder-techniques/pull/931
Updated by Nicolas CHARLES over 8 years ago
- Status changed from Pending technical review to Pending release
- % Done changed from 0 to 100
Applied in changeset rudder-techniques|1f25c9aa37b49eea1c6fc438d8bc88ea89a9a17d.
Updated by Vincent MEMBRÉ over 8 years ago
- Status changed from Pending release to Released
This bug has been fixed in Rudder 3.0.16, 3.1.10 and 3.2.3 which were released on 2016-06-01, but not announced.
- 2.11: Changelog
- 3.0: Changelog
- 3.1: Changelog
- 3.2: Changelog
- Download: https://www.rudder-project.org/site/get-rudder/downloads/
Updated by Nicolas CHARLES almost 8 years ago
- Related to Bug #9841: Error parsing inventory added