Project

General

Profile

Actions

User story #11257

closed

Do not send inventory if a forwarder/uploader daemon exists

Added by Janos Mattyasovszky over 7 years ago. Updated about 7 years ago.

Status:
Released
Priority:
N/A
Category:
System techniques
Target version:
UX impact:
Suggestion strength:
Advise - This would make Rudder significantly better | easier | simpler
User visibility:
Infrequent - complex configurations | third party integrations
Effort required:
Name check:
Fix check:
Regression:

Description

For implementing a custom inventory forwarder/uploader daemon, following code of the policy needs some additional case handling, so it's not run if a file exists (to bedefined):

diff --git a/techniques/system/distributePolicy/1.0/propagatePromises.st b/techniques/system/distributePolicy/1.0/propagatePromises.st
index e266871..28d604f 100644
--- a/techniques/system/distributePolicy/1.0/propagatePromises.st
+++ b/techniques/system/distributePolicy/1.0/propagatePromises.st
@@ -229,20 +229,21 @@ bundle agent sendInventoryToCmdb

   files:
     # Root server and relay-top send to the endpoint, every other send as usual to their policy server
-    root_server|role_rudder_relay_top::
-
-      "${incoming_inventory_files}" 
-        transformer => "${g.rudder_tools}/send-clean.sh ${rudder_inventory_endpoint} ${this.promiser} ${g.rudder_inventories}/received/ ${g.rudder_inventories}/failed/",
-        classes => rudder_common_classes("rudder_inventory_processing"),
-        ifvarclass => "!rudder_inventory_processing_error",
-        comment => "Processing a local inventory";
-
-      "${updates_inventory_files}" 
-        transformer => "${g.rudder_tools}/send-clean.sh ${rudder_inventory_endpoint} ${this.promiser} ${g.rudder_inventories}/received/ ${g.rudder_inventories}/failed/",
-        classes => rudder_common_classes("rudder_inventory_processing"),
-        ifvarclass => "!rudder_inventory_processing_error",
-        comment => "Processing a local inventory";
-
+#### Replaced by daemon
+##    root_server|role_rudder_relay_top::
+##
+##      "${incoming_inventory_files}" 
+##        transformer => "${g.rudder_tools}/send-clean.sh ${rudder_inventory_endpoint} ${this.promiser} ${g.rudder_inventories}/received/ ${g.rudder_inventories}/failed/",
+##        classes => rudder_common_classes("rudder_inventory_processing"),
+##        ifvarclass => "!rudder_inventory_processing_error",
+##        comment => "Processing a local inventory";
+##
+##      "${updates_inventory_files}" 
+##        transformer => "${g.rudder_tools}/send-clean.sh ${rudder_inventory_endpoint} ${this.promiser} ${g.rudder_inventories}/received/ ${g.rudder_inventories}/failed/",
+##        classes => rudder_common_classes("rudder_inventory_processing"),
+##        ifvarclass => "!rudder_inventory_processing_error",
+##        comment => "Processing a local inventory";
+##

Related issues 1 (0 open1 closed)

Related to Rudder - Bug #11648: Unexpected report for Send inventories to CMDB after #11257ReleasedAlexis MoussetActions
Actions

Also available in: Atom PDF