Project

General

Profile

Actions

Bug #8045

closed

Using Rudder server 3.x + rudder agent 2.11.x, a node doesn't properly detect its change of relay server

Added by Nicolas CHARLES almost 9 years ago. Updated over 8 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

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


Related issues 2 (0 open2 closed)

Related to Rudder - Bug #2443: Policy Server UUID in /var/rudder/tmpReleasedNicolas CHARLES2014-12-17Actions
Related to Rudder - Bug #9841: Error parsing inventoryReleasedAlexis MoussetActions
Actions #1

Updated by Nicolas CHARLES almost 9 years ago

  • Related to Bug #2443: Policy Server UUID in /var/rudder/tmp added
Actions #2

Updated by Janos Mattyasovszky almost 9 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

Actions #3

Updated by Jonathan CLARKE almost 9 years ago

  • Translation missing: en.field_tag_list set to Quick and important
Actions #4

Updated by Vincent MEMBRÉ over 8 years ago

  • Target version changed from 3.0.15 to 3.0.16
Actions #5

Updated by Nicolas CHARLES over 8 years ago

  • Status changed from New to In progress
  • Assignee set to Nicolas CHARLES
Actions #6

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
Actions #7

Updated by Nicolas CHARLES over 8 years ago

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

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.

Actions #9

Updated by Nicolas CHARLES about 8 years ago

  • Related to Bug #9841: Error parsing inventory added
Actions

Also available in: Atom PDF