Project

General

Profile

Actions

User story #8919

closed

Remove modifications made to the inventory by the agent

Added by Matthieu CERDA about 8 years ago. Updated over 6 years ago.

Status:
Released
Priority:
3
Category:
Web - Nodes & inventories
Target version:
UX impact:
Suggestion strength:
User visibility:
Effort required:
Name check:
Fix check:
Regression:

Description

We currently do three things when running an inventory update in Rudder:
  • Trigger a fusioninventory-agent run and store the generated inventory XML
  • Modify it using the agent to add custom entries
  • Send it to the Rudder server

It is a fact that as of now, most of the additions we do using the agent are obsolete, since they are added by FusionInventory itself as part of standard inventory tasks.

We should clean up our custom additions so we may someday be able to eat a vanilla fusioninventory report !

The addition is done in the system technique "techniques/system/inventory/1.0/fusionAgent.st"

The added fields are:

  • on android, <OPERATINGSYSTEM> and <ACCESSLOG>. We don't care of that, because Android support must be upgraded in all case. So we should directly patch fusion if still needed in place of adding something fusion is supposed to do (existing tag)
  • <VMS><VM></VM></VMS>: not mandatory for Rudder, superseeded by <VIRTUALMACHINES> tag, much more complete and supported since BEFORE Rudder 2.11 / fusionagent 2.3.6 (they are their since at least 2.1.0)
  • <USERSLIST><USER></USER></USERLIST>: not mandatory, superseeded by fusion LOCAL_USERS (same as VMS)
  • UUID, USER, AGENTSNAME, CFKEY, POLICY_SERVER, HOSTNAME: there are superseeded by the <RUDDER> tag provided in fusion in no more used for real since BEFORE 2.11
  • PROCESSORS: it is NO MORE USED since AT LEAST Rudder 2.11
  • MACHINEID: It is the same think that in <HARDWARE><UUID>. It used to be buggy with VM, but our is, too, and since 2.11 AT LEAST, if the MACHINEID field does not exists or is empty, we are derivating one from node UUID. So it may lead to some regeneration of machines, but that shouldn't break anything
  • SERVER_ROLES: exists only in added tag by CFEngine It was done and in 4.1, it is both under <RUDDER> and at the end in added tags.

So, given all the above, the only actions to do are:

  • add SERVER_ROLES to fusioninventory <RUDDER> tag in Rudder 3.1. It is a bug that it wasn't added in that place but in a deprecated one. Add the corresponding parsing in ldap-inventory. On the server, parse that and fall-back with parsing the one outside <RUDDER>
  • add support for HARDWARE/UUID, LOCAL_USERS and VIRTUALMACHINES in ldap-inventory with fallback to MACHINEID / USERLIST / VMS in Rudder 3.1

With that, we are able to safely remove ALL added things for nodes up-to-date in 3.1, and as soon as 3.1 - but of course, we won't do it before 4.0.

So, removing addition in 4.0, with the corresponding update in fusion/ldap-inventory in 3.1, covers the cases:
  • "last Rudder 3.1 or Rudder 4.0 with nodes in last 3.1, 3.2, or 4.0": as explained, all is good in that case.
  • "Rudder 4.0 in other case": as we continue fall-back parsing old place for SERVER_ROLE, LOCAL_USERS and VIRTUALMACHINES, it should just work as before.
  • "non last Rudder 3.1 with nodes 4.0": none of the missing tag is mandatory and as soon as the node get its system technique, it will add them (so at worst, first inventory is missing information). We could also keep the old addition only in initial promises for the first time (now that they are merged :)

Subtasks 4 (0 open4 closed)

User story #8920: Use FusionInventory system attributes instead of Rudder's custom onesReleasedFrançois ARMANDActions
User story #8922: Remove custom inventory modifications from the inventory promisesReleasedAlexis MoussetActions
Bug #12242: Error at node installation - Can't stat file '/var/rudder/cfengine-community/inputs/inventory/1.0/virtualMachines.cf' for parsing. (stat: No such file or directory)ReleasedAlexis MoussetActions
User story #12231: Remove parsing of MachineID in ldap-inventoryRejectedFrançois ARMANDActions

Related issues 4 (0 open4 closed)

Related to Rudder - User story #8127: On agent, check inventory before sending it to Rudder serverReleasedNicolas CHARLESActions
Related to Rudder - Bug #7092: Include Timezone in Node InfoReleasedVincent MEMBRÉActions
Related to Rudder - User story #7093: Include Timezone in InventoryReleasedBenoît PECCATTE2016-10-18Actions
Related to Rudder - Bug #8921: The FusionInventory Rudder task does not work on Windows and will not return server rolesReleasedBenoît PECCATTE2016-09-15Actions
Actions

Also available in: Atom PDF