Project

General

Profile

Bug #11580

Inventory uploaded multiple times after reinit

Added by Janos Mattyasovszky about 1 year ago. Updated about 1 year ago.

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

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.

Associated revisions

Revision 9d5efacd (diff)
Added by Alexis MOUSSET about 1 year ago

Fixes #11580: Inventory uploaded multiple times after reinit

History

#1 Updated by Janos Mattyasovszky about 1 year ago

  • Description updated (diff)

#2 Updated by François ARMAND about 1 year ago

  • Target version set to 3.1.24
  • Severity set to Minor - inconvenience | misleading | easy workaround
  • User visibility set to Getting started - demo | first install | level 1 Techniques
  • Effort required set to Very Small
  • Priority changed from 0 to 67

Ah. Oh.

Well, you prefectly identified the root cause for the problem, and your proposed correction seems good, thanks!

(note: setting it to major minor, because nothing really breaks - you get non existing incoming nodes, which is a real inconvenience, but should be nothing more. And it's getting started, because the described user story is typically what could happen on your firsts use of Rudder).

#3 Updated by François ARMAND about 1 year ago

minor

#4 Updated by Benoît PECCATTE about 1 year ago

We should remove inventories upon reinit

#5 Updated by Benoît PECCATTE about 1 year ago

  • Assignee set to Alexis MOUSSET

#6 Updated by Alexis MOUSSET about 1 year ago

  • Status changed from New to In progress

#7 Updated by Alexis MOUSSET about 1 year ago

  • Status changed from In progress to Pending technical review
  • Assignee changed from Alexis MOUSSET to Benoît PECCATTE
  • Pull Request set to https://github.com/Normation/rudder-agent/pull/133

#8 Updated by Alexis MOUSSET about 1 year ago

  • Status changed from Pending technical review to Pending release

#9 Updated by Vincent MEMBRÉ about 1 year ago

  • Status changed from Pending release to Released

This bug has been fixed in Rudder 3.1.24, 4.1.8 and 4.2.1 which were released today.

Also available in: Atom PDF