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

Updated by Janos Mattyasovszky over 6 years ago

  • Description updated (diff)
Actions #2

Updated by François ARMAND over 6 years 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).

Actions #3

Updated by François ARMAND over 6 years ago

minor

Actions #4

Updated by Benoît PECCATTE over 6 years ago

We should remove inventories upon reinit

Actions #5

Updated by Benoît PECCATTE over 6 years ago

  • Assignee set to Alexis Mousset
Actions #6

Updated by Alexis Mousset over 6 years ago

  • Status changed from New to In progress
Actions #7

Updated by Alexis Mousset over 6 years 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
Actions #8

Updated by Alexis Mousset over 6 years ago

  • Status changed from Pending technical review to Pending release
Actions #9

Updated by Vincent MEMBRÉ over 6 years 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.

Actions

Also available in: Atom PDF