Project

General

Profile

Actions

Bug #11580

closed

Inventory uploaded multiple times after reinit

Added by Janos Mattyasovszky over 6 years ago. Updated over 6 years ago.

Status:
Released
Priority:
N/A
Category:
Agent
Target version:
Severity:
Minor - inconvenience | misleading | easy workaround
UX impact:
User visibility:
Getting started - demo | first install | level 1 Techniques
Effort required:
Very Small
Priority:
67
Name check:
Fix check:
Regression:

Description

When you have a rudder agent, which is set to a policy server that does not have it allowed via IP subnet, the agent fails to send the inventory, but the generated inventory file stays below /var/rudder/tmp/inventory/.

If someone does a rudder agent reinit multiple times, differently named inventories are get created below /var/rudder/tmp/inventory/ but never uploaded to the policy server due to not allowed and also not removed.

After the policy server allows the node to communicate with it (by adding it to the allowed networks), all the inventories get uploaded with different UUID suffixes by the promise:

    !windows::
      "${g.rudder_inventories}" 
        transformer => "${download_command_prefix} ${this.promiser} ${download_command_suffix}",
        depth_search => recurse_visible(1),
        file_select  => by_name("@{g.signed_inventory_file_types}"),
        classes      => persistant_class("inventory_sent", "cant_send_inventory", 480),
        comment      => "Sending the inventory to the server";

The expected behavior would be that when doing a rudder agent inventory, all previous, not-uploaded inventories would be purged, and/or only the most current inventory would be uploaded, not any previous, maybe outdated ones.

Actions

Also available in: Atom PDF