Processing inventories on root server

On the Root server, the start of the workflow is the same than on a relay:

  • the inventory is received by a webdav endpoint,
  • the webdav service store the file in the folder /var/rudder/inventories/incoming

Then, on each run, the agent:

  • look for inventory / signature pairs:

    • inventories without a corresponding signature file are processed only if they are older than 2 minutes,
  • POST the inventory or inventory+signature pair to the local API of "inventory-endpoint" application on http://localhost:8080/endpoint/upload/
  • the API makes some quick checks on inventory (well formed, mandatory fields…) and :

    • if checks are OK, ACCEPTS (HTTP code 200) the inventory,
    • if signature is configured to be mandatory and is missing, or if the signature is not valid, refuses with UNAUTHORIZED error (HTTP code 401)
    • else fails with a PRECONDITION FAILED error (HTTP code 412)
  • on error, inventory file is moved to /var/rudder/inventories/failed,
  • on success:

    • the inventory file is moved to /var/rudder/inventories/received,
    • in parallel, inventory web parses and updates Rudder database.