Actions
User story #11257
closedDo not send inventory if a forwarder/uploader daemon exists
Pull Request:
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"; +##
Updated by Nicolas CHARLES over 7 years ago
Hi Janos,
Does it break something to have both the forward/uploader daemon plus the policy to upload promises?
From my understanding, inventories are sent asap by the daemon, so the policy could act as a fallback, unless i'm missing something
Updated by Janos Mattyasovszky over 7 years ago
I have never tried it, but there might be hidden race cases, which I simply did not want to debug if I did not need to..
Alternate solution is a patch to exit 0;
in the second line of /opt/rudder/share/tools/send-clean.sh
:)
Updated by Benoît PECCATTE about 7 years ago
- Status changed from New to In progress
- Assignee set to Benoît PECCATTE
Updated by Benoît PECCATTE about 7 years ago
- Status changed from In progress to Pending technical review
- Assignee changed from Benoît PECCATTE to Alexis Mousset
- Pull Request set to https://github.com/Normation/rudder-techniques/pull/1211
Updated by Benoît PECCATTE about 7 years ago
- Status changed from Pending technical review to Pending release
Applied in changeset rudder-techniques|fdc31cf2bed9b3585a6a4ea286bb790c5d08f47c.
Updated by Janos Mattyasovszky about 7 years ago
- Related to Bug #11648: Unexpected report for Send inventories to CMDB after #11257 added
Updated by Vincent MEMBRÉ about 7 years ago
- Status changed from Pending release to Released
Actions