Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #17616: inventory should be copied to /var/rudder/inventories/accepted-nodes-updates rather than uploaded on root server #1603

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions techniques/system/common/1.0/site.cf
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ bundle common g

"rudder_base" string => "/opt/rudder";
"rudder_rm" string => "/bin/rm";
"rudder_cp" string => "/bin/cp";
"rudder_var" string => "/var/rudder";

"rudder_curl" string => "/usr/bin/curl",
Expand Down
10 changes: 9 additions & 1 deletion techniques/system/inventory/1.0/fusionAgent.st
Original file line number Diff line number Diff line change
Expand Up @@ -254,12 +254,20 @@ bundle agent sendInventory
"pass1" expression => "any";

files:
any::
!root_server::
"${g.rudder_inventories}/${fusionAgent.inventory_name}\..*"
transformer => "${download_command_prefix} ${this.promiser} ${download_command_suffix}",
classes => persistent_class("inventory_sent", "cant_send_inventory", "${min_resend_delay}"),
comment => "Sending the inventory to the server";

root_server::
# minimal change to copy inventories to accepted node updates on root server
"${g.rudder_inventories}/${fusionAgent.inventory_name}\..*"
transformer => "${g.rudder_cp} ${this.promiser} ${g.rudder_inventories}/accepted-nodes-updates",
classes => persistent_class("inventory_sent", "cant_send_inventory", "${min_resend_delay}"),
comment => "Copying the inventory on root server";


# Once we've successfully sent all inventories, remove them
inventory_sent.!cant_send_inventory::
"${g.rudder_inventories}/${fusionAgent.inventory_name}\..*"
Expand Down