Bug #11580
closedInventory uploaded multiple times after reinit
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.
Updated by François ARMAND about 7 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).
Updated by Alexis Mousset about 7 years ago
- Status changed from New to In progress
Updated by Alexis Mousset about 7 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
Updated by Alexis Mousset about 7 years ago
- Status changed from Pending technical review to Pending release
Applied in changeset rudder-agent|9d5efacd47864c1ce8913c7e1ac39e8d1d86b526.
Updated by Vincent MEMBRÉ about 7 years ago
- Status changed from Pending release to Released